the-journey Your favorite articles about groff in 2023

Learn about everyone's favorite Unix text formatter and document preparation system in these how-to articles and interviews.

Technical writers have used computers to format text for as long as computers could print text to a typewriter-like device. An early and perennial favorite text formatter and document preparation system is roff, later renewed as "new roff" or nroff in early Unix systems. Later, Unix added troff to support typesetters. And in the 1990s, GNU created a compatible roff system called groff.

Your favorite articles

Earlier this year, we shared a few articles about nroff and troff, as implemented by groff. These articles proved so popular with our readers that we added many more articles and interviews about this enduring document preparation system. Here are several articles you found most popular:

1. A look back: Technical writing with nroff and troff

Take a trip back in time to learn about technical writing with nroff and troff from the original Unix system. This article explores a bit of history before providing a few simple examples of writing documents with nroff and troff, using the GNU groff implementation.

2. Nroff by example: The basics

This shows the basics of how to use nroff to format text documents. Nroff documents are always plain text, and use special commands or requests to do certain things on the page. Requests appear on their own lines in the nroff file, and begin with a period followed by one or more letters. Start with this sample to explore how nroff formats documents for typewriter-like printers. 

3. Groff by example: equations with eqn

In 1975, Lorinda Cherry and Brian Kernighan introduced the eqn preprocessor which recognizes special instructions to format math and equations within documents. The eqn program is implemented as geqn in GNU groff, but is available on most systems as just eqn. This article demonstrates how to format several equations using eqn.

4. Tables with groff tbl

To add tables to printed documents, troff added the tbl pre-processor program, included in Unix 6th Edition. This program interprets a troff document, specifically any instructions between the .TS and .TE requests, and generates formatting instructions that troff can use to draw a table. Using the tbl pre-processor with groff, you can create sophisticated tables with a variety of styles.

Learn from the experts

We also interviewed several experts about writing technical documentation using the original nroff and troff, and about using the newer GNU groff implementation. These were the most popular interviews with our readers:

1. Technical writing with GNU groff

We asked Brian Kernighan about the history of nroff and troff, and how technical writers can explore these tools today. You may recognize Brian Kernighan's name. He is the "K" in Awk, the "K" in "K&R C" (he co-wrote the original "Kernighan and Ritchie" book about the C programming language), and he has authored and co-authored many books about Unix, programming, and technology. These were all written in troff or groff.

2. Modern groff macros with Mom

The Mom macros provide a modern way to write technical documentation in groff. Peter Schaffter created a new macro system for groff. The Mom macros are becoming more popular for creating modern documentation. We asked Peter about how he created the Mom macros and what they do. Learn more in this interview with its developer. For more, read Peter's article about an introduction to groff Mom.

3. GNU groff: Powerful document formatting in a small package

In the late 1980s, the GNU Project started work on groff, the GNU version of roff. Thirty years later, groff can generate output in a variety of formats, including HTML, Postscript, and PDF. I interviewed G. Branden Robinson from the GNU groff project about the latest developments in groff. Learn about groff's history and development in this interview with one of its developers.

4. Modern troff with GNU groff

Earlier this year, GNU released groff version 1.23.0. To celebrate the new release, I asked developer Deri James about his work on the groff system.

Thanks to everyone for their insightful interviews about working with and on groff. You can find more history about groff at Background (The GNU Troff Manual). An updated and more extensive history of roff is also in the roff(7) man page, available by typing man 7 roff. If you don't have the system “man” pages, skip ahead to page 372 in the collected man pages document (PDF). Download the new groff 1.23.0 from the GNU roff (groff) website.