Macro sets for whole documents

Last-Updated: 2022-06-02


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.

Be aware that Utmac uses Neatroff as its default troff processor, however Groff is used to produce plain text files since Neatroff does not include a nroff implementation.

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, ^?.

Mb by Lucas de Sena

Mb (phillbush/catb-mb) is useful to format books. This macro package has been written with Heirloom Troff in mind and you can see The Cathedral and the Bazaar, by Eric S. Raymond formated with Mb (mb/catb.pdf).

← Go back