Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nroff(1) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mm(1)

soelim(1)

NROFF(1)

NAME

nroff − format text

SYNOPSIS

nroff [ options ] file ... 

DESCRIPTION

Nroff formats text contained in file (standard input by default) for printing on typewriter-like devices and line printers.  Its capabilities are described in the tutorial cited below. 

Nroff is best not used directly, but rather via macro packages such as mm, which provides a high-level interface to document processing, as opposed to the very low level one provided directly in nroff.

An argument consisting of a minus (−) is taken to be a file name corresponding to the standard input.  The options, which may appear in any order but must appear before the file, are:

−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 WARNINGS below.) 

−nN Number first generated page N.

−sN Stop every N pages.  Nroff will halt after every N pages (default N=1) to allow paper loading or changing, and will resume upon receipt of a line-feed or new-line (new-lines do not work in pipelines, for example, with mm(1)). 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-compacted (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 /usr/lib/tmac/tmac.name is used instead. 

−cname Precede the input

files with the compacted macro files /usr/lib/macros/cmp.[nt]. [dt].name and /usr/lib/macros/ucmp.[nt].name.

−kname Compact the macros used in this invocation of nroff, placing the output in files [dt].name in the current directory. 

−Tname Prepare output for specified terminal.  Known names are 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, 2631 for the Hewlett Packard 2631 line printer, and klp for a (generic) 16-bit character printer having ratio of 2 to 3 in 8-bit and 16-bit character width. 

−e Produce equally-spaced words in adjusted lines, using the full resolution of the particular terminal. 

−h Use output tabs during horizontal spacing to speed output and reduce output character count.  Tab settings are assumed to be every 8 nominal character widths. 

−un Set the emboldening factor (number of character overstrikes) for the third font position (bold) to n, or to zero if n is missing. 

EXAMPLES

The following command prints the first five pages of the document whose nroff source file is filename:

nroff -o-5 filename

Note that there should not be a space between the o and the − or the − and the 5. 

To print only pages 1, 3, and 4 type:

nroff -o1,3,4 filename

WARNINGS

When nroff is used with the −olist option inside a pipeline, it may cause a harmless "broken pipe" diagnostic if the last page of the document is not specified in list.

FILES

/usr/lib/macros/∗standard macro files

/usr/lib/term/∗terminal driving tables for nroff

/usr/lib/suftabsuffix hyphenation tables

/tmp/ta$#temporary file

/usr/lib/tmac/tmac.∗standard macro files and pointers

SEE ALSO

mm(1), soelim(1). 
nroff/troff tutorial in the Text Formatters volume of HP-UX Concepts and Tutorials.

EXTERNAL INFLUENCES

Environment Variables

LC_CTYPE determines the interpretation of text as single and/or multi-byte characters. 

LANG is used to determine the search path for the −m option.  LANG also determines the language in which messages are displayed. 

If LC_CTYPE is not specified in the environment or is set to the empty string, the value of LANG is used as a default for each unspecified or empty variable.  If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG.  If any internationalization variable contains an invalid setting, nroff behaves as if all internationalization variables are set to "C".  See environ(5).

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026