xref: /plan9/sys/doc/troff.ms (revision 7dd7cddf99dd7472612f1413b4da293630e6b1bc)
1.nr *% \n(%#u+7u
2.ds NR "\f2nroff\fP
3.ds TR "\f2troff\|\fP
4.ds Tr \f2Troff\|\fP
5.ds Nr \f2Nroff\fP
6.		\" CW - constant width font not from -ms
7.de T&
8.X "END US
9.X "US T&
10..
11.de CW
12.nr PQ \\n(.f
13.if \\n(.$=0 .ft CW
14.if \\n(.$>0 \%\&\\$3\f(CW\\$1\\f\\n(PQ\\$2
15..
16.de BI
17.nr PQ \\n(.f
18.if \\n(.$=0 .ft 4
19.if \\n(.$>0 \%\&\\$3\f2\\$1\\f\\n(PQ\\$2
20..
21.de UC
22\\$3\s-2\\$1\s+2\\$2
23..
24.am NH
25.nr p \\np+1
26.nr s 0 1
27..
28.fp 4 BI LucidaSansI
29.bd 4 3
30.de sc
31.LP
32\f4\\np.\\n+s.\ \ \\$1\f1\0
33..
34.de bt
35.SP .25
36.LP
37.NE 2.1
38.ta 1.5i 2.5i 3.5i 4.5i
39\\$1	\\$2	\\$3	\\$4
40.IP "" 0.8i
41....br
42\\$5
43..
44.
45.
46.
47.
48.
49.
50.
51.TL
52Troff User's Manual
53.AU
54Joseph F. Ossanna
55Brian W. Kernighan
56.sp
57bwk@research.bell-labs.com
58.EQ
59delim @@
60define cw % "\&" font CW %
61.EN
62.SH
63Introduction
64.PP
65\*(Tr and \*(NR are text processors
66that format text for typesetter- and
67typewriter-like terminals, respectively.
68They accept lines of text interspersed with lines of
69format control information and
70format the text into a printable, paginated document
71having a user-designed style.
72\*(Tr and \*(NR offer
73unusual freedom in document styling:
74arbitrary style headers and footers;
75arbitrary style footnotes;
76multiple automatic sequence numbering for paragraphs, sections, etc;
77multiple column output;
78dynamic font and point-size control;
79arbitrary horizontal and vertical local motions at any point;
80and
81a family of automatic overstriking, bracket construction, and
82line-drawing functions.
83.
84.de TL
85.LP
86.ce
87.ps +2
88.ft B
89..
90.
91.PP
92.I Troff
93produces its output in a device-independent form,
94although parameterized for a specific device;
95\*(TR output must be processed by a driver for that
96device to produce printed output.
97.PP
98\*(Tr and \*(NR are highly compatible with each other and it is almost always
99possible to prepare input acceptable to both.
100Conditional input is provided to enable
101the user to embed input expressly destined for either program.
102\*(Nr can prepare output directly for a variety of terminal types and
103is capable of utilizing the full resolution of each terminal.
104\*(Nr is the same program as \*(TR; in fact, on Plan 9
105\*(NR is a shell script that calls \*(TR with the
106.CW -N
107argument.
108.SH
109Background to the Plan 9 Edition
110.PP
111The primary change to \*(TR and \*(NR for Plan 9 is
112support of the Unicode Standard, which was added during
1131992 and 1993.  There are two results.  First, there is much
114less need for the myriad of two-character names that are so
115much a part of \*(TR lore; in Plan 9, for example, one naturally uses the
116Unicode character ½ instead of \*(TR\|'s
117.CW \\e(12 .
118Second, the output device, though called
119.CW utf ,
120is almost always a form of PostScript printer;
121the panoply of special drivers for different typesetters
122has largely disappeared.
123Unfortunately, not all PostScript printers can cope
124with Unicode characters, so there remains a need for
125programs that synthesize PostScript characters from bitmaps;
126this is especially true for Asian languages.
127.SH
128Background to the Second Edition
129.PP
130\*(Tr
131was originally written by the late Joe Ossanna
132in about 1973, in assembly language for the
133.UC PDP -11,
134to drive the Graphic Systems CAT typesetter.
135It was rewritten in C around 1975,
136and underwent slow but steady evolution until
137Ossanna's death late in 1977.
138.PP
139In 1979, Brian Kernighan
140modified
141\*(TR
142so that it would produce output for a variety of typesetters,
143while retaining its input specifications.
144Over the decade from 1979 to 1989,
145the internals
146have been modestly revised,
147though much of the code remains as it was when Ossanna wrote it.
148.PP
149\*(Tr
150reads parameter files
151each time it is invoked, to
152set values for machine resolution,
153legal type sizes and fonts, and character names,
154character widths
155and the like.
156\*(Tr
157output is
158.UC ASCII
159characters
160in a simple language
161that describes where each character is to be placed
162and in what size and font.
163A post-processor must be written for each device
164to convert this typesetter-independent language
165into specific instructions for that device.
166.PP
167The output language contains information that was not readily
168identifiable in the older output.
169In the newer language, the beginning of each page, line, and word
170is marked,
171so post-processors can do device-specific optimizations
172such as sorting the data vertically or printing it boustrophedonically,
173independent of
174\*(TR.
175.PP
176Capabilities for graphics have been added:
177\*(TR
178recognizes commands for drawing diagonal lines,
179circles, ellipses, circular arcs,
180and quadratic B-splines.
181There are also ways to pass arbitrary information to the output,
182unprocessed by
183\*(TR.
184.PP
185A number of limitations have been eased or eliminated.
186A document may have an arbitrary number of fonts on any page
187(if the output device permits it, of course).
188Fonts may be accessed merely by naming them;
189``mounting'' is no longer necessary.
190There are no limits on the number of characters.
191\H'8'Character height\H'10' and \S'-1'sl\S'0'a\S'1'nt\S'0' may be set
192independently of width.
193.PP
194The remainder of this document contains a description of
195usage and command-line options;
196a summary of requests, escape sequences, and pre-defined number registers;
197a reference manual;
198tutorial examples;
199and a list of commonly-available characters.
200.SH
201Acknowledgements
202.PP
203Joe Ossanna's
204\*(TR
205remains a remarkable accomplishment.
206For more than twenty years, it has proven a robust tool,
207taking unbelievable abuse from a variety of preprocessors
208and being forced into uses that were never conceived of
209in the original design,
210all with considerable grace under fire.
211.PP
212Recent versions of \*(TR have profited from
213significant code improvements by
214Jaap Akkerhuis, Dennis Ritchie, Ken Thompson, and Molly Wagner.
215UTF facilities owe much to Jaap Akkerhuis.
216Andrew Hume, Doug McIlroy, Peter Nelson and Ravi Sethi made valuable suggestions on the manual.
217I fear that the remaining bugs are my fault.
218.sp 100
219.BP
220.TL
221Usage
222.SP
223.PP
224\*(Tr or \*(NR is invoked as
225.P1
226troff  \fIoptions  files\fP
227nroff  \fIoptions  files\fP
228.P2
229where @options@ represents any of a number of option arguments
230and @files@ represents the list of files containing the document
231to be formatted.
232An argument consisting of a single minus
233.CW - ' `
234represents standard input.
235If no filenames are given input is taken from the standard input.
236The options, which may appear in any order so long as they appear
237before the files, are:
238.TS
239center;
240lfCW lw(4.5i).
241-m@name@	T{
242Read the macro file
243@cw /sys/lib/tmac. name@
244before the input @files@.
245T}
246-T@name@	T{
247Specifies
248the type of the output device.
249Specific devices are site-dependent.
250For
251\*(TR,
252the most useful name is
253.CW utf .
254For
255\*(NR,
256useful names include
257@cw "37"@ for the (default) Model 37 Teletype,
258@cw lp@ for ``dumb'' line printer terminals (no half-line motions,
259no reverse motions),
260and @cw think@ for the HP ThinkJet printer.
261T}
262-i	T{
263Read standard input after the input files are exhausted.
264T}
265-o@list@	T{
266Print only pages whose page numbers appear in @list@,
267which consists of comma-separated numbers and number ranges.
268A number range has the form @N-M@
269and means pages @N@ through @M@;
270a initial @-N@ means
271from the beginning to page @N@; and a final @N-@ means
272from @N@ to the end.
273T}
274-n@N@	T{
275Number first generated page @N@.
276T}
277-r@aN@	T{
278Set number register @a@ (one-character) to @N@.
279T}
280-s@N@	T{
281Stop every @N@ pages.
282\*(Nr will halt prior to every @N@ pages (default @N=1@)
283to allow paper loading or
284changing, and will resume upon receipt of a newline.
285\*(Tr will include a ``pause'' code every @N@ pages;
286its meaning, if any, depends on the output device.
287T}
288-u@N@	T{
289Set amount of emboldening for the
290.CW bd
291request to @N@.
292T}
293-F@path@	T{
294Look in directory @path@ for font information;
295the defaults are
296.CW /sys/lib/troff/font
297and
298.CW /sys/lib/troff/term
299for \*(TR
300and \*(NR respectively.
301T}
302.sp .5
303	T{
304                  \*(TR Only
305T}
306-a	T{
307Send a printable approximation
308of the results to the standard output.
309T}
310.sp .5
311	T{
312                  \*(NR Only
313T}
314-e	T{
315Produce equally-spaced words in adjusted
316lines, using full terminal resolution.
317T}
318-h	T{
319Use tabs instead of spaces
320to speed up printing.
321T}
322-q	T{
323Invoke the simultaneous input-output mode of the @cw rd@ request.
324T}
325.TE
326.PP
327Each option is a separate argument;
328for example,
329.P1
330troff -Tutf -ms -mpictures -o4,6,8-10 \f2file1 file2\fP
331.P2
332requests formatting of pages 4, 6, and 8 through 10 of a document contained in the files
333named \f2file1\fP and \f2file2\fP,
334specifies the output in UTF,
335and invokes the macro packages
336.CW -ms
337and
338.CW -mpictures .
339.PP
340Various pre- and post-processors are available for use with \*(NR and \*(TR.
341These include the equation preprocessor
342.I eqn
343(for \*(TR only),
344the table-construction preprocessor
345.I tbl ,
346and
347.I pic
348and
349.I grap
350for various forms of graphics.
351.sp 100
352.BP
353.TL
354Request Summary
355.PP
356In the following table,
357the notation @+- N@ in the
358.BI "Request Form
359column means that the forms @N@, @+N@, or @-N@ are permitted,
360to set the parameter to @N@, increment it by @N@, or decrement it by @N@,
361respectively.
362Plain @N@ means that the value is used to set the parameter.
363.BI "Initial Values
364separated by
365.CW ;
366are for
367\*(TR
368and
369\*(NR
370respectively.
371In the
372.BI Notes
373column,
374.TS
375center;
376c lw(4.5i).
377B	T{
378Request normally causes a break.
379The use of
380.CW ' \&
381as control character (instead of
382.CW . )\&
383suppresses the break function.
384T}
385D	T{
386Mode or relevant parameters associated with current diversion level.
387T}
388E	T{
389Relevant parameters are a part of the current environment.
390T}
391O	T{
392Must stay in effect until logical output.
393T}
394P	T{
395Mode must be still or again in effect at the time of physical output.
396T}
397T	T{
398\*(TR only; no effect in \*(NR.
399T}
400@bold v@, @bold p@, @bold m@, @bold u@	T{
401Default scale indicator; if not specified, scale indicators are ignored.
402T}
403.TE
404.sp
405.tr &.
406.ps 9
407.vs 11
408.nr z 0 1
409.TS
410lf2 lf2 lf2 lf2 lf2
411lf2 lf2 lf2 lf2 lf2
412lfCW l l l l.
413Request	Initial	If No
414Form	Value	Argument	Notes	Explanation
415.sp .5
416.T&
417lf3 s s s s.
418\\n+z.  General Information
419.sp .5
420.T&
421lf3 s s s s
422lfCW l l l l.
423\\n+z.  Font and Character Size Control
424.sp .5
425&ps @+- N@	10 point	previous	E,T	Point size; also @cw "\es" +- N@.
426&ss @N@	12/36\fBm\fP	ignored	E,T	Space-character size set to @N/36@ em.
427&cs @ F~N~ M@	off	-	P,T	Constant character space (width) mode (font @F@).
428&bd @F~N@	off	-	P,T	Embolden font @F@ by @N-1@ units.
429&bd S@~F~N@	off	-	P,T	Embolden Special Font when current font is @F@.
430&ft@~F@	Roman	previous	E	Change to font @F@; also @cw "\ef" x@, @cw "\ef(" xx@, @cw "\ef" N@.
431&fp@~N~F~L@	R,I,B,...,S	ignored	-	Mount font named @F@ on physical position @N <= 1@;
432				  long name is @L@ if given.
433.sp .5
434.T&
435lf3 s s s s
436lfCW l l l l.
437\\n+z.  Page Control
438&pl @+- N@	11i	11i	@bold v@	Page length.
439&bp @+- N@	@N=1@	-	B,@bold v@	Eject current page; next page number @N@.
440&pn @+- N@	@N=1@	ignored	-	Next page number @N@.
441&po @+- N@	1i; 0	previous	@bold v@	Page offset.
442&ne @N@	-	@N=1 roman v@	D,@bold v@	Need @N@ vertical space.
443&mk @R@	none	internal	D	Mark current vertical place in register @R@.
444&rt @+- N@	none	internal	D,@bold v@	Return (upward only) to marked vertical place.
445.sp .5
446.T&
447lf3 s s s s
448lfCW l l l l.
449\\n+z.  Text Filling, Adjusting, and Centering
450&br	-	-	B	Break.
451&fi	fill	-	B,E	Fill output lines.
452&nf	fill	-	B,E	No filling or adjusting of output lines.
453&ad @c@	adj, both	adjust	E	Adjust output lines with mode @c@;  @c = cw l , cw r , cw c , cw b , none@
454&na	adjust	-	E	No output line adjusting.
455&ce @N@	off	@N=1@	B,E	Center next @N@ input text lines.
456.sp .5
457.T&
458lf3 s s s s
459lfCW l l l l.
460\\n+z.  Vertical Spacing
461&vs @N@	12p; 1/6i	previous	E,@bold p@	Vertical baseline spacing (@V@).
462&ls @N@	@N=1@	previous	E	Output @N-1@ @bold v@'s after each text output line.
463&sp @N@	-	@N=1@v	B,@bold v@	Space vertical distance @N@ in either direction.
464&sv @N@	-	@N=1@v	@bold v@	Save vertical distance @N@.
465&os	-	-	-	Output saved vertical distance.
466&ns	space	-	D	Turn no-space mode on.
467&rs	-	-	D	Restore spacing; turn no-space mode off.
468.sp .5
469.T&
470lf3 s s s s
471lfCW l l l l.
472\\n+z.  Line Length and Indenting
473&ll @+- N@	6.5i	previous	E,@bold m@	Line length.
474&in @+- N@	@N=0@	previous	B,E,@bold m@	Indent.
475&ti @+- N@	-	ignored	B,E,@bold m@	Temporary indent.
476.sp .5
477.ne 2.1
478.T&
479lf3 s s s s
480lfCW l l l l.
481\\n+z.  Macros, Strings, Diversion, and Position Traps
482&de @xx~yy@	-	@.yy= cw ".."@	-	Define or redefine macro @xx@; end at call of @yy@.
483&am @xx~yy@	-	@.yy= cw ".."@	-	Append to a macro.
484&ds @xx~string@	-	ignored	-	Define a string @xx@ containing @string@.
485&as @xx~string@	-	ignored	-	Append @string@ to string @xx@.
486&rm @xx@	-	ignored	-	Remove request, macro, or string.
487&rn @xx~yy@	-	ignored	-	Rename request, macro, or string @xx@ to @yy@.
488&di @xx@	-	end	D	Divert output to macro @xx@.
489&da @xx@	-	end	D	Divert and append to @xx@.
490&wh @N~xx@	-	-	@bold v@	Set location trap; negative is w.r.t. page bottom.
491&ch @xx~N@	-	-	@bold v@	Change trap location.
492&dt @N~xx@	-	off	D,@bold v@	Set a diversion trap.
493&it @N~xx@	-	off	E	Set an input-line count trap.
494&em @xx@	none	none	-	End macro is @xx@.
495.sp .5
496.T&
497lf3 s s s s
498lfCW l l l l.
499\\n+z.  Number Registers
500&nr @R~+- N~M@		-	@bold u@	Define and set number register @R@;
501				  auto-increment by @M@.
502&af @R~c@	arabic	-	-	Assign format to register @R@ (@c= cw "1" , cw i , cw I , cw a , cw A@).
503&rr @R@	-	-	-	Remove register @R@.
504.sp .5
505.T&
506lf3 s s s s
507lfCW l l l l.
508\\n+z.  Tabs, Leaders, and Fields
509&ta@~Nt~. . .@	0.5i; 0.8n	none	E,@bold m@	Tab settings; left-adjusting, unless
510				  @t= cw R@ (right), @cw C@ (centered).
511&tc@~c@	none	none	E	Tab repetition character.
512&lc@~c@	@cw "."@	none	E	Leader repetition character.
513&fc@~a~b@	off	off	-	Set field delimiter @a@ and pad character @b@.
514.sp .5
515.T&
516lf3 s s s s
517lfCW l l l l.
518\\n+z.  Input and Output Conventions and Character Translations
519&ec@~c@	\e	\e	-	Set escape character.
520&eo	on	-	-	Turn off escape character mechanism.
521&lg@~N@	on; -	on	T	Ligature mode on if @N>0@.
522&ul@~N@	off	@N=1@	E	Underline (italicize in \*(TR\^) @N@ input lines.
523&cu@~N@	off	@N=1@	E	Continuous underline in \*(NR; in \*(TR, like @cw ul@.
524&uf@~F@	Italic	Italic	-	Underline font set to @F@ (to be switched to by @cw ul@).
525&cc@~c@	@cw .@	@cw .@	E	Set control character to @c@.
526&c2@~c@	@cw "'"@	@cw "'"@	E	Set no-break control character to @c@.
527&tr@~abcd....@	none	-	O	Translate @a@ to @b@, etc., on output.
528.sp .5
529.T&
530lf3 s s s s.
531\\n+z.  Local Horizontal and Vertical Motions, and the Width Function
532.sp .5
533.T&
534lf3 s s s s.
535\\n+z.  Overstrike, Bracket, Line-drawing, Graphics, and Zero-width Functions
536.sp .5
537.T&
538lf3 s s s s
539lfCW l l l l.
540\\n+z.  Hyphenation.
541&nh	hyphenate	-	E	No hyphenation.
542&hy@~N@	hyphenate	hyphenate	E	Hyphenate; @N =@ mode.
543&hc@~c@	@cw "\e%"@	@cw "\e%"@	E	Hyphenation indicator character @c@.
544&hw@~word~. . .@		ignored	-	Add words to hyphenation dictionary.
545.sp .5
546.T&
547lf3 s s s s
548lfCW l l l l.
549\\n+z.  Three-Part Titles.
550&tl@~'l'c'r'@		-	-	Three-part title; delimiter may be any character.
551&pc@~c@	@cw %@	off	-	Page number character.
552&lt@~+- N@	6.5i	previous	E,@bold m@	Length of title.
553.sp .5
554.T&
555lf3 s s s s
556lfCW l l l l.
557\\n+z.  Output Line Numbering.
558&nm@~+- N^M^S^I@		off	E	Number mode on or off, set parameters.
559&nn@~N@	-	@N=1@	E	Do not number next @N@ lines.
560.sp .5
561.ne 2
562.T&
563lf3 s s s s
564lfCW l l l l.
565\\n+z.  Conditional Acceptance of Input
566&if@~c~any@		-	-	If condition @c@ true, accept @any@ as input;
567				  for multi-line, use @cw "\e{" any cw "\e}"@.
568&if !@c~any@		-	-	If condition @c@ false, accept @any@.
569&if@~N~any@		-	@bold u@	If expression @N > 0@, accept @any@.
570&if !@N~any@		-	@bold u@	If expression @N <= 0@ [sic], accept @any@.
571&if@~ 's1 's2 '~any@		-	-	If string @s1@ identical to @s2@, accept @any@.
572&if !@ 's1 's2 '~any@		-	-	If string @s1@ not identical to @s2@, accept @any@.
573&ie@~c~any@		-	@bold u@	If portion of if-else; all above forms (like @cw "if"@).
574&el@~any@		-	-	Else portion of if-else.
575.sp .5
576.T&
577lf3 s s s s
578lfCW l l l l.
579\\n+z.  Environment Switching
580&ev@~N@	@N=0@	previous	-	Environment switch (push down).
581.sp .5
582.T&
583lf3 s s s s
584lfCW l l l l.
585\\n+z.  Insertions from the Standard Input
586&rd@~prompt@	-	@prompt@=\s-1BEL\s+1	-	Read insertion.
587&ex	-	-	-	Exit.
588.sp .5
589.T&
590lf3 s s s s
591lfCW l l l l.
592\\n+z.  Input/Output File Switching
593&so@~filename@		-	-	Switch source file (push down).
594&nx@~filename@		end-of-file	-	Next file.
595&sy@~string@		-	-	Execute program @string@.  Output not interpolated.
596&pi@~string@		-	-	Pipe output to program @string@.
597&cf@~filename@		-	-	Copy file contents to \*(TR output.
598.sp .5
599.T&
600lf3 s s s s
601lfCW l l l l.
602\\n+z.  Miscellaneous
603&mc@~c~N@	-	off	E,@bold m@	Set margin character @c@ and separation @N@.
604&tm@~string@	-	newline	-	Print @string@ on terminal (standard error).
605&ab@~string@	-	newline	-	Print @string@ on standard error, exit program.
606&ig@~yy@	-	@.yy= cw ".."@	-	Ignore input until call of @yy@.
607&lf@~N ~f@		-	-	Set input line number to @N@ and filename to @f@.
608&pm@~t@	-	all	-	Print macro names, sizes; if @t@ present, print total.
609&fl	-	-	B	Flush output buffer.
610.sp .5
611.T&
612lf3 s s s s.
613\\n+z.  Output and Error Messages
614.sp .5
615\\n+z.  Output Language
616.sp .5
617\\n+z.  Device and Font Description Files
618.TE
619.br
620.nr zz 9
621.de cl
622.ie \\n+(cl<\n(zz \{\
623.	po +\\n(.lu/\n(zzu
624.	rt\}
625.el \{.po 1i\}
626..
627.nr cl 0 1
628.di zz
629.ta .45iR
630... was .35
631.nf
632.ps 9
633.vs 10.5
634\f(CWab\fP	20
635\f(CWad\fP	4
636\f(CWaf\fP	8
637\f(CWam\fP	7
638\f(CWas\fP	7
639\f(CWbd\fP	2
640\f(CWbp\fP	3
641\f(CWbr\fP	4
642\f(CWc2\fP	10
643\f(CWcc\fP	10
644\f(CWce\fP	4
645\f(CWcf\fP	19
646\f(CWch\fP	7
647\f(CWcs\fP	2
648\f(CWcu\fP	10
649\f(CWda\fP	7
650\f(CWde\fP	7
651\f(CWdi\fP	7
652\f(CWds\fP	7
653\f(CWdt\fP	7
654\f(CWec\fP	10
655\f(CWel\fP	16
656\f(CWem\fP	7
657\f(CWeo\fP	10
658\f(CWev\fP	17
659\f(CWex\fP	18
660\f(CWfc\fP	9
661\f(CWfi\fP	4
662\f(CWfl\fP	20
663\f(CWfp\fP	2
664\f(CWft\fP	2
665\f(CWhc\fP	13
666\f(CWhw\fP	13
667\f(CWhy\fP	13
668\f(CWie\fP	16
669\f(CWif\fP	16
670\f(CWig\fP	20
671\f(CWin\fP	6
672\f(CWit\fP	7
673\f(CWlc\fP	9
674\f(CWlg\fP	10
675\f(CWlf\fP	20
676\f(CWll\fP	6
677\f(CWls\fP	5
678\f(CWlt\fP	14
679\f(CWmc\fP	20
680\f(CWmk\fP	3
681\f(CWna\fP	4
682\f(CWne\fP	3
683\f(CWnf\fP	4
684\f(CWnh\fP	13
685\f(CWnm\fP	15
686\f(CWnn\fP	15
687\f(CWnr\fP	8
688\f(CWns\fP	5
689\f(CWnx\fP	19
690\f(CWos\fP	5
691\f(CWpc\fP	14
692\f(CWpi\fP	19
693\f(CWpl\fP	3
694\f(CWpm\fP	20
695\f(CWpn\fP	3
696\f(CWpo\fP	3
697\f(CWps\fP	2
698\f(CWrd\fP	18
699\f(CWrm\fP	7
700\f(CWrn\fP	7
701\f(CWrr\fP	8
702\f(CWrs\fP	5
703\f(CWrt\fP	3
704\f(CWso\fP	19
705\f(CWsp\fP	5
706\f(CWss\fP	2
707\f(CWsv\fP	5
708\f(CWsy\fP	19
709\f(CWta\fP	9
710\f(CWtc\fP	9
711\f(CWti\fP	6
712\f(CWtl\fP	14
713\f(CWtm\fP	20
714\f(CWtr\fP	10
715\f(CWuf\fP	10
716\f(CWul\fP	10
717\f(CWvs\fP	5
718\f(CWwh\fP	7
719.di
720.nr aa \n(dn/\n(zz
721.ne \\n(aau+10p
722.sp
723.SP 2
724.TL
725Alphabetical Request and Section Number Cross Reference
726.SP .5
727.LP
728.sp .5
729.nf
730.wh \n(nlu+\n(aau cl
731.nr qq \n(nlu+\n(aau
732.ps
733.vs
734.mk
735.zz
736.rt
737.sp \n(.tu
738.ch cl 12i
739.sp 100
740.BP
741.TL
742Escape Sequences for Characters, Indicators, and Functions
743.SP .5
744.LP
745.ps -1
746.vs -1
747.TS
748center;
749c2 l
750c2 l2 l
751n2 l2fCW l.
752.ft 4
753Section	Escape
754Reference	Sequence	Meaning
755.ft
756.sp .5
75710.1	\e\e	\&\f(CW\e\fP prevents or delays the interpretation of \&\f(CW\e\fP
75810.1	\ee	Printable version of the current escape character.
7592.1	\e'	\' (acute accent); equivalent to \&\f(CW\e(aa\fP
7602.1	\e`	\` (grave accent); equivalent to \&\f(CW\e(ga\fP
7612.1	\e\-	\- Minus sign in the current font
7627.	\e\^.	Period (dot) (see \&\f(CWde\fP)
76311.1	\e\f2space\fP	Unpaddable space-size space character
76411.1	\e0	Digit width space
76511.1	\e|	1/6 em narrow space character (zero width in \*(NR\^)
76611.1	\e^	1/12 em half-narrow space character (zero width in \*(NR\^)
767.tr &&
7684.1	\e&	Non-printing, zero width character
769.tr &.
77010.6	\e!	Transparent line indicator
77110.8	\e"	Beginning of comment; continues to end of line
77213.	\e%	Default optional hyphenation character
7732.1	\e(@xx@	Character named @xx@
7747.1	\e*@x,~@\e*(@xx@	Interpolate string @x@ or @xx@
7757.3	\e$@N@	Interpolate argument @1 <= N <= 9@
7769.1	\ea	Non-interpreted leader character
77712.3	\eb'@abc...@'	Bracket building function
7784.2	\ec	Connect to next input text
7792.1	\eC'@xyz@'	Character named @xyz@
78011.1	\ed	Downward 1/2 em vertical motion (1/2 line in \*(NR\^)
78112.5	\eD'@c...@'	Draw graphics function @c@ with parameters @. . .@; @c= cw l , cw c , cw e , cw a , cw "~"@
7822.2	\ef@x,~@\ef(@xx,~@\ef@N@	Change to font named @x@ or @xx@, or position @N@
7838.	\eg@x,~@\eg(@xx@	Format of number register @x@ or @xx@
78411.1	\eh'@N@'	Local horizontal motion; move right @N@ (negative left)
7852.3	\eH'@N@'	Height of current font is @N@
78611.3	\ek@x@	Mark horizontal input place in register @x@
78712.4	\el'@Nc@'	Horizontal line drawing function (optionally with @c@ )
78812.4	\eL'@Nc@'	Vertical line drawing function (optionally with @c@ )
7898.	\en@x,~@\en(@xx@	Contents of number register @x@ or @xx@
7902.1	\eN'@N@'	Character number @N@ on current font
79112.1	\eo'@abc...@'	Overstrike characters @a,~ b,~ c@, ...
7924.1	\ep	Break and spread output line
79311.1	\er	Reverse 1 em vertical motion (reverse line in \*(NR\^)
7942.3	\es@N,~@\es@+- N@	Point-size change function; also @cw "\es(" nn@, @cw "\es" +- cw "(" nn@
7952.2	\eS'@N@'	Slant output @N@ degrees
7969.1	\et	Non-interpreted horizontal tab
79711.1	\eu	Reverse (up) 1/2 em vertical motion (1/2 line in \*(NR\^)
79811.1	\ev'@N@'	Local vertical motion; move down N (negative up)
79911.2	\ew'@string@'	Width of @string@
8005.2	\ex'@N@'	Extra line-space function (negative before, positive after)
80110.7	\eX'@string@'	Output @string@ as device control function
80212.2	\ez@c@	Print @c@ with zero width (without spacing)
80316.	\e{	Begin conditional input
80416.	\e}	End conditional input
80510.8	\e@newline@	Concealed (ignored) newline
806-	\e@Z@	@Z@, any character not listed above
807.TE
808.ps +1
809.vs +1
810.LP
811The escape sequences
812.CW \e\e ,
813.CW \e\^. ,
814.CW \e" ,
815.CW \e$ ,
816.CW \e* ,
817.CW \ea ,
818.CW \en ,
819.CW \et ,
820.CW \eg ,
821and
822.CW \e@newline@
823are interpreted in copy mode (§7.2).
824.SP .5i
825\0
826.sp 100
827.BP
828.TL
829Predefined Number Registers
830.LP
831.ps -1
832.vs -1
833.TS
834c2l
835c2 l2 l
836n2 l2fCW l.
837.ft 4
838Section	Register
839Reference	Name	Description
840.ft
841.sp .5
8423.	%	Current page number.
84311.2	ct	Character type (set by \&\f(CW\ew\fP function).
8447.4	dl	Width (maximum) of last completed diversion.
8457.4	dn	Height (vertical size) of last completed diversion.
846-	dw	Current day of the week (1-7).
847-	dy	Current day of the month (1-31).
84815.	ln	Output line number.
849-	mo	Current month (1-12).
8504.1	nl	Vertical position of last printed text baseline.
85111.2	sb	Depth of string below baseline (generated by \&\f(CW\ew\fP function).
85211.2	st	Height of string above baseline (generated by \&\f(CW\ew\fP function).
853-	yr	Last two digits of current year.
854.TE
855.ps +1
856.vs +1
857
858
859.TL
860Predefined Read-Only Number Registers
861.LP
862.ps -1
863.vs -1
864.TS
865c2 l
866c2 l2 l
867n2 l2fCW l.
868.ft 4
869Section	Register
870Reference	Name	Description
871.ft
872.sp .5
87319.	$$	Process id of \*(TR or \*(NR.
8747.3	&$	Number of arguments available at the current macro level.
8755.2	&a	Post-line extra line-space most recently used in @cw "\ex'" N cw "'" @.
876-	&A	Set to 1 in \*(TR, if @cw -a@ option used; always 1 in \*(NR.
8772.3	&b	Emboldening level.
87820.	&c	Number of lines read from current input file.
8797.4	&d	Current vertical place in current diversion; equal to @cw nl@, if no diversion.
8802.2	&f	Current font number.
88120.	&F	Current input file name [sic].
8824.	&h	Text baseline high-water mark on current page or diversion.
88311.1	&H	Available horizontal resolution in basic units.
8846.	&i	Current indent.
8854.2	&j	Current @cw ad@ mode.
8864.1	&k	Current output horizontal position.
8876.	&l	Current line length.
8885.1	&L	Current @cw ls@ value.
8894.	&n	Length of text portion on previous output line.
8903.	&o	Current page offset.
8913.	&p	Current page length.
8927.5	.R	Number of unused number registers.
893-	&T	Set to 1 in \*(NR, if \&\f(CW-T\fP option used; always 0 in \*(TR.
8942.3	&s	Current point size.
8957.5	&t	Distance to the next trap.
8964.1	&u	Equal to 1 in fill mode and 0 in nofill mode.
8975.1	&v	Current vertical line spacing.
89811.1	&V	Available vertical resolution in basic units.
89911.2	&w	Width of previous character.
900-	&x	Reserved version-dependent register.
901-	&y	Reserved version-dependent register.
9027.4	&z	Name [sic] of current diversion.
903.TE
904.ps +1
905.vs +1
906.sp 100
907.BP
908.TL
909Reference Manual
910.NH
911General Explanation
912.sc "Form of input.
913Input consists of \fItext lines\fR, which are destined to be printed,
914interspersed with \fIcontrol lines\fR,
915which set parameters or otherwise control subsequent processing.
916Control lines begin with a \fIcontrol character\fR\(em\
917normally \&\f(CW.\fR (period) or \&\f(CW'\fR (single quote)\(em\
918followed by a one or two character name that specifies
919a basic \fIrequest\fR or the substitution of
920a user-defined \fImacro\fR in place of the control line.
921The control character \&\f(CW'\fR suppresses the \fIbreak\fR function\(em\
922the forced output of a partially filled line\(em\
923caused by certain requests.
924The control character may be separated from the request/macro name by
925white space (spaces and/or tabs) for aesthetic reasons.
926Names should be followed by either
927space or newline.
928Control lines with unrecognized names are ignored.
929.PP
930Various special functions may be introduced anywhere in the input by
931means of an \fIescape\fR character, normally \&\f(CW\e\fR.
932For example, the function
933.CW \en@R@
934causes the interpolation of the contents of the
935\fInumber register R\fR
936in place of the function;
937here @R@ is either a single character name
938as in \&\f(CW\en\fIx\fR,
939or a two-character name introduced by
940a left-parenthesis, as in \&\f(CW\en(\fIxx\fR.
941.sc "Formatter and device resolution.
942\*(Tr internally stores and processes dimensions in units that correspond to
943the particular device for which output is being prepared;
944values from 300 to 1200/inch are typical.
945See §23.
946\*(Nr internally uses 240 units/inch,
947corresponding to the least common multiple of the
948horizontal and vertical resolutions of various
949typewriter-like output devices.
950\*(Tr rounds horizontal/vertical numerical parameter input to the actual
951horizontal/vertical resolution of the output device indicated by the \&\f(CW-T\fR option
952(default
953.CW post ).
954\*(Nr similarly rounds numerical input to the actual resolution
955of its output device
956(default Model 37 Teletype).
957.sc "Numerical parameter input.
958Both \*(NR and \*(TR
959accept numerical input with the appended scale
960indicators
961shown in the following table,
962where
963\fIS\fR is the current type size in points and
964\fIV\fR is the current vertical line spacing in
965basic units.
966.TS
967center box;
968c|c
969c|c
970c|l.
971Scale
972Indicator	Meaning
973_
974\&\f(CWi\fR	Inch
975\&\f(CWc\fR	Centimeter
976\&\f(CWP\fR	Pica = 1/6 inch
977\&\f(CWm\fR	Em = \fIS\fR points
978\&\f(CWn\fR	En = Em/2
979\&\f(CWp\fR	Point = 1/72 inch
980\&\f(CWu\fR	Basic unit
981\&\f(CWv\fR	Vertical line space \fIV\fR
982none	Default, see below
983.TE
984In \*(NR, both the em and the en are taken to be equal to the
985nominal character width,
986which is output-device dependent;
987common values are 1/10 and 1/12 inch.
988Actual character widths in \*(NR need not be all the same and constructed characters
989such as -> (→) are often extra wide.
990The default scaling is
991.CW m
992for the horizontally-oriented requests
993and functions
994.CW ll ,
995.CW in ,
996.CW ti ,
997.CW ta ,
998.CW lt ,
999.CW po ,
1000.CW mc ,
1001.CW \eh ,
1002.CW \el ,
1003and horizontal coordinates of
1004.CW \eD ;
1005.CW v
1006for the vertically-oriented requests and functions
1007.CW pl ,
1008.CW wh ,
1009.CW ch ,
1010.CW dt ,
1011.CW sp ,
1012.CW sv ,
1013.CW ne ,
1014.CW rt ,
1015.CW \ev ,
1016.CW \ex ,
1017.CW \eL ,
1018and vertical coordinates of
1019.CW \eD ;
1020.CW p
1021for the
1022.CW vs
1023request;
1024and
1025.CW u
1026for the requests
1027.CW nr ,
1028.CW if ,
1029and
1030.CW ie .
1031\fIAll\fR other requests ignore any scale indicators.
1032When a number register containing an already appropriately scaled number
1033is interpolated to provide numerical input,
1034the unit scale indicator
1035\&\f(CWu\fR may need to be appended to prevent
1036an additional inappropriate default scaling.
1037The number, @N@, may be specified in decimal-fraction form
1038but the parameter finally stored is rounded to an integer number of basic units.
1039Internal computations are performed in integer arithmetic.
1040.PP
1041The \fIabsolute position\fR indicator \&\f(CW|\fR may be prefixed
1042to a number @N@
1043to generate the distance to the vertical or horizontal place @N@.
1044For vertically-oriented requests and functions, \&\f(CW|\fP@N@
1045becomes the distance in basic units from the current vertical place on the page or in a \fIdiversion\fR (§7.4)
1046to the vertical place @N@.
1047For \fIall\fR other requests and functions,
1048\&\f(CW|\fP@N@
1049becomes the distance from
1050the current horizontal place on the \fIinput\fR line to the horizontal place @N@.
1051For example,
1052.P1
1053\&.sp |3.2c
1054.P2
1055will space in the required direction to 3.2 centimeters from the top of the page.
1056.sc "Numerical expressions.
1057.tr &&
1058Wherever numerical input is expected,
1059an expression involving parentheses,
1060the arithmetic operators \&\f(CW+\fR, \&\f(CW-\fR, \&\f(CW/\fR, \&\f(CW\(**\fR, \&\f(CW%\fR (mod),
1061and the logical operators
1062\&\f(CW<\fR,
1063\&\f(CW>\fR,
1064\&\f(CW<=\fR,
1065\&\f(CW>=\fR,
1066\&\f(CW=\fR (or \&\f(CW==\fR),
1067\&\f(CW&\fR\ (and),
1068\&\f(CW:\fR\ (or)
1069may be used.
1070Except where controlled by parentheses, evaluation of expressions is left-to-right;
1071there is no operator precedence.
1072In the case of certain requests, an initial \&\f(CW+\fR or \&\f(CW-\fR is stripped
1073and interpreted as an increment or decrement indicator respectively.
1074In the presence of default scaling, the desired scale indicator must be
1075attached to \fIevery\fR number in an expression
1076for which the desired and default scaling differ.
1077For example,
1078if the number register \&\f(CWx\fR contains 2
1079and the current point size is 10,
1080then
1081.P1
1082\&.ll (4.25i+\enxP+3)/2u
1083.P2
1084will set the line length to 1/2 the sum of 4.25 inches + 2 picas + 3 ems.
1085.sc "Notation.
1086Numerical parameters are indicated in this manual in two ways.
1087@+- N@ means that the argument may take the forms @N@, @+N@, or @-N@ and
1088that the corresponding effect is to set the parameter
1089to @N@, to increment it by @N@, or to decrement it by @N@ respectively.
1090Plain @N@ means that an initial algebraic sign is \fInot\fR
1091an increment indicator,
1092but merely the sign of @N@.
1093Generally, unreasonable numerical input is either ignored
1094or truncated to a reasonable value.
1095For example,
1096most requests expect to set parameters to non-negative
1097values;
1098exceptions are
1099.CW sp ,
1100.CW wh ,
1101.CW ch ,
1102.CW nr ,
1103and
1104.CW if .
1105The requests
1106.CW ps ,
1107.CW ft ,
1108.CW po ,
1109.CW vs ,
1110.CW ls ,
1111.CW ll ,
1112.CW in ,
1113and
1114.CW lt
1115restore the previous parameter value in the absence
1116of an argument.
1117.PP
1118Single character arguments are indicated by single lower case letters
1119and
1120one/two character arguments are indicated by a pair of lower case letters.
1121Character string arguments are indicated by multi-character mnemonics.
1122.NH
1123Font and Character Size Control
1124.sc "Character set.
1125The \*(TR character set is defined by a description file specific to each output device (§23).
1126There are normally several regular fonts and one or more special fonts.
1127Characters are input as themselves,
1128as @cw "\e(" xx@, as @cw "\eC'" name cw "'"@,
1129or as
1130.CW \eN'@n@' .
1131The form
1132.CW \eC'@name@'
1133permits a name of any length;
1134the form
1135.CW \eN'@n@'
1136refers to the @n@-th character on the current font,
1137whether named or not.
1138.PP
1139Normally the input characters
1140.CW ` ,
1141.CW ' ,
1142and
1143.CW -
1144are printed as `, ', and - respectively;
1145.CW \e` ,
1146.CW \e' ,
1147and
1148.CW \e-
1149produce \`, \', and \-.
1150If the character does not exist in the font, \*(TR assumes the width is 1 em and
1151outputs the character with a
1152.CW C
1153name as defined in Section 22.
1154(This is independent of how the device handles characters unknown to it.)
1155.PP
1156\*(Nr has an analogous, but different, mechanism for defining legal characters
1157and how to print them.
1158By default all characters are valid.
1159There are such
1160additional characters as may be available on
1161the output device,
1162such characters as may be constructed
1163by overstriking or other combination,
1164and those that can reasonably be mapped
1165into other printable characters.
1166The exact behavior is determined by a driving
1167table prepared for each device.
1168.sc "Fonts.
1169\*(Tr
1170begins execution by reading information for a set of defaults fonts,
1171said to be
1172.I mounted ;
1173conventionally, the first four are
1174Times Roman (\&\f(CWR\fR),
1175Times Italic
1176(\&\f(CWI\fR),
1177Times Bold
1178(\&\f(CWB\fR),
1179and
1180Times Bold Italic
1181(\&\f(CWBI\fR) ,
1182and the last is a Special font
1183.CW S ) (
1184containing miscellaneous characters.
1185(This document uses Lucida Sans in place of Times.)
1186The set of fonts and positions is determined by the device description file,
1187described in §23.
1188.PP
1189The current font, initially Roman, may be changed
1190by the \&\f(CWft\fR request,
1191or by embedding at any desired point
1192\&\f(CW\ef\fIx\fR, \&\f(CW\ef(\fIxx\fR, or \&\f(CW\ef\fP@N@,
1193where
1194\fIx\fR and \fIxx\fR are the name of a font
1195and @N@ is a numerical font position.
1196.PP
1197It is not necessary to change to the Special font;
1198characters on that font are automatically handled
1199as if they were physically part of the current font.
1200The Special font may actually be several fonts;
1201the name
1202.CW S
1203is reserved and is generally used for one of these.
1204All special fonts must be mounted after regular fonts.
1205.PP
1206\*(Tr can be informed that any particular font is mounted
1207by use of the \&\f(CWfp\fR request.
1208The list of known fonts is installation dependent.
1209In the subsequent discussion of font-related requests,
1210@F@ represents either a one/two-character
1211font name or the numerical font position.
1212The current font is available (as a numerical position) in the read-only number register \&\f(CW.f\fR.
1213.PP
1214A request for a named but not-mounted font is honored
1215if the font description information exists.
1216In this way, there is no limit on the number of fonts that may be printed
1217in any part of a document.
1218Mounted fonts may be handled more efficiently,
1219and they may be referred to by their mount positions,
1220but there is no other difference.
1221Mention of an unmounted font loads it temporarily at font position
1222zero, which serves as a one-font cache.
1223.PP
1224The function
1225.CW \eS'@+- N@'
1226causes the current font to be slanted by
1227@+- N@
1228degrees.
1229Not all devices support slanting.
1230.PP
1231\*(Nr understands font control
1232and normally underlines italic characters (see §10.5).
1233.sc "Character size.
1234Character point sizes available depend on the specific output device;
1235a typical (historical) set of values is
12366, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 28, and 36.
1237This is a range of 1/12 inch to 1/2 inch.
1238The \&\f(CWps\fR request is used to change or restore the point size.
1239Alternatively the point size may be changed between any two characters
1240by embedding a
1241.CW \es@N@
1242at the desired point
1243to set the size to @N@,
1244or a
1245.CW "\&\f(CW\es@+- N@
1246(@1 <= N <= 9@)
1247to increment/decrement the size by @N@;
1248.CW \es0
1249restores the previous size.
1250Requested point size values that are between two valid
1251sizes yield the larger of the two.
1252.PP
1253Note that through an accident of history, a construction like
1254.CW \es39
1255is parsed as size 39, and thus converted to size 36 (given the sizes above),
1256while
1257.CW \es40
1258is parsed as size 4 followed by
1259.CW 0 .
1260The forms
1261@cw "\es(" nn@ and @cw "\es" +- cw "(" nn@
1262permit specification of sizes that would otherwise be ambiguous.
1263.PP
1264The current size is available in the \&\f(CW.s\fR register.
1265\*(Nr ignores type size requests.
1266.PP
1267The function
1268.CW "\eH'@+- N@'
1269sets \H'+2'the height of the current font\H'0' to
1270@N@, or increments it by @+N@, or decrements it by @-N@;
1271if @N=0@, the height is restored to the current point size.
1272In each case, the width is unchanged.
1273Not all devices support independent height and width for characters.
1274.FS
1275*The fields have the same meaning as described earlier in the Request Summary.
1276.FE
1277.SP .5
1278.LP
1279.ne 2.1
1280.ta 1.5i 2.5i 3.5i 4.5i
1281\f2Request\fR	\f2Initial\fR	\f2If\ No\fR
1282.br
1283\f2Form\fR	\f2Value\fR	\f2Argument\fR	\f2Notes\fR
1284.bt "\&\f(CW.ps\fI \(+-N\fR*" "10\|point" "previous" "E" "Point size
1285set to @+- N@.
1286Alternatively, embed
1287.CW \es@N@
1288or
1289.CW "\&\f(CW\es@+- N@" .
1290Any positive size value may be requested;
1291if invalid, the next larger valid size will result, with a
1292maximum of 36.
1293A paired sequence
1294@+N@, @-N@
1295will work because the previous requested value is also remembered.
1296Ignored in \*(NR.
1297.bt "\&\f(CW.ss\fI N\fR" "12/36\|em" "ignored" "E" "Space-character size
1298(i.e., inter-word gap)
1299is set to @N@/36 ems.
1300This size is the minimum word spacing in adjusted text.
1301Ignored in \*(NR.
1302.bt "\&\f(CW.cs\fI\|F\|N\|M\fR" "off" "-" "P" "Constant character space
1303(width) mode is
1304set on for font @F@ (if mounted); the width of every character will be
1305taken to be @N@/36 ems.
1306If @M@ is absent,
1307the em is that of the character's point size;
1308if @M@ is given,
1309the em is @M@ points.
1310All affected characters
1311are centered in this space, including those with an actual width
1312larger than this space.
1313Special Font characters occurring while the current font
1314is @F@ are also so treated.
1315If @N@ is absent, the mode is turned off.
1316The mode must be in effect when the characters are physically printed.
1317Ignored in \*(NR.
1318.bt "\&\f(CW.bd\fI F N\fR" "off" "-" "P" "The characters in font @F@ will be artificially
1319emboldened by printing each one twice, separated by @N-1@ basic units.
1320A reasonable value for @N@ is 3 when the character size is near 10 points.
1321If @N@ is missing the embolden mode is turned off.
1322The emboldening value @N@ is in the \&\f(CW.b\fP register.
1323.IP
1324.bd R 3
1325This paragraph is printed with \&\f(CW.bd R 3\fR.
1326The mode must be in effect when the characters are physically printed.
1327Ignored in \*(NR.
1328.br
1329.bd R
1330.bt "\&\f(CW.bd S \fIF N\fR" "off" "-" "P" "The characters in the Special font
1331will be emboldened whenever the current font is @F@.
1332The mode must be in effect when the characters are physically printed.
1333Ignored in \*(NR.
1334.bt "\&\f(CW.ft\fP @F@" "Roman" "previous" "E" "Font changed to
1335@F@.
1336Alternatively, embed
1337.CW \ef@F@ .
1338The font name \&\f(CWP\fR is reserved to mean the previous font,
1339and the name
1340.CW S
1341for the special font.
1342.bt "\&\f(CW.fp \fIN F L\fR" "R,I,B,...,S" "ignored" "-" "Font position.
1343This is a statement
1344that a font named @F@ is associated with position @N@.
1345It is a fatal error if @F@ is not known.
1346For fonts with names longer than two characters,
1347.I L
1348refers to the long name,
1349and
1350.I F
1351becomes a synonym.
1352There is generally a limit of about 10 mounted fonts.
1353.NH
1354Page control
1355.PP
1356Top and bottom margins are not automatically provided;
1357it is conventional to define two \fImacros\fR and to set \fItraps\fR
1358for them at vertical positions 0 (top) and @-N@ (distance @N@ up from the bottom).
1359See §7 and Tutorial Examples §T2.
1360A pseudo-page transition onto the first page occurs
1361either when the first \fIbreak\fR occurs or
1362when the first \fInon-diverted\fR text processing occurs.
1363Arrangements
1364for a trap to occur at the top of the first page
1365must be completed before this transition.
1366In the following, references to the \fIcurrent diversion\fR (§7.4)
1367mean that the mechanism being described works during both
1368ordinary and diverted output (the former considered as the top diversion level).
1369.PP
1370The limitations on \*(TR and \*(NR output dimensions
1371are device dependent.
1372.bt "\&\f(CW.pl\fI \(+-N\fR" "11\|in" "11\|in" "\fBv\fR" "Page length set to @+- N@.
1373The current page length is available in the \&\f(CW.p\fR register.
1374.bt "\&\f(CW.bp\fI \(+-N\fR" "\fIN\(eq\fR1" "-" "B,\fBv\fR" "Begin page.
1375The current page is ejected and a new page is begun.
1376If @+- N@ is given, the new page number will be @+- N@.
1377Also see request \&\f(CWns\fR.
1378.bt "\&\f(CW.pn\fI \(+-N\fR" "@N@\(eq1" "ignored" "-" "Page number.
1379The next page (when it occurs) will have the page number @+- N@.
1380A \&\f(CWpn\fR must occur before the initial pseudo-page transition
1381to affect the page number of the first page.
1382The current page number is in the \&\f(CW%\fR register.
1383.bt "\&\f(CW.po\fI \(+-N\fR" "1\|in; 0" "previous" "\fBv\fR" "Page offset.
1384The current \fIleft margin\fR is set to @+- N@.
1385The \*(TR initial value provides 1 inch of paper margin
1386on a typical device.
1387The current page offset is available in the \&\f(CW.o\fR register.
1388.bt "\&\f(CW.ne\fI N\fR" "-" "\fIN\(eq\fR1\|\fIV\fR" "D,\fBv\fR" "Need @N@ vertical space.
1389If the distance \fID\fR to the next trap position (see §7.5) is less than @N@,
1390a forward vertical space of size \fID\fR occurs,
1391which will spring the trap.
1392If there are no remaining
1393traps on the page,
1394\fID\fR is the distance to the bottom of the page.
1395If @D<V@, another line could still be output
1396and spring the trap.
1397In a diversion, \fID\fR is the distance to the \fIdiversion trap\fR, if any,
1398or is very large.
1399.bt "\&\f(CW.mk\fI R\fR" "none" "internal" "D" "Mark the current vertical place
1400in an internal register (both associated with the current diversion level),
1401or in register @R@, if given.
1402See \&\f(CWrt\fR request.
1403.bt "\&\f(CW.rt\fI \(+-N\fR" "none" "internal" "D,\fBv\fR" "Return \fIupward only\fR to a marked vertical place
1404in the current diversion.
1405If @+- N@ (with respect to current place) is given,
1406the place is @+- N@ from the top of the page or diversion
1407or, if @N@ is absent, to a
1408place marked by a previous \&\f(CWmk\fR.
1409The \&\f(CWsp\fR request (§5.3) may be used
1410instead of \&\f(CWrt\fR
1411by spacing to the absolute place stored in a explicit register,
1412e.g., using
1413.CW ".mk
1414@R@ ...\&
1415.CW ".sp
1416.CW |\en@R@u ;
1417this also works when the motion is downwards.
1418.NH
1419Text Filling, Adjusting, and Centering
1420.sc "Filling and adjusting.
1421Normally,
1422words are collected from input text lines
1423and assembled into a output text line
1424until some word does not fit.
1425An attempt is then made
1426to hyphenate the word to put part
1427of it into the output line.
1428The spaces between the words on the output line
1429are then increased to spread out the line
1430to the current \fIline length\fR
1431minus any current \fIindent\fR.
1432A \fIword\fR is any string of characters delimited by
1433the \fIspace\fR character or the beginning/end of the input line.
1434Any adjacent pair of words that must be kept together
1435(neither split across output lines nor spread apart
1436in the adjustment process)
1437can be tied together by separating them with the
1438\fIunpaddable space\fR character
1439``\&\f(CW\e\ \fR'' (backslash-space).
1440The adjusted word spacings are uniform in \*(TR
1441and the minimum interword spacing can be controlled
1442with the \&\f(CWss\fR request (§2).
1443In \*(NR, they are normally nonuniform because of
1444quantization to character-size spaces;
1445however,
1446the command line option \&\f(CW-e\fR causes uniform
1447spacing with full output device resolution.
1448Filling, adjustment, and hyphenation (§13) can all be
1449prevented or controlled.
1450The text length on the last line output is available in the \&\f(CW.n\fR register,
1451and text baseline position on the page for this line is in the \&\f(CWnl\fR register.
1452The text baseline high-water mark (lowest place) on the current page is in
1453the \&\f(CW.h\fR register.
1454The current horizontal output position is in the \&\f(CW.k\fP register.
1455.PP
1456An input text line
1457.I ending
1458with \&\f(CW.\fR\^, \&\f(CW?\fR, or \&\f(CW!\fR,
1459optionally followed by any number of
1460.CW \&" ,
1461.CW ' ,
1462.CW ) ,
1463.CW ] ,
1464.CW * ,
1465or
1466†,
1467is taken
1468to be the end of a sentence, and an additional space character is
1469automatically provided during filling.
1470To prevent this, add
1471.CW \e&
1472to the end of the input line.
1473Multiple inter-word space characters found in the input are retained,
1474except for trailing spaces;
1475initial spaces also cause a break.
1476.PP
1477When filling is in effect, a \&\f(CW\ep\fR may be embedded or attached to a word to
1478cause a break at the end of the word and have the resulting output
1479line spread out to fill the current line length.
1480.PP
1481.tr &&
1482A text input line that happens to begin
1483with a control character can
1484be made not to look like a control line
1485by prefixing it with
1486the non-printing, zero-width filler character \&\f(CW\e&\fR.
1487Still another way is to specify output translation of some
1488convenient character into the control character
1489using \&\f(CWtr\fR (§10.5).
1490.tr &.
1491.sc "Interrupted text.
1492The copying of a input line in \fInofill\f (non-fill) mode can be interrupted
1493by terminating
1494the partial line with a \&\f(CW\ec\fR.
1495The next encountered input text line will be considered to be a continuation
1496of the same line of input text.
1497Similarly,
1498a word within \fIfilled\fR text may be interrupted by terminating the
1499word (and line) with \&\f(CW\ec\fR;
1500the next encountered text will be taken as a continuation of the
1501interrupted word.
1502If the intervening control lines cause a break,
1503any partial line will be forced out along with any partial word.
1504.bt "\&\f(CW.br\fR" "-" "-" "B" "Break.
1505The filling of the line currently
1506being collected is stopped and
1507the line is output without adjustment.
1508Text lines beginning with space characters
1509(but not tabs)
1510and empty text lines (blank lines) also cause a break.
1511.bt "\&\f(CW.fi\fR" "fill on" - B,E "Fill subsequent output lines.
1512The register \&\f(CW.u\fR is 1 in fill mode and 0 in nofill mode.
1513.bt "\&\f(CW.nf\fR" "fill on" "-" "B,E" "Nofill.
1514Subsequent output lines are neither filled nor adjusted.
1515Input text lines are copied directly to output lines
1516without regard for the current line length.
1517.bt "\&\f(CW.ad\fI c\fR" "adj, both" "adjust" "E" "Line adjustment is begun.
1518If fill mode is not on, adjustment will be deferred until
1519fill mode is back on.
1520If the type indicator @c@ is present,
1521the adjustment type is changed as shown in the following table.
1522.TS
1523center box;
1524c|c
1525c|l.
1526Indicator	Adjust Type
1527_
1528\&\f(CWl\fR	adjust left margin only
1529\&\f(CWr\fR	adjust right margin only
1530\&\f(CWc\fR	center
1531\&\f(CWb\fR or \&\f(CWn\fR	adjust both margins
1532absent	unchanged
1533.TE
1534The number register
1535.CW .j
1536contains the current value of the
1537.CW ad
1538setting;
1539its value can be recorded and used subsequently to set adjustment.
1540.bt "\&\f(CW.na\fR" "adjust" "-" "E" "Noadjust.
1541Adjustment is turned off;
1542the right margin will be ragged.
1543The adjustment type for \&\f(CWad\fR is not changed.
1544Output line filling still occurs if fill mode is on.
1545.bt "\&\f(CW.ce\fI N\fR" "off" "@N=1@" "B,E" "Center the next @N@ input text lines
1546within the current available horizontal space (line-length minus indent).
1547If @N=0@, any residual count is cleared.
1548A break occurs after each of the @N@ input lines.
1549If the input line is too long,
1550it will be left adjusted.
1551.NH
1552Vertical Spacing
1553.sc "Baseline spacing.
1554The vertical spacing @(V)@ between the baselines of successive
1555output lines can be set
1556using the \&\f(CWvs\fR request.
1557\fIV\fR should be large enough to accommodate the character sizes
1558on the affected output lines.
1559For the common type sizes (9-12 points),
1560usual typesetting practice is to set \fIV\fR to 2 points greater than the
1561point size;
1562\*(TR default is 10-point type on a 12-point spacing
1563(as in this document).
1564The current \fIV\fR is available in the \&\f(CW.v\fR register.
1565Multiple-\fIV\|\fR line separation (e.g., double spacing) may be requested
1566with \&\f(CWls\fR,
1567but it is better to use a large
1568.CW vs
1569instead;
1570certain preprocessors assume single spacing.
1571The current line spacing is available in the \&\f(CW.L\fP register.
1572.sc "Extra line-space.
1573If a word contains a tall construct requiring
1574the output line containing it to have extra vertical space
1575before and/or after it,
1576the \fIextra-line-space\fR function \&\f(CW\ex'\fIN\fP'\fR
1577can be embedded in or attached to that word.
1578If @N@ is negative,
1579the output line containing the word will
1580be preceded by @N@ extra vertical space;
1581if @N@ is positive,
1582the output line containing the word
1583will be followed by @N@ extra vertical space.
1584If successive requests for extra space apply to the same line,
1585the maximum values are used.
1586The most recently utilized post-line extra line-space is available in the \&\f(CW.a\fR register.
1587.PP
1588In
1589.CW \ex'\f2...\fP'
1590and other functions having a pair of delimiters around
1591their parameter,
1592the delimiter choice (here
1593.CW ' )
1594is arbitrary,
1595except that it can not look like the continuation of a number expression for @N@.
1596.sc "Blocks of vertical space.
1597A block of vertical space is ordinarily requested using \&\f(CWsp\fR,
1598which honors the \fIno-space\fR mode and which does
1599not space past a trap.
1600A contiguous block of vertical space may be reserved using \&\f(CWsv\fR.
1601.bt "\&\f(CW.vs \fIN\fR" "12pts; 1/6in" "previous" "E,\fBp\fR" "Set vertical baseline spacing size \fIV\fR.
1602Transient extra vertical space is available with \&\f(CW\ex\fI'N\|'\fR (see above).
1603.bt "\&\f(CW.ls \fIN\fR" "@N=1@" "previous" "E" "\fILine\fR spacing
1604set to @+- N@.
1605@N-1@ \fIV\fR\^s (blank lines) are
1606appended to each output text line.
1607Appended blank lines are omitted, if the text or previous appended blank line reached a trap position.
1608.bt "\&\f(CW.sp \fIN\fR" "-" "@N=1~V@" "B,\fBv\fR" "Space vertically in either direction.
1609If @N@ is negative, the motion is backward (upward)
1610and is limited to the distance to the top of the page.
1611Forward (downward) motion is truncated to the distance to the
1612nearest trap.
1613(Recall the use of
1614.CW ".sp |\f2N\fP
1615from §1.3.)
1616If the no-space mode is on,
1617no spacing occurs (see \&\f(CWns\fR and \&\f(CWrs\fR below).
1618.bt "\&\f(CW.sv\fI N\fR" "-" "@N=1~V@" "\fBv\fR" "Save a contiguous vertical block of size @N@.
1619If the distance to the next trap is greater
1620than @N@, @N@ vertical space is output.
1621No-space mode has no effect.
1622If this distance is less than @N@,
1623no vertical space is immediately output,
1624but @N@ is remembered for later output (see \&\f(CWos\fR).
1625Subsequent \&\f(CWsv\fR requests will overwrite any still remembered @N@.
1626.bt "\&\f(CW.os\fR" "-" "-" "-" "Output saved vertical space.
1627No-space mode has no effect.
1628Used to finally output a block of vertical space requested
1629by an earlier \&\f(CWsv\fR request.
1630.bt "\&\f(CW.ns\fR" "space" "-" "D" "No-space mode turned on.
1631When on, no-space mode inhibits \&\f(CWsp\fR requests and
1632\&\f(CWbp\fR requests \fIwithout\fR a next page number.
1633No-space mode is turned off when a line of
1634output occurs, or with \&\f(CWrs\fR.
1635.bt "\&\f(CW.rs\fR" "space" "-" "D" "Restore spacing.
1636The no-space mode is turned off.
1637.bt "\&Blank text line." "" "-" "B" "Causes a break and
1638output of a blank line exactly like \&\f(CWsp 1\fR.
1639.NH
1640Line Length and Indenting
1641.PP
1642The maximum line length for fill mode may be set with \&\f(CWll\fR.
1643The indent may be set with \&\f(CWin\fR;
1644an indent applicable to only the next output line may be set with \&\f(CWti\fR.
1645The line length includes indent space but not
1646page offset space.
1647The line length minus the indent is the basis for centering with \&\f(CWce\fR.
1648The effect of \&\f(CWll\fR, \&\f(CWin\fR, or \&\f(CWti\fR
1649is delayed, if a partially collected line exists,
1650until after that line is output.
1651In fill mode the length of text on an output line is less than or equal to
1652the line length minus the indent.
1653The current line length and indent are available in registers \&\f(CW.l\fR and \&\f(CW.i\fR respectively.
1654The length of \fIthree-part titles\fR produced by \&\f(CWtl\fR
1655(see §14) is independently set by \&\f(CWlt\fR.
1656.bt "\&\f(CW.ll\fI \(+-N\fR" "6.5\|in" "previous" "E,\fBm\fR" "Line length is set to \(+-@N@.
1657.bt "\&\f(CW.in\fI \(+-N\fR" "\fIN\(eq\^\fR0" "previous" "B,E,\fBm\fR" "Indent is set to @+- N@.
1658The indent is prefixed to each output line.
1659.bt "\&\f(CW.ti\fI \(+-N\fR" "-" "ignored" "B,E,\fBm\fR" "Temporary indent.
1660The next output text line will be indented a distance @+- N@
1661with respect to the current indent.
1662The resulting total indent may not be negative.
1663The current indent is not changed.
1664.NH
1665Macros, Strings, Diversion, and Position Traps
1666.sc "Macros and strings.
1667A \fImacro\fR is a named set of arbitrary \fIlines\fR that may be invoked by name or
1668with a \fItrap\fR.
1669A \fIstring\fR is a named string of \fIcharacters\fR,
1670not including a newline character,
1671that may be interpolated by name at any point.
1672Request, macro, and string names share the same name list.
1673Macro and string names
1674may be one or two characters long and may usurp previously defined
1675request, macro, or string names;
1676this implies that built-in operations may be (irrevocably) redefined.
1677Any of these entities may be renamed with \&\f(CWrn\fR
1678or removed with \&\f(CWrm\fR.
1679.PP
1680Macros are created by \&\f(CWde\fR and \&\f(CWdi\fR, and appended to by \&\f(CWam\fR and \&\f(CWda\fR;
1681\&\f(CWdi\fR and \&\f(CWda\fR cause normal output to be stored in a macro.
1682A macro is invoked in the same way as a request;
1683a control line beginning \&\f(CW.\fIxx\fR will interpolate the contents of macro \fIxx\fR.
1684The remainder of the line may contain up to nine \fIarguments\fR.
1685.PP
1686Strings are created by \&\f(CWds\fR and appended to by \&\f(CWas\fR.
1687The strings \fIx\fR and \fIxx\fR are interpolated at any desired point with
1688\&\f(CW\e\(**\fIx\fR and \&\f(CW\e\(**(\fIxx\fR respectively.
1689String references and macro invocations may be nested.
1690.sc "Copy mode input interpretation.
1691During the definition and extension
1692of strings and macros (not by diversion)
1693the input is read in \fIcopy mode\fR.
1694In copy mode, input is copied without interpretation
1695except that:
1696.IP
1697.ds + \v'-.1m'\s-4\(bu\s+4\v'+.1m'
1698.nf
1699\*+ The contents of number registers indicated by \&\f(CW\en\fR are interpolated.
1700\*+ Strings indicated by \&\f(CW\e\(**\fR are interpolated.
1701\*+ Arguments indicated by \&\f(CW\e$\fR are interpolated.
1702\*+ Concealed newlines indicated by \&\f(CW\e\fP\f2newline\fP are eliminated.
1703\*+ Comments indicated by \&\f(CW\e"\fR are eliminated.
1704\*+ \&\f(CW\et\fR and \&\f(CW\ea\fR are interpreted as \s-1ASCII\s+1 horizontal tab and \s-1SOH\s+1 respectively (§9).
1705\*+ \&\f(CW\e\e\fR is interpreted as \&\f(CW\e\fR.
1706\*+ \&\f(CW\e.\fR is interpreted as ``\&\f(CW.\fR''.
1707.LP
1708These interpretations can be suppressed by
1709prefixing
1710a \&\f(CW\e\fR.
1711For example, since \&\f(CW\e\e\fR maps into a \&\f(CW\e\fR, \&\f(CW\e\en\fR will copy as \&\f(CW\en\fR, which
1712will be interpreted as a number register indicator when the
1713macro or string is reread.
1714.sc "Arguments.
1715When a macro is invoked by name, the remainder of the line is
1716taken to contain up to nine arguments.
1717The argument separator is the space character (not tab), and arguments
1718may be surrounded by double quotes to permit embedded space characters.
1719Pairs of double quotes may be embedded in double-quoted arguments to
1720represent a single double-quote character.
1721The argument
1722.CW \&""
1723is explicitly null.
1724If the desired arguments won't fit on a line,
1725a concealed newline may be used to continue on the next line.
1726A trailing double quote may be omitted.
1727.PP
1728When a macro is invoked the \fIinput level\fR is \fIpushed down\fR and
1729any arguments available at the previous level become unavailable
1730until the macro is completely read and the previous level is restored.
1731A macro's own arguments can be interpolated at any point
1732within the macro with
1733.CW \e$@N@ ,
1734which interpolates the @N@\^th
1735argument
1736(@1 <= N <= 9@).
1737If an invoked argument does not exist,
1738a null string results.
1739For example, the macro \fIxx\fR may be defined by
1740.P1
1741.ta .75i
1742&de xx	\e" begin definition
1743Today is \e\e$1 the \e\e$2.
1744&.	\e" end definition
1745.P2
1746and called by
1747.P1
1748&xx Monday 14th
1749.P2
1750to produce the text
1751.P1
1752Today is Monday the 14th.
1753.P2
1754Note that each \&\f(CW\e$\fR
1755was concealed in the definition with a prefixed \&\f(CW\e\fR.
1756The number of
1757arguments is in the \&\f(CW.$\fR register.
1758.PP
1759No arguments are available at the top (non-macro) level,
1760within a string, or within a trap-invoked macro.
1761.PP
1762Arguments are copied in copy mode onto a stack
1763where they are available for reference.
1764It is advisable to
1765conceal string references (with an extra \&\f(CW\e\fR\|)
1766to delay interpolation until argument reference time.
1767.sc "Diversions.
1768Processed output may be diverted into a macro for purposes
1769such as footnote processing (see Tutorial §T5)
1770or determining the horizontal and vertical size of some text for
1771conditional changing of pages or columns.
1772A single diversion trap may be set at a specified vertical position.
1773The number registers \&\f(CWdn\fR and \&\f(CWdl\fR respectively contain the
1774vertical and horizontal size of the most
1775recently ended diversion.
1776Processed text that is diverted into a macro
1777retains the vertical size of each of its lines when reread
1778in \fInofill\fR mode
1779regardless of the current \fIV\fR.
1780Constant-spaced (\&\f(CWcs\fR) or emboldened (\&\f(CWbd\fR) text that is diverted
1781can be reread correctly only if these modes are again or still in effect
1782at reread time.
1783One way to do this is to embed in the diversion the appropriate
1784\&\f(CWcs\fR or \&\f(CWbd\fR requests with the \fItransparent\fR
1785mechanism described in §10.6.
1786.PP
1787Diversions may be nested
1788and certain parameters and registers
1789are associated
1790with the current diversion level
1791(the top non-diversion level may be thought of as the
17920th diversion level).
1793These are the diversion trap and associated macro,
1794no-space mode,
1795the internally-saved marked place (see \&\f(CWmk\fR and \&\f(CWrt\fR),
1796the current vertical place (\&\f(CW.d\fR register),
1797the current high-water text baseline (\&\f(CW.h\fR register),
1798and the current diversion name (\&\f(CW.z\fR register).
1799.sc "Traps.
1800Three types of trap mechanisms are available\(empage traps, a diversion trap, and
1801an input-line-count trap.
1802Macro-invocation traps may be planted using \&\f(CWwh\fR at any page position including the top.
1803This trap position may be changed using \&\f(CWch\fR.
1804Trap positions at or below the bottom of the page
1805have no effect unless or until
1806moved to within the page or rendered effective by an increase in page length.
1807Two traps may be planted at the same position only by first planting them at different
1808positions and then moving one of the traps;
1809the first planted trap will conceal the second unless and until the first one is moved
1810(see Tutorial Examples).
1811If the first one is moved back, it again conceals the second trap.
1812The macro associated with a page trap is automatically
1813invoked when a line of text is output whose vertical size reaches
1814or sweeps past the trap position.
1815Reaching the bottom of a page springs the top-of-page trap, if any,
1816provided there is a next page.
1817The distance to the next trap position is available in the \&\f(CW.t\fR register;
1818if there are no traps between the current position and the bottom of the page,
1819the distance returned is the distance to the page bottom.
1820.PP
1821A macro-invocation trap effective in the current diversion may be planted using \&\f(CWdt\fR.
1822The \&\f(CW.t\fR register works in a diversion; if there is no subsequent trap a large
1823distance is returned.
1824For a description of input-line-count traps, see \&\f(CWit\fR below.
1825.bt "\&\f(CW&de\fI xx yy\fR" "-" "\fI.yy=\&\f(CW..\fR" "-" "Define or redefine the macro \fIxx\fR.
1826The contents of the macro begin on the next input line.
1827Input lines are copied in \fIcopy mode\fR until the definition is terminated by a
1828line beginning with \&\f(CW.\fIyy\fR,
1829whereupon the macro \fIyy\fR is called.
1830In the absence of \fIyy\fR, the definition
1831is terminated by a
1832line beginning with ``\&\f(CW..\fR''.
1833A macro may contain \&\f(CWde\fR requests
1834provided the terminating macros differ
1835or the contained definition terminator is concealed.
1836\&``\&\f(CW..\fR'' can be concealed as
1837\&\f(CW\e\e..\fR which will copy as \&\f(CW\e..\fR and be reread as ``\&\f(CW..\fR''.
1838.bt "\&\f(CW&am\fI xx yy\fR" "-" "\fI.yy=\&\f(CW..\fR" "-" "Append to macro
1839.I xx
1840(append version of \&\f(CWde\fR).
1841.bt "\&\f(CW&ds\fI xx string\fR" "-" "ignored" "-" "Define a string
1842\fIxx\fR containing \fIstring\fR.
1843Any initial double quote in \fIstring\fR is stripped off to permit
1844initial blanks.
1845.bt "\&\f(CW&as\fI xx string\fR" "-" "ignored" "-" "Append
1846\fIstring\fR to string \fIxx\fR
1847(append version of \&\f(CWds\fR).
1848.bt "\&\f(CW&rm\fI xx\fR" "-" "ignored" "-" "Remove
1849request, macro, or string.
1850The name \fIxx\fR is removed from the name list and
1851any related storage space is freed.
1852Subsequent references will have no effect.
1853If many macros and strings are being created dynamically, it
1854may become necessary to remove unused ones
1855to recapture internal storage space for newer registers.
1856.bt "\&\f(CW&rn\fI xx yy\fR" "-" "ignored" "-" "Rename request, macro, or string
1857\fIxx\fR to \fIyy\fR.
1858If \fIyy\fR exists, it is first removed.
1859.bt "\&\f(CW&di\fI xx\fR" "-" "end" "D" "Divert output to macro \fIxx\fR.
1860Normal text processing occurs during diversion
1861except that page offsetting is not done.
1862The diversion ends when the request \&\f(CWdi\fR or \&\f(CWda\fR is encountered without an argument;
1863extraneous
1864requests of this type should not appear when nested diversions are being used.
1865.bt "\&\f(CW&da \fIxx\fR" "-" "end" "D" "Divert, appending to macro \fIxx\fR
1866(append version of \&\f(CWdi\fR).
1867.bt "\&\f(CW&wh\fI N xx\fR" "-" "-" "\fBv\fR" "Install
1868a trap to invoke \fIxx\fR at page position \fIN\fR;
1869a negative N will be interpreted as a distance from the
1870page bottom.
1871Any macro previously planted at @N@ is replaced by \fIxx\fR.
1872A zero @N@ refers to the top of a page.
1873In the absence of \fIxx\fR, the first trap found at @N@, if any, is removed.
1874.bt "\&\f(CW&ch\fI xx N\fR" "-" "-" "\fBv\fR" "Change
1875the trap position for macro \fIxx\fR to be @N@.
1876In the absence of @N@, the trap, if any, is removed.
1877.bt "\&\f(CW&dt\fI N xx\fR" "-" "off" "D,\fBv\fR" "Install a diversion trap
1878at position @N@ in the \fIcurrent\fR diversion to invoke
1879macro \fIxx\fR.
1880Another \&\f(CWdt\fR will redefine the diversion trap.
1881If no arguments are given, the diversion trap is removed.
1882.bt "\&\f(CW&it\fI N xx\fR" "-" "off" "E" "Set an input-line-count trap
1883to invoke the macro \fIxx\fR after @N@ lines of \fItext\fR input
1884have been read
1885(control or request lines do not count).
1886The text may be inline text or
1887text interpolated by inline or trap-invoked macros.
1888.bt "\&\f(CW&em\fI xx\fR" "none" "none" "-" "The
1889macro \fIxx\fR will be invoked
1890when all input has ended.
1891The effect is almost as if the contents of \fIxx\fR had been at the end
1892of the last file processed,
1893but all processing ceases at the next page eject.
1894.NH
1895Number Registers
1896.PP
1897A variety of parameters are available to the user as
1898predefined \fInumber registers\fR (see Summary, page \n(*%).
1899In addition, users may define their own registers.
1900Register names are one or two characters long and do not conflict
1901with request, macro, or string names.
1902Except for certain predefined read-only registers,
1903a number register can be read, written, automatically
1904incremented or decremented, and interpolated
1905into the input in a variety of formats.
1906One common use of user-defined registers is to
1907automatically number sections, paragraphs, lines, etc.
1908A number register may be used any time numerical input is expected or desired
1909and may be used in numerical \fIexpressions\fR (§1.4).
1910.PP
1911Number registers are created and modified using \&\f(CWnr\fR, which
1912specifies the name, numerical value, and the auto-increment size.
1913Registers are also modified, if accessed
1914with an auto-incrementing sequence.
1915If the registers \fIx\fR and \fIxx\fR both contain
1916@N@ and have the auto-increment size @M@,
1917the following access sequences have the effect shown:
1918.TS
1919center box;
1920c2|c2|c
1921c2|c2|c2
1922l2|c2|c2
1923l2|c2|c2
1924l2|l2|c2.
1925	Effect on	Value
1926Sequence	Register	Interpolated
1927_
1928\&\f(CW\en\fIx\fR	none	@N@
1929\&\f(CW\en(\fIxx\fR	none	@N@
1930\&\f(CW\en+\fIx\fR	\fIx\fR incremented by @M@	\fIN+M\fR
1931\&\f(CW\en-\fIx\fR	\fIx\fR decremented by @M@	\fIN-M\fR
1932\&\f(CW\en+(\fIxx\fR	\fIxx\fR incremented by @M@	\fIN+M\fR
1933\&\f(CW\en-(\fIxx\fR	\fIxx\fR decremented by @M@	\fIN-M\fR
1934.TE
1935When interpolated, a number register is converted to
1936decimal (default),
1937decimal with leading zeros,
1938lower-case Roman,
1939upper-case Roman,
1940lower-case sequential alphabetic,
1941or
1942upper-case sequential alphabetic
1943according to the format specified by \&\f(CWaf\fR.
1944.bt "\&\f(CW&nr\fI R \(+-N M\fR" "" "-" "\fBu\fR" "The number register
1945@R@ is assigned the value @+- N@
1946with respect to the previous value, if any.
1947The increment for auto-incrementing is set to @M@.
1948.bt "\&\f(CW&af\fI R c\fR" "arabic" "-" "-" "Assign
1949format @c@ to register @R@.
1950The available formats are:
1951.Tm number register format	s
1952.TS
1953center box;
1954c2|c
1955c2|c
1956c2|l.
1957	Numbering
1958Format	Sequence
1959_
1960\&\f(CW1\fR	0, 1, 2, 3, 4, 5, ...
1961\&\f(CW001\fR	000, 001, 002, 003, 004, 005, ...
1962\&\f(CWi\fR	0, i, ii, iii, iv, v, ...
1963\&\f(CWI\fR	0, I, II, III, IV, V, ...
1964\&\f(CWa\fR	0, a, b, c, ..., z, aa, ab, ..., zz, aaa, ...
1965\&\f(CWA\fR	0, A, B, C, ..., Z, AA, AB, ..., ZZ, AAA, ...
1966.TE
1967An arabic format having @N@ digits
1968specifies a field width of @N@ digits (example 2 above).
1969The read-only registers and the width function
1970.CW \ew
1971(§11.2)
1972are always arabic.
1973Warning: the value of a number register in a non-Arabic format
1974is not numeric, and will not produce the expected results in expressions.
1975.IP
1976The function
1977.CW \eg@x@
1978or
1979.CW \eg(@xx@
1980returns the format of a number register in a form suitable for
1981.CW af ;
1982it returns nothing if the register has not been used.
1983.bt "\&\f(CW&rr\fI R\fR" "-" "ignored" "-" "Remove number register @R@.
1984If many registers are being created dynamically, it
1985may become necessary to remove unused registers
1986to recapture internal storage space for newer registers.
1987The register
1988.CW .R
1989contains the number of number registers still available.
1990.NH
1991Tabs, Leaders, and Fields
1992.sc "Tabs and leaders.
1993The \s-1ASCII\s+1 horizontal tab character and the \s-1ASCII\s+1
1994\s-1SOH\s+1 (control-A, hereafter called the \fIleader\fR character)
1995can both be used to generate either horizontal motion or
1996a string of repeated characters.
1997The length of the generated entity is governed
1998by internal \fItab stops\fR specifiable
1999with \&\f(CWta\fR.
2000The default difference is that tabs generate motion and leaders generate
2001a string of periods;
2002\&\f(CWtc\fR and \&\f(CWlc\fR
2003offer the choice of repeated character or motion.
2004There are three types of internal tab stops\(em\
2005\fIleft\fR adjusting, \fIright\fR adjusting,
2006and \fIcentering\fR.
2007In the following table,
2008\fID\fR is the distance from the current position on the \fIinput\fR line
2009(where a tab or leader was found)
2010to the next tab stop,
2011\fInext-string\fR consists
2012of the input characters following the tab (or leader) up to the next tab (or leader) or end of line,
2013and
2014\fIW\fR is the width of \fInext-string\fR.
2015.TS
2016center box;
2017c2|c2|c
2018c2|c2|c
2019c2|c2|l.
2020Tab	Length of motion or	Location of
2021type	repeated characters	\fInext-string\fR
2022_
2023Left	\fID\fR	Following \fID\fR
2024Right	\fID-W\fR	Right adjusted within \fID\fR
2025Centered	\fID-W/\fR2	Centered on right end of \fID\fR
2026.TE
2027The length of generated motion is allowed to be negative, but
2028that of a repeated character string cannot be.
2029Repeated character strings contain an integer number of characters, and
2030any residual distance is prepended as motion.
2031Tabs or leaders found after the last tab stop are ignored, but may be used
2032as \fInext-string\fR terminators.
2033.PP
2034Tabs and leaders are not interpreted in copy mode.
2035\&\f(CW\et\fR and \&\f(CW\ea\fR always generate a non-interpreted
2036tab and leader respectively, and
2037are equivalent to actual tabs and leaders in copy mode.
2038.sc "Fields.
2039A \fIfield\fR is contained between
2040a pair of \fIfield delimiter\fR characters,
2041and consists of substrings
2042separated by \fIpadding\fR indicator characters.
2043The field length is the distance on the
2044\fIinput\fR line from the position where the field begins to the next tab stop.
2045The difference between the total length of all the substrings
2046and the field length is incorporated as horizontal
2047padding space that is divided among the indicated
2048padding places.
2049The incorporated padding is allowed to be negative.
2050For example,
2051if the field delimiter is \&\f(CW#\fR and the padding indicator is \&\f(CW^\fR,
2052\&\f(CW#^\fIxxx\&\f(CW^\fIright\|\&\f(CW#\fR
2053specifies a right-adjusted string with the string \fIxxx\fR centered
2054in the remaining space.
2055.h1
2056.bt "\&\f(CW&ta\fI Nt ...\fR" "0.8; 0.5in" "none" "E,\fBm\fR" "Set tab stops and types.
2057\fIt=\&\f(CWR\fR, right adjusting;
2058\fIt=\&\f(CWC\fR, centering;
2059\fIt\fR absent, left adjusting.
2060\*(Tr tab stops are preset every 0.5in.,
2061\*(NR every 0.8in.
2062The stop values are separated by spaces, and
2063a value preceded by \&\f(CW+\fR
2064is treated as an increment to the previous stop value.
2065.bt "\&\f(CW&tc\fI c\fR" "none" "none" "E" "The tab repetition character
2066becomes @c@,
2067or is removed, thus specifying motion.
2068.bt "\&\f(CW&lc\fI c\fR" "\&\f(CW.\fR" "none" "E" "The leader repetition character
2069becomes @c@,
2070or is removed, thus specifying motion.
2071.bt "\&\f(CW&fc\fI a b\fR" "off" "off" "-" "The field delimiter
2072is set to \fIa\fR;
2073the padding indicator is set to the space character or to
2074\fIb\fR, if given.
2075In the absence of arguments the field mechanism is turned off.
2076.NH
2077Input and Output Conventions and Character Translations
2078.sc "Input character translations.
2079Ways of inputting the valid character set were
2080discussed in §2.1.
2081The \s-1ASCII\s+1 control characters horizontal tab (§9.1),
2082\s-1SOH\s+1 (§9.1), and backspace (§10.3) are discussed elsewhere.
2083The newline delimits input lines.
2084In addition,
2085\s-1STX\s+1, \s-1ETX\s+1, \s-1ENQ\s+1, \s-1ACK\s+1, and \s-1BEL\s+1
2086are accepted,
2087and may be used as delimiters or translated into a graphic with \&\f(CWtr\fR (§10.5).
2088All others are ignored.
2089.PP
2090The \fIescape\fR character \&\f(CW\e\fR
2091introduces \fIescape sequences\fR,
2092which cause the following character to mean
2093another character, or to indicate
2094some function.
2095.nr %% \n(*%-1
2096A complete list of such sequences is given in the Summary on page \n(*%.
2097The escape character \&\f(CW\e\fR
2098should not be confused with the \s-1ASCII\s+1 control character \s-1ESC\s+1.
2099The escape character \&\f(CW\e\fR can be input with the sequence \&\f(CW\e\e\fR.
2100The escape character can be changed with \&\f(CWec\fR,
2101and all that has been said about the default \&\f(CW\e\fR becomes true
2102for the new escape character.
2103\&\f(CW\ee\fR can be used to print whatever the current escape character is.
2104The escape mechanism may be turned off with \&\f(CWeo\fR,
2105and restored with \&\f(CWec\fR.
2106.h1
2107.bt "\&\f(CW&ec\fI c\fR" "\&\f(CW\e\fR" "\&\f(CW\e\fR" "-" "Set escape character
2108to \&\f(CW\e\fR, or to @c@, if given.
2109.bt "\&\f(CW&eo\fR" "on" "-" "-" "Turn escape mechanism off.
2110.sc "Ligatures.
2111.lg0
2112The set of available ligatures is device and font dependent,
2113but is often a subset of
2114\&\fBfi\fR, \&\fBfl\fR, \&\fBff\fR, \&\fBffi\fR, and \&\fBffl\fR.
2115They may be input by
2116\&\f(CW\e(fi\fR, \&\f(CW\e(fl\fR, \&\f(CW\e(ff\fR, \&\f(CW\e(Fi\fR, and \&\f(CW\e(Fl\fR respectively.
2117.lg
2118The ligature mode is normally on in \*(TR, and automatically invokes
2119ligatures during input.
2120.h1
2121.bt "\&\f(CW&lg\fI N\fR" "on; off" "on" "-" "Ligature mode
2122is turned on if @N@ is absent or non-zero,
2123and turned off if @N=0@.
2124If @N=2@, only the two-character ligatures are automatically invoked.
2125Ligature mode is inhibited for
2126request, macro, string, register, or file names,
2127and in copy mode.
2128No effect in \*(NR.
2129.sc "Backspacing, underlining, overstriking, etc.
2130Unless in copy mode, the \s-1ASCII\s+1 backspace character is replaced
2131by a backward horizontal motion having the width of the
2132space character.
2133Underlining as a form of line-drawing is discussed in §12.4.
2134A generalized overstriking function is described in §12.1.
2135.PP
2136\*(Nr automatically underlines
2137characters in the \fIunderline\fR font,
2138specifiable with \&\f(CWuf\fR,
2139normally that on font position 2.
2140In addition to \&\f(CWft\fR and
2141.CW \ef@F@ ,
2142the underline font may be selected by \&\f(CWul\fR and \&\f(CWcu\fR.
2143Underlining is restricted to an output-device-dependent
2144subset of reasonable characters.
2145.bt "\&\f(CW&ul\fI N\fR" "off" "@N=1@" "E" "Italicize in \*(TR
2146(underline in \*(NR) the next @N@
2147input text lines.
2148Actually, switch to underline font, saving the
2149current font for later restoration;
2150other font changes within the span of a \&\f(CWul\fR
2151will take effect,
2152but the restoration will undo the last change.
2153Output generated by \&\f(CWtl\fR (§14) is affected by the
2154font change, but does not decrement @N@.
2155If @N>1@, there is the risk that
2156a trap interpolated macro may provide text
2157lines within the span;
2158environment switching can prevent this.
2159.bt "\&\f(CW&cu\fI N\fR" "off" "@N=1@" "E" "Continuous underline.
2160A variant
2161of \&\f(CWul\fR that causes \fIevery\fR character to be underlined in \*(NR.
2162Identical to \&\f(CWul\fR in \*(TR.
2163.bt "\&\f(CW&uf\fI F\fR" "Italic" "Italic" "-" "Underline font set to @F@.
2164In \*(NR,
2165@F@ may not be on position 1.
2166.sc "Control characters.
2167Both the control character \&\f(CW.\fR and the \fIno-break\fR
2168control character \&\f(CW'\fR may be changed.
2169Such a change must be compatible with the design
2170of any macros used in the span of the change,
2171and
2172particularly of any trap-invoked macros.
2173.bt "\&\f(CW&cc\fI c\fR" "\&\f(CW.\fR" "\&\f(CW.\fR" "E" "The basic control character
2174is set to @c@,
2175or reset to ``\&\f(CW.\fR''.
2176.bt "\&\f(CW&c2\fI c\fR" "\&\f(CW'" "'\fR" "E" "The \fIno-break\fR control character is set
2177to @c@, or reset to ``\&\f(CW'\fR''.
2178.sc "Output translation.
2179One character can be made a stand-in for another character using \&\f(CWtr\fR.
2180All text processing (e.g., character comparisons) takes place
2181with the input (stand-in) character, which appears to have the width of the final
2182character.
2183The graphic translation occurs at the moment of output
2184(including diversion).
2185.bt "\&\f(CW&tr\fI abcd....\fR" "none" "-" "O" "Translate
2186\fIa\fR into \fIb\fR, @c@ into \fId\fR, etc.
2187If an odd number of characters is given,
2188the last one will be mapped into the space character.
2189To be consistent, a particular translation
2190must stay in effect from \fIinput\fR to \fIoutput\fR time.
2191.sc "Transparent throughput.
2192An input line beginning with a \&\f(CW\e!\fR is read in copy mode and \fItrans\%parently\fR output
2193(without the initial \&\f(CW\e!\fR);
2194the text processor is otherwise unaware of the line's presence.
2195This mechanism may be used to pass control information to a post-processor
2196or to embed control lines in a macro created by a diversion.
2197.sc "Transparent output
2198The sequence
2199.CW \eX'@anything@'
2200copies
2201.I anything
2202to the output, as a device control function of the form
2203.CW x
2204.CW X
2205.I anything
2206(§22).
2207Escape sequences in
2208.I anything
2209are processed.
2210.sc "Comments and concealed newlines.
2211An uncomfortably long input line that must stay
2212one line (e.g., a string definition, or nofilled text)
2213can be split into several physical lines by ending all but
2214the last one with the escape \&\f(CW\e\fR.
2215The sequence \&\f(CW\e\fR@newline@ is always ignored,
2216except in a comment.
2217Comments may be embedded at the end of any line by
2218prefacing them with \&\f(CW\e"\fR.
2219The newline at the end of a comment cannot be concealed.
2220A line beginning with \&\f(CW\e"\fR will appear as a blank line and
2221behave like
2222.CW ".sp\ 1" ;
2223a comment can be on a line by itself by beginning the line with \&\f(CW.\e"\fR.
2224.NH
2225Local Horizontal and Vertical Motions, and the Width Function
2226.sc "Local Motions.
2227The functions \&\f(CW\ev'\fIN\&\f(CW'\fR and
2228\&\f(CW\eh'\fIN\&\f(CW'\fR
2229can be used for \fIlocal\fR vertical and horizontal motion respectively.
2230The distance @N@ may be negative; the positive directions
2231are rightward and downward.
2232A local motion is one contained within a line.
2233To avoid unexpected vertical dislocations, it is necessary that
2234the net vertical local motion within a word in filled text
2235and otherwise within a line balance to zero.
2236The escape sequences providing local motion are
2237summarized in the following table.
2238.ds Y \0\0\0
2239.KS
2240.TS
2241center box;
2242c2|cs2||c2|cs2
2243c1|c2c2||c2|c2c2.
2244Vertical	Effect in	Horizontal	Effect in
2245Local Motion	\*(TR	\*(NR	Local Motion	\*(TR	\*(NR
2246_
2247.sp.4
2248.TC
2249l2|ls2||l2|ls2.
2250\&\f(CW\*Y\ev'\fIN\|\f(CW'\fR	Move distance @N@	\
2251\&\f(CW\*Y\eh'\fIN\|\f(CW'\fR	Move distance @N@
2252.TC
2253_2|_2_2||l2|ls2.
2254x	x	x	\&\f(CW\*Y\e\fP\f2space\fP	Unpaddable space-size space
2255.TC
2256l2|l2|l2||l2|ls2.
2257\&\f(CW\*Y\eu\fR	½ em up	½ line up	\&\f(CW\*Y\e0\fR	Digit-size space
2258.TC
2259l2|l2|l2||_2|_2_2.
2260\&\f(CW\*Y\ed\fR	½ em down	½ line down	x	x	x
2261.TC
2262l2|l2|l2||l2|l2|l2.
2263\&\f(CW\*Y\er\fR	1 em up	1 line up	\&\f(CW\*Y\e|\fR	1/6 em space	ignored
2264			\&\f(CW\*Y\e^\fR	1/12 em space	ignored
2265.sp.4
2266.TE
2267.KE
2268As an example,
2269\&\f(CWE\s-2\v'-.4m'2\v'.4m'\s+2\fR
2270could be generated by a sequence of size changes and motions:
2271\&\f(CWE\es-2\ev'-0.4m'2\ev'0.4m'\es+2\fR;
2272note that
2273the 0.4 em vertical motions are at the smaller size.
2274.sc "Width Function.
2275The \fIwidth\fR function \&\f(CW\ew'\fIstring\&\f(CW'\fR
2276generates the numerical width of \fIstring\fR (in basic units).
2277Size and font changes may be embedded in \fIstring\fR,
2278and will not affect the current environment.
2279For example,
2280\&\&\f(CW.ti\ -\ew'\efB1.\ 'u\fR could be used to
2281temporarily indent leftward a distance equal to the
2282size of the string ``\&\f(CW1.\ \fR'' in font
2283.CW B .
2284.PP
2285The width function also sets three number registers.
2286The registers \&\f(CWst\fR and \&\f(CWsb\fR are set respectively to the highest and
2287lowest extent of \fIstring\fR relative to the baseline;
2288then, for example,
2289the total height of the string is \&\f(CW\en(stu-\en(sbu\fR.
2290In \*(TR the number register \&\f(CWct\fR is set to a value
2291between 0 and 3.
2292The value
22930 means that all of the characters in \fIstring\fR were short lower
2294case characters without descenders (like \&\f(CWe\fR);
22951 means that at least one character has a descender (like \&\f(CWy\fR);
22962 means that at least one character is tall (like \&\f(CWH\fR);
2297and 3 means that both tall characters and characters with
2298descenders are present.
2299.sc "Mark horizontal place.
2300The function \&\f(CW\ek\fIx\fR causes the current horizontal
2301position in the \fIinput line\fR to be stored in register \fIx\fR.
2302For example,
2303the construction \&\f(CW\ekx\fIword\f(CW\eh'|\enxu+3u'\fIword\&\f(CW\fR
2304will embolden \fIword\fR by backing up to almost its beginning and overprinting it,
2305resulting in \kz\fIword\fR\h'|\nzu+3u'\fIword\fR.
2306.NH
2307Overstrike, Bracket, Line-drawing, Graphics, and Zero-width Functions
2308.sc "Overstriking.
2309Automatically centered overstriking of up to nine characters
2310is provided by the \fIoverstrike\fR function
2311\&\f(CW\eo'\fIstring\&\f(CW\|'\fR.
2312The characters in \fIstring\fR are overprinted with centers aligned; the total width
2313is that of the widest character.
2314\fIstring\fR may not contain local vertical motion.
2315As examples,
2316\&\f(CW\eo'e\e''\fR produces \o'e\'', and
2317\&\f(CW\eo'\e(mo\e(sl'\fR produces \o'\(mo\(sl'.
2318.sc "Zero-width characters.
2319The function
2320.CW \ez@c@
2321will output @c@ without spacing over
2322it, and can be used to produce left-aligned overstruck
2323combinations.
2324As examples,
2325\&\f(CW\ez□+\fR will produce \z□+, and
2326\&\f(CW\e(br\ez\e(rn\e(ul\e(br\fR will produce a small
2327badly constructed box \&\(br\z\(rn\(ul\(br\|.
2328.sc "Large Brackets.
2329The Special Font usually contains a number of bracket construction pieces
2330\|\|\(lt\|\|\(lb\|\|\(rt\|\|\(rb\|\|\(lk\|\|\(rk\|\|\(bv\|\|\(lf\|\|\(rf\|\|\(lc\|\|\(rc\|\|
2331that can be combined into various bracket styles.
2332The function \&\f(CW\eb'\fIstring\&\f(CW\|'\fR may be used to pile
2333up vertically the characters in \fIstring\fR
2334(the first character on top and the last at the bottom);
2335the characters are vertically separated by 1 em and the total
2336pile is centered 1/2 em above the current baseline
2337(½ line in \*(NR).
2338For example,
2339.P1
2340\eb'\e(lc\e(lf'E\eb'\e(rc\e(rf'\ex'-0.5m'\ex'0.5m'
2341.P2
2342produces
2343\x'-.5m'\x'.5m'\b'\(lc\(lf'E\b'\(rc\(rf'.
2344.sc "Line drawing.
2345.tr &&
2346The function \&\f(CW\el'\fINc\f(CW'\fR (backslash-ell) draws a string of repeated @c@'s towards the right for a distance @N@.
2347If @c@ looks like a continuation of
2348an expression for @N@, it may be insulated from @N@ with \&\f(CW\e&\fR.
2349If @c@ is not specified, the \&\f(CW\(ru\fR (baseline rule) is used
2350(underline character in \*(NR).
2351If @N@ is negative, a backward horizontal motion
2352of size @N@ is made before drawing the string.
2353Any space resulting from @N@/(size of @c@) having a remainder is put at the beginning (left end)
2354of the string.
2355If @N@ is less than the width of @c@,
2356a single @c@ is centered on a distance @N@.
2357In the case of characters
2358that are designed to be connected, such as
2359baseline-rule\ \&\f(CW\(ru\fR\|,
2360under-rule\ \&\f(CW\(ul\fR\|,
2361and
2362root-en\ \&\f(CW\(rn\fR\|,
2363the remainder space is covered by overlapping.
2364As an example, a macro to underscore a string can be written
2365.tr &.
2366.P1
2367.ne 2.1
2368&de us
2369\e\e$1\e\|l\|'|0\e(ul'
2370&&
2371.P2
2372.ne2.1
2373.de xu
2374\\$1\l'|0\(ul'
2375..
2376or one to draw a box around a string
2377.P1
2378&de bx
2379\e(br\e|\e\e$1\e|\e(br\e\|l\|'|0\e(rn'\e\|l\|'|0\e(ul'
2380&&
2381.P2
2382.de bx
2383\(br\|\\$1\|\(br\l'|0\(rn'\l'|0\(ul'
2384..
2385such that
2386.P1
2387&ul "underlined words"
2388.P2
2389and
2390.P1
2391&bx "words in a box"
2392.P2
2393yield
2394.xu "underlined words"
2395and
2396.bx "words in a box"
2397\h'-\w'.'u'.
2398.PP
2399The function \&\f(CW\eL'\fINc\&\f(CW'\fR draws a vertical line consisting
2400of the (optional) character @c@ stacked vertically apart 1\|em
2401(1 line in \*(NR),
2402with the first two characters overlapped,
2403if necessary, to form a continuous line.
2404The default character is the \fIbox rule\fR \|\(br\| (\&\f(CW\|\e(br\fR);
2405the other suitable character is the \fIbold vertical\fR \|\(bv\| (\&\f(CW\|\e(bv\fR).
2406The line is begun without any initial motion relative to the
2407current baseline.
2408A positive @N@ specifies a line drawn downward and
2409a negative @N@ specifies a line drawn upward.
2410After the line is drawn no compensating
2411motions are made;
2412the instantaneous baseline is at the end of the line.
2413.PP
2414.de eb
2415.sp -1
2416.nf
2417\h'-.5n'\L'|\\nzu-1'\l'\\n(.lu+1n\(ul'\L'-|\\nzu+1'\l'|0u-.5n\(ul'
2418.fi
2419..
2420.ne 2i
2421.mk z
2422.nr z \nz+1
2423The horizontal and vertical line drawing functions may be used
2424in combination to produce large boxes.
2425The zero-width \fIbox-rule\fR and the ½-em wide \fIunder-rule\fR
2426were designed to form corners when using 1-em vertical
2427spacings.
2428For example the macro
2429.nr x \n(DV
2430.nr DV 0
2431.P1 .15i
2432.ps -1
2433\&.de eb
2434\&.sp -1	\e"compensate for next automatic baseline spacing
2435\&.nf	\e"avoid possibly overflowing word buffer
2436\&\eh'-.5n'\eL'|\e\enau-1'\el'\e\en(.lu+1n\e(ul'\eL'-|\e\enau+1'\el'|0u-.5n\e(ul'
2437\&.fi
2438\&..
2439.ps +1
2440.P2
2441.nr DV \nx
2442will draw a box around some text whose beginning vertical place was
2443saved in number register \fIa\fR
2444(e.g., using \&\f(CW.mk\ a\fR)
2445as was done for this paragraph.
2446.eb
2447.sc "Graphics.
2448The function
2449.CW \eD'@c...@'
2450draws a graphic object of type @c@
2451according to a sequence of parameters,
2452which are generally pairs of numbers.
2453.IP
2454.nf
2455.ta 1.7i
2456\f(CW\eD'l @dh~ dv@'	\f1draw line from current position by @dh,~dv@\f(CW
2457\f(CW\eD'c @d@'	\f1draw circle of diameter @d@ with left side at current position\f(CW
2458\f(CW\eD'e @d sub 1 d sub 2@'	\f1draw ellipse of diameters @d sub 1@ and @d sub 2@\f(CW
2459\f(CW\eD'a @dh sub 1~ dv sub 1~ dh sub 2~ dv sub 2@'\f(CW	\f1draw arc from current position to @dh sub 1 +dh sub 2@, @dv sub 1 +dv sub 2@,\f(CW
2460	   \f1with center at @dh sub 1 ,~ dv sub 1@ from current position\f(CW
2461\f(CW\eD'~ @dh sub 1 dv sub 1 dh sub 2 dv sub 2 "..."@'\f(CW	\f1draw B-spline from current position by @dh sub 1, dv sub 1@,\f(CW
2462	   \f1then by @dh sub 2 , dv sub 2@, then by @dh sub 2 , dv sub 2@, then ...\f(CW
2463.LP
2464For example,
2465.CW "\eD'e0.2i 0.1i'"
2466draws the ellipse
2467\D'e.2i .1i'\|,
2468and
2469.CW "\eD'l.2i -.1i'\eD'l.1i .1i'"
2470the line
2471\D'l.2i -.1i'\D'l.1i .1i'\|.
2472A
2473.CW \\eD
2474with an unknown @c@ is processed and copied through to the output
2475for unspecified interpretation;
2476coordinates are interpreted alternately as horizontal and vertical
2477values.
2478.PP
2479Numbers taken as horizontal (first, third, etc.) have default scaling of ems;
2480vertical numbers (second, fourth, etc.) have default scaling of @V^@s (§1.3).
2481The position after a graphical object has been drawn is
2482at its end; for circles and ellipses, the ``end''
2483is at the right side.
2484.NH
2485Hyphenation.
2486.PP
2487Automatic hyphenation may be switched off and on.
2488When switched on with \&\f(CWhy\fR,
2489several variants may be set.
2490A \fIhyphenation indicator\fR character may be embedded in a word to
2491specify desired hyphenation points,
2492or may be prefixed to suppress hyphenation.
2493In addition,
2494the user may specify a small list of exception words.
2495.PP
2496Only words that consist of a central alphabetic string
2497surrounded by (usually null) non-alphabetic strings
2498are candidates for automatic hyphenation.
2499Words that contain hyphens
2500(minus),
2501em-dashes (\&\f(CW\e(em\fR),
2502or hyphenation indicator characters
2503are always subject to splitting after those characters,
2504whether automatic hyphenation is on or off.
2505.bt "\&\f(CW&nh\fR" "hyphenate" "-" "E" "Automatic hyphenation is turned off.
2506.bt "\&\f(CW&hy\fP@~N@" "on, @N=1@" "on, @N=1@" "E" "Automatic hyphenation is turned on
2507for @N >= 1@, or off for @N=0@.
2508If @N=2@, last lines (ones that will cause a trap)
2509are not hyphenated.
2510For @N=4@ and 8, the last and first two characters
2511respectively of a word are not split off.
2512These values are additive;
2513i.e., @N=14@ will invoke all three restrictions.
2514.bt "\&\f(CW&hc\fI c\fR" "\&\f(CW\e%" "\e%\fR" "E" "Hyphenation indicator character is set
2515to @c@ or to the default \&\f(CW\e%\fR.
2516The indicator does not appear in the output.
2517.bt "\&\f(CW&hw\fI word ...\fR" "" "ignored" "-" "Specify
2518hyphenation points in words
2519with embedded minus signs.
2520Versions of a word with terminal \fIs\fR are implied;
2521i.e.,
2522.CW dig-it
2523implies
2524.CW dig-its .
2525This list is examined initially and after
2526each suffix stripping.
2527The space available is small.
2528.NH
2529Three-Part Titles.
2530.PP
2531The titling function \&\f(CWtl\fR provides for automatic placement
2532of three fields at the left, center, and right of a line
2533with a title length
2534specifiable with \&\f(CWlt\fR.
2535\&\f(CWtl\fR may be used anywhere, and is independent of the
2536normal text collecting process.
2537A common use is in header and footer macros.
2538.h1
2539.bt "\&\f(CW&tl '\fIleft\fP'\fIcenter\fP'\fIright\fP'\fR" "-" "-" "" "The strings
2540\fIleft\fR, \fIcenter\fR, and \fIright\fR are
2541respectively left-adjusted, centered, and right-adjusted
2542in the current title length.
2543Any of the strings may be empty,
2544and overlapping is permitted.
2545If the page-number character (initially \&\f(CW%\fR) is found within any of the fields it is replaced
2546by the current page number in the format assigned to register \&\f(CW%\fR.
2547Any character may be used in place of
2548.CW '
2549as the string delimiter.
2550.bt "\&\f(CW&pc\fI c\fR" "\&\f(CW%\fR" "off" "-" "The page number character is set to @c@,
2551or removed.
2552The page number register remains \&\f(CW%\fR.
2553.bt "\&\f(CW&lt\fI \(+-N\fR" "6.5\|in" "previous" "E,\fBm\fR" "Length of title
2554is set to @+- N@.
2555The line length and the title length are independent.
2556Indents do not apply to titles; page offsets do.
2557.NH
2558Output Line Numbering.
2559.PP
2560.ll -\w'0000'u
2561.nm 1 3
2562Automatic sequence numbering of output lines may be
2563requested with \&\f(CWnm\fR.
2564When in effect,
2565a three-digit, arabic number plus a digit-space
2566is prefixed to output text lines.
2567The text lines are thus offset by four digit-spaces,
2568and otherwise retain their line length;
2569a reduction in line length may be desired to keep the right margin
2570aligned with an earlier margin.
2571Blank lines, other vertical spaces, and lines generated by \&\f(CWtl\fR
2572are not numbered.
2573Numbering can be temporarily suspended with \&\f(CWnn\fR,
2574or with an \&\f(CW.nm\fR followed by a later \&\f(CW.nm +0\fR.
2575In addition,
2576a line number indent \fII\fR, and the number-text separation \fIS\fR
2577may be specified in digit-spaces.
2578Further, it can be specified that only those line numbers that are
2579multiples of some number @M@ are to be printed (the others will appear
2580as blank number fields).
2581.br
2582.nm
2583.ll
2584.bt "\&\f(CW&nm\fI \(+-N M S I\fR" "" "off" "E" "Line number mode.
2585If @+- N@ is given,
2586line numbering is turned on,
2587and the next output line numbered is numbered @+- N@.
2588Default values are @M=1@, @S=1@, and @I=0@.
2589Parameters corresponding to missing arguments are unaffected;
2590a non-numeric argument is considered missing.
2591In the absence of all arguments, numbering is turned off;
2592the next line number is preserved for possible further use
2593in number register \&\f(CWln\fR.
2594.bt "\&\f(CW&nn\fI N\fR" "-" "@N=1@" "E" "The next @N@ text output lines are not
2595numbered.
2596.PP
2597.ll -\w'0000'u
2598.nm +0
2599As an example, the paragraph portions of this section
2600are numbered with \fIM=\fR\|3:
2601\&\&\f(CW.nm\ 1\ 3\fR was placed at the beginning;
2602\&\&\f(CW.nm\fR was placed at the end of the first paragraph;
2603and \&\f(CW.nm\ +0\fR was placed in front of this paragraph;
2604and \&\f(CW.nm\fR finally placed at the end.
2605Line lengths were also changed (by \&\f(CW\ew'0000'u\fR) to keep the right side aligned.
2606Another example is
2607.CW .nm
2608.CW +5
2609.CW 5
2610.CW x
2611.CW 3 ,
2612which turns on numbering with the line number of the next
2613line to be 5 greater than the last numbered line,
2614with @M=5@, with spacing \fIS\fR untouched, and with the indent \fII\fR set to 3.
2615.br
2616.ll
2617.nm
2618.NH
2619Conditional Acceptance of Input
2620.PP
2621In the following,
2622@c@ is a one-character built-in \fIcondition\fR name,
2623\&\f(CW!\fR signifies \fInot\fR,
2624@N@ is a numerical expression,
2625\fIstring1\fR and \fIstring2\fR are strings delimited by any non-blank, non-numeric character not in the strings,
2626and
2627\fIanything\fR represents what is conditionally accepted.
2628.bt "\&\f(CW&if\fI c anything\fR" "-" "-" "" "If condition
2629@c@ true, accept \fIanything\fR as input;
2630in multi-line case use \e{\fIanything\|\fR\e}.
2631.bt "\&\f(CW&if !\fIc anything\fR" "-" "-" "" "If condition @c@ false, accept \fIanything\fR.
2632.bt "\&\f(CW&if\fI N anything\fR" "" "-" "\fBu\fR" "If expression @N@ > 0, accept \fIanything\fR.
2633.bt "\&\f(CW&if !\fIN anything\fR" "" "-" "\fBu\fR" "If expression @N@ ≤ 0 [sic], accept \fIanything\fR.
2634.bt "\&\f(CW&if '\fIstring1\f(CW'\fIstring2\f(CW'\fI anything\fR" "-" "" "" "If \fIstring1\fR identical to \fIstring2\fR,
2635accept \fIanything\fR.
2636.bt "\&\f(CW&if !'\fIstring1\f(CW'\fIstring2\f(CW'\fI anything\fR" "-" "" "" "If \fIstring1\fR not identical to \fIstring2\fR,
2637accept \fIanything\fR.
2638.bt "\&\f(CW&ie\fI c anything\fR" "" "-" "\fBu\fR" "If portion of if-else;
2639all of the forms for \&\f(CWif\fR above are valid.
2640.bt "\&\f(CW&el\fI anything\fR" "-" "-" "" "Else portion of if-else.
2641.PP
2642The built-in condition names are:
2643.TS
2644center box;
2645c2|c2
2646c2|c2
2647c2|l2.
2648Condition
2649Name	True If
2650_
2651\&\f(CWo\fR	Current page number is odd
2652\&\f(CWe\fR	Current page number is even
2653\&\f(CWt\fR	Formatter is \*(TR
2654\&\f(CWn\fR	Formatter is \*(NR
2655.TE
2656If the condition @c@ is true, or if the number @N@ is greater than zero,
2657or if the strings compare identically (including motions and character size and font),
2658\fIanything\fR is accepted as input.
2659If a \&\f(CW!\fR precedes the condition, number, or string comparison,
2660the sense of the acceptance is reversed.
2661.PP
2662Any spaces between the condition and the beginning of \fIanything\fR are skipped over.
2663The \fIanything\fR can be either a single input line (text, macro, or whatever)
2664or a number of input lines.
2665In the multi-line case,
2666the first line must begin with a left delimiter \&\f(CW\e{\fR and
2667the last line must end with a right delimiter \&\f(CW\e}\fR.
2668.PP
2669The request \&\f(CWie\fR (if-else) is identical to \&\f(CWif\fR
2670except that the acceptance state is remembered.
2671A subsequent and matching \&\f(CWel\fR (else) request then uses the reverse sense of that state.
2672\&\f(CWie\fR-\&\f(CWel\fR pairs may be nested.
2673.PP
2674Some examples are:
2675.P1
2676&if e .tl '\|Even Page %'''
2677.P2
2678which outputs a title if the page number is even; and
2679.P1
2680&ie \en%>1 \e{\e
2681\&'	sp 0.5i
2682&	tl 'Page %'''
2683\&'	sp |1.2i \e}
2684&el .sp |2.5i
2685.P2
2686which treats page 1 differently from other pages.
2687.NH
2688Environment Switching.
2689.PP
2690A number of the parameters that
2691control the text processing are gathered together into an
2692\fIenvironment\fR, which can be switched by the user.
2693The environment parameters are those associated
2694with requests noting E in their \fINotes\fR column;
2695in addition, partially collected lines and words are in the environment.
2696Everything else is global; examples are page-oriented parameters,
2697diversion-oriented parameters, number registers, and macro and string definitions.
2698All environments are initialized with default parameter values.
2699.bt "\&\f(CW&ev\fI N\fR" "@N=0@" "previous" "-" "Environment switched to
2700environment @0 <= N <= 2@.
2701Switching is done in push-down fashion so that
2702restoring a previous environment \fImust\fR be done with \&\f(CW.ev\fR
2703rather than specific reference.
2704Note that what is pushed down and restored is the environment
2705.I number,
2706not its contents.
2707.NH
2708Insertions from the Standard Input
2709.PP
2710The input can be temporarily switched to the system standard input
2711with \&\f(CWrd\fR,
2712which will switch back when two consecutive newlines
2713are found (the extra blank line is not used).
2714This mechanism is intended for insertions in form-letter-like documentation.
2715The standard input can be the user's keyboard,
2716a pipe, or a file.
2717.bt "\&\f(CW&rd\fI prompt\fR" "-" "\fIprompt=\fR\s-1BEL\s+1" "-" "Read insertion
2718from the standard input until two newlines in a row are found.
2719If the standard input is the user's keyboard, \fIprompt\fR (or a \s-1BEL\s+1)
2720is written onto the standard output.
2721\&\f(CWrd\fR behaves like a macro,
2722and arguments may be placed after \fIprompt\fR.
2723.bt "\&\f(CW&ex\fR" "-" "-" "-" "Exit from \*(NR/\*(TR.
2724Text processing is terminated exactly as if all input had ended.
2725.PP
2726If insertions are to be
2727taken from the terminal keyboard while output is being printed
2728on the terminal, the command line option \&\f(CW-q\fR will turn off the echoing
2729of keyboard input and prompt only with \s-1BEL\s+1.
2730The regular input and insertion input cannot
2731simultaneously come from the standard input.
2732.PP
2733As an example,
2734multiple copies of a form letter may be prepared by entering the insertions
2735for all the copies in one file to be used as the standard input,
2736and causing the file containing the letter to reinvoke itself with \&\f(CWnx\fR (§19);
2737the process would ultimately be ended by an \&\f(CWex\fR in the insertion file.
2738.NH
2739Input/Output File Switching
2740.bt "\&\f(CW&so\fI filename\fR" "" "-" "-" "Switch source file.
2741The top input (file reading) level is switched to \fIfilename\fR.
2742When the new file ends,
2743input is again taken from the original file.
2744\&\f(CWso\fR's may be nested.
2745.bt "\&\f(CW&nx\fI filename\fR" "" "end-of-file" "-" "Next file is \fIfilename\fR.
2746The current file is considered ended, and the input is immediately switched
2747to \fIfilename\fR.
2748.bt "\&\f(CW&sy\fI string\fR" "" "-" "-" "Execute program from \fIstring\fR,
2749which is the rest of the input line.
2750The output is not collected automatically.
2751The number register
2752.CW $$ ,
2753which contains the process id of the \*(TR process,
2754may be useful in generating unique filenames for output.
2755.bt "\&\f(CW&pi\fI string\fR" "" "-" "-" "Pipe output to \fIstring\fR,
2756which is the rest of the input line.
2757This request must occur before any printing occurs;
2758typically it is the first line of input.
2759.bt "\&\f(CW&cf\fI filename\fR" "" "-" "-" "Copy
2760contents of file
2761.I filename
2762to output, completely unprocessed.
2763The file is assumed to contain something meaningful
2764to subsequent processes.
2765.NH
2766Miscellaneous
2767.br
2768.mc \s12\(br\s0
2769.bt "\&\f(CW.mc\fI c N\fR" - off E,\fBm\fR "Specifies
2770that a \fImargin\fR character @c@ appear a distance
2771@N@ to the right of the right margin
2772after each non-empty text line (except those produced by \&\f(CWtl\fR).
2773If the output line is too long (as can happen in nofill mode)
2774the character will be appended to the line.
2775If @N@ is not given, the previous @N@ is used; the initial @N@ is
27760.2 inches in \*(NR and 1 em in \*(TR.
2777The margin character used with this paragraph was a 12-point box-rule.
2778.br
2779.mc
2780.bt "\&\f(CW.tm\fI string\fR" "-" "newline" "-" "After skipping initial blanks,
2781\fIstring\fR (rest of the line) is read in copy mode
2782and written on the standard error.
2783.bt "\&\f(CW&ab\fI string\fR" "-" "newline" "-" "After skipping initial blanks,
2784\fIstring\fR (rest of the line) is read in copy mode
2785and written on the standard error.
2786\*(Tr or \*(NR then exit.
2787.bt "\&\f(CW.ig\fI yy\fR" "-" "\fI.yy=\&\f(CW..\fR" "-" "Ignore
2788input lines.
2789\&\f(CWig\fR behaves exactly like \&\f(CWde\fR (§7) except that the
2790input is discarded.
2791The input is read in copy mode, and any auto-incremented
2792registers will be affected.
2793.bt "\&\f(CW.lf\fI N filename\fR" "" "-" "-" "Set
2794line number to @N@ and filename to @filename@
2795for purposes of subsequent error messages, etc.
2796The number register [sic]
2797.CW .F
2798contains the name of the current input file,
2799as set by command line argument,
2800.CW so ,
2801.CW nx ,
2802or
2803.CW lf .
2804The number register
2805.CW .c
2806contains the number of input lines read from the current file,
2807again perhaps as modified by
2808.CW lf .
2809.CW
2810.bt "\&\f(CW.pm\fI t\fR" "-" "all" "-" "Print macros.
2811The names and sizes of all of the defined macros and strings are printed
2812on the standard error;
2813if \fIt\fR is given, only the total of the sizes is printed.
2814The sizes is given in blocks
2815of 128 characters.
2816.bt "\&\f(CW.fl\fR" - - B "Flush output buffer.
2817Force output, including any pending position information.
2818......
2819.NH
2820Output and Error Messages.
2821.PP
2822The output from \&\f(CWtm\fR, \&\f(CWpm\fR, and the prompt from \&\f(CWrd\fR,
2823as well as various error messages, are written onto
2824the standard error.
2825The latter is different from the standard output,
2826where formatted text goes.
2827By default, both are written onto the user's terminal,
2828but they can be independently redirected.
2829.PP
2830Various error conditions may occur during
2831the operation of \*(NR and \*(TR.
2832Certain less serious errors having only local impact do not
2833cause processing to terminate.
2834Two examples are \fIword overflow\fR, caused by a word that is too large
2835to fit into the word buffer (in fill mode), and
2836\fIline overflow\fR, caused by an output line that grew too large
2837to fit in the line buffer.
2838In both cases, a message is printed, the offending excess
2839is discarded,
2840and the affected word or line is marked at the point of truncation
2841with a \(** in \*(NR and a \(lh in \*(TR.
2842Processing continues if possible,
2843on the grounds that output useful for debugging may be produced.
2844If a serious error occurs, processing terminates,
2845and a message is printed, along with a list of the macro names currently active.
2846Examples of serious errors include the inability to create, read, or write files,
2847and the exceeding of certain internal limits that
2848make future output unlikely to be useful.
2849.NH
2850Output Language
2851.PP
2852\*(Tr
2853produces its output in a language that is independent of any
2854specific output device,
2855except that the numbers in it have been computed on the basis
2856of the resolution of the device,
2857and the sizes, fonts, and characters that that device can print.
2858Nevertheless it is quite possible to interpret that output
2859on a different device, within the latter's capabilities.
2860.IP
2861.nf
2862.ta .7i
2863@cw s n@	set point size to @n@
2864@cw f n@	set font to @n@
2865@cw c c@	print character @c@
2866@cw C name@	print the character called @name@; terminate @name@ by white space
2867@cw N n@	print character @n@ on current font
2868@cw H n@	go to absolute horizontal position \f2n\fP (@n >= 0@)
2869@cw V n@	go to absolute vertical position \f2n\fP (@n >= 0@, down is positive)
2870@cw h n@	go \f2n\fP units horizontally; @n < 0@ is to the left
2871@cw v n@	go \f2n\fP units vertically; @n < 0@ is up
2872@nnc@	move right \f2nn\fP, then print \s-1UTF\s0 character \f2c\fP;  \f2nn\fP must be exactly 2 digits
2873@cw p n@	new page \f2n\fP begins\(emset vertical position to 0
2874@cw n b~a@	end of line (information only\(emno action);  \f2b\fP = space before line, \f2a\fP = after
2875@cw w@	paddable word space (information only\(emno action)
2876@cw D c@ ...\en	graphics function @c@; see below
2877@cw x@ ...\en	device control functions; see below
2878@cw "#"@ ...\en	comment
2879.LP
2880All position values are in units.
2881Sequences that end in digits must be followed by a non-digit.
2882Blanks, tabs and newlines may occur as separators
2883in the input, and are mandatory to separate constructions
2884that would otherwise be confused.
2885Graphics functions, device control functions, and comments extend to the
2886end of the line they occur on.
2887.PP
2888The device control and graphics commands are intended as open-ended
2889families, to be expanded as needed.
2890The graphics functions coincide directly with the
2891.CW \eD
2892sequences:
2893.IP
2894.nf
2895.ta 1.7i
2896@cw Dl@ \f2dh dv\fP	draw line from current position by @dh,~ dv@
2897@cw Dc@ \f2d\fP	draw circle of diameter \f2d\fP with left side here
2898@cw De@ @dh sub 1~dv sub 2@	draw ellipse of diameters @dh sub 1@ and @ dv sub 2@\fP
2899@cw Da ~dh sub 1~ dv sub 1 ~ dh sub 2 ~dv sub 2@	draw arc from current position to @dh sub 1 +dh sub 2 ,~ dv sub 1 +dv sub 2@,
2900		   center at @dh sub 1 ,~ dv sub 1@ from current position
2901@cw "D~" ~dh sub 1 ~dv sub 1 ~dh sub 2 ~dv sub 2@ ...	draw B-spline from current position to @dh sub 1 ,~ dv sub 1@,
2902		   then to @dh sub 2 , ~dv sub 2@, then to ...
2903@cw "D"z ~dh sub 1 ~dv sub 1 ~dh sub 2 ~dv sub 2@ ...	for any other @z@ is uninterpreted
2904.LP
2905In all of these, @dh, ~dv@ is an increment on the current horizontal and
2906vertical position,
2907with down and right positive.
2908All distances and dimensions are in units.
2909.PP
2910The device control functions begin with
2911.CW x ,
2912then a command, then other parameters.
2913.IP
2914.ta .8i 1.2i
2915.nf
2916.ft CW
2917x T \f2s\fP	\f1name of typesetter is @s@\f(CW
2918x r \f2n h v\fP	\f1resolution is @n@ units/inch;\f(CW
2919		\f1@h@ = minimum horizontal motion, @v@ = minimum vertical\f(CW
2920x i	\f1initialize\fP
2921x f \f2n s\fP	\f1mount font @s@ on font position @n@\f(CW
2922x p	\f1pause\(emcan restart\f(CW
2923x s	\f1stop\(emdone forever\f(CW
2924x t	\f1generate trailer information, if any\f(CW
2925x H \f2n\fP	\f1set character height to @n@\f(CW
2926x S \f2n\fP	\f1set slant to @n@\f(CW
2927x X \f2any\fP	\f1generated by the \&\f(CW\eX\fP function\f(CW
2928x \f2any\fP	\f1to be ignored if not recognized\f(CW
2929.LP
2930Subcommands like
2931.CW i '' ``
2932may be spelled out like
2933.CW init ''. ``
2934.PP
2935The commands
2936.CW "x T" ,
2937.CW "x r " ...,
2938and
2939.CW "x i"
2940must occur first;
2941fonts must be mounted before they can be used;
2942.CW "x s
2943comes last.
2944There are no other order requirements.
2945.PP
2946The following is the output from
2947.CW hello, "" ``
2948.CW world ''
2949for a typical printer,
2950as described in §23:
2951.P1
2952x T utf
2953x res 720 1 1
2954x init
2955V0
2956p1
2957.P2
2958.P1
2959x font 1 R
2960x font 2 I
2961x font 3 B
2962x font 4 BI
2963x font 5 CW
2964x font 6 H
2965x font 7 HB
2966x font 8 HX
2967x font 9 S1
2968x font 10 S
2969.P2
2970.P1
2971s10
2972f1
2973H0
2974s10
2975f1
2976V0
2977H720
2978V120
2979ch
298050e44l28l28o50,w58w72o50r33l28dn120 0
2981x trailer
2982V7920
2983x stop
2984.P2
2985.PP
2986\*(Tr output is normally not redundant;
2987size and font changes and position information are not included
2988unless needed.
2989Nevertheless, each page is self-contained, for the benefit of postprocessors
2990that re-order pages or process only a subset.
2991.NH
2992Device and Font Description Files
2993.PP
2994The parameters that describe a output device
2995.I name
2996are read
2997from the directory
2998.CW /sys/lib/troff/font/dev@name@ ,
2999each time
3000\*(TR
3001is invoked.
3002The device name is provided by default,
3003by the environment variable
3004.CW TYPESETTER ,
3005or by a command-line argument
3006.CW -T@name@ .
3007The default device name is
3008.CW utf ,
3009for \s-1UTF\s0-encoded Unicode characters.
3010The pre-defined string
3011.CW .T
3012contains the name of the device.
3013The
3014.CW -F
3015command-line option may be used to change the default directory.
3016.......
3017.sc "Device description file.
3018General parameters of the device are stored, one per line, in
3019the file
3020.CW /sys/lib/troff/font/dev@name@/DESC ,
3021as a sequence of names and values.
3022\*(Tr recognizes these parameters, and ignores any
3023others that may be present for specific drivers:
3024.IP
3025.nf
3026.ta 1i
3027@cw fonts ~ n ~ F sub 1  ~F sub 2  ~. . .~ F sub n@
3028@cw sizes ~ s sub 1 ~ s sub 2 ~ . . . cw 0@
3029@cw res ~n@
3030@cw hor ~n@
3031@cw vert ~n@
3032@cw unitwidth ~n@
3033@cw charset@
3034\f2list of multi-character character names (optional)\fP
3035.LP
3036The @F sub i@ are font names
3037to be initially mounted.
3038The list of sizes is a set of integers representing
3039some or all of the legal sizes the device can produce,
3040terminated by a zero.
3041The
3042.CW res
3043parameter gives the resolution of the machine in units per inch;
3044.CW hor
3045and
3046.CW ver
3047give the minimum number of units that can be moved
3048horizontally and vertically.
3049.PP
3050Character widths for each font are assumed to be given in machine units
3051at point size
3052.CW unitwidth .
3053(In other words, a character with a width of
3054@n@ is @n@ units wide at size
3055.CW unitwidth .)
3056All widths are integers at all sizes.
3057.PP
3058A list of valid character names may be introduced by
3059.CW charset ;
3060the list of names is optional.
3061.PP
3062A line whose first non-blank character is
3063.CW #
3064is a comment.
3065Except that
3066.CW charset
3067must occur last, parameters may appear in any order.
3068.PP
3069Here is a subset of the
3070.CW DESC
3071file for a typical Postscript printer:
3072.P1
3073# Description file for Postscript printers.
3074
3075fonts 10 R I B BI CW H HB HX S1 S
3076sizes 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
3077   24 25 26 27 28 29 30 31 32 33 34 35 36 38 40 44 48 54 60 72 0
3078res 720
3079hor 1
3080vert 1
3081unitwidth 10
3082charset
3083hy ct fi fl ff Fi Fl dg em 14 34 12 en aa
3084ga ru sc dd -> br Sl ps cs cy as os =. ld
3085rd le ge pp -+ ob vr
3086sq bx ci fa te ** pl mi eq ~= *A *B *X *D
3087*E *F *G *Y *I *K *L *M *N *O *P *R *H *S *T *U *W
3088*C *Q *Z ul rn *a *b *x *d *e *f *g *y *i *k
3089*l *m *n *o *p *h *r *s *t *u *w *c *q *z
3090.P2
3091.sc "Font description files.
3092Each font is described by an analogous description file,
3093which begins with parameters of the font, one per line, followed by a
3094list of characters and widths.
3095The file for font
3096.I f
3097is
3098.CW /sys/lib/troff/font/dev@name@/@f@ .
3099.IP
3100.ta 1.7i
3101.nf
3102@cw name ~str@	name of font is @str@
3103@cw ligatures ~ ". . ." ~ cw "0"@	list of ligatures
3104@cw spacewidth ~n@	width of a space on this font
3105@cw special@	this is a special font
3106@cw charset@
3107\f2list of character name, width, ascender/descender, code\fP, tab separated
3108.LP
3109The
3110.CW name
3111and
3112.CW charset
3113fields are mandatory;
3114.CW charset
3115must be last.
3116Comments are permitted,
3117as are other unrecognized parameters.
3118.PP
3119Each line following
3120.CW charset
3121describes one character: its name, its width in units as described above,
3122ascender/descender information, and a decimal, octal or hexadecimal value
3123by which the output device knows it
3124(the
3125.CW \eN
3126``number'' of the character).
3127The character name is arbitrary, except that
3128.CW ---
3129signifies an unnamed character.
3130If the width field contains
3131.CW \&" ,
3132the name is a synonym for the previous character.
3133The ascender/descender field is 1 if
3134the character has a descender (hangs below the baseline, like
3135.CW y ),
3136is 2 if it has an ascender (is tall, like
3137.CW Y ),
3138is 3 if both,
3139and is 0 if neither.
3140The value is returned
3141in the
3142.CW ct
3143register, as computed by the
3144.CW \ew
3145function (§11.2).
3146.PP
3147Here are excerpts from a typical font description file
3148for the same Postscript printer.
3149.P1
3150hy	33	0	45	hyphen \e(hy
3151-	"			- is a synonym for \e(hy
3152.sp .3
3153Q	72	3	81
3154.sp .3
3155a	44	0	97
3156b	50	2	98
3157c	44	0	99
3158d	50	2	100
3159y	50	1	121
3160.sp .3
3161em	100	0	208
3162---	44	2	220	Pound symbol £, \eN'220'
3163---	36	0	221	centered dot \eN'221'
3164.P2
3165This says, for example, that the width of the letter
3166.CW a
3167is 44 units at point size 10,
3168the value of
3169.CW unitwidth .
3170Point sizes are scaled linearly and rounded, so the width of
3171.CW a
3172will be 44 at size 10, 40 at size 9, 35 at size 8,
3173and so on.
3174.sp 100
3175.BP
3176.fp 8 C CW
3177.tr &.
3178.tr |
3179.tr ~|
3180.TL
3181Tutorial Examples
3182.SP
3183....2C
3184.sp .25i
3185.SH
3186Introduction
3187.PP
3188It is almost always necessary to
3189prepare at least a small set of macro definitions
3190to describe a document.
3191Such common formatting needs
3192as page margins and footnotes
3193are deliberately not built into \*(NR and \*(TR.
3194Instead,
3195the macro and string definition, number register, diversion,
3196environment switching, page-position trap, and conditional input mechanisms
3197provide the basis for user-defined implementations.
3198.PP
3199For most uses, a standard package like
3200.CW -ms
3201or
3202.CW -mm
3203is the right choice.
3204The next stage is to augment that,
3205or to selectively replace macros from the standard package.
3206The last stage, much harder,
3207is to write one's own from scratch.
3208This is not a task for the novice.
3209.PP
3210The examples discussed here are intended to be useful and somewhat realistic,
3211but will not necessarily cover all relevant contingencies.
3212Explicit numerical parameters are used
3213in the examples
3214to make them easier to read and to
3215illustrate typical values.
3216In many cases, number registers would be used
3217to reduce the number of places where numerical
3218information is kept,
3219and to concentrate conditional parameter initialization
3220like that which depends on whether \*(TR or \*(NR is being used.
3221.SH
3222Page Margins
3223.PP
3224As discussed in §3,
3225header and footer macros are usually defined
3226to describe the top and bottom page margin areas respectively.
3227A trap is planted at page position 0 for the header, and at
3228\fI-N\fR (\fIN\fR from the page bottom) for the footer.
3229The simplest such definitions might be
3230.P1 .1i
3231&de hd	\e"define header
3232\&'sp 1i
3233&&	\e"end definition
3234&de fo	\e"define footer
3235\&'bp
3236&&	\e"end definition
3237&wh 0 hd
3238&wh -1i fo
3239.P2
3240which provide blank 1 inch top and bottom margins.
3241The header will occur on the \fIfirst\fR page
3242only if the definition and trap exist prior to
3243the initial pseudo-page transition (§3).
3244In fill mode, the output line that springs the footer trap
3245was typically forced out because some part or whole word didn't fit on it.
3246If anything in the footer and header that follows causes a break,
3247that word or part word will be forced out.
3248In this and other examples,
3249requests like \&\f(CWbp\fR and \&\f(CWsp\fR that normally cause breaks are invoked using
3250the no-break control character \&\f(CW'\fR
3251to avoid this.
3252When the header/footer design contains material
3253requiring independent text processing, the
3254environment may be switched, avoiding
3255most interaction with the running text.
3256.PP
3257A more realistic example would be
3258.P1 .1i
3259&de hd	\e"header
3260&if \e\en%>1 \e{\e
3261\&'sp ~0.5i-1	\e"tl base at 0.5i
3262&tl ''- % -''	\e"centered page number
3263&ps	\e"restore size
3264&ft	\e"restore font
3265&vs  \e}	\e"restore vs
3266\&'sp ~1.0i  	\e"space to 1.0i
3267&ns	\e"turn on no-space mode
3268&&
3269&de fo	\e"footer
3270&ps 10	\e"set footer/header size
3271&ft R	\e"set font
3272&vs 12p	\e"set baseline spacing
3273&if \e\en%=1 \e{\e
3274\&'sp ~\e\en(.pu-0.5i-1  \e"tl base 0.5i up
3275&tl ''- % -'' \e}  \e"first page number
3276\&'bp
3277&&
3278&wh 0 hd
3279&wh -1i fo
3280.P2
3281which sets the size, font, and baseline spacing for the
3282header/footer material, and ultimately restores them.
3283The material in this case is a page number at the bottom of the
3284first page and at the top of the remaining pages.
3285The \&\f(CWsp\fR's refer to absolute positions to avoid
3286dependence on the baseline spacing.
3287Another reason for doing this in the footer
3288is that the footer is invoked by printing a line whose
3289vertical spacing swept past the trap position by possibly
3290as much as the baseline spacing.
3291No-space mode is turned on at the end of \&\f(CWhd\fR
3292to render ineffective
3293accidental occurrences of \&\f(CWsp\fR at the top of the running text.
3294.PP
3295This method of restoring size, font, etc., presupposes
3296that such requests (that set \fIprevious\fR value) are \fInot\fR
3297used in the running text.
3298A better scheme is to save and restore both the current \fIand\fR
3299previous values as shown for size in the following:
3300.P1 .1i
3301&de fo
3302&nr s1 \e\en(.s	\e"current size
3303&ps
3304&nr s2 \e\en(.s	\e"previous size
3305&  ---	\e"rest of footer
3306&&
3307&de hd
3308&  ---	\e"header stuff
3309&ps \e\en(s2  \e"restore previous size
3310&ps \e\en(s1  \e"restore current size
3311&&
3312.P2
3313Page numbers may be printed in the bottom margin
3314by a separate macro triggered during the footer's
3315page ejection:
3316.P1 .1i
3317&de bn	\e"bottom number
3318&tl ''- % -''	\e"centered page number
3319&&
3320&wh -0.5i-1v bn	 \e"tl base 0.5i up
3321.P2
3322.SH
3323Paragraphs and Headings
3324.PP
3325The housekeeping
3326associated with starting a new paragraph should be collected
3327in a paragraph macro
3328that, for example,
3329does the desired preparagraph spacing,
3330forces the correct font, size, baseline spacing, and indent,
3331checks that enough space remains for \fImore than one\fR line,
3332and
3333requests a temporary indent.
3334.P1 .1i
3335&de pg    \e"paragraph
3336&br       \e"break
3337&ft R     \e"force font,
3338&ps 10    \e"size,
3339&vs 12p   \e"spacing,
3340&in 0     \e"and indent
3341&sp 0.4   \e"prespace
3342&ne 1+\e\en(.Vu  \e"want more than 1 line
3343&ti 0.2i         \e"temp indent
3344&&
3345.P2
3346The first break in \&\f(CWpg\fR
3347will force out any previous partial lines,
3348and must occur before the \&\f(CWvs\fR.
3349The forcing of font, etc., is
3350partly a defense against prior error and
3351partly to permit
3352things like section heading macros to
3353set parameters only once.
3354The prespacing parameter is suitable for \*(TR;
3355a larger space, at least as big as the output device vertical resolution, would be
3356more suitable in \*(NR.
3357The choice of remaining space to test for in the \&\f(CWne\fR
3358is the smallest amount greater than one line
3359(the \&\f(CW.V\fR is the available vertical resolution).
3360.PP
3361A macro to automatically number section headings
3362might look like:
3363.P1 .1i
3364&de sc	\e"section
3365&  ---	\e"force font, etc.
3366&sp 0.4	\e"prespace
3367&ne 2.4+\e\en(.Vu \e"want 2.4+ lines
3368.lg 0
3369&fi
3370.lg
3371\e\en+S.
3372&&
3373&nr S 0 1	\e"init S
3374.P2
3375The usage is \&\f(CW.sc\fR,
3376followed by the section heading text,
3377followed by \&\f(CW.pg\fR.
3378The \&\f(CWne\fR test value includes one line of heading,
33790.4 line in the following \&\f(CWpg\fR, and
3380one line of the paragraph text.
3381A word consisting of the next section number and a period is
3382produced to begin the heading line.
3383The format of the number may be set by \&\f(CWaf\fR (§8).
3384.PP
3385Another common form is the labeled, indented paragraph,
3386where the label protrudes left into the indent space.
3387.P1 .1i
3388&de lp	\e"labeled paragraph
3389&pg
3390&in 0.5i	\e"paragraph indent
3391&ta 0.2i 0.5i	\e"label, paragraph
3392&ti 0
3393\et\e\e$1\et\ec	\e"flow into paragraph
3394&&
3395.P2
3396The intended usage is ``\&\f(CW.lp\fR \fIlabel\fR\|'';
3397\fIlabel\fR will begin at 0.2 inch, and
3398cannot exceed a length of 0.3 inch without intruding into
3399the paragraph.
3400The label could be right adjusted against 0.4 inch by
3401setting the tabs instead with \&\f(CW.ta|0.4iR|0.5i\fR.
3402The last line of \&\f(CWlp\fR ends with \&\f(CW\ec\fR so that
3403it will become a part of the first line of the text
3404that follows.
3405.SH
3406Multiple Column Output
3407.PP
3408The production of multiple column pages requires
3409the footer macro to decide whether it was
3410invoked by other than the last column,
3411so that it will begin a new column rather than
3412produce the bottom margin.
3413The header can initialize a column register that
3414the footer will increment and test.
3415The following is arranged for two columns, but
3416is easily modified for more.
3417.P1 .1i
3418&de hd	\e"header
3419&  ---
3420&nr cl 0 1	\e"init column count
3421&mk	\e"mark top of text
3422&&
3423.P2
3424.P1 .1i
3425&de fo	\e"footer
3426&ie \e\en+(cl<2 \e{\e
3427&po +3.4i	\e"next column; 3.1+0.3
3428&rt	\e"back to mark
3429&ns \e}	\e"no-space mode
3430&el \e{\e
3431&po \e\enMu	\e"restore left margin
3432&  ---
3433\&'bp \e}
3434&&
3435&ll 3.1i	\e"column width
3436&nr M \e\en(.o	\e"save left margin
3437.P2
3438Typically a portion of the top of the first page
3439contains full width text;
3440the request for the narrower line length,
3441as well as another \&\f(CW.mk\fR would
3442be made where the two column output was to begin.
3443.SH
3444Footnotes
3445.PP
3446The footnote mechanism to be described is used by
3447embedding the footnotes in the input text at the
3448point of reference,
3449demarcated by an initial \&\f(CW.fn\fR and a terminal \&\f(CW.ef\fR:
3450.P1 .1i
3451&fn
3452\fIFootnote text and control lines...\fP
3453&ef
3454.P2
3455In the following,
3456footnotes are processed in a separate environment and diverted
3457for later printing in the space immediately prior to the bottom
3458margin.
3459There is provision for the case where the last collected
3460footnote doesn't completely fit in the available space.
3461.P1 .1i
3462&de hd	\e"header
3463&  ---
3464&nr x 0 1	\e"init footnote count
3465&nr y 0-\e\enb	\e"current footer place
3466&ch fo -\e\enbu	\e"reset footer trap
3467&if \e\en(dn .fz	\e"leftover footnote
3468&&
3469.P2
3470.P1 .1i
3471&de fo	\e"footer
3472&nr dn 0  \e"zero last diversion size
3473&if \e\enx \e{\e
3474&ev 1	\e"expand footnotes in ev1
3475&nf	\e"retain vertical size
3476&FN	\e"footnotes
3477&rm FN	\e"delete it
3478.P2
3479.P1 .1i
3480&if "\e\en(.z"fy" .di  \e"end overflow di
3481&nr x 0	\e"disable fx
3482&ev  \e}	\e"pop environment
3483&  ---
3484\&'bp
3485&&
3486.P2
3487.P1 .1i
3488&de fx	\e"process footnote overflow
3489&if \e\enx .di fy	\e"divert overflow
3490&&
3491.P2
3492.P1 .1i
3493&de fn	\e"start footnote
3494&da FN	\e"divert (append) footnote
3495&ev 1	\e"in environment 1
3496&if \e\en+x=1 .fs   \e"if 1st, separator
3497&fi	\e"fill mode
3498&&
3499.P2
3500.P1 .1i
3501&de ef	\e"end footnote
3502&br	\e"finish output
3503&nr z \e\en(.v	\e"save spacing
3504&ev	\e"pop ev
3505&di	\e"end diversion
3506&nr y -\e\en(dn	\e"new footer position,
3507&if \e\enx=1 .nr y -(\e\en(.v-\e\enz) \e
3508	\e"uncertainty correction
3509&ch fo \e\enyu	\e"y is negative
3510&if (\e\en(nl+1v)>(\e\en(.p+\e\eny) \e
3511&ch fo \e\en(nlu+1v	 \e"didn't fit
3512&&
3513.P2
3514.P1 .1i
3515&de fs	\e"separator
3516\el'1i'	\e"1 inch rule
3517&br
3518&&
3519.P2
3520.P1 .1i
3521&de fz	\e"get leftover footnote
3522&fn
3523&nf	\e"retain vertical size
3524&fy	\e"where fx put it
3525&ef
3526&&
3527.P2
3528.P1 .1i
3529&nr b 1.0i  \e"bottom margin size
3530&wh 0 hd    \e"header trap
3531&wh 12i fo  \e"footer trap->temp pos
3532&wh -\e\enbu fx	\e"fx at footer position
3533&ch fo -\e\enbu	\e"conceal fx with fo
3534.P2
3535.PP
3536The header \&\f(CWhd\fR initializes a footnote count register \&\f(CWx\fR,
3537and sets both the current footer trap position register \&\f(CWy\fR and
3538the footer trap itself to a nominal position specified in
3539register \&\f(CWb\fR.
3540In addition, if the register \&\f(CWdn\fR indicates a leftover footnote,
3541\&\f(CWfz\fR is invoked to reprocess it.
3542The footnote start macro \&\f(CWfn\fR begins a diversion (append) in environment 1,
3543and increments the count \&\f(CWx\fR; if the count is one, the footnote separator \&\f(CWfs\fR
3544is interpolated.
3545The separator is kept in a separate macro to permit user redefinition.
3546.PP
3547The footnote end macro \&\f(CWef\fR restores
3548the previous environment and ends the diversion after saving the spacing size in register \&\f(CWz\fR.
3549\&\f(CWy\fR is then decremented by the size of the footnote, available in \&\f(CWdn\fR;
3550then on the first footnote, \&\f(CWy\fR is further decremented by the difference
3551in vertical baseline spacings of the two environments, to
3552prevent the late triggering of the footer trap from causing the last
3553line of the combined footnotes to overflow.
3554The footer trap is then set to the lower (on the page) of \&\f(CWy\fR or the current page position (\&\f(CWnl\fR)
3555plus one line, to allow for printing the reference line.
3556.PP
3557If indicated by \&\f(CWx\fR, the footer \&\f(CWfo\fR rereads the footnotes from \&\f(CWFN\fR in nofill mode
3558in environment 1,
3559and deletes \&\f(CWFN\fR.
3560If the footnotes were too large to fit, the macro \&\f(CWfx\fR will be trap-invoked to redivert
3561the overflow into \&\f(CWfy\fR,
3562and the register \&\f(CWdn\fR will later indicate to the header whether \&\f(CWfy\fR is empty.
3563.PP
3564Both \&\f(CWfo\fR and \&\f(CWfx\fR are planted in the nominal footer trap position in an order
3565that causes \&\f(CWfx\fR to be concealed unless the \&\f(CWfo\fR trap is moved.
3566The footer then terminates the overflow diversion, if necessary, and
3567zeros \&\f(CWx\fR to disable \&\f(CWfx\fR,
3568because the uncertainty correction
3569together with a not-too-late triggering of the footer can result
3570in the footnote rereading finishing before reaching the \&\f(CWfx\fR trap.
3571.PP
3572A good exercise for the student is to combine the multiple-column and footnote mechanisms.
3573.SH
3574The Last Page
3575.PP
3576After the last input file has ended, \*(NR and \*(TR
3577invoke the \fIend macro\fR (§7), if any,
3578and when it finishes, eject the remainder of the page.
3579During the eject, any traps encountered are processed normally.
3580At the end of this last page, processing terminates
3581unless a partial line, word, or partial word remains.
3582If it is desired that another page be started, the end-macro
3583.P1 .1i
3584&de en	\e"end-macro
3585\ec
3586\&'bp
3587&&
3588&em en
3589.P2
3590will deposit a null partial word,
3591and produce another last page.
3592....1C
3593.sp 100
3594.BP
3595........
3596.TL
3597Special Character Names
3598.SP
3599.PP
3600The following table lists names for a set of characters,
3601most of which have traditionally been provided by \*(TR using
3602the `special' or `symbol' font.
3603Many of these sequences are old ways to get what are now Unicode
3604characters;
3605Lucida Sans, for example, has glyphs corresponding to many of these
3606but does not have the special sequences.
3607Therefore
3608the \*(TR sequence
3609.CW \e(*F
3610gives the character \(*F from the Times font instead of the
3611character Φ from the current font, in this case Lucida Sans.
3612Not all sequences print on any particular device, including this one; Peter
3613faces appear in their place.
3614.TS
3615center;
3616l l20fCW l l20fCW l l20fCW.
3617\&\'	\e'	\(*m	\e(*m	\(~=	\e(~=
3618\`	\e`	\(*n	\e(*n	\(ap	\e(ap
3619\(em	\e(em	\(*c	\e(*c	\(!=	\e(!=
3620\(en	\e(en	\(*o	\e(*o	\(->	\e(->
3621\(hy	\e(hy	\(*p	\e(*p	\(<-	\e(<-
3622\-	\e-	\(*r	\e(*r	\(ua	\e(ua
3623\(bu	\e(bu	\(*s	\e(*s	\(da	\e(da
3624\(sq	\e(sq	\(ts	\e(ts	\(mu	\e(mu
3625\(ru	\e(ru	\(*t	\e(*t	\(di	\e(di
3626\(14	\e(14	\(*u	\e(*u	\(+-	\e(+-
3627\(12	\e(12	\(*f	\e(*f	\(cu	\e(cu
3628\(34	\e(34	\(*x	\e(*x	\(ca	\e(ca
3629\(fi	\e(fi	\(*q	\e(*q	\(sb	\e(sb
3630\(fl	\e(fl	\(*w	\e(*w	\(sp	\e(sp
3631\(ff	\e(ff	\(*A	\e(*A	\(ib	\e(ib
3632\(Fi	\e(Fi	\(*B	\e(*B	\(ip	\e(ip
3633\(Fl	\e(Fl	\(*G	\e(*G	\(if	\e(if
3634\(de	\e(de	\(*D	\e(*D	\(pd	\e(pd
3635\(dg	\e(dg	\(*E	\e(*E	\(gr	\e(gr
3636\(fm	\e(fm	\(*Z	\e(*Z	\(no	\e(no
3637\(ct	\e(ct	\(*Y	\e(*Y	\(is	\e(is
3638\(rg	\e(rg	\(*H	\e(*H	\(pt	\e(pt
3639\(co	\e(co	\(*I	\e(*I	\(es	\e(es
3640\(pl	\e(pl	\(*K	\e(*K	\(mo	\e(mo
3641\(mi	\e(mi	\(*L	\e(*L	\(br	\e(br
3642\(eq	\e(eq	\(*M	\e(*M	\(dd	\e(dd
3643\(**	\e(**	\(*N	\e(*N	\(rh	\e(rh
3644\(sc	\e(sc	\(*C	\e(*C	\(lh	\e(lh
3645\(aa	\e(aa	\(*O	\e(*O	\(L1	\e(bs
3646\(ga	\e(ga	\(*P	\e(*P	\(or	\e(or
3647\(ul	\e(ul	\(*R	\e(*R	\(ci	\e(ci
3648\(sl	\e(sl	\(*S	\e(*S	\(lt	\e(lt
3649\(*a	\e(*a	\(*T	\e(*T	\(lb	\e(lb
3650\(*b	\e(*b	\(*U	\e(*U	\(rt	\e(rt
3651\(*g	\e(*g	\(*F	\e(*F	\(rb	\e(rb
3652\(*d	\e(*d	\(*X	\e(*X	\(lk	\e(lk
3653\(*e	\e(*e	\(*Q	\e(*Q	\(rk	\e(rk
3654\(*z	\e(*z	\(*W	\e(*W	\(bv	\e(bv
3655\(*y	\e(*y	\(sr	\e(sr	\(lf	\e(lf
3656\(*h	\e(*h	\(rn	\e(rn	\(rf	\e(rf
3657\(*i	\e(*i	\(>=	\e(>=	\(lc	\e(lc
3658\(*k	\e(*k	\(<=	\e(<=	\(rc	\e(rc
3659\(*l	\e(*l	\(==	\e(==	\d\h'-5m'\(LH\u	\e(LH
3660.TE
3661