add spacing between commands and arguments; reset state at end
[unix-history] / usr / src / old / roff / USD.doc / troff / m0
CommitLineData
ff262511
KB
1.\" %sccs.include.proprietary.roff%
2.\"
b97615c1 3.\" @(#)m0 6.3 (Berkeley) %G%
03194541
KM
4.\"
5.br
6.rs
f09dbc55 7.sp |1.0i
b97615c1
EA
8.ce 1000
9.ps 12
10.ft B
03194541
KM
11\*(Nr\(sl\*(Tr User's Manual
12.sp .2i
b97615c1
EA
13.ft I
14.ps 10
03194541 15Joseph F. Ossanna
f09dbc55 16(updated for 4.3BSD by Mark Seiden)
b97615c1 17.ft R
03194541
KM
18.sp
19Bell Laboratories
20Murray Hill, New Jersey 07974
b97615c1
EA
21.ce 0
22.sp 2
03194541
KM
23.ps \n(PS
24.fi
b97615c1 25.ft B
03194541
KM
26Introduction
27.pg
28\*(NR and \*(TR are text processors under
f09dbc55 29the \s-1UNIX\s+1 Time-Sharing System
03194541
KM
30that format text for typewriter-like terminals and
31for a \%Graphic Systems phototypesetter, respectively.
f09dbc55
KM
32(Device-independent \*(TR, part of the Documenter's Workbench,
33supports additional output devices.)
03194541
KM
34They accept lines of text interspersed with lines of
35format control information and
36format the text into a printable, paginated document
37having a user-designed style.
38\*(NR and \*(TR offer
39unusual freedom in document styling,
40including:
41arbitrary style headers and footers;
42arbitrary style footnotes;
43multiple automatic sequence numbering for paragraphs, sections, etc;
44multiple column output;
45dynamic font and point-size control;
46arbitrary horizontal and vertical local motions at any point;
47and
48a family of automatic overstriking, bracket construction, and
49line drawing functions.
50.pg
51\*(NR and \*(TR are highly compatible with each other and it is almost always
52possible to prepare input acceptable to both.
53Conditional input is provided that enables
54the user to embed input expressly destined for either program.
55\*(NR can prepare output directly for a variety of terminal types and
56is capable of utilizing the full resolution of each terminal.
57.pg
b97615c1 58.ft B
03194541
KM
59Usage
60.pg
61The general form of invoking \*(NR (or \*(TR) at \s-1UNIX\s+1 command level is
62.x1
63\fBnroff \fIoptions files\fR\
64\h'|2i'(or \fBtroff \fIoptions files\fR)
65.x2
66where \fIoptions\fR represents any of a number of option arguments
67and \fIfiles\fR represents the list of files containing the document
68to be formatted.
69An argument consisting of a single minus (\fB\-\fR) is taken to be
70a file name corresponding to the standard input.
71If no file names are given input is taken from the standard input.
72The options, which may appear in any order so long as they appear
73before the files, are:
74.sp
75.ta .2i 1.0i
b97615c1 76.ft I
03194541
KM
77.bd I 3
78 Option Effect
79.br
80.bd I
b97615c1 81.ft R
03194541
KM
82.ta .3i 1.0i
83.in 1.0i
b97615c1 84.ll -.3i
f09dbc55
KM
85.bt
86 \fB\-i\fP Read standard input after the input files are exhausted.
87.bt
88 \fB\-m\fIname\fR Prepends the macro file
89\fB\(slusr\(sllib\(sltmac.\fIname\fR
90to the input \fIfiles\fR.
91.bt
92 \fB\-n\fIN\fR Number first generated page \fIN\fR.
03194541
KM
93.bt
94 \fB\-o\fIlist\fR \
95Print only pages whose page numbers appear in \fIlist\fR,
96which consists of comma-separated numbers and number ranges.
97A number range has the form \fIN\-M\fR
98and means pages \fIN\fR through \fIM;\fR
99a initial \fI\-N\fR means
100from the beginning to page \fIN;\fR and a final \fIN\-\fR means
101from \fIN\fR to the end.
102.bt
f09dbc55
KM
103 \fB\-q\fR \
104Invoke the simultaneous input-output mode of the \fBrd\fR request.
105.bt
106 \fB\-r\fIaN\fR Number register \fIa\fR (one-character) is set to \fIN\fR.
03194541
KM
107.bt
108 \fB\-s\fIN\fR Stop every \fIN\fR pages.
109\*(NR will halt prior to every \fIN\fR pages (default \fIN\fR=1)
110to allow paper loading or
111changing, and will resume upon receipt of a newline.
112\*(TR will stop the phototypesetter every \fIN\fR pages,
113produce a trailer to allow changing cassettes,
114and will resume after the phototypesetter \s-1START\s+1 button is pressed.
115.bt
f09dbc55
KM
116 \fB\-z\fR Efficiently suppress formatted output.
117Only produce output to standard error (from \fBtm\fP requests or
118diagnostics).
03194541 119.sp
b97615c1
EA
120.ne 5
121.ft I
03194541
KM
122.bd I 3
123 \*(NR Only
124.br
125.bd I
126.ft
127.bt
128 \fB\-T\fIname\fR Specifies
129the name of the output terminal type.
130Currently defined names are \fB37\fR for the (default) Model 37 Teletype\(rg,
131\fBtn300\fR for the GE TermiNet\ 300 (or any terminal without half-line
132capabilities),
133\fB300S\fR for the \s-1DASI\s+1-300S,
134\fB300\fR for the \s-1DASI\s+1-300,
135and
136\fB450\fR for the \s-1DASI\s+1-450 (Diablo Hyterm).
137.bt
138 \fB\-e\fR \
139Produce equally-spaced words in adjusted
140lines, using full terminal resolution.
f09dbc55
KM
141.bt
142 \fB\-h\fR \
143On output, use tabs during horizontal spacing to increase speed.
144Device tabs setting are assumed to be (and input tabs are initially
145set to) every 8 character widths.
03194541
KM
146.sp
147.ne 3
b97615c1 148.ft I
03194541
KM
149.bd I 3
150 \*(TR Only
151.br
152.bd I
153.ft
154.bt
f09dbc55
KM
155 \fB\-a\fP Send a printable \s-1(ASCII)\s+1 approximation
156of the results to the standard output.
03194541
KM
157.bt
158 \fB\-b\fR \*(TR will report whether the phototypesetter
159is busy or available.
160No text processing is done.
161.bt
f09dbc55
KM
162 \fB\-f\fP Refrain from feeding out paper and stopping
163phototypesetter at the end of the run.
03194541 164.bt
f09dbc55
KM
165 \fB\-t\fP Direct output to the standard output instead
166of the phototypesetter.
03194541 167.bt
f09dbc55
KM
168 \fB\-w\fP Wait until phototypesetter is available, if
169currently busy.
03194541 170.ll
b97615c1 171.in 0
03194541
KM
172.xx
173.pg
174Each option is invoked as a separate argument;
175for example,
176.x1
177\fBnroff \-o\fI4,8\-10 \fB\-T\fI300S \fB\-m\fIabc file1 file2\fR
178.x2
179requests formatting of pages 4, 8, 9, and 10 of a document contained in the files
180named \fIfile1\fR and \fIfile2\fR,
181specifies the output terminal as a \s-1DASI\s+1-300S,
182and invokes the macro package \fIabc\fR.
183.pg
184Various pre- and post-processors are available for use with \*(NR and \*(TR.
f09dbc55 185These include the equation preprocessors \s-1NEQN\s+1 and \s-1EQN\s+1\*u1\*d
03194541 186(for \*(NR and \*(TR respectively),
f09dbc55
KM
187and the table-construction preprocessor \s-1TBL\s+1\*u2\*d.
188A reverse-line postprocessor \s-1COL\s+1\*u3\*d
03194541
KM
189is available for multiple-column \*(NR output on terminals without reverse-line ability;
190\s-1COL\s+1 expects the Model 37 Teletype
191escape sequences that \*(NR produces by default.
f09dbc55 192\s-1TK\s+1\*u3\*d
03194541 193is a 37 Teletype simulator postprocessor for printing \*(NR output on a Tektronix 4014.
f09dbc55
KM
194\s-1TC\s+1\*u5\*d
195is a phototypesetter-simulator postprocessor
03194541
KM
196for \*(TR that produces an approximation of phototypesetter output
197on a Tektronix 4014.
198For example, in
199.x1
f09dbc55 200\fBtbl \fIfiles \fB| eqn | troff \-t \fIoptions \fB| tc\fR
03194541
KM
201.x2
202the first \|\fB|\fR\| indicates the piping of \s-1TBL\s+1's output to \s-1EQN\s+1's input;
203the second the piping of \s-1EQN\s+1's output to \*(TR's input;
f09dbc55 204and the third indicates the piping of \*(TR's output to \s-1TC\s+1.
03194541
KM
205.br
206.pg
207The remainder of this manual consists of:
f09dbc55
KM
208a Summary and outline;
209a Reference Manual keyed to the outline;
03194541
KM
210and
211a set of Tutorial Examples.
212Another tutorial is [5].
b97615c1 213.sp .4
03194541
KM
214.ps -1
215.vs -1p
216.pg
b97615c1 217.ft B
03194541
KM
218References
219.pg
220.ta .3i
221.in .3i
b97615c1 222.ti 0
f09dbc55 223[1] B. W. Kernighan, L. L. Cherry,
03194541
KM
224.ul
225Typesetting Mathematics \(em User's Guide (Second Edition),
f09dbc55 226Bell Laboratories.
b97615c1
EA
227.sp .4
228.ti 0
f09dbc55 229[2] M. E. Lesk,
03194541
KM
230.ul
231Tbl \(em A Program to Format Tables,
232Bell Laboratories internal memorandum.
b97615c1
EA
233.sp .4
234.ti 0
f09dbc55 235[3] Internal on-line documentation (\fIman\fP pages) on \s-1UNIX\s+1.
b97615c1
EA
236.sp .4
237.ti 0
f09dbc55
KM
238[4] B. W. Kernighan, \fIA TROFF Tutorial\fR,
239Bell Laboratories.
b97615c1
EA
240.sp .4
241.ti 0
f09dbc55 242[5] Your site may have similar programs for more modern displays.
b97615c1
EA
243.in 0
244.ps 10
245.vs 12
246.ft R
247.bp