Macro sets written by groff users

Last-Updated: 2021-10-05

Sources

Utmac by Pierre-Jean Fichet

The U troff macros (pjfichet/utmac) — utmac — is a set of macros aiming to produce beautiful documents easily. Bibliography, indexes, table of content and summaries can be automatically inserted. Utmac informs about orphans, widows and empty lines at the bottom of a page. It can produce PDF files, ReStructuredText files, plain text files, and clean XML files — and so, with some XLS stylesheet, flat open document texts (FODT) and HTML files.

Mk by John Ankarström

Mk (john/mk) is a simple, modern and highly flexible macro package that provides useful macros for advanced documents, while abstracting as little as possible from troff itself.

Unlike other macro packages, mk has no special registers or strings. It uses standard troff requests to control settings like font family, point size and vertical spacing, which are saved in environments instead of registers. As such, mk is a great macro package for learning troff. Beginners will only need to learn one way to do each thing, and it will be the standard troff way.

Mono by John Gardner

Mono (Alhadis/mono) is a featureful macro set with macros for font choice, lists, hyperlinks, PDF tools for menus, tables of contents, etc. The code is short, clear and concise with helpful comments.

A fair warning from John Gardner himself (2021-08/msg00106):

When copy+pasting from the macro package, be aware that many internal registers and strings use names containing ASCII control characters, which mightn't be visible in your browser/editor. Specifically, ^B, ^C, ^E, ^F, ^G, ^?.