Most Unix users at some point have read manual pages
(manpages) by typing man ls on the command line and
getting a concise explanation of the component's usage.
This article delves into the history of the manpage tools
and formats: where do they come from, and why?
This article reconstructs the history of the Unix manpages
based on source code, manuals, and first-hand accounts.
The Unix manpage system was the first system to
allow full in-system documentation of its own
utilities and interfaces.
This came as a result of three factors: writing the UNIX
Programmer's Manual in the
roff language, providing
in-system formatters for this language into both
terminal and print media, and
organising the manual into logical sections for easy
querying and display.
How did this all come about?
This history begins with an
introduction of how the concept of
manpages was influenced by systems pre-dating Unix. It's
then divided into three parts describing each part of the
manpage system: the language used
to author manpages; the formatter
used to convert manpages to what's paged to the screen;
and the tools used to index, view,
and otherwise locate and display manpages.
Some major milestones are in the following table, along
with the software license: AT&T for commercial
AT&T, BSD for BSD (or MIT) license, GNU for GPL, and
PD for public domain.
Throughout, Unix components are referenced in the manpage
convention. For instance, man(1) refers to
the man component in section 1. The section
groups components: 1, 6, and 8 for programs; 2 and 3 for
programming; and 7 for miscellanea. The term Unix
is used for Unix systems as a whole, while UNIX is
reserved for AT&T UNIX specifically.
This is not a general Unix history site.
Many people and organisations have done that broader work
far more rigorously. This is just the tiniest part of the
story!
At the time, they weren't individual pages,
but simply sections of a larger document.
The ability to bring up specific pages from the
UNIX Programmer's Manual arrived with
man(1) in Version 2
AT&T UNIX. In fact, the term manual
pages would only appear ten years later
in 4.1BSD.
The concept of a manual describing all aspects of
an operating system was by no means a new one.
This was a precedent set long before Unix came to
be. For the most part, these manuals contained
hand-written (or otherwise hand-transcribed)
documents bound in book format.
Of course the Labs had always provided
manuals for its operating systems: L1 for
the IBM 650, then several iterations of
BESYS for the IBM 700/7000 series. For
BESYS the manual took the form of a
loose-leaf binder containing a collection
of documents: system API, hardware manual,
assembler manual, etc. Each was written in
its own style.
A major influence on the first Unix manpages (and
Unix itself, in many ways) was
Multics.
Multics was a sprawling research system starting
around 1964 and co-existing with Unix after its
inception in 1971. In fact, the origin
story of Unix is directly related to how Bell
Labs (the company that originated Unix) pulled
funding for Multics in 1969, resulting in some of
its developers transferring to what would become
Unix.
Multics was bundled with the MSPM
(Multics System Programmer's Manual), a
sprawling 3000+ page document, which led to issues
in distribution and maintenance.
As sections were produced, they were
distributed to every member of the project
team. The MSPM occupied ten or twelve
four-inch three-ring binders, more than
one shelf of a standard office bookcase.
Just keeping up with filing the updates
took substantial time. As a result, each
person's copy of the MSPM may have some
variations.
The Version 1 AT&T UNIX Programmer's Manual
continued this practice from the outset, but
differed in being written in the language that
(arguably) was one of the reasons for Unix
existing in the first place: the type-setting
language roff.
This manual was prepared using the UNIX
text editor ed
and the formatting program
roff.
Beyond documenting the tools available to
programmers, the UNIX Programmer's Manual lays out
in simple terms the syntax and layout of its own
contents that has persisted to this day. Dennis
Ritchie is attributed as developing the formatting
of the document, with Doug McIlroy and Ken
Thompson laying out the document as a whole.
Each section consists of a number of
independent entries of a page or so each.
The name of the entry is in the upper
right corner of its pages, its preparation
date in the upper left. Entries within
each section are alphabetized. It was
thought better to avoid page numbers,
since it is hoped that the manual will be
updated frequently.
The concept of sections may seem trivial, but they
would be massively important in what came in
Version 2 AT&T UNIX. By combining the
section-based layout with being written in a
language recognised with
nroff(1), the entire manual
could be viewed in-system. Ken Thompson's
man(1) brought all
of these together.
i did the start of the man pages and set
up the title/synopsis/... stuff. the
loose prototype for the man pages was the
multics man (MSPM). the mspm was much
wordier and less structured, but many
sections had similar headings.
The Unix Programmer's manual took these concepts
and blended them into a highly-structured, concise
document. Unlike previous manuals like the MSPM
and CTSS Programmer's Guide, the Unix Programmer's
Manual focussed on the in-system tools and less on
the general structure of the operating system.
This subtle change came from the technical
abstraction of user-land from kernel. It also
made the concept of an in-system documentation
more relevant, as users would be using a system in
which they were developing.
[The] first real application of the file
system that became Unix was a text
processing system. And this was kind of
the merging of file system work and work
that folks had been interested in for a
long time, text processing.
This language became an instrumental part of Unix
from the start, and thus manpages. In fact, the
languages used to this day are the same as those
used in 1971 with the Version 1 AT&T UNIX
Programmer's Manual.
This section is a little unbalanced because the
man(7), mdoc(7), and pre-man languages are all
technically macro files for roff(7), while roff(7)
is defined by its
formatter.
Thus, the macros may be (and were) re-written
independently of the main language.
Language: 1971: roff
Although no sources remain, it stands to
reason that
Version 1 AT&T UNIX had
its printed manual written entirely in the roff language
itself. The same language is used for
Version 2 and
Version 3, although these both
had their manual queryable using the
fledgeling man(1) shell-script. Only the
Version 3 AT&T UNIX Programmer's
Manual has its source available, and is in
roff.
is a shell command file that will locate
and run off a particular section of this
manual.
In this snippet, the underscore is an
after-affect of the backspace-encoding
used to render underlining. This uses the
syntax of a letter, followed by a
backspace character, followed by an
underscore. The same syntax is used for
bold characters.
In Version 4 AT&T Unix, the manuals
begin using a set of pre-defined macros
instead of pure roff. These macros took
common idioms and formalised them as
simple purpose-built macros. This set of
roff macros is technically the first
manpage language. For example:
It's not known whether Dennis Ritchie or
Ken Thompson wrote these macros, although
Ken was the owner of the man(1) script
itself.
Both nroff(1) and troff(1) modes were
supported. The macros themselves are
defined within the same directories as the
manuals: it stands to reason that the
man(1) script would source those macro
files directly. However, no sources
remain from this early version of the
system.
I did a major revision of the
man-page macros for v7. Every
macro name was in caps, a custom
pioneered by -ms. The
alternating-font macros, e.g. .BR,
were a generalization of the
font-change macros in -ms, that
brought to light (and to intuitive
order) the second and third
arguments of .B. The
indented-paragraph macros, .HP,
.TF, etc., filled a lacuna in the
historic -man, where the
ubiquitous tagged indented
paragraphs had to be handled on a
case-by-case basis.
This combined the previous lower-case
macros with the syntax adopted by ms(7),
which was using uppercase, to produce the
macros used to even this day.
The man(7) macro endured for well over ten
years until
Cynthia Livingston,
then at CSRG, wrote a new macro package
specifically for manpages called mdoc(7).
Unlike man(7), mdoc(7) was designed for
semantic annotation.
Markup languages were beginning to
appear and be debated at that time
and apple had a hypertext attempt.
The markup stuff looked to be a
disaster, highly dependent on each
person who input the markup. This
led me to develop an abbreviated
type of markup by determining the
context rather than the
formatting. CSRG tolerated my
stuff banging on their systems. I
wanted to fully implement
everything in groff as it would
have been easier and faster than
troff, but Mike Karels did not
want that. He wanted it ditroff
compatible.
mdoc(7) was released with 4.3BSD-Reno,
although the re-writing of the manpages
released with the BSD operating systems
took several more releases, culminating
with 4.4BSD-Lite Release 2, which was the
last BSD released by CSRG.
This style of macros persists until this day, and is used
predominantly in BSD-derived Unix systems (OpenBSD,
FreeBSD, NetBSD), and Mac OS.
Despite James Clarke
having written groff(1) contemporaneously
with mdoc(7)'s release, it was ten years
later that
Werner Lemberg
re-implemented the mdoc(7) macros for
groff.
There are quite a few tools in the manpage
ecosystem, foremost of them
man(1),
but also
apropos(1),
whatis(1),
and so on. All of these tools are common-place
now: where and when did they arise?
It's important to remember, in considering these
tools, the revolutionary change in being able to
access manuals from within the system they
documented. Not only did this considerably
simplify the dissemination of documentation (as
part of the system itself, instead of alongside in
printed books), but the tooling to access this
documentation was all brand new.
Beyond the usual command-line tools, this section
also contains the tools used for web and graphical
rendering.
Tools: 1972: man(1)
The predominant method of accessing
documentation, either as reading a printed
version of paging through the full system
in the terminal, changed with the Version
2 AT&T UNIX, 1972, which featured a
little shell script called
man(1).
The source code has
been lost, but the UNIX Programmer's
Manual from this edition says the
following:
man is a shell command
file that will locate and
run off a particular
section of this manual...
Prior to this, the Version 1 AT&T UNIX
could only be viewed as a printed
document; however, man leveraged
nroff (also a new
addition to Version 2 AT&T UNIX)
for actually rendering the manpages.
The first source code for this script
appears only in Version 7 AT&T UNIX,
owned by
Ken Thompson.
The first C language man source code was
written by
Bill Joy for the
University of California Berkeley (UCB),
1BSD, 1977. Although nominally for a BSD
system, this was before re-licensing, so
this version was still considered
encumbered by the AT&T
ownership.
* Man is an intelligent man command which obviates the need to know
* section numbers in the manual. Also if the standard output is a teletype and
* the option - is not given we pipe through "ssp" to eliminate piled
* up blank lines.
*/
1BSD similarly featured
manwhere.c,
which allowed the operator to search for
sections in which a named manual were
listed. In 2BSD, 1979, this was split as
whatis.c
and
apropos.c,
both of which drew from
makewhatis.sh,
which generated their database.
Presumably, Bill Joy wrote all of these
utilities. Unfortunately, no source code
history remains: only snapshots. Thus,
the record isn't clear on the actual
authors of makewhatis(8) and apropos(1).
I concur with your guesses above.
We had no source control until
SCCS showed up in 1980 and the
project began using it (three
years after Bill Joy began his
initial Berkeley UNIX
development). Initially only the
kernel was put under SCCS, but by
1983 everything had been put under
SCCS.
Following the license kerfuffle, man and
its constellation of tools (apropos,
whatis, makewhatis) were all re-written by
Keith Bostic with a new BSD license,
released in BSD Networking Release 2
(Net/2), 1991.
Keith lead the effort to get
redistributable versions of the
AT&T libraries and utilities.
He would get up at the Usenix
Birds-of-a-Feather session at
which we were talking about the
latest things happening in BSD and
put up a list of the utilities and
library functions that we needed
to have rewritten. He would ask
folks to contribute to the effort
by writing new implementations
from scratch that could be freely
redistributed. Most of the
contributions required that he
seriously rewrite them to make
them usable.
Unix as you know has this large
shared online manual all written
in troff... The output isn't very
complicated so it occurred to me I
could translate for example
change to bold font to the
appropriate X10 call, etc, etc.
This effort led to its further work for
X11R3 by
Chris Peterson
for the Athena project.
This program was written, for two
princpal [sic] reasons, the first
is to create a "real" application
that tests the features of the
Xtk, written by someone, who is
not intimatly familiar with the
guts of Xtk. Unfortunatly for you
all, I have become quite versed in
the guts of the Athena widget set
and the toolkit intrinsics, so I
am not really just a tookit
applications programmer anymore.
This means that some of the things
I did may not make sense to you
from just reading the
documentation.
The first GNU-licensed implementation (but
not part of GNU) of man(1) was by
John Eaton, written
circa 1990, and included apropos and
whatis implementations. No source code
has been found for the original
implementation, but subsequent versions
(e.g., 1.4) can be found.
[...] I remember that [the man
programs] did not all allow for
local man pages to be installed,
or to set the search order for
separate directory trees
containing man pages. I wanted
consistency in behavior across all
the systems and I wanted the man
program to be able to find the man
pages corresponding to the
programs I had installed locally.
John stopped releasing in August 1991
(version 1.1), but the GNU-licensed
software was continued by quite a few
developers, but was forked into
mandb in
1994.
The first known CGI script for manpages
was written by
Tony Sanders in
1993 for Berkely Software Design, Inc.
(BSDi). It was then called bsdi-man.pl
(man.cgi is used in the title to
prevent confusion, as many immediate
descendents used the man.cgi name).
This tool served apropos and man queries.
It was designed to work within the
Plexus server, one
of the original web servers and written
entirely in Perl.
Most of the original CGI scripts for
manpages descended from this piece of
software, notably the man.cgi written by
Wolfram Schneider, which was commonly used
until mandoc's
man.cgi in 2012.
Unlike many other tools in this history,
bsdi-man.pl was released entirely in the
Public Domain.
rman, or PolyglotMan or RosettaMan, was an
interesting project started in 1993 by
Thomas Phelps. It
was designed to convert from various types
of manpages into various types of outputs.
It was under the
Artistic License.
PolyglotMan takes man pages from
most of the popular flavors of
UNIX and transforms them into any
of a number of text source
formats. In contrast various
man2html filters, which
essentially translate bold and
italic text and otherwise wrap the
entire manual page in PRE tags,
PolyglotMan tries to interpret the
page and produce good HTML text
that can be reflowed.
This tool would be used within both
tkman
and
kdehelp,
and likely many others.
Inspired by
xman,
Phelps wrote a
Tk-based graphical manpage viewer in 1994,
with a prototype listed as complete as
early as 1993. It was under the
Artistic License.
TkMan is a graphical, hypertext
manual page and Texinfo browser
for UNIX. TkMan boasts hypertext
links, unmatched online text
formatting and display quality,
(optional) outline view of man
pages [...] full text search among
man pages and Texinfo, incremental
and regular expression search
within pages, [...] and man page
versioning support, among many
other features.
This tool also had the benefit of
integrating with texinfo, which was
another predominant documentation system
developed for GNU. It's still available
on modern Unix systems to this day.
John Eaton's GNU-licensed software was
forked into a completely different
software system called man-db in 1994 by
Graeme Wilf Wilford.
This was the result of significant effort
after a series of forks and discontinued
branches, all with different features.
Wilf took over the further
development of the man package and
released man-2.0a2. After this a
small group of people sent in
patches and Jul 1994 suggestions
resulting in man_db-2.1.
Unlike the existing man implementations,
this software moved the goalposts yet
again by using a database-backed system
for querying manpages. Wilf's work was
picked up again by Fabrizio Polacco, and
developed until being helmed by Colin
Watson in 2001.
Colin's man-db implementation continues to
be used until this day, predominantly as
pair with
groff.
For a help system HTML 2.0 is more
than enough, some nice search
function added and that's it.
Since it is also possible to
convert the obsolete troff
man-pages to HTML, we can also
integrate the original UNIX help
system.
The manpage system was released in at
least version 0.2., and attached to Martin
Jones in 1995.
The
mandoc
tool had already existed for quite some
time, as had its apropos and whatis tools
since 2011; but
Ingo Schwarze
integrated these tool into a single
binary. This was part of OpenBSD
originally; which, like NetBSD upon which
it was based, was previously using
Bostic's implementation.
Add an implementation of man(1)
into the /usr/bin/mandoc binary
and provide a unified set of
command line options for
mandoc(1), man(1), apropos(1), and
whatis(1), each option doing the
same for all four. Not adding any
completely new options, only
extending exiting ones from one
tool to the others.
A re-write of the man.cgi tool based on
mandoc would also appear roughly around
the same time, specifically in 2011.
The development of UNIX manpages can be divided into the
Prehistory, before UNIX; the
Classical Age, during the
development of UNIX; and the
Renaissance, where traditional
UNIX utilities were re-written. In this chart, I show all
known formatters of manpages (and their logical precursors
before manpages existed as such).
Formatter: 1964: RUNOFF
Jerome 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.
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.
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.
While working at AT&T Bell Labs'
Whippany centre,
Rudd 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.
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.
In 1967,
Stuart 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):
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...
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.
In 1969,
Douglas McIlroy
released an influential
BCPL
port of RUNOFFto 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:
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.
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.
After being exposed to
RUNOFF while
at
MIT
in summer 1966,
Brian Kernighan
wrote a port in Fortran (for an IBM
System/360) while working on his doctoral
thesis at Princeton (to format the
thesis). By his account, the system was
used for five more years by the student
agency. The punch-card source has long
since been lost.
Ken 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.
Most of the programming team for Multics
continued working with UNIX at AT&T
Bell Labs, Murray Hill, so it's no
surprise that Multics runoff was
incorporated as UNIX roff(1) in Version 1
AT&T UNIX, 1971. This was a PDP-11
assembly-language port of the
BCPL
runoff. According to
McIlroy,
Ossanna convinced
the AT&T patent department to use UNIX
and roff(1) for
formatting patent applications, and
according to
Thompson, that
usage was the justification for the PDP-11
purchase.
There are many differing accounts of who
wrote this version, but most settle on
Ossanna,
Ritchie, and
Thompson.
However, the first-hand accounts of
McIlroy,
Kernighan, and
Thompson settle on Ritchie as the primary
author. This is corroborated by Ritchie's
expertise in
BCPL,
as roff(1) was based upon McIlroy's
BCPL
runoff.
Unfortunately, the first roff(1) version
is lost. Some sources from Version 1
AT&T UNIX have been reconstructed from
old tapes, but roff(1) was not among them.
All that remains from this time are manual
entries and first-hand accounts. However,
the PDP-11 source for Version 5 AT&T
UNIX still exists, and by first-hand
accounts, is a modified form of the
original.
Version 1 AT&T UNIX roff(1) is also
notable, regarding manpages, for its
release of the First Edition UNIX
Programmer's Manual, which defines the
manpage structure and layout enjoyed in
the present day.
Thompson conceived
of this convention, inspired by the
Multics MSPM, itself inspired by the CTSS
manuals.
The source code of Version 1 and 2 AT&T UNIX manual pages may not have survived;
only typeset versions are known.
Joseph Ossanna took
over the PDP-11
roff(1) and built
nroff(1), which focussed on outputting
text onto terminals, for Version 2
AT&T UNIX. The exact motivations for
this are unknown, but are vaguely agreed
as evolving the utility and language to
support more advanced formatting.
Unfortunately, a source record of the
original effort is entirely lost; however,
later versions of the PDP-11 source (for
Version 6 AT&T UNIX) and manual page
(Version 3 AT&T UNIX) are available.
Thompson mentions
that nroff(1) introduced the notion of
programmable macros. This is corroborated
by the Version 6 AT&T UNIX source for
nroff(1), where files under the prefix
/usr/lib/tmac.
are parsed for macros (see
nroff.8 in the
Version 6 AT&T archive). This same
behaviour is not reproduced in the
roff(1) sources from
the same time, so it makes sense that this
is the first appearance of macros.
On the other hand, the manual pages for
Version 3 AT&T UNIX (Feb. 1973) were
still written in raw roff without using
any macro set.
Joseph Ossanna
started writing troff(1) from his PDP-11
nroff(1) sources for
Version 4 AT&T UNIX. It's widely
asserted that the driving motivation was
to create output for the
CAT
phototypesetter.
Original sources for this version of
AT&T UNIX are also lost; however, the
manual still exists, and records of the
PDP-11 source exist in raw tape data for
Version 6 AT&T UNIX (which apparently
couldn't be reconstructed).
From Version 4 AT&T UNIX (Nov. 1973)
to Version 6 AT&T UNIX (May 1975), a
simple macro set was used for writing
manual pages, but the macros were
completely incompatible with macro sets
used today.
The compose utility, né runoff, was
a port of
RUNOFF to PL/1
by Dennis 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.)
In around 1975,
Joseph Ossanna
re-wrote
troff(1) in the
C-language. However, in 1977 this work
was discontinued and sources were
untouched for nearly two years
until resumed by
Brian Kernighan:
After Joe
Ossanna
died in late 1977,
troff was
static for probably close to two
years, since no one had the time
and courage to touch it. It was
entirely in C at that point,
somewhat over 9000 lines as I
remember. I simply modified it,
gradually getting around some of
the limitations on fonts, making
use of dynamic memory, and
generating "device-independent"
output for devices whose
properties were specified in
dynamically loaded files.
The result is the first intact UNIX
troff(1) source. By Version 7 AT&T
UNIX, both nroff(1) and troff(1) are built
from the same C sources, separated by
preprocessor conditionals, while roff(1)
was still built in its PDP-11 assembly.
The ditroff(1) name origin is unknown.
Kernighan writes,
I'm pretty sure that I only talked
about a "device independent
troff"; the name "ditroff" came
from somewhere else, and I've
never been fond of it.
Kernighan's
device-independent troff(1) was repackaged
in commercial AT&T (and derivative)
UNIX systems for years to come. In circa
1978, the
DWB
featured troff(1) as its mainstay; later,
the
WWB
bolted on many additional word-processing
utilities. These applications were
repackaged in 1989 by
USL,
a subsidiary of AT&T Bell
Laboratories. The DWB tools were then
bought by SoftQuad in circa 1978, which
rebranded troff(1) as sqtroff(1).
When Douglas McIlroy edited volume 1 of
the manual pages for Version 7 AT&T
UNIX, he revised the manual page macros
substantially, first designing and
implementing most of the macros that are
still used in the man(7) language today.
The GNU troff is
popularly considered to be the most
wide-spread in modern UNIX installations.
It's bundled by default on most GNU/Linux
operating systems. This port, renamed
groff, was written by
James Clark in 1989
specifically for the GNU project. At this
time, no open-source implementation
existed.
The groff port was based purely from
troff documentation
as shipped with SunOS 4.1.4, and was
written in C++ on Sun 4/110 (initial
implementations of the GNU C++ compiler
were on Sun, making it an ideal starting
point).
In 1991,
Henry Spencer sent
a terse mail to USENET comp.sources.unix
indicating that he'd written an
interpreter in the AWK language for the
man and ms macro packages
documented in Version 7 AT&T UNIX
nroff(1) and
ditroff(1).
This is awf, the Amazingly
Workable Formatter – a
"nroff -man" or (subset) "nroff
-ms" clone written entirely in
(old) awk.
According to
Spencer, awf was
necessary for the portability of C News, a
USENET news server written by Spencer and
Geoff Collyer in 1987. The project wished
to distribute manpage sources, but since
ditroff(1) sources
were still license-encumbered, needed to
guarantee portability to un-licensed UNIX
systems.
Vic Abell ported
awf(1) to C in
1991 while at Purdue. The motivation of
this port was to
[produce]
a C language version that would run on small systems, particularly MS-DOS ones.
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
Brian 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.
In 2005, Sun Microsystems published an
CDDL-licenced variant of their Solaris
operating system called OpenSolaris. This
included a re-licenced descendant of
troff(1) as imported
into AT&T UNIX System V UNIX in 1983.
Gunnar Ritter
incorporated this software into the
Heirloom project in August, 2005.
mandoc(1), starting as mdocml(1), was
started by
Kristaps Dzonsons
as a way to improve the HTML output of
groff(1).
It gained terminal output as mdocterm(1)
in 2009.
mdocml is a suite of tools
compiling `mdoc', the roff macro
package for BSD manual pages. The
mission of mdocml is to deprecate
groff, the GNU roff
implementation, for displaying BSD
mdoc pages.
The project was taken over by
Ingo Schwarze
in around 2011.
mandoc(1) reads only
mdoc(7)
and
man(7)
input (not general
ditroff(1)
input), although it has some capability
for generalised input. It is the first
fully semantic parser for manpages,
exposing the annotated content of parsed
documents.
groff(1)
manuals were the predominant basis for
this port.
Disclaimer: the author of this
document originally wrote mandoc(1).
Kernighan, Brian, Lesk, M. E., & Ossanna, J. F., (1978, July). UNIX Time-sharing System: Document Preparation [Technical journal]. AT&T Bell System Technical.
Kernighan, Brian. Manuscript Printing under OS/360: ROFF [Technical paper, (High-quality)]. Available with permission of the author.
Lowry, Leslie M. J., Corbató, Fernando J., & Steinberg, Richard J. (1963, March). Memo, Modify, and Ditto Commands in the Compatible Time Sharing System [Memorandum]. M.I.T. Computation Center (courtesy of Jerome Saltzer).
Madnick, Stuart E. & Mouton, Allen. (1968, August). SCRIPT, an On-line Manuscript Processing System [Paper]. IEEE Transactions on Engineering Writing and Speech.
Magnus, Nils. (1994, July 15). The history of the man utility package [Source code].
Massachusetts Institute of Technology [M.I.T.]. The Compatible Time-Sharing System [Source code]. Paul Pierce.
McIlroy, Douglas. (1971, January 12). Roff [Memorandum (High-quality)]. AT&T Bell Labs Technical Memorandum. Available with permission of the author.
McIlroy, Douglas. (1969, September 17). Runoff [Memorandum (High-quality)]. AT&T Bell Labs Technical Memorandum. Available with permission of the author.
McMahon, L.E., Cherry, L.L., & Morris, R. (1978, July). UNIX Time-sharing System: Statistical Text Processing [Technical journal]. AT&T Bell System Technical Journal.
Mahoney, M.S. (1989, September 12). An Oral History of Unix: Interview with Sam Morgan [Transcript].
The content of this page are available under
Creative Commons'
Attribution Share-Alike:
deriving works must attribute the author(s) and
use a similar license. However, cited
communications (and copies of source materials),
available here, are
copyright the sender/author, and not covered by
this license.