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