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