Mk, a simple macro package for troff

Last updated on Sun Jul 4 21:10:46 CEST 2021.

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.

Mk is tested with GNU troff and Heirloom troff. It should also support Neatroff. In its current implementation, it requires a troff implementation with support for long identifiers and more than three environments.

To get started with mk, download the latest version, edit the Makefile and run make install.

User guide
Developer guide
Git repository
Download latest version

The mk distribution also includes the toc and list utilities, which are used to generate tables of contents and automatically escape code listings.

If you have any questions about mk, feel free to contact me via e-mail on john at


Here is an outline of a basic mk document:

Document title
.d e \" current date
First heading
This is a paragraph.
Indented quotation.
Second heading, with
.x "bold italic"
This is a paragraph with a footnote\c
This is a footnote.
.) .

A screenshot of the results is included near the top of this page.