Linux nroff command
Updated: 05/04/2019 by Computer Hope
On Unix-like operating systems, the nroff command (short for "new runoff"), is used to format ("run off") documents for display or fixed-width printing. In addition to user functions, internally, the system uses it to format the text in man pages.
This page covers the GNU/Linux version of nroff.
Syntax
nroff [-e] [-h] [-i] [-q] [-mname] [-nN] [-opagelist] [-raN] [-sN] [-Tname]
Options
-e | Produce equally-spaced words in adjusted lines, using full terminal resolution. | ||||||||||||||||||||
-h | Use output Tab characters during horizontal spacing to speed output and reduce output character count. Tab settings are assumed to be every 8 nominal character widths. | ||||||||||||||||||||
-i | Read the standard input after the input files are exhausted. | ||||||||||||||||||||
-q | Invoke the simultaneous input-output mode of the rd request. | ||||||||||||||||||||
-mname | Prepend the macro file /usr/share/lib/tmac/tmac.name to the input files. | ||||||||||||||||||||
-nN | Number first generated page N. | ||||||||||||||||||||
-opagelist | Print only pages whose page numbers appear in the comma-separated list of numbers and ranges. A range N-M means pages N through M; an initial -N means from the beginning to page N; and a final N- means from N to the end. | ||||||||||||||||||||
-raN | Set register a (one-character) to N. | ||||||||||||||||||||
-sN | Stop every N pages. nroff halts before every N pages (default N=1) to allow paper loading or changing, and resumes upon receipt of a NEWLINE. | ||||||||||||||||||||
-Tname | Prepare output for a device of the specified name. Known names are:
|
Examples
nroff -s4 -me users.guide
Formats users.guide using the -me macro package.
Related commands
checknr — Check nroff and troff files for errors.
col — Filter reverse linefeeds.
eqn — Language processor for describing equations.
man — Display the manual page of a given command.
tbl — Preprocessor that formats tables for nroff or troff.
troff — Typeset or format documents for terminal display or line-printer.