Where do UNIX manpages come from? Who introduced the section-based layout of NAME, SYNOPSIS, and so on? And for manpage authors: where were those economical two- and three-letter instructions developed?

The many accounts available on the Internet lack citations and are at times inconsistent. In this article, I reconstruct the history of the UNIX manpage based on source code, manuals, and first-hand accounts.

Special thanks to Paul Pierce for his CTSS source archive; Bernard Nivelet for the Multics Internet Server; the UNIX Heritage Society for their research UNIX source reconstruction; Gunnar Ritter for the Heirloom Project sources; Alcatel-Lucent Bell Labs for the Plan 9 sources; BitSavers for their historical archive; and last but not least, Rudd Canaday, James Clarke, Brian Kernighan, Douglas McIlroy, Nils-Peter Nelson, Jerome Saltzer, Henry Spencer, Ken Thompson, and Tom Van Vleck for their valuable contributions.

Please see the Copyright section if you plan on reproducing parts of this work.

The compose utility, né runoff, was a port of RUNOFF to PL/1 by Capps for the Multics Honeywell 6180. It was later tuned and improved by Ed Wallman. Tom Van Vleck, Wallman's manager in mid-1978, recounts the porting effort to produce photo-typeset manuals and eliminate dependence on BCPL . (Note: the primary source erroneously refers to Ossanna as writing the BCPL runoff; it was in fact McIlroy .)

McIlroy 's port is at times referred to as runoff, at times as roff. The reason for renaming is not entirely clear: I see that I called it runoff in 1969. By 1971 it was roff. Now I'm not so sure I got the name from Morris . Conceivably it came from Thompson , who was big on shortening names. My 1971 description came in January; the first ediion [sic] Unix manual is dated December 1971.

The first ROFF for Multics was written in March, 1969, by Doug McIlroy of Bell Labs. Art Evans made extensive modifications to it in May and June, 1969, adding many comments and making various changes. Footnoting added by Dennis Capps in 1970. Maintained by Harwell Thrasher in 1971. Many new features added and bugs fixed by R Mabee in 1971-1972. RUNOFF and BCPL were brought over to the 6180 Multics (from 645) in May of 1973 by R F Mabee.

In 1969, McIlroy released an influential BCPL port of RUNOFF to extend the runoff model to the GECOS GE-645 computer at AT&T Bell Labs, Murray Hill. He did not refer to the CTSS RUNOFF source code in writing runoff, nor any other speculated derivatives of Saltzer 's utility. The progress of this utility subsequent 1969 is recorded in the Multics BCPL source as ported by R. F. Mabee:

Source code for the original re-write of RUNOFF could not be located, although a considerable amount of documentation exists for this utility. The dates of Madnick 's porting derive from his publication and independent accounts.

Thus the backspace key allows underscoring and overprinting at the terminal for SCRIPT files. The logical backspace character prints only when entered and does not take up a column in the record; it logically backspaces one column...

In 1967, Madnick ported the RUNOFF code to the IBM CP67/CMS at IBM as SCRIPT. The documentation of SCRIPT explicitly mentions the backspace-encoding convention used to this day by manpage formatters on UNIX terminals (of course, this was common practise in mechanical type-writers before then):

Little is known about this speculated port of RUNOFF , only that it was called roff and probably ran on Bell Labs' GCOS -II GE-635. Ritchie is commonly cited as participating in this port, and this is not disputed. Canaday is also mentioned as an author, though this is not the case by his own account. Both McIlroy and Saltzer speculate that this version, if written, was likely in BCPL , much like runoff .

While working at AT&T Bell Labs' Whippany centre, Canaday led a porting effort of the CTSS at MIT to the GE-635 (in 635 assembly). The RUNOFF utility is suspected to be part of this port. The ported CTSS was originally intended as a prototype (to be replaced by Nike hardware), but ended up being used for five more years. No sources could be located for this CTSS port.

Of the many abbreviated RUNOFF control words, macros such as sp and br are still common-place. According to Saltzer and the source literature, the syntax of RUNOFF inherits loosely from the prior DITTO, MEMO, and MODIFY utilities by M. J. Leslie Lowry, Fernando J. Corbató, and J. Richard Steinberg, 1963. The original purpose of RUNOFF was to format Saltzer 's doctoral thesis proposal.

Input generally consists of English text, 36O or fewer characters to a line. Control words must begin a new line, and they begin with a period so that they may be distinguished from other text. RUNOFF does not print the control words.

Saltzer wrote the RUNOFF utility for MIT 's IBM 7094 CTSS operating system in the MAD computer language. Its legacy is considerable: not only do contemporary manpages inherit from RUNOFF, many of them, in fact, use instructions identical to those specified in the original RUNOFF manual.

1969: roff (Brian Kernighan)

1970: rf (Ken Thompson)

Thompson wrote a PDP-7 port of either the BCPL runoff or directly from the CTSS RUNOFF. This fork was an evolutionary dead-end, replaced by the PDP-11 roff(1) which was written at around the same time. The source code for this port has long since been lost. Sources: Ken Thompson, UNIX manpages & questions regarding roff(1) history. 23 October, 2011. Email to Kristaps Dzonsons.

The Plan 9 operating system, initially released in 1991 from AT&T Bell Labs, Murray Hill, is a research system extending the UNIX model. It included ditroff(1), which was steadily improved by Kernighan to include features such as UTF encoding. The troff(1) for Plan 9 was not free software until the Third Edition in June, 2000, when sources were licensed under the Plan 9 license. It was again re-licenced in 2002 under the Lucent Public Licence 1.02. Sources: Joseph F. Ossanna and Brian W. Kernighan, Troff User's Manual , Second Edition.

, Second Edition. Plan 9 from Bell Labs source listings, hosted by Plan 9 from Bell Labs.