[Chapter 43] 43.14 nroff/troff and Macro Packages
Author: Jerry Peek, Tim O'Reilly & Mike Loukides
Date: 1998-10-23T15:51:56Z

#

| Chapter 43 Printing |

## 43.14 nroff/troff and Macro Packages

nroff and troff have a set of built-in commands, but what makes them truly powerful is the ability to define macros. Think of macros as batch files or command scripts, written in nroff and troff's arcane language.

Macros are difficult to write and even harder to debug. Luckily, several macro packages are available for everyday use. Macro packages are sets of macros designed to work together. For example, manual pages for UNIX (50.1) are written with the man macro package (50.11), which is called on the command line using the -man option:

>     % nroff -man cat.1

We wrote this book with our own proprietary macro package which is based on ms. ms was one of the original macro packages written at Bell Labs, but it was dropped by AT&T in System V. It is still available on BSD-based systems, as is another macro package called me. The System V replacement for ms is called mm.

- LM

43.13 The Text Formatters nroff, troff, ditroff, ... |  | 43.15 From a Source File to the Printer