Reflections on gnu troff (groff)

I’m convinced that groff is one of the most useful tools in the GNU/Linux toolkit. As more and more of the world moves over to free software solutions, particularly those parts of the world where spanking new, honkin’ big muscle boxes are rarer than hen’s teeth, I believe groff, with its extremely modest system requirements, is the ideal solution for professional typesetting and document formatting. (For whatever it’s worth, mom came to life on an ancient 386.)

It does remain true, though, that groff’s ├╝ber-geekiness tends to scare off new users. That’s why mom came into being. As a typographer and a writer, I needed to use groff while wearing both hats, easily and intuitively. I started out with a little library of routines that grew and grew until I had a full-fledged macro set that performed precise typesetting and document formatting beautifully.

When I released mom, I hoped her simplicity would encourage a more widespread use of groff, and, to judge from the comments I’ve subsequently received, this is happening.


Groff and mom vs TEX and LATEX

One of the more noticeable differences between groff and TEX is size. Even a minimal TEX installation is huge compared to groff. Another important difference is in the matter of managing fonts. With groff, adding new fonts is relatively easy. Adding fonts in TEX can be quite complex.

Still, many people believe that TEX’s size and complexity are warranted because TEX produces typesetting of a quality superior to groff. While that may have been true in some distant past, it is simply not the case now. As a typesetting engine, groff is superb.

TEX remains, however, the typesetting system par excellence for scientific and mathematical papers. Furthermore, it has for many years had the famous macro set, LATEX, which puts the production of beautifully typeset documents within the reach of tekkies and non-tekkies alike.

The closest equivalents to LATEX in groff have been the ms and me macro sets, but those have never been easy to master. The two-letter commands are hard to remember, and altering their default behaviour usually involves knowing a fair bit about groff itself.

Mom is the first groff macro set that can be said to compare favourably to LATEX. Some have even called it a mini-LATEX. A few have even found it preferable. Mom’s commands are simple, mostly literal, clear and intuitive—much like LATEX. Furthermore, mom is divided into two parts that inter-operate beautifully: typesetting macros (for the professional manipulation of virtually all elements of type) and document processing macros (for the automatic, mostly non-user-interventive generation of splendidly formatted documents).

Mom, then, finally puts typesetting and document processing with groff within the reach of everyone, not just experts. If you write scientific or mathematical papers, you may still prefer TEX (although groff is quite capable of creating tables, charts, diagrams and equations). But if your needs run to business correspondence, formatting papers and reports, creating short-story manuscripts to send to publishers or even typesetting whole novels in book form at book-level quality, groff with mom may turn out to be the document processing godsend you’ve been looking for.