Introduction
The standard Unix text-processing tools are nroff and troff. They are not What You See Is What You Get (WYSIWYG) word-processors. Rather, they are text processing programs, where the input consists of a mixture of text to be formatted and special commands that instruct the programs how to format the text.
troff is for output devices such as typesetters and high resolution laser printers that can handle variable-width fonts and different character sizes. nroff is for simpler devices where all characters have the same width, such as terminals or line printers. Both programs accept the same set of commands; thus, carefully prepared input may be used with both programs to produce reasonable results. The original troff program worked for only one specific typesetter. The modern version, known as “device independent troff,” or ditroff, can be tuned via specific drivers to work on multiple output devices.
Different commercial versions of Unix come with different versions of the troff suite. GNU/Linux and BSD systems all use GNU troff (groff), which is an excellent, full-featured implementation of ditroff and all the troff preprocessors. The Internet starting point for groff is http://www.gnu.org/software/groff/groff.html. We recommend downloading and building it if you intend to do serious troff-based typesetting work.[*]
Knowledge of nroff and troff was once an integral part of a Unix wizard’s claims to Unix mastery. Over time though, they have been superseded for daily document ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access