He wrote two novellas in groff, and the second took ten days

Novellas with Groff

After discovering a love of fiction, this author wrote two novellas and typeset them with groff, the typesetting system behind Linux man pages. The first, about 50 A5 pages, took over seven months; the second, 120 pages, took just ten days. The post walks through a tiny custom macro package, page-number traps, German hyphenation, and a Vim setup, showing groff can produce book-quality PDFs in under two seconds.

In school, anything related to writing was pure horror for me -- unless it was related to maths, physics, or other technical stuff. But here we are.
  1. tmoertel

    I think it’s fascinating to see all the different ways that techfolk who write fiction set up their writing pipelines. Some people go with a bare-bones coding editor like Vim; others use “pro” tools Scrivener. And then there’s the typesetting pipeline. Using troff is pretty out there.

    When I started writing fiction, here’s what I came up with. I write in Google Docs because it’s lightweight, works everywhere, and can easily export to Markdown format. From there, I manage the Markdown source in Git and Emacs. For typesetting—I cannot abide crappy word-processor output—I used to use Pandoc to generate LaTeX markup and run LuaLaTeX to produce PDFs. But that took several seconds. Now, I use Typst to go straight from Markdown to PDF files. It’s pretty much instant.

    If you want to see what the output looks like, here’s the first chapter of my current project:

    https://drive.google.com/file/d/1Wl4k_rdYGFZp-r5nq864r5CNzD1...

    (Notice: This is a typesetting sample, not a writing sample. It’s my W40k-adjacent fanfic, so you have been warned.)

    It’s set in 12pt Erewhon, which is an enhanced version of Andrey V. Panov’s Heuristica font family, which extends Robert Slimbach’s Utopia font family. Slimbach is a sublime type designer—he created Minion—and Utopia is one of his early works that is especially spirited.

  2. dofm

    I typeset some university work in troff in 1994. The professor I submitted it to was impressed but questioned my sanity in front of half of the class. Not wrong to do so.

    Might still have the source code to that work somewhere. And it probably still parses.

    Can't remember why I did it but on reflection it might simply have been that LaTeX was not going to fit on my extremely space-constrained Linux machine but troff was already there.

    ETA: this sentence made me chuckle. "It's much easier to read without the inline comments:" Oh yes, much ;-)

  3. tosti

    Whoah, wait, author uses groff without ms?! Even wrote his own macro package. Neat!

  4. fweimer

    O'Reilly used to typeset their books using troff/groff: http://www.lemis.com/grog/Documentation/PUS/tmac.Gbignuts.G (“O'Reilly & Associates book macros by Steve Talbott, Lenny Muellner”)

  5. staplung

    For those that don't know, groff's ancestor "roff" is very closely tied to UNIX's origin story. roff itself had it's own antecedent called RUNOFF (whence the name) on Multics. roff was basically UNIX's first "killer app" and was used to typeset patent applications by the division of Bell Labs that handled that sort of thing. It legitimized the further development of UNIX.

    Groff seems to be somewhat supplanted by mandoc these days, at least on the BSDs.

More from this day

2026-11-01