xref: /386bsd/usr/src/share/me/tmac.e (revision a2142627)
1.nr _0 \n(.c
2.\" Copyright (c) 1988 The Regents of the University of California.
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\" 3. All advertising materials mentioning features or use of this software
14.\"    must display the following acknowledgement:
15.\"	This product includes software developed by the University of
16.\"	California, Berkeley and its contributors.
17.\" 4. Neither the name of the University nor the names of its contributors
18.\"    may be used to endorse or promote products derived from this software
19.\"    without specific prior written permission.
20.\"
21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31.\" SUCH DAMAGE.
32.\"
33.\"	@(#)tmac.e	2.35 (Berkeley) 4/17/91
34.\"
35.\"	%beginstrip%
36.\"
37.\"**********************************************************************
38.\"*									*
39.\"*	******  - M E   N R O F F / T R O F F   M A C R O S  ******	*
40.\"*									*
41.\"*	Produced for your edification and enjoyment by:			*
42.\"*		Eric Allman						*
43.\"*		Electronics Research Laboratory				*
44.\"*		U.C. Berkeley.						*
45.\"*	current address:						*
46.\"*		Britton-Lee, Inc.					*
47.\"*		1919 Addison Street Suite 105				*
48.\"*		Berkeley, California  94704				*
49.\"*									*
50.\"*	VERSION 2.35	First Release: 11 Sept 1978			*
51.\"*	See file \*(||/revisions for revision history			*
52.\"*									*
53.\"*	Documentation is available.					*
54.\"*									*
55.\"**********************************************************************
56.\"
57.\"	Code on .de commands:
58.\"		***	a user interface macro.
59.\"		&&&	a user interface macro which is redefined
60.\"			when used to be the real thing.
61.\"		$$$	a macro which may be redefined by the user
62.\"			to provide variant functions.
63.\"		---	an internal macro.
64.\"
65.\" library directory for sourced files:
66.ds || /usr/share/me
67.if \n@>0 .ds || .
68.\"
69.if !\n(.V .tm You are using the wrong version of NROFF/TROFF!!
70.if !\n(.V .tm This macro package works only on the version seven
71.if !\n(.V .tm release of NROFF and TROFF.
72.if !\n(.V .ex
73.if \n(pf \
74.	nx \*(||/null.me
75.\"		*** INTERNAL GP MACROS ***
76.de @C			\" --- change ev's, taking info with us
77.nr _S \\n(.s
78.nr _V \\n(.v
79.nr _F \\n(.f
80.nr _I \\n(.i
81.ev \\$1
82.ps \\n(_S
83.vs \\n(_Vu
84.ft \\n(_F
85'in \\n(_Iu
86.xl \\n($lu
87.lt \\n($lu
88.rr _S
89.rr _V
90.rr _F
91.rr _I
92.ls 1
93'ce 0
94..
95.de @D			\" --- determine display type (Indent, Left, Center)
96.ds |p "\\$3
97.nr _d \\$1
98.ie "\\$2"C" \
99.	nr _d 1
100.el .ie "\\$2"L" \
101.	nr _d 2
102.el .ie "\\$2"I" \
103.	nr _d 3
104.el .ie "\\$2"M" \
105.	nr _d 4
106.el \
107.	ds |p "\\$2
108..
109.de @z			\" --- end macro
110.if \n@>1 .tm >> @z, .z=\\n(.z ?a=\\n(?a
111.if !"\\n(.z"" \
112\{\
113.	tm Line \\n(c. -- Unclosed block, footnote, or other diversion (\\n(.z)
114.	di
115.	ex
116.\}
117.if \\n(?a \
118.	bp			\" force out final table
119.rm bp
120.rm @b\"			\" don't start another page
121.if t \
122.	wh -1p @m
123.br
124.if \n@>1 .tm << @z
125..
126.de @I			\" --- initialize processor
127.rm th
128.rm ac
129.rm lo
130.rm sc
131.rm @I
132..
133.\"		*** STANDARD HEADERS AND FOOTERS ***
134.de he			\" *** define header
135.ie !\\n(.$ \
136\{\
137.	rm |4
138.	rm |5
139.\}
140.el \
141\{\
142.	ds |4 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
143.	ds |5 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
144.\}
145..
146.de eh			\" *** define even header
147.ie !\\n(.$ \
148.	rm |4
149.el \
150.	ds |4 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
151..
152.de oh			\" *** define odd header
153.ie !\\n(.$ \
154.	rm |5
155.el \
156.	ds |5 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
157..
158.de fo			\" *** define footer
159.ie !\\n(.$ \
160\{\
161.	rm |6
162.	rm |7
163.\}
164.el \
165\{\
166.	ds |6 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
167.	ds |7 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
168.\}
169..
170.de ef			\" *** define even foot
171.ie !\\n(.$ \
172.	rm |6
173.el \
174.	ds |6 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
175..
176.de of			\" *** define odd footer
177.ie !\\n(.$ \
178.	rm |7
179.el \
180.	ds |7 "\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
181..
182.de ep			\" *** end page (must always be followed by a .bp)
183.if \\n(nl>0 \
184\{\
185.	wh 0
186.	rs
187.	@b
188.\}
189..
190.\"		*** INTERNAL HEADER AND FOOTER MACROS ***
191.de @h			\" --- header
192.if \n@>1 .tm >> @h %=\\n% ?a=\\n(?a ?b=\\n(?b ?w=\\n(?w
193.if (\\n(.i+\\n(.o)>=\\n(.l \
194.	tm Line \\n(c. -- Offset + indent exceeds line length
195.if t .if (\\n(.l+\\n(.o)>7.75i \
196.	tm Line \\n(c. -- Offset + line length exceeds paper width
197.\" initialize a pile of junk
198.nr ?h \\n(?H			\" transfer "next page" to "this page"
199.rr ?H
200.nr ?c \\n(?C
201.rr ?C
202.rn |4 |0
203.rn |5 |1
204.rn |6 |2
205.rn |7 |3
206.nr _w 0			\" reset max footnote width
207.nr ?W 0			\" no wide floats this page (yet)
208.nr ?I 1
209.\" begin actual header stuff
210.ev 2
211.rs
212.if t .@m			\" output cut mark
213.if \\n(hm>0 \
214.	sp |\\n(hmu		\" move to header position
215.@t $h				\" output header title
216.if \\n(tm<=0 \
217.	nr tm \n(.Vu
218.sp |\\n(tmu			\" move to top of text
219.ev
220.mk _k				\" for columned output
221.if \\n(?n .nm 1		\" restore line numbering if n1 mode
222.nr $c 1			\" set first column
223.if \n@>4 .tm -- @h >> .ns nl=\\n(nl %=\\n% _k=\\n(_k tm=\\n(tm
224.ie \\n(?s \
225\{\
226.	rr ?s
227.	rs
228'	@b
229.\}
230.el \
231.	@n			\" begin the column
232.if \n@>2 .tm << @h
233..
234.if \nv=2 \
235\{\
236.	de @m		\" --- output cut mark (only on C/A/T-style)
237.	@O 0
238.	lt 7.5i
239.	tl '\(rn''\(rn'
240.	@O
241.	lt
242..
243.\}
244.de @n			\" --- new column or page
245.if \n@>3 .tm >> @n nl=\\n(nl %=\\n% ?f=\\n(?f ?o=\\n(?o
246.if \\n(bm<=0 \
247.	nr bm \\n(.Vu
248.if (\\n(_w<=\\n($l)&(\\n(?W=0) \
249\{\
250.	nr _b (\\n(ppu*\\n($ru)/2u	\" compute fudge factor (must be < 1P)
251.	if \\n(_bu>((\\n(bmu-\\n(fmu-(\\n(tpu*\\n($ru))/2u) \
252.		nr _b (\\n(ppu*\\n($ru)-\n(.Vu
253.	nr _b +\\n(bmu
254.\}
255.nr _B \\n(_bu
256.ch @f
257.wh -\\n(_bu @f
258.nr _b +(\\n(ppu*\\n($ru)	\" add 1 paragraph v in case of sweep past
259.if \n@>2 .tm @n .p=\\n(.p bm=\\n(bm _b=\\n(_b _B=\\n(_B
260.nr ?f 0			\" reset footnote flag
261.if \\n(?o \
262\{\
263.	(f _			\" reprocess footnotes which run off page
264.	nf
265.	|o
266.	fi
267.	)f
268.	rm |o
269.\}
270.nr ?o 0
271.if \\n(?T \
272\{\
273.	nr _i \\n(.i
274.	in \\n($iu
275.	|h			\" output the table header
276.	in \\n(_iu
277.	rr _i
278.	mk #T			\" for tbl commands
279.	ns
280.\}
281.if (\\n(?a)&((\\n($c<2):(\\n(?w=0)) \
282\{\
283.	nr ?a 0			\" output floating keep
284.	@k |t
285.	if \\n(?w \
286.		mk _k		\" don't overstrike wide keeps
287.	nr ?w 0
288.\}
289.os
290.$H				\" special column header macro
291.ns
292..
293.de @f			\" --- footer
294.if \n@>1 .tm >> @f %=\\n% nl=\\n(nl ?a=\\n(?a ?b=\\n(?b ?f=\\n(?f
295.if \n@>2 .nr VL \\n(.pu-\\n(nlu
296.if \n@>2 .tm @f bm=\\n(bm _B=\\n(_B _b=\\n(_b .p-nl=\\n(VL
297.ec
298.if \\n(?T \
299\{\
300.	nr T. 1			\" for tbl commands (to output bottom line)
301.	T# 1			\" output the sides and bottom lines
302.	br
303.\}
304.ev 2
305.ce 0
306.if \\n(?b \
307\{\
308.	nr ?b 0
309.	@k |b\"			\" output bottom of page tables
310.\}
311.if \\n(?f \
312.	@o			\" output footnote if present
313.ie \\n($c<\\n($m \
314.	@c			\" handle new column
315.el \
316.	@e			\" new page
317.ev
318.if \n@>2 .tm << @f
319..
320.de @o			\" --- output footnote
321.nf
322.ls 1
323.in 0
324.if \n@>2 .tm @o last printed text = \\n(nl placing @r trap at -\\n(_B
325.wh -\\n(_Bu @r
326.|f
327.fi
328.if \n@>2 .tm @o triggered @r (?o) = \\n(?o
329.if \\n(?o \
330\{\
331.	di			\" just in case triggered @r
332.	if \\n(dn=0 \
333\{\
334.		rm |o
335.		nr ?o 0
336.	\}
337.	nr dn \\n(_D
338.	rr _D
339.\}
340.rm |f
341.ch @r
342..
343.de @c			\" --- new column
344.if \n@>2 .tm	>> @c %=\\n%
345.rs
346.sp |\\n(_ku
347.@O +\\n($lu+\\n($su
348.nr $c +1
349.@n
350..
351.de @e			\" --- end page
352.if \n@>2 .tm	>> @e
353.@O \\n(_ou
354.rs
355.sp |\\n(.pu-\\n(fmu-(\\n(tpu*\\n($ru)	\" move to footer position
356.@t $f				\" output footer title
357.nr ?h 0
358.bp
359..
360.de @t			\" --- output header or footer title
361.if !\\n(?h \
362\{\
363.	sz \\n(tp		\" set header/footer type fonts, etc.
364.	@F \\n(tf
365.	lt \\n(_Lu		\" make title span entire page
366.	nf
367.	\\$1
368.	br
369.\}
370..
371.de $h			\" $$$ print header
372.rm |z
373.if !\\n(?c \
374\{\
375.	if e .ds |z "\\*(|0
376.	if o .ds |z "\\*(|1
377.\}
378.if !\(ts\\*(|z\(ts\(ts \
379'	tl \\*(|z
380.rm |z
381..
382.de $f			\" $$$ print footer
383.rm |z
384.if \\n(?c \
385\{\
386.	if e .ds |z "\\*(|0
387.	if o .ds |z "\\*(|1
388.\}
389.if \(ts\\*(|z\(ts\(ts \
390\{\
391.	if e .ds |z "\\*(|2
392.	if o .ds |z "\\*(|3
393.\}
394.if !\(ts\\*(|z\(ts\(ts \
395'	tl \\*(|z
396.rm |z
397..
398.de @r			\" --- reprocess overflow footnotes
399.if \n@>3 .tm		>> @r .z=\\n(.z ?f=\\n(?f ?a=\\n(?a ?b=\\n(?b _b=\\n(_b
400.di |o				\" save overflow footnote
401.nr ?o 1
402.nr _D \\n(dn
403.ns
404..
405.\"		*** COMMANDS WITH VARIANT DEFINITIONS ***
406.rn bp @b		\" --- begin page
407.de bp			\" *** begin new page (overrides columns)
408.nr $c \\n($m			\" force new page, not new column
409.ie \\n(nl>0 \
410.	@b \\$1
411.el \
412\{\
413.	if \\n(.$>0 \
414.		pn \\$1
415.	if \\n(?I \
416.		@h		\" 'spring' the header trap
417.\}
418.br
419.wh 0 @h			\" reset header
420..
421.rn ll xl		\" *** special line length (local)
422.de ll			\" *** line length (global to environments)
423.xl \\$1
424.lt \\$1
425.nr $l \\n(.l
426.if (\\n($m<=1):(\\n($l>\\n(_L) \
427.	nr _L \\n(.l
428..
429.rn po @O		\" --- local page offset
430.de po			\" *** page offset
431.@O \\$1
432.nr _o \\n(.o
433..
434.\"		*** MISCELLANEOUS ROFF COMMANDS ***
435.de hx			\" *** suppress headers and footers next page
436.nr ?H 1
437..
438.de ix			\" *** indent, no break
439'in \\$1
440..
441.de bl			\" *** contiguous blank lines
442.br
443.ne \\$1
444.rs
445.sp \\$1
446..
447.de n1			\" *** line numbering 1
448.nm 1
449.xl -\w'0000'u
450.nr ?n 1
451..
452.de n2			\" *** line numbering 2
453.nm \\$1
454.ie \\n(.$ \
455.	xl -\w'0000'u
456.el \
457.	xl \\n($lu
458..
459.de pa			\" *** new page
460.bp \\$1
461..
462.de ro			\" *** roman page numbers
463.af % i
464..
465.de ar			\" *** arabic page numbers
466.af % 1
467..
468.de m1			\" *** position one space
469.nr _0 \\n(hmu
470.nr hm \\$1v
471.nr tm +\\n(hmu-\\n(_0u
472.rr _0
473..
474.de m2			\" *** position two space
475.nr tm \\n(hmu+\\n(tpp+\\$1v
476..
477.de m3			\" *** position three space
478.nr bm \\n(fmu+\\n(tpp+\\$1v
479..
480.de m4			\" *** position four space
481.nr _0 \\n(fmu
482.nr fm \\$1v
483.nr bm +\\n(fmu-\\n(_0u
484..
485.de sk			\" *** leave a blank page (next page)
486.if \\n(.$>0 \
487.	tm Line \\n(c. -- I cannot skip multiple pages
488.nr ?s 1
489..
490.\"		*** MISCELLANEOUS USER SUPPORT COMMANDS ***
491.de re			\" *** reset tabs (TROFF defines 15 stops default)
492.ta 0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i
493..
494.if t .ig
495.de re			\" *** reset tabs (NROFF version)
496.ta 0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i +0.8i
497..
498.de ba			\" *** set base indent
499.ie \\n(.$ \
500.	nr $i \\$1n
501.el \
502.	nr $i \\n(siu*\\n($0u
503..
504.de hl			\" *** draw horizontal line
505.br
506\l'\\n(.lu-\\n(.iu'
507.sp
508..
509.\"		*** PARAGRAPHING ***
510.de pp			\" *** paragraph
511.lp \\n(piu
512..
513.de lp			\" *** left aligned paragraph
514.@p
515.if \\n(.$ \
516.	ti +\\$1
517.nr $p 0 1
518..
519.de ip			\" *** indented paragraph w/ optional tag
520.if (\\n(ii>0)&(\\n(ii<1n) \
521.	nr ii \\n(iin
522.nr _0 \\n(ii
523.if \\n(.$>1 \
524.	nr _0 \\$2n
525.@p \\n(_0u
526.if \\w"\\$1" \
527\{\
528.	ti -\\n(_0u
529.	ie \\w"\\$1">=\\n(_0 \
530\{\
531\&\\$1
532.		br
533.	\}
534.	el \&\\$1\h'|\\n(_0u'\c
535.\}
536.rr _0
537..
538.de np			\" *** numbered paragraph
539.if \\n($p<0 \
540.	nr $p 0			\" reset number after .bu
541.nr $p +1			\" increment paragraph number
542.@p \w'\0(000)\0'u
543.ti -\w'\0(000)\0'u
544\0(\\n($p)\h'|\w'\0(000)\0'u'\c
545..
546.de bu			\" *** bulleted paragraph
547.br
548.if \\n($p<0 \
549.	ns			\" don't space between .bu paragraphs
550.nr $p 0-1			\" mark "bulleted paragraph" mode
551.@p \w'\0\(bu\0'u
552.ti -\w'\0\(bu\0'u
553\0\(bu\0\c
554..
555.de @p			\" --- initialize for paragraph
556.@I				\" initialize macro processor
557.if "\\n(.z"|e" .tm Line \\n(c. -- Unmatched continued equation
558.in \\n($iu+\\n(pou
559.if \\n(.$ \
560.	in +\\$1n
561.ce 0
562.fi
563.@F \\n(pf
564.sz \\n(pp
565.sp \\n(psu
566.ne \\n(.Lv+\\n(.Vu
567.ns
568..
569.\"		*** SECTION HEADINGS ***
570.de sh			\" &&& section heading
571.rn sh @T
572.so \\*(||/sh.me
573.sh "\\$1" "\\$2" \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
574.rm @T
575..
576.de $p			\" $$$ print section heading
577.if (\\n(si>0)&(\\n(.$>2) \
578.	nr $i \\$3*\\n(si
579.in \\n($iu
580.ie !"\\$1\\$2"" \
581\{\
582.	sp \\n(ssu 		\" one of them is non-null
583.	ne \\n(.Lv+\\n(.Vu+\\n(psu+(\\n(spu*\\n($ru*\\n(.Lu)
584.	ie \\n(.$>2 \
585.		ti -(\\n(siu-\\n(sou)
586.	el \
587.		ti +\\n(sou
588.	@F \\n(sf
589.	sz \\n(sp
590.	if \\$3>0 \
591.		$\\$3
592.	if \w"\\$2">0 \\$2.
593.	if \w"\\$1">0 \\$1\f1\ \ \&
594.\}
595.el \
596.	sp \\n(psu
597.@F \\n(pf
598.sz \\n(pp
599..
600.de uh			\" *** unnumbered section heading
601.rn uh @T
602.so \\*(||/sh.me
603.uh "\\$1"
604.rm @T
605..
606.\"		*** COLUMNNED OUTPUT ***
607.de 2c			\" *** double columned output
608.br
609.if \\n($m>1 \
610.	1c			\" revert to 1c if already 2c
611.nr $c 1
612.nr $m 2
613.if \\n(.$>1 \
614.	nr $m \\$2
615.if \\n(.$>0 \
616.	nr $s \\$1n		\" param 1: column seperation
617.nr $l (\\n(.l-((\\n($m-1)*\\n($s))/\\n($m
618.xl \\n($lu
619.mk _k
620.ns
621..
622.de 1c			\" *** single columned output
623.br
624.nr $c 1
625.nr $m 1
626.ll \\n(_Lu			\" return to normal output
627.sp |\\n(.hu
628.@O \\n(_ou
629..
630.de bc			\" *** begin column
631.sp 24i
632..
633.\"		*** FLOATING TABLES AND NONFLOATING BLOCKS ***
634.de (z			\" &&& begin floating keep
635.rn (z @V
636.so \\*(||/float.me
637.(z \\$1 \\$2
638.rm @V
639..
640.de )z			\" &&& end floating keep
641.tm Line \\n(c. -- unmatched .)z
642..
643.de (t			\" XXX temp ref to (z
644.(z \\$1 \\$2
645..
646.de )t			\" XXX temp ref to )t
647.)z \\$1 \\$2
648..
649.de (b			\" *** begin block
650.br
651.@D 3 \\$1 \\$2
652.sp \\n(bsu
653.@(
654..
655.de )b			\" *** end block
656.br
657.@)
658.if (\\n(bt=0):(\\n(.t<\\n(bt) \
659.	ne \\n(dnu		\" make it all on one page
660.ls 1
661.nf
662.|k
663.ec
664.fi
665.in 0
666.xl \\n($lu
667.ev
668.rm |k
669.sp \\n(bsu+\\n(.Lv-1v
670..
671.de @(			\" --- begin keep
672.if !"\\n(.z"" .tm Line \\n(c. -- Illegal nested keep \\n(.z
673.@M
674.di |k
675\!'rs
676..
677.de @M			\" --- set modes for display
678.nr ?k 1
679.@C 1
680.@F \\n(df
681.vs \\n(.su*\\n($Ru
682.nf
683.if "\\*(|p"F" \
684.	fi			\" set fill mode if "F" parameter
685.if \\n(_d=4 \
686.	in 0
687.if \\n(_d=3 \
688\{\
689.	in +\\n(biu
690.	xl -\\n(biu
691.\}
692.if \\n(_d=1 \
693.	ce 10000
694..
695.de @)			\" --- end keep
696.br
697.if !"\\n(.z"|k" .tm Line \\n(c. -- Close of a keep which has never been opened
698.nr ?k 0
699.di
700.in 0
701.ce 0
702..
703.de (c			\" *** begin block centered text
704.if "\\n(.z"|c" .tm Line \\n(c. -- Nested .(c requests
705.di |c
706..
707.de )c			\" *** end block centered text
708.if !"\\n(.z"|c" .tm Line \\n(c. -- Unmatched .)c
709.br				\" force out final line
710.di
711.if \n@>4 .tm >> .)c .l=\\n(.l .i=\\n(.i $i=\\n($i dl=\\n(dl
712.ev 1
713.ls 1
714.in (\\n(.lu-\\n(.iu-\\n(dlu)/2u
715.if \n@>4 .tm -- .)c << .in .l=\\n(.l .i=\\n(.i dl=\\n(dl
716.nf
717.|c
718.ec
719.in
720.ls
721.ev
722.rm |c
723..
724.\"		*** BLOCK QUOTES (OR WHATEVER) AND LISTS ***
725.de (q			\" *** begin block quote
726.br
727.@C 1
728.fi
729.sp \\n(qsu
730.in +\\n(qiu
731.xl -\\n(qiu
732.sz \\n(qp
733..
734.de )q			\" *** end block quote
735.br
736.ev
737.sp \\n(qsu+\\n(.Lv-1v
738.nr ?k 0
739..
740.de (l			\" *** begin list
741.br
742.sp \\n(bsu
743.@D 3 \\$1 \\$2
744.@M
745..
746.de )l			\" *** end list
747.br
748.ev
749.sp \\n(bsu+\\n(.Lv-1v
750.nr ?k 0
751..
752.\"		*** PREPROCESSOR SUPPORT ***
753.\"
754.\"	EQN
755.\"
756.de EQ			\" &&& begin equation
757.rn EQ @T
758.so \\*(||/eqn.me
759.EQ \\$1 \\$2
760.rm @T
761..
762.\"
763.\"	TBL
764.\"
765.de TS			\" &&& begin table
766.rn TS @W
767.so \\*(||/tbl.me
768.TS \\$1 \\$2
769.rm @W
770..
771.\"
772.\"	REFER
773.\"
774.de ]-			\" &&& initialize reference
775.rn ]- @]
776.so \\*(||/refer.me
777.]-
778.rm @]
779..
780.de ]<			\" &&& initialize reference
781.rn ]< @]
782.so \\*(||/refer.me
783.]<
784.rm @]
785..
786.if n .ds [. " [
787.if t .ds [. \s-2\v'-.4m'\f1
788.if n .ds .] ]
789.if t .ds .] \v'.4m'\s+2\fP
790.if n .ds <. "
791.if t .ds <. .
792.if n .ds >. .
793.if t .ds >. "
794.\"
795.\"	IDEAL
796.\"
797.de IS			\" *** start ideal picture
798.nr g7 \\n(.u
799.ls 1
800..
801.de IF
802.if \\n(g7 .fi
803.ls
804..
805.de IE			\" *** end ideal picture
806.if \\n(g7 .fi
807.ls
808..
809.\"
810.\"	PIC
811.\"
812.de PS		\" *** start picture: $1=height, $2=width in units or inches
813.if t \
814.	sp 0.3
815.nr g7 \\$2
816.in (\\n(.lu-\\n(g7u)/2u
817.ne \\$1u
818.nr g7 \\n(.u
819.ls 1
820..
821.de PE			\" *** end picture
822.ls
823.in
824.if \\n(g7 .fi
825.if t .sp .6
826..
827.\"
828.\"	GREMLIN
829.\"
830.de GS			\" *** start gremlin picture
831.nr g7 (\\n(.lu-\\n(g1u)/2u
832.if "\\$1"L" .nr g7 \\n(.iu
833.if "\\$1"R" .nr g7 \\n(.lu-\\n(g1u
834.in \\n(g7u
835.nr g7 \\n(.u
836.ls 1
837.nf
838.ne \\n(g2u
839..
840.de GE			\" *** end gremlin picture
841.GF
842.if t .sp .6
843..
844.de GF			\" *** finish gremlin picture; stay at top
845.ls
846.in
847.if \\n(g7 .fi
848..
849.\"		*** FONT AIDS ***
850.de sz			\" *** set point size and vertical spacing
851.ps \\$1
852.vs \\n(.su*\\n($ru		\" default vs at pointsize + 20%
853.bd S B \\n(.su/3u
854..
855.de r			\" *** enter roman font
856.nr _F \\n(.f
857.ul 0
858.ft 1
859.if \\n(.$ \&\\$1\f\\n(_F\\$2
860.rr _F
861..
862.de i			\" *** enter italic
863.nr _F \\n(.f
864.ul 0
865.ft 2
866.if \\n(.$ \&\\$1\f\\n(_F\\$2
867.rr _F
868..
869.de b			\" *** enter boldface (underline in NROFF)
870.nr _F \\n(.f
871.ul 0
872.ft \\n($b
873.if \\n(.$ \&\\$1\f\\n(_F\\$2
874.rr _F
875..
876.de rb			\" *** enter real boldface (not underlined in NROFF)
877.nr _F \\n(.f
878.ul 0
879.ft 3
880.if \\n(.$ \&\\$1\f\\n(_F\\$2
881.rr _F
882..
883.de u			\" *** enter underlined word
884\&\\$1\l'|0\(ul'\\$2
885..
886.de q			\" *** enter quoted word
887\&\\*(lq\\$1\\*(rq\\$2
888..
889.de bi			\" *** enter word in bold italics
890.ft 2
891.ie t \&\k~\\$1\h'|\\n~u+(\\w' 'u/4u)'\\$1\fP\\$2
892.el \&\\$1\fP\\$2
893..
894.de bx			\" *** enter boxed word
895.ie \\n($T \&\f2\\$1\fP\\$2
896.el \k~\(br\|\\$1\|\(br\l'|\\n~u\(rn'\l'|\\n~u\(ul'\^\\$2
897..
898.de sm			\" *** print in smaller font
899\s-1\\$1\\s0\\$2
900..
901.de @F			\" --- change font (8 -> underlined, 0 -> no change)
902.nr ~ \\$1
903.if \\n~>0 \
904\{\
905.	ul 0
906.	if \\n~=8 \
907.		nr ~ \\n($b
908.	ft \\n~
909.\}
910.rr ~
911..
912.\"		*** FOOTNOTING ***
913.de (f			\" &&& begin footnote
914.rn (f @U
915.so \\*(||/footnote.me
916.(f \\$1 \\$2
917.rm @U
918..
919.de )f			\" &&& end footnote
920.tm Line \\n(c. -- unmatched .)f
921..
922.de $s			\" $$$ footnote separator
923\l'2i'
924.if n \
925.	sp 0.3
926..
927.\"		*** DELAYED TEXT ***
928.de (d			\" &&& begin delayed text
929.rn (d @U
930.so \\*(||/deltext.me
931.(d \\$1 \\$2
932.rm @U
933..
934.de )d			\" &&& end delayed text
935.tm Line \\n(c. -- unmatched .)d
936..
937.\"		*** INDEXES (TABLE OF CONTENTS) ***
938.de (x			\" &&& begin index
939.rn (x @U
940.so \\*(||/index.me
941.(x \\$1 \\$2
942.rm @U
943..
944.de )x			\" &&& end index entry
945.tm Line \\n(c. -- unmatched .)x
946..
947.\"		*** STUFF FOR "STANDARD" PAPERS ***
948.de th			\" *** set "thesis" mode
949.so \\*(||/thesis.me
950.rm th
951..
952.de +c			\" *** begin chapter
953.ep				\" force out footnotes
954.if \\n(?o:\\n(?a \
955\{\
956.	bp			\" force out a table or more footnote
957.	rs
958.	ep
959.\}
960.nr ?C 1
961.nr $f 1 1
962.ds * \\*[1\\*]\k*
963.if \\n(?R \
964.	pn 1
965.bp
966.in \\n($iu			\" reset the indent
967.rs
968.ie \\n(.$ \
969.	$c "\\$1"
970.el \
971.	sp 3
972..
973.de ++			\" *** declare chapter type
974.nr _0 0
975.if "\\$1"C" \
976.	nr _0 1			\" chapter
977.if "\\$1"RC" \
978.	nr _0 11		\" renumbered chapter
979.if "\\$1"A" \
980.	nr _0 2			\" appendix
981.if "\\$1"RA" \
982.	nr _0 12		\" renumbered appendix
983.if "\\$1"P" \
984.	nr _0 3			\" preliminary material
985.if "\\$1"B" \
986.	nr _0 4			\" bibliographic material
987.if "\\$1"AB" \
988.	nr _0 5			\" abstract
989.if \\n(_0=0 \
990.	tm Line \\n(c. -- Bad mode to .++
991.nr ?R 0
992.if \\n(_0>10 \
993.\{
994.	nr ?R 1
995.	nr _0 -10
996.\}
997.nr ch 0 1
998.if (\\n(_0=3):(\\n(_0=5) \
999.	pn 1			\" must do before .ep
1000.ep				\" end page for correct page number types
1001.if \\n(_0=1 \
1002\{\
1003.	af ch 1
1004.	af % 1
1005.\}
1006.if \\n(_0=2 \
1007\{\
1008.	af ch A
1009.	af % 1
1010.\}
1011.if \\n(_0=3 \
1012.	af % i
1013.if \\n(_0=4 \
1014.	af % 1
1015.if \\n(_0=5 \
1016.	af % 1
1017.if \\n(.$>1 \
1018.	he \\$2
1019.if !\\n(_0=\\n(_M .if \\n(_M=3 \
1020.	pn 1
1021.nr _M \\n(_0
1022.rr _0
1023..
1024.de $c			\" $$$ print chapter title
1025.sz 12
1026.ft B
1027.ce 1000
1028.if \\n(_M<3 \
1029.	nr ch +1
1030.ie \\n(_M=1 CHAPTER\ \ \\n(ch
1031.el .if \\n(_M=2 APPENDIX\ \ \\n(ch
1032.if \w"\\$1" .sp 3-\\n(.L
1033.if \w"\\$1" \\$1
1034.if (\\n(_M<3):(\w"\\$1") \
1035.	sp 4-\\n(.L
1036.ce 0
1037.ft
1038.sz
1039.ie \\n(_M=1 \
1040.	$C Chapter \\n(ch "\\$1"
1041.el .if \\n(_M=2 \
1042.	$C Appendix \\n(ch "\\$1"
1043..
1044.de tp			\" *** title page
1045.hx
1046.bp
1047.br
1048.rs
1049.pn \\n%
1050..
1051.de ac			\" *** setup for ACM photo-ready paper
1052.rn ac @T
1053.so \\*(||/acm.me
1054.ac "\\$1" "\\$2"
1055.rm @T
1056..
1057.de lo			\" *** pull in the set of local macros
1058.\" all these macros should be named "*X", where X is any letter
1059.so \\*(||/local.me
1060.rm lo
1061..
1062.de lh			\" *** letterhead
1063.so \\*(||/letterhead.me
1064..
1065.\"		*** DATES ***
1066.if \n(mo=1 .ds mo January
1067.if \n(mo=2 .ds mo February
1068.if \n(mo=3 .ds mo March
1069.if \n(mo=4 .ds mo April
1070.if \n(mo=5 .ds mo May
1071.if \n(mo=6 .ds mo June
1072.if \n(mo=7 .ds mo July
1073.if \n(mo=8 .ds mo August
1074.if \n(mo=9 .ds mo September
1075.if \n(mo=10 .ds mo October
1076.if \n(mo=11 .ds mo November
1077.if \n(mo=12 .ds mo December
1078.if \n(dw=1 .ds dw Sunday
1079.if \n(dw=2 .ds dw Monday
1080.if \n(dw=3 .ds dw Tuesday
1081.if \n(dw=4 .ds dw Wednesday
1082.if \n(dw=5 .ds dw Thursday
1083.if \n(dw=6 .ds dw Friday
1084.if \n(dw=7 .ds dw Saturday
1085.ds td \*(mo \n(dy, 19\n(yr
1086.\"		*** PARAMETRIC INITIALIZATIONS ***
1087.if (1m<0.1i)&(\nx!=0) \
1088.	vs 9p			\" for 12-pitch DTC terminals
1089.rr x
1090.nr $r \n(.v/\n(.s		\" ratio of vs to ps for .sz request
1091.nr $R \n($r			\" ratio for displays & footnotes
1092.nr hm 4v			\" header margin
1093.nr tm 7v			\" top margin
1094.nr bm 6v			\" bottom margin
1095.nr fm 3v			\" footer margin
1096.nr tf 3			\" title font: (real) Times Bold
1097.nr tp 10			\" title point size
1098.hy 14
1099.nr bi 4m			\" indent for blocks
1100.nr pi 5n			\" indent for paragraphs
1101.nr pf 1			\" normal text font
1102.nr pp 10			\" normal text point size
1103.nr qi 4n			\" indent for quotes
1104.nr qp -1			\" down one point
1105.nr ii 5n			\" indent for .ip's and .np's
1106.nr $m 1			\" max number of columns
1107.nr $s 4n			\" column separation
1108.bd S B 3
1109.\"		*** OTHER INITIALIZATION ***
1110.ds [ \u\x'-0.25v'
1111.ds ] \d
1112.ds < \d\x'0.25v'
1113.ds > \u
1114.ds - --
1115.if t \
1116\{\
1117.	ds [ \v'-0.4m'\x'-0.2m'\s-3
1118.	ds ] \s0\v'0.4m'
1119.	ds < \v'0.4m'\x'0.2m'\s-3
1120.	ds > \s0\v'-0.4m'
1121.	ds - \(em
1122.	nr fi 0.3i
1123.\}
1124.if n \
1125\{\
1126.	nr fi 3n
1127.\}
1128.nr _o \n(.o
1129.if n .po 1i
1130.if \n(.V=1v \
1131.	nr $T 2
1132.if n .if \n(.T=0 \
1133.	nr $T 1
1134.if \nv=2 \
1135\{\
1136.	nr $T 0
1137.	po -0.5i		\" make ugly line on LHS on C/A/T typesetters
1138.\}
1139.if \n($T \
1140\{\
1141.	if \n($T=1 \
1142.		po 0
1143.	ds [ [
1144.	ds ] ]
1145.	ds < <
1146.	ds > >
1147.\}
1148.nr $b \nb			\" figure the real font 8 font
1149.rr b
1150.if \n($b=0 \
1151\{\
1152.	if n .nr $b 2		\" italic
1153.	if t .nr $b 3		\" bold
1154.\}
1155.nr ps 0.5v			\" paragraph pre/post spacing
1156.if \n($T \
1157.	nr ps 1v
1158.if t .nr ps 0.35v
1159.nr bs \n(ps			\" block pre/post spacing
1160.nr qs \n(ps			\" quote pre/post spacing
1161.nr zs 1v			\" float-block pre/postspacing
1162.nr xs 0.2v			\" index prespacing
1163.nr fs 0.2v			\" footnote prespacing
1164.if \n($T \
1165.	nr fs 0
1166.if n .nr es 1v			\" equation pre/postspacing
1167.if t .nr es 0.5v
1168.wh 0 @h			\" set header
1169.nr $l \n(.lu			\" line length
1170.nr _L \n(.lu			\" line length of page
1171.nr $c 1			\" current column number
1172.nr $f 1 1			\" footnote number
1173.ds * \*[1\*]\k*\"		\" footnote "name"
1174.nr $d 1 1			\" delayed text number
1175.ds # [1]\k#\"			\" delayed text "name"
1176.nr _M 1			\" chapter mode is chapter
1177.ds lq \&"\"			\" left quote
1178.ds rq \&"\"			\" right quote
1179.if t \
1180.	ds lq ``
1181.if t \
1182.	ds rq ''
1183.em @z
1184.\"		*** FOREIGN LETTERS AND SPECIAL CHARACTERS ***
1185.de sc			\" *** define special characters
1186.so \\*(||/chars.me
1187.rm sc
1188..
1189.ll 6.0i
1190.lt 6.0i
1191