fonts Building the -me macros

Learn about the history of the troff -me macro package to prepare technical papers.

The original Unix nroff and troff document preparation systems were significant milestones in technical writing. These tools allowed technical writers in the 1970s to create complex documents such as papers and books in a time before the desktop word processor.

I first used GNU groff in the 1990s to write papers for my undergraduate classes, and my favorite macro package was the –me macros, created by Eric Allman. I asked Allman about the history of the –me macro package.

1. Let's start with an introduction.

I am Eric Allman, and I was a student at the University of California, Berkeley, starting in the 1970s. I was fortunate enough to be hired to a research project working on the INGRES Relational Database Management System while still an undergraduate. The INGRES project was based on Unix, which was pretty new at the time.

We were initially using Unix 5th Edition. This version was quite crude compared to current versions of Unix or Linux. Because the system was so basic, it was common practice to make local updates to the system code and to share with others, either privately or at conferences such as USENIX.

The other stroke of luck was that I was at Berkeley at the same time as some very gifted students who were producing system updates and new tools. For example, Kirk McKusick wrote the Pascal interpreter and later the filesystem, Özalp Babaoğlu wrote an early version of the virtual memory system for the VAX, and many others. But the main character was Bill Joy, who besides writing the C Shell, the vi editor, and countless other things both large and small, collected these things together into the Berkeley Software Distributions. Bill also either wrote or coordinated most of the kernel changes over the years.

I was one of those contributors. Most of my work was small stuff (for example, the tset program), but I'm best known for syslog and sendmail. But that's another story. One of my projects was the –me macro package.

2. How did you start working on the –me macros?

Berkeley somehow got the nroff/troff system (which I'll just call "*roff" meaning nroff, troff, ditroff, groff, etc. that use the same markup language) from Bell Labs, but it didn't come with any macro packages. nroff (for fixed-width text) and troff (for typeset text) were essentially an assembly language for text processing, very difficult to use without macros to turn it into something useful for most users.

For example, *roff had the concept of "diversions" which allowed you to collect together text but move it to a different place on the page, but what people really wanted were things like footnotes. So I took it upon myself to produce a macro package, initially for my own use—but as was traditional at Berkeley, it quickly got shared with others. At some point –me went onto the BSD tape, which gave it greater reach.

The –me macro package was initially for my private use, and was in fact at first called –meric. But when it started to be shared with people who weren't with the INGRES project, I shortened the name and redubbed it to mean "extended."

3. How long did it take to create the –me macros?

Before nroff and troff, there was a program called roff (based on RUNOFF in Multics) which only did fixed-width text, only had basic formatting (for example, no footnotes), and only had very crude macros—if indeed it had macros at all. I'm afraid I don't recall for sure. In fact, "nroff" stands for "new roff."

I used roff, as did most folks in the EECS department. And when nroff came along (troff was later) I wanted to use some of the new features, so creating a macro package seemed like the obvious thing to do.

Like so many things at the time, this project was never "finished"—after I released one version, it was inevitable that I would get asked to add another feature, such as the very popular .th command, which set all of the parameters to produce output that was acceptable for a PhD thesis.

I suspect the first version was pretty quick, maybe a couple of weeks if you include the time spent trying to understand the language, but I think I was probably working on it off and on for well over a year. In fact, in looking over the old SCCS files, it looks like the first release was in September 1978 (I would have started before that) and I was still making minor changes in December 1981.

4. What's the process to write a macro package?

The first step, of course, is to try to understand the language. The original manual is a miracle of brevity: everything is documented in detail, but without any clues as to why you would want to use thus-and-such a feature. I probably read the manual cover to cover fifty times, and at most readings a light bulb would go off—"Ah ha! That's why that command works the way it does." I think I finally decided that every single feature did something that was needed, but there are no features that overlap—it is definitely not a system where "there's more than one way to do it" was a design goal. Put another way, everything is both necessary and sufficient.

The next step is to build basic things: paragraphs, sections, etc. Things like footnotes and floating figures would have come later after I wrapped my head around diversions. Unfortunately the SCCS files I have don't go back far enough to say for sure.

5. What kinds of documents did you write with –me? Technical documentation? Class papers? MS or PhD thesis? Memos? Books?

Yes, yes, yes, yes, and yes. Books probably would require some tweaking to get things like elimination of widows (single lines ending a paragraph at the top of a page) and orphans (single lines beginning a paragraph at the bottom of a page)—that's one thing that I never included.

I've already alluded to things like PhD theses, but also conference papers, user guides and manuals, pretty much anything that is text-based. The best tools are used for more than the creator expected.

5. Do you still write documents with –me? What other tools do you use for your digital writing?

Rarely. The world has moved on from *roff—some distributions don't even install anything from the *roff family by default. In academia (or at least my corner of it) the standard is LaTeX—some conferences insist on that format for all submissions.

Personally, most of the time these days I'm using some variant of Markdown, which seems to be the preference for online documentation these days, with the exception of man pages, which of course are formatted with either –man or –mandoc. For some small things, I use WYSIWYG options like LibreOffice, especially if multimedia (usually photos, but sometimes audio or video) is needed.


Thanks to Eric Allman for this insightful and interesting interview about the –me macros! I loved learning about the history of the macro package and how they started.