|
|
1.1 root 1:
2:
3: troff Command troff
4:
5:
6:
7:
8: Extended text-formatting language
9:
10: ttrrooffff [_o_p_t_i_o_n ...] [_f_i_l_e ...]
11:
12: The command ttrrooffff is the COHERENT typesetter and text-formatting
13: language. It performs typeset-quality text formatting, suitable
14: for printing on either the Hewlett-Packard LaserJet II or III
15: printers, or on any printer for which the PostScript language has
16: been implemented.
17:
18: ***** troff Input *****
19:
20: ttrrooffff processes each given _f_i_l_e, or the standard input if none is
21: specified, and prints the formatted result on the standard
22: output. The input must consist of text with formatting commands
23: embedded within it.
24:
25: ttrrooffff provides a full suite of commands that set line length,
26: page length and page offset, generate vertical and horizontal
27: motions, indentation, fill and adjust output lines, and center
28: text. The great flexibility of ttrrooffff lies in its acceptance of
29: user-defined macros to control almost all higher-level
30: formatting. For example, the formation of paragraphs, header and
31: footer areas, and footnotes must all be implemented by the user
32: via macros.
33:
34: ttrrooffff uses a supeerset of the commands and syntax used by nnrrooffff,
35: the other COHERENT text-formatter: files prepared for the latter
36: usually can be processed through the former without requiring any
37: changes. ttrrooffff differs from nnrrooffff in that nnrrooffff can perform only
38: monospaced formatting, whereas ttrrooffff can handle multiple fonts of
39: type, both monospaced and proportionally spaced. It lets you
40: load font-width tables dynamically, so you can whatever fonts you
41: have loaded into your printer at a given time. ttrrooffff also lets
42: you move about the page in increments other than sixths of an
43: inch vertically or tenths of an inch horizontally.
44:
45: ttrrooffff produces output either in the Hewlett-Packard Printer
46: Control Language (PCL) or PostScript, whichever you prefer. The
47: former can be printed on the Hewlett-Packard LaserJet family of
48: laser printer, and can use any PCL bitmapped ``soft font''. The
49: latter can be printed on any printer that supports the PostScript
50: language, and can use any font for which you have an Adobe Font
51: Metric (AFM) description. The default is PCL output; to obtain
52: PostScript, use the -pp command-line option.
53:
54: ***** Fonts *****
55:
56: The COHERENT version of ttrrooffff produces output suitable for
57: printing on a Hewlett-Packard LaserJet or HP-compatible laser
58: printer, using either PCL or PostScript. ttrrooffff knows about three
59: fonts by default, as follows:
60:
61:
62:
63:
64: COHERENT Lexicon Page 1
65:
66:
67:
68:
69: troff Command troff
70:
71:
72:
73:
74: \fR Times Roman
75: \fI Times Italic
76: \fB Times Bold
77:
78:
79: ttrrooffff also recognizes the alternative font names TTRR, TTII and TTBB
80: for the same three Times family fonts. The default font
81: information for ttrrooffff is in file /uussrr/lliibb/rrooffff/ttrrooffff_ppccll/ffoonnttss.rr
82: or /uussrr/lliibb/rrooffff/ttrrooffff_ppss/ffoonnttss.rr, as described in detail below.
83:
84: To use other fonts, you must use the .llff request (see below) to
85: load a _f_o_n_t _w_i_d_t_h _t_a_b_l_e. The font width table is a binary file
86: that describes the width of each character in the font and the
87: printer command (escape sequence) needed to tell the printer to
88: use the font. The program ffwwttaabbllee builds a font width table from
89: a PCL bitmap font or from a PostScript AFM description. See its
90: Lexicon entry for details on its use.
91:
92: ttrrooffff output includes a printer command for each desired font
93: change. You must use the hhpprr command to download bitmapped _s_o_f_t
94: _f_o_n_t_s (fonts that are always resident in the printer) to the
95: printer before printing ttrrooffff output that uses the soft fonts.
96: If a specified font is not available in the printer, the output
97: will not be what you expect.
98:
99: ***** Command-line Options *****
100:
101: Command-line options may be listed in any order. They are as
102: follows:
103:
104: -dd Debug: print each request before execution. This option
105: is very useful when you are writing and debugging new
106: macros.
107:
108: -DD Display the available fonts. These are all the fonts
109: that have been loaded into ttrrooffff with the .llff primitive
110: (described below).
111:
112: -ff _n_a_m_e Write the temporary file into file _n_a_m_e.
113:
114: -ii _f_i_l_e_s
115: Read from the standard input after reading the given
116: _f_i_l_e_s.
117:
118: -kk Keep: do not erase the temporary file.
119:
120: -ll Landscape mode: output is rotated 90 degrees, with
121: default size 11 by 8.5 inches rather than 8.5 by 11
122: inches.
123:
124: -mm_n_a_m_e Include the macro file /uussrr/lliibb/ttmmaacc._n_a_m_e in the input
125: stream.
126:
127:
128:
129:
130: COHERENT Lexicon Page 2
131:
132:
133:
134:
135: troff Command troff
136:
137:
138:
139: -nn_N Number the first page of output _N.
140:
141: -pp Produce output for a PostScript printer rather than for a
142: HP-compatible printer.
143:
144: -rr_a_N Set number register _a to the value _N.
145:
146: -xx Do not eject to the bottom of the last page when text
147: ends. This option lets you use ttrrooffff interactively,
148: which is especially useful when debugging macros.
149:
150: If the environmental variable TTRROOFFFF is set when ttrrooffff is invoked,
151: its contents are prefixed to the list of command-line arguments.
152: This allows the user to set commonly used options once in the
153: environment rather than on each ttrrooffff command line.
154:
155: ***** troff's Primitives *****
156:
157: As noted earlier, ttrrooffff's command set is a superset of that used
158: by nnrrooffff: see the Lexicon entry on nnrrooffff for information on the
159: commands and escape sequences shared by ttrrooffff and nnrrooffff. This
160: article describes the primitives that ttrrooffff does _n_o_t share with
161: nnrrooffff.
162:
163: Please note that the basic ttrrooffff unit is one-tenth of a point. A
164: printer's point is 1/12 of a pica, which is in turn one-sixth of
165: an inch; therefore, there are 72 points and 720 ttrrooffff units in an
166: inch.
167:
168: .ccoo _e_n_d_m_a_r_k
169: Copy input to output file directly, with no processing. If
170: _e_n_d_m_a_r_k argument is present, ttrrooffff copies input until it
171: finds a line containing _e_n_d_m_a_r_k followed by \nn. If no
172: _e_n_d_m_a_r_k is given, ttrrooffff copies input until it finds a line
173: containing .ccoo\nn. This directive is useful for embedding
174: PostScript commands in an input file.
175:
176: .ccss _X_X _N _M
177: Set font _X_X to use constant character spacing. The width of
178: each character is _N divided by 36 ems. If _M is present, it
179: specifies the width of an em; otherwise, _N assumes the
180: point size em for the given font.
181:
182: .ffdd Display the currently available fonts.
183:
184: .ffpp _N _X_X
185: Associate font name _X_X with numeric font position _N. The
186: given _N should be a number between 1 and 9. Subsequently,
187: the numeric font position can be used in an escape sequence
188: \ff_N to select the font. (This nomenclature comes from the
189: days when phototypesetters used print wheels that were set
190: in fixed positions on the device.) The nnrrooffff primitive .rrff
191: performs a similar task, and is more flexible in its syntax.
192:
193:
194:
195:
196: COHERENT Lexicon Page 3
197:
198:
199:
200:
201: troff Command troff
202:
203:
204:
205: .ffzz _X_X _N
206: Fix the point size of font _X_X at _N. The point size of the
207: font will not be affected by subsequent .ppss commands or \ss_N
208: point size escapes.
209:
210: .llff _X_X _f_i_l_e [_n]
211: Load font width table from _f_i_l_e and use it for font _X_X. If
212: _f_i_l_e is not found, ttrrooffff looks for
213: /uussrr/lliibb/rrooffff/ttrrooffff_ppccll/ffwwtt/_f_i_l_e or
214: /uussrr/lliibb/rrooffff/ttrrooffff_ppss/ffwwtt/_f_i_l_e (depending on whether the -pp
215: option is used).
216:
217: The optional third argument sets the default point size of
218: the loaded font to _n. Note that this argument takes effect
219: only if ttrrooffff is running in -pp (PostScript) mode.
220:
221: For example, to load the font-width table for the PCL
222: bitmapped font ccnn009900rrppnn.uusspp (which sets Century Roman, nine
223: point, portrait mode) and name it font RRSS, use the command:
224:
225: .lf RS cn090rpn.usp
226:
227: To do the same thing under PostScript, use the command:
228:
229: .lf RS Century_R.fwt 9
230:
231: Thereafter, you can reference font RRSS with either .fftt RRSS or
232: \ff(RRSS.
233:
234: Note that the second argument to this primitive must name a
235: font-width table generated by the COHERENT command ffwwttaabbllee,
236: not the font itself, although both may have the same name.
237: Look in directories /uussrr/lliibb/rrooffff/ttrrooffff*/ffwwtt for the set of
238: font-width tables that are included with COHERENT. If you
239: purchase additional PCL fonts, you must use ffwwttaabbllee to
240: generate font-width tables for them. Note, too, that if you
241: are using ttrrooffff in PCL mode, you must both load the font-
242: width table into ttrrooffff and use the command hhpprr to load the
243: font itself into your printer: doing one without the other
244: will not produce the results you desire.
245:
246: Finally, please note that .llff is unique to the COHERENT
247: implementation of ttrrooffff, and cannot be ported to other
248: implementations.
249:
250: .ppss _N
251: Set point size to _N. The default point size is 10 point.
252:
253: .rrbb _f_i_l_e
254: Read input from _f_i_l_e and copy it to the output without
255: processing. This directive is useful for including files
256: containing PostScript routines in the output.
257:
258: .ssss _N
259: Set the minimum word spacing to _N divided by 36 ems.
260:
261:
262: COHERENT Lexicon Page 4
263:
264:
265:
266:
267: troff Command troff
268:
269:
270:
271:
272: .vvss _Npp
273: Set the vertical spacing to _N points. The default vertical
274: spacing for ttrrooffff is 11 points.
275:
276: ***** Escape Sequences *****
277:
278: ttrrooffff recognizes the following escape sequences, in addition to
279: those recognized by nnrrooffff:
280:
281: \ss'NN'
282: Set the point-size escape sequence to _N. Like the .ppss
283: primitive, it changes the point size to _N. The specified _N
284: may have a leading plus or minus sign to make the new size
285: relative to the current point size.
286:
287: \XX_N_N Output character _N_N where _N_N are two hexadecimal digits.
288: This is useful for forcing ttrrooffff to print characters outside
289: the normal printable range, e.g., those with the high-order
290: bit set. Note that this escape sequence is unique to the
291: COHERENT implementation of ttrrooffff and cannot be ported to
292: other implementations.
293:
294: ***** Example *****
295:
296: The following example prints an enormous `E' on a Hewlett-Packard
297: LaserJet III:
298:
299:
300: .sp |8i
301: .ps 500
302: .ce
303: E
304:
305:
306: ***** Printer Configuration *****
307:
308: ttrrooffff reads several files in directory /uussrr/lliibb/rrooffff/ttrrooffff_ppccll
309: (for normal ttrrooffff) or /uussrr/lliibb/rrooffff/ttrrooffff_ppss (for PostScript
310: ttrrooffff) to find printer-specific information. It reads special
311: character definitions from file ssppeecciiaallss.rr. It reads font loading
312: requests from file ffoonnttss.rr. It copies file .pprree at the beginning
313: of the output. It copies file .ppoosstt at the end of the output.
314: In landscape mode, ttrrooffff looks for files .pprree_llaanndd and .ppoosstt_llaanndd
315: instead. You can change these files as desired to include
316: printer-specific commands in ttrrooffff output.
317:
318: ***** Files *****
319:
320: /ttmmpp/rrooff* -- Temporary files
321: /uussrr/lliibb/ttmmaacc.* -- Standard macro packages
322: /uussrr/lliibb/rrooffff/ttrrooffff_ppccll/ -- Support files directory for PCL
323: /uussrr/lliibb/rrooffff/ttrrooffff_ppss/ -- Support files directory for PostScript
324: /uussrr/lliibb/rrooffff/ttrrooffff_*/.pprree -- Output prefix
325: /uussrr/lliibb/rrooffff/ttrrooffff_*/.pprree_llaanndd -- Output prefix, landscape mode
326:
327:
328: COHERENT Lexicon Page 5
329:
330:
331:
332:
333: troff Command troff
334:
335:
336:
337: /uussrr/lliibb/rrooffff/ttrrooffff_*/.ppoosstt -- Output suffix
338: /uussrr/lliibb/rrooffff/ttrrooffff_*/.ppoosstt_llaanndd -- Output suffix, landscape mode
339: /uussrr/lliibb/rrooffff/ttrrooffff_*/ffoonnttss.rr -- Font definitions
340: /uussrr/lliibb/rrooffff/ttrrooffff_*/ffwwtt/ -- Directory for font width tables
341: /uussrr/lliibb/rrooffff/ttrrooffff_*/ssppeecciiaallss.rr -- Special character definitions
342:
343: ***** See Also *****
344:
345: ccooll, ccoommmmaannddss, ddeerrooffff, ffwwttaabbllee, hhpprr, mmaann, mmss, nnrrooffff
346: _n_r_o_f_f, _T_h_e _T_e_x_t-_F_o_r_m_a_t_t_i_n_g _L_a_n_g_u_a_g_e, tutorial
347:
348: Adobe Systems Incorporated: _P_o_s_t_S_c_r_i_p_t _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l.
349: Reading, Mass.: Addison-Wesley Publishing Company, Inc., 1988.
350:
351: Adobe Systems Incorporated: _P_o_s_t_S_c_r_i_p_t _L_a_n_g_u_a_g_e _T_u_t_o_r_i_a_l _a_n_d
352: _C_o_o_k_b_o_o_k. Reading, Mass.: Addison-Wesley Publishing Company,
353: Inc., 1988.
354:
355: Emerson, S.L., Paulsell, K.: _t_r_o_f_f _T_y_p_e_s_e_t_t_i_n_g _f_o_r _U_n_i_x _S_y_s_t_e_m_s.
356: Englewood Cliffs, N.J.: Prentice-Hall, Inc., 1987 (ISBN 0-13-
357: 930959-4).
358:
359: Lawson, A.: _P_r_i_n_t_i_n_g _T_y_p_e_s: _A_n _I_n_t_r_o_d_u_c_t_i_o_n. Boston: Beacon
360: Press, 1971. _A_n _e_x_c_e_l_l_e_n_t, _o_n_e-_v_o_l_u_m_e _i_n_t_r_o_d_u_c_t_i_o_n _t_o _t_y_p_e _a_n_d
361: _t_y_p_e_s_e_t_t_i_n_g.
362:
363: Tufte, E.W.: _T_h_e _V_i_s_u_a_l _D_i_s_p_l_a_y _o_f _Q_u_a_n_t_i_t_a_t_i_v_e _I_n_f_o_r_m_a_t_i_o_n.
364: Cheshire, Conn.: Graphics Press, 1983. _S_u_p_e_r_b_l_y _i_n_t_r_o_d_u_c_e_s _t_h_e
365: _s_u_b_j_e_c_t _o_f _g_r_a_p_h_i_c _d_e_s_i_g_n. _E_s_p_e_c_i_a_l_l_y _u_s_e_f_u_l _i_f _y_o_u _w_i_s_h _t_o
366: _e_x_p_l_o_r_e _P_o_s_t_S_c_r_i_p_t.
367:
368: University of Chicago Press: _A _M_a_n_u_a_l _o_f _S_t_y_l_e _f_o_r _A_u_t_h_o_r_s,
369: _E_d_i_t_o_r_s, _a_n_d _C_o_p_y_w_r_i_t_e_r_s, ed. 12, revised. Chicago: University
370: of Chicago Press, 1969. _S_t_i_l_l _t_h_e _b_e_s_t _o_n_e-_v_o_l_u_m_e _r_e_f_e_r_e_n_c_e _f_o_r
371: _c_o_p_y _e_d_i_t_o_r_s: _i_f _y_o_u'_r_e _g_o_i_n_g _t_o _p_u_b_l_i_s_h _m_a_n_u_a_l_s, _y_o_u _s_h_o_u_l_d _d_o
372: _i_t _r_i_g_h_t.
373:
374: ***** Notes *****
375:
376: Like nnrrooffff, ttrrooffff should be used with the macro packages mmss,
377: which is found in the file /uussrr/lliibb/ttmmaacc.ss, and mmaann, which is
378: found in the file /uussrr/lliibb/ttmmaacc.aann.
379:
380: ttrrooffff output, unlike that of nnrrooffff, cannot be processed through a
381: terminal driver.
382:
383: Laser printers cannot print on an area near each edge of the
384: output page. Output sent to the unprintable area will disappear.
385: On some printers, the _l_o_g_i_c_a_l _p_a_g_e does not correspond to the
386: _p_h_y_s_i_c_a_l _p_a_g_e, so printed ttrrooffff output may be offset from the
387: specified position on the physical page.
388:
389:
390:
391:
392:
393:
394: COHERENT Lexicon Page 6
395:
396:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.