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