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