home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeBook TitleSearch this book

Chapter 12. nroff and troff

This chapter presents the following topics:

12.1. Introduction

nroff and troff are Unix programs for formatting text files. nroff is designed to format output for line printers and letter-quality printers; you can also display the output on your screen. troff is designed for typesetting and laser printers. The same commands work for both programs; nroff simply ignores commands it can't implement.

nroff and troff are not part of standard SVR4 but are included in the compatibility packages. It is this version that is documented here. In addition, we make references to ditroff, or device-independent troff, which is a later version of troff. For the most part, ditroff works the same as troff; where there are distinctions, the original troff is referred to as otroff. The Solaris troff is the device-independent version and is a standard part of the Solaris distribution.

Some Unix vendors include a vendor-specific version of nroff/troff. Others don't include them at all. Various enhanced packages are also available, such as sqtroff from SoftQuad or groff from the Free Software Foundation.[16] These packages include additional requests or escape sequences. For completely accurate information, you should consult the text-processing manuals that come with your specific version of Unix.

[16]groff in particular is worth noting; it has numerous useful extensions over standard troff and is very stable. (See http://www.gnu.org).

Finally, if the checknr program is available, you should use it on your troff documents. Note: the device-independent version of troff is 8-bit clean. You may not be so lucky if your system only supplies otroff.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.