HP-UX Reference (11i v3 07/02) - 1 User Commands N-Z (vol 2)
n
nroff(1) nroff(1)
NAME
nroff - format text
SYNOPSIS
nroff [ options ] file ...
DESCRIPTION
nroff is a text formatting program that interprets source text contained in file and prepares it for print-
ing on typewriter-like devices and line printers. If file name is
- or not specified, standard input is used as
source text.
If the file contains plain text with no formatter requests,
nroff uses default line lengths and page dimen-
sions to produce readable output, outputting a blank line for each blank line encountered in the input, and
filling and adjusting text to both margins.
nroff ignores any lines in the source text that begin with a
period (
.) but are not valid
nroff formatter requests.
Source File Preparation
Document source file preparation is usually easier when text is coded using macro packages such as mm(1)
which provide a high-level interface for headings, page footers, lists, and other features, rather than coding
the file with inherently low-level
nroff requests.
Options
nroff recognizes the following command-line options, which can appear in any order but must appear
before the file argument:
-olist Print only pages whose page numbers appear in the list of numbers and ranges,
separated by commas. 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. (See WARN-
INGS below.)
-nn Number first generated page n.
-sn Stop every n pages. nroff halts after every n pages (default n=1) to allow paper
loading or changing, and resumes upon receipt of a line-feed or new-line (new-lines do
not work in pipelines, such as with mm). When nroff halts between pages, an ASCII
BEL is sent to the terminal.
-raN Set register a (which must have a one-character name) to N.
-i Read standard input after files are exhausted.
-q Invoke the simultaneous input-output mode of the .rd request.
-z Print only messages generated by .tm (terminal message) requests.
-mname Precede the input files with the non-compiled (ASCII text) macro file
/usr/lib/nls/ LANG/tmac/tmac. name
where LANG is the value of the LANG environment variable. If LANG is not set or
/usr/lib/nls/ LANG/tmac/tmac. name
does not exist, the following file is used instead:
/usr/share/lib/tmac/tmac.name
-Tname Prepare output for specified terminal. Known names are as follows:
37 for the (default) TELETYPE Model 37 terminal
tn300 for the GE TermiNet 300 (or any terminal without half-line capability)
300s for the DASI 300s
300 for the DASI 300
450 for the DASI 450
lp for a (generic) ASCII line printer
382 for the DTC-382
4000A for the Trendata 4000A
832 for the Anderson Jacobson 832
X for a (generic) EBCDIC printer
58 Hewlett-Packard Company − 1 − HP-UX 11i Version 3: February 2007