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

UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: III. Text Formatting Chapter 12 Next: 12.2 Command-Line Invocation

12. nroff and troff

This chapter presents the following topics:

  • Introduction

  • Command-line invocation

  • Conceptual overview

  • Default operation of requests

  • Group summary of requests

  • Alphabetical summary of requests

  • Escape sequences

  • Predefined number registers

  • Special characters

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.[1 ] 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.

[1] 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 .

Previous: III. Text Formatting UNIX in a Nutshell: System V Edition Next: 12.2 Command-Line Invocation
III. Text Formatting Book Index 12.2 Command-Line Invocation

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System