.\" $Copyright:	$
.\" Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
.\" Sequent Computer Systems, Inc.   All rights reserved.
.\"  
.\" This software is furnished under a license and may be used
.\" only in accordance with the terms of that license and with the
.\" inclusion of the above copyright notice.   This software may not
.\" be provided or otherwise made available to, or used by, any
.\" other person.  No title to or ownership of the software is
.\" hereby transferred.
...
. \" $Header: m0 1.4 86/03/06 $
.br
.rs
.sp |1.50i
.ce1000
.ps12
.ft 3
\*(Nr\(sl\*(Tr User's Manual
.sp .2i
.ft 2
.ps10
Joseph F. Ossanna
.ft 1
.sp
Bell Laboratories
Murray Hill, New Jersey 07974
.ce0
.sp2
.ps \n(PS
.fi
.ft 3
Introduction
.pg
\*(NR and \*(TR are text processors under
the \s-1PDP\s+1-11 \s-1UNIX\s+1 Time-Sharing System\*u1\*d
that format text for typewriter-like terminals and
for a \%Graphic Systems phototypesetter, respectively.
They accept lines of text interspersed with lines of
format control information and
format the text into a printable, paginated document
having a user-designed style.
\*(NR and \*(TR offer
unusual freedom in document styling,
including:
arbitrary style headers and footers;
arbitrary style footnotes;
multiple automatic sequence numbering for paragraphs, sections, etc;
multiple column output;
dynamic font and point-size control;
arbitrary horizontal and vertical local motions at any point;
and
a family of automatic overstriking, bracket construction, and
line drawing functions.
.pg
\*(NR and \*(TR are highly compatible with each other and it is almost always
possible to prepare input acceptable to both.
Conditional input is provided that enables
the user to embed input expressly destined for either program.
\*(NR can prepare output directly for a variety of terminal types and
is capable of utilizing the full resolution of each terminal.
.pg
.ft 3
Usage
.pg
The general form of invoking \*(NR (or \*(TR) at \s-1UNIX\s+1 command level is
.x1
\f3nroff  \f2options  files\f1\
\h'|2i'(or  \f3troff  \f2options  files\f1)
.x2
where \f2options\f1 represents any of a number of option arguments
and \f2files\f1 represents the list of files containing the document
to be formatted.
An argument consisting of a single minus (\f3\-\f1) is taken to be
a file name corresponding to the standard input.
If no file names are given input is taken from the standard input.
The options, which may appear in any order so long as they appear
before the files, are:
.sp
.ta .2i 1.0i
.ft 2
.bd I 3
	Option	Effect
.br
.bd I
.ft 1
.ta .3i 1.0i
.in 1.0i
.ll-.3i
.bt
	\f3\-o\f2list\f1	\
Print only pages whose page numbers appear in \f2list\f1,
which consists of comma-separated numbers and number ranges.
A number range has the form \f2N\-M\f1
and means pages \f2N\f1 through \f2M;\f1
a initial \f2\-N\f1 means
from the beginning to page \f2N;\f1 and a final \f2N\-\f1 means
from \f2N\f1 to the end.
.bt
	\f3\-n\f2N\f1	Number first generated page \f2N\f1.
.bt
	\f3\-s\f2N\f1	Stop every \f2N\f1 pages.
\*(NR will halt prior to every \f2N\f1 pages (default \f2N\f1=1)
to allow paper loading or
changing, and will resume upon receipt of a newline.
\*(TR will stop the phototypesetter every \f2N\f1 pages,
produce a trailer to allow changing cassettes,
and will resume after the phototypesetter \s-1START\s+1 button is pressed.
.bt
	\f3\-m\f2name\f1	Prepends the macro file
\f3\(slusr\(sllib\(sltmac.\f2name\f1
to the input \f2files\f1.
.bt
	\f3\-r\f2aN\f1	Register \f2a\f1 (one-character) is set to \f2N\f1.
.bt
	\f3\-i\fP	Read standard input after the input files are exhausted.
.bt
	\f3\-q\f1	\
Invoke the simultaneous input-output mode of the \f3rd\f1 request.
.sp
.ne 3
.ft 2
.bd I 3
		\*(NR Only
.br
.bd I
.ft
.bt
	\f3\-T\f2name\f1	Specifies
the name of the output terminal type.
Currently defined names are specified in \f2/usr/lib/term/README\fP.
.bt
	\f3\-e\f1	\
Produce equally-spaced words in adjusted
lines, using full terminal resolution.
.bt
	\f3\-h\f1	\
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.
.sp
.ne 3
.ft 2
.bd I 3
		\*(TR Only
.br
.bd I
.ft
.bt
	\f3\-t\fP	Direct output to the standard output instead
of the phototypesetter.
.bt
	\f3\-f\fP	Refrain from feeding out paper and stopping
phototypesetter at the end of the run.
.bt
	\f3\-w\fP	Wait until phototypesetter is available, if
currently busy.
.bt
	\f3\-b\f1	\*(TR will report whether the phototypesetter
is busy or available.
No text processing is done.
.bt
	\f3\-a\fP	Send a printable \s-1(ASCII)\s+1 approximation
of the results to the standard output.
.bt
	\f3\-p\f2N\f1	Print all characters in point size \f2N\f1
while retaining all prescribed spacings and motions,
to reduce phototypesetter elasped time.
.ll
.in0
.xx
.pg
Each option is invoked as a separate argument;
for example,
.x1
\f3nroff  \-o\f24,8\-10  \f3\-T\f2300S  \f3\-m\f2abc  file1  file2\f1
.x2
requests formatting of pages 4, 8, 9, and 10 of a document contained in the files
named \f2file1\f1 and \f2file2\f1,
specifies the output terminal as a \s-1DASI\s+1-300S,
and invokes the macro package \f2abc\f1.
.pg
Various pre- and post-processors are available for use with \*(NR and \*(TR.
These include the equation preprocessors \s-1NEQN\s+1 and \s-1EQN\s+1\*u2\*d
(for \*(NR and \*(TR respectively),
and the table-construction preprocessor \s-1TBL\s+1\*u3\*d.
A reverse-line postprocessor \s-1COL\s+1\*u4\*d
is available for multiple-column \*(NR output on terminals without reverse-line ability;
\s-1COL\s+1 expects the Model 37 Teletype
escape sequences that \*(NR produces by default.
\s-1TK\s+1\*u4\*d
is a 37 Teletype simulator postprocessor for printing \*(NR output on a Tektronix 4014.
\s-1TCAT\s+1\*u4\*d
is phototypesetter-simulator postprocessor
for \*(TR that produces an approximation of phototypesetter output
on a Tektronix 4014.
For example, in
.x1
\f3tbl  \f2files  \f3|  eqn  |  troff  \-t \f2options  \f3|  tcat\f1
.x2
the first \|\f3|\f1\| indicates the piping of \s-1TBL\s+1's output to \s-1EQN\s+1's input;
the second the piping of \s-1EQN\s+1's output to \*(TR's input;
and the third indicates the piping of \*(TR's output to \s-1TCAT\s+1.
\s-1GCAT\s+1\*u4\*d can be used to send \*(TR (\f3\-g\f1) output to
the Murray Hill Computation Center.
.br
.pg
The remainder of this manual consists of:
a Summary and Index;
a Reference Manual keyed to the index;
and
a set of Tutorial Examples.
Another tutorial is [5].
.sp.4i
.ta 4i
	Joseph F. Ossanna
.sp.4
.ps -1
.vs -1p
.pg
.ft 3
References
.pg
.ta .3i
.in .3i
.ti0
[1]	K. Thompson, D. M. Ritchie,
.ul
UNIX Programmer's Manual,
Sixth Edition (May 1975).
.sp.4
.ti0
[2]	B. W. Kernighan, L. L. Cherry,
.ul
Typesetting Mathematics \(em User's Guide (Second Edition),
Bell Laboratories internal memorandum.
.sp.4
.ti0
[3]	M. E. Lesk,
.ul
Tbl \(em A Program to Format Tables,
Bell Laboratories internal memorandum.
.sp.4
.ti0
[4]	Internal on-line documentation, on \s-1UNIX\s+1.
.sp.4
.ti0
[5]	B. W. Kernighan, \f2A TROFF Tutorial\f1,
Bell Laboratories internal memorandum.
.in0
.ps
.vs
