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