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