groff: remove version tag from directory
[dragonfly.git] / contrib / groff / tmac / e.tmac
1 .\"     @(#)e.tmac      2.31 (Berkeley) 5/21/88
2 .\"     Modified by James Clark for use with groff.
3 .\"
4 .\" Copyright (c) 1988 Regents of the University of California.
5 .\" All rights reserved.
6 .\"
7 .\" Redistribution and use in source and binary forms are permitted
8 .\" provided that this notice is preserved and that due credit is given
9 .\" to the University of California at Berkeley. The name of the University
10 .\" may not be used to endorse or promote products derived from this
11 .\" software without specific prior written permission. This software
12 .\" is provided ``as is'' without express or implied warranty.
13 .\"     %beginstrip%
14 .\"
15 .\"**********************************************************************
16 .\"*                                                                    *
17 .\"*    ******  - M E   N R O F F / T R O F F   M A C R O S  ******     *
18 .\"*                                                                    *
19 .\"*    Produced for your edification and enjoyment by:                 *
20 .\"*            Eric Allman                                             *
21 .\"*            Electronics Research Laboratory                         *
22 .\"*            U.C. Berkeley.                                          *
23 .\"*    current address:                                                *
24 .\"*            Britton-Lee, Inc.                                       *
25 .\"*            1919 Addison Street Suite 105                           *
26 .\"*            Berkeley, California  94704                             *
27 .\"*                                                                    *
28 .\"*    VERSION 2.31    First Release: 11 Sept 1978                     *
29 .\"*                                                                    *
30 .\"*    Documentation is available.                                     *
31 .\"*                                                                    *
32 .\"**********************************************************************
33 .\"
34 .\"     Code on .de commands:
35 .\"             ***     a user interface macro.
36 .\"             &&&     a user interface macro which is redefined
37 .\"                     when used to be the real thing.
38 .\"             $$$     a macro which may be redefined by the user
39 .\"                     to provide variant functions.
40 .\"             ---     an internal macro.
41 .\"
42 .if !\n(.g .ig
43 .de @R                  \" --- initialize number register to 0, if undefined
44 .if !r\\$1 .nr \\$1 0
45 ..
46 .@R pf
47 .if \n(pf .nx
48 .if !\n(.g .ig
49 .de @S                  \" --- initialize string/macro to empty, if undefined
50 .if !d\\$1 .ds \\$1 \" empty
51 ..
52 .@R @\"                 \" debugging level
53 .\"             *** INTERNAL GP MACROS ***
54 .de @C                  \" --- change ev's, taking info with us
55 .nr _S \\n(.s
56 .nr _V \\n(.v
57 .nr _F \\n(.f
58 .nr _J \\n(.j
59 .do ds _A \\n[.fam]
60 .nr _I \\n(.i
61 .ev \\$1
62 .ps \\n(_S
63 .vs \\n(_Vu
64 .ft \\n(_F
65 .ad \\n(_J
66 .do @fam \\*(_A
67 'in \\n(_Iu
68 .xl \\n($lu
69 .lt \\n($lu
70 .rr _S
71 .rr _V
72 .rr _F
73 .rr _I
74 .rr _J
75 .ls 1
76 'ce 0
77 ..
78 .de @D                  \" --- determine display type (Indent, Left, Center)
79 .ds |p "\\$3
80 .nr _d 0
81 .if "\\$2"C" \
82 .       nr _d 1
83 .if "\\$2"L" \
84 .       nr _d 2
85 .if "\\$2"I" \
86 .       nr _d 3
87 .if "\\$2"M" \
88 .       nr _d 4
89 .if !\\n(_d \{\
90 .       nr _d \\$1
91 .       ds |p "\\$2
92 .\}
93 ..
94 .de @z                  \" --- end macro
95 .if \n@>1 .tm >> @z, .z=\\n(.z ?a=\\n(?a
96 .if !"\\n(.z"" \
97 \{\
98 .       tm Line \\n(c. -- Unclosed block, footnote, or other diversion (\\n(.z)
99 .       di
100 .       ex
101 .\}
102 .if \\n(?a \
103 .       bp                      \" force out final table
104 .ds bp
105 .ds @b\"                        \" don't start another page
106 .br
107 .if \n@>1 .tm << @z
108 ..
109 .\"             *** STANDARD HEADERS AND FOOTERS ***
110 .ie \n(.g .ds $* \\\\$*
111 .el .ds $* \\\\$1 \\\\$2 \\\\$3 \\\\$4 \\\\$5 \\\\$6 \\\\$7 \\\\$8 \\\\$9
112 .de he                  \" *** define header
113 .ie !\\n(.$ \
114 \{\
115 .       rm |4
116 .       rm |5
117 .\}
118 .el \
119 \{\
120 .       ds |4 "\*($*
121 .       ds |5 "\*($*
122 .\}
123 ..
124 .de eh                  \" *** define even header
125 .ie !\\n(.$ \
126 .       rm |4
127 .el \
128 .       ds |4 "\*($*
129 ..
130 .de oh                  \" *** define odd header
131 .ie !\\n(.$ \
132 .       rm |5
133 .el \
134 .       ds |5 "\*($*
135 ..
136 .de fo                  \" *** define footer
137 .ie !\\n(.$ \
138 \{\
139 .       rm |6
140 .       rm |7
141 .\}
142 .el \
143 \{\
144 .       ds |6 "\*($*
145 .       ds |7 "\*($*
146 .\}
147 ..
148 .de ef                  \" *** define even foot
149 .ie !\\n(.$ \
150 .       rm |6
151 .el \
152 .       ds |6 "\*($*
153 ..
154 .de of                  \" *** define odd footer
155 .ie !\\n(.$ \
156 .       rm |7
157 .el \
158 .       ds |7 "\*($*
159 ..
160 .de ep                  \" *** end page (must always be followed by a .bp)
161 .if \\n(nl>0 \
162 \{\
163 .       wh 0
164 .       rs
165 .       @b
166 .\}
167 ..
168 .\"             *** INTERNAL HEADER AND FOOTER MACROS ***
169 .de @h                  \" --- header
170 .if \n@>1 .tm >> @h %=\\n% ?a=\\n(?a ?b=\\n(?b ?w=\\n(?w
171 .if (\\n(.i+\\n(.o)>=\\n(.l \
172 .       tm Line \\n(c. -- Offset + indent exceeds line length
173 .\" initialize a pile of junk
174 .nr ?h \\n(?H                   \" transfer "next page" to "this page"
175 .nr ?H 0
176 .nr ?c \\n(?C
177 .nr ?C 0
178 .rn |4 |0
179 .rn |5 |1
180 .rn |6 |2
181 .rn |7 |3
182 .nr _w 0                        \" reset max footnote width
183 .nr ?W 0                        \" no wide floats this page (yet)
184 .nr ?I 1
185 .\" begin actual header stuff
186 .ev 2
187 .rs
188 .if \\n(hm>0 \
189 .       sp |\\n(hmu             \" move to header position
190 .@t $h\"                        \" output header title
191 .if \\n(tm<=0 \
192 .       nr tm \n(.Vu
193 .sp |\\n(tmu                    \" move to top of text
194 .ev
195 .mk _k                          \" for columned output
196 .if \\n(?n .nm 1                \" restore line numbering if n1 mode
197 .nr $c 1                        \" set first column
198 .if \n@>4 .tm -- @h >> .ns nl=\\n(nl %=\\n% _k=\\n(_k tm=\\n(tm
199 .ie \\n(?s \
200 \{\
201 .       nr ?s 0
202 .       rs
203 '       @b
204 .\}
205 .el \
206 .       @n\"                    \" begin the column
207 .if \n@>2 .tm << @h
208 ..
209 .de @n                  \" --- new column or page
210 .if \n@>3 .tm >> @n nl=\\n(nl %=\\n% ?f=\\n(?f ?o=\\n(?o
211 .if \\n(bm<=0 \
212 .       nr bm \\n(.Vu
213 .if (\\n(_w<=\\n($l)&(\\n(?W=0) \
214 \{\
215 .       nr _b (\\n(ppp*\\n($vu)/200u    \" compute fudge factor (must be < 1P)
216 .       if \\n(_bu>((\\n(bmu-\\n(fmu-((\\n(tpp*\\n($vu)/100u))/2u) \
217 .               nr _b (\\n(ppp*\\n($vu)/100u-\n(.Vu
218 .       nr _b +\\n(bmu
219 .\}
220 .nr _B \\n(_bu
221 .ch @f
222 .wh -\\n(_bu @f
223 .nr _b +(\\n(ppp*\\n($vu)/100u \" add 1 paragraph v in case of sweep past
224 .if \n@>2 .tm @n .p=\\n(.p bm=\\n(bm _b=\\n(_b _B=\\n(_B
225 .nr ?f 0                        \" reset footnote flag
226 .if \\n(?o \
227 \{\
228 .       (f _\"                  \" reprocess footnotes which run off page
229 .       nf
230 .       |o
231 .       fi
232 .       )f
233 .       rm |o
234 .\}
235 .nr ?o 0
236 .if \\n(?T \
237 \{\
238 .       nr _i \\n(.i
239 .       in 0
240 .       |h\"                    \" output the table header
241 .       in \\n(_iu
242 .       rr _i
243 .       mk #T                   \" for tbl commands
244 .       ns
245 .\}
246 .if (\\n(?a)&((\\n($c<2):(\\n(?w=0)) \
247 \{\
248 .       nr ?a 0                 \" output floating keep
249 .       @k |t
250 .       if \\n(?w \
251 .               mk _k           \" don't overstrike wide keeps
252 .       nr ?w 0
253 .\}
254 .os
255 .$H\"                           \" special column header macro
256 .ns
257 ..
258 .de @f                  \" --- footer
259 .if \n@>1 .tm >> @f %=\\n% nl=\\n(nl ?a=\\n(?a ?b=\\n(?b ?f=\\n(?f
260 .if \n@>2 .nr VL \\n(.pu-\\n(nlu
261 .if \n@>2 .tm @f bm=\\n(bm _B=\\n(_B _b=\\n(_b .p-nl=\\n(VL
262 .ec
263 .if \\n(?T \
264 \{\
265 .       nr T. 1                 \" for tbl commands (to output bottom line)
266 .       T# 1\"                  \" output the sides and bottom lines
267 .       br
268 .\}
269 .ev 2
270 .ce 0
271 .if \\n(?b \
272 \{\
273 .       nr ?b 0
274 .       @k |b\"                 \" output bottom of page tables
275 .\}
276 .if \\n(?f \
277 .       @o\"                    \" output footnote if present
278 .ie \\n($c<\\n($m \
279 .       @c\"                    \" handle new column
280 .el \
281 .       @e\"                    \" new page
282 .ev
283 .if \n@>2 .tm << @f
284 ..
285 .de @o                  \" --- output footnote
286 .nf
287 .ls 1
288 .in 0
289 .if \n@>2 .tm @o last printed text = \\n(nl placing @r trap at -\\n(_B
290 .wh -\\n(_Bu @r
291 .|f
292 .fi
293 .if \n@>2 .tm @o triggered @r (?o) = \\n(?o
294 .if \\n(?o \
295 \{\
296 .       di                      \" just in case triggered @r
297 .       if \\n(dn=0 \
298 \{\
299 .               rm |o
300 .               nr ?o 0
301 .       \}
302 .       nr dn \\n(_D
303 .       rr _D
304 .\}
305 .rm |f
306 .ch @r
307 ..
308 .de @c                  \" --- new column
309 .if \n@>2 .tm   >> @c %=\\n%
310 .rs
311 .sp |\\n(_ku
312 .@O +\\n($lu+\\n($su
313 .nr $c +1
314 .@n
315 ..
316 .de @e                  \" --- end page
317 .if \n@>2 .tm   >> @e
318 .@O \\n(_ou
319 .rs
320 .sp |\\n(.pu-\\n(fmu-((\\n(tpp*\\n($vu)/100u)   \" move to footer position
321 .@t $f\"                        \" output footer title
322 .nr ?h 0
323 .bp
324 ..
325 .de @t                  \" --- output header or footer title
326 .if !\\n(?h \
327 \{\
328 .       sz \\n(tp\"             \" set header/footer type fonts, etc.
329 .       @F \\n(tf
330 .       lt \\n(_Lu              \" make title span entire page
331 .       nf
332 .       \\$1
333 .       br
334 .\}
335 ..
336 .de $h                  \" $$$ print header
337 .ds |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 '       tl \\*(|z
345 .rm |z
346 ..
347 .de $f                  \" $$$ print footer
348 .ds |z
349 .if \\n(?c \
350 \{\
351 .       if e .ds |z "\\*(|0
352 .       if o .ds |z "\\*(|1
353 .\}
354 .if \(ts\\*(|z\(ts\(ts \
355 \{\
356 .       if e .ds |z "\\*(|2
357 .       if o .ds |z "\\*(|3
358 .\}
359 .if !\(ts\\*(|z\(ts\(ts \
360 '       tl \\*(|z
361 .rm |z
362 ..
363 .de @r                  \" --- reprocess overflow footnotes
364 .if \n@>3 .tm           >> @r .z=\\n(.z ?f=\\n(?f ?a=\\n(?a ?b=\\n(?b _b=\\n(_b
365 .di |o                          \" save overflow footnote
366 .nr ?o 1
367 .nr _D \\n(dn
368 .ns
369 ..
370 .\"             *** COMMANDS WITH VARIANT DEFINITIONS ***
371 .rn bp @b               \" --- begin page
372 .de bp                  \" *** begin new page (overrides columns)
373 .nr $c \\n($m                   \" force new page, not new column
374 .ie \\n(nl>0 \
375 .       @b \\$1
376 .el \
377 \{\
378 .       if \\n(.$>0 \
379 .               pn \\$1
380 .       if \\n(?I \
381 .               @h\"            \" 'spring' the header trap
382 .\}
383 .br
384 .wh 0 @h                        \" reset header
385 ..
386 .rn ll xl               \" *** special line length (local)
387 .de ll                  \" *** line length (global to environments)
388 .xl \\$1
389 .lt \\$1
390 .nr $l \\n(.l
391 .if (\\n($m<=1):(\\n($l>\\n(_L) \
392 .       nr _L \\n(.l
393 ..
394 .rn po @O               \" --- local page offset
395 .de po                  \" *** page offset
396 .@O \\$1
397 .nr _o \\n(.o
398 ..
399 .\" Redefine the fam request to set the family in
400 .\" environment 2 as well as the current environment.
401 .if !\n(.g .ig
402 .do rn fam @fam         \" --- set family in current environment
403 .do de fam              \" *** set font family in ev 2 and current ev
404 .do @fam \\$1
405 .ev 2
406 .do @fam \\$1
407 .ev
408 ..
409 .\"             *** MISCELLANEOUS ROFF COMMANDS ***
410 .de hx                  \" *** suppress headers and footers next page
411 .nr ?H 1
412 ..
413 .de ix                  \" *** indent, no break
414 'in \\$1
415 ..
416 .de bl                  \" *** contiguous blank lines
417 .br
418 .ne \\$1
419 .rs
420 .sp \\$1
421 ..
422 .de n1                  \" *** line numbering 1
423 .nm 1
424 .xl -\w'0000'u
425 .nr ?n 1
426 ..
427 .de n2                  \" *** line numbering 2
428 .nm \\$1
429 .ie \\n(.$ \
430 .       xl -\w'0000'u
431 .el \
432 .       xl \\n($lu
433 ..
434 .de pa                  \" *** new page
435 .bp \\$1
436 ..
437 .de ro                  \" *** roman page numbers
438 .af % i
439 ..
440 .de ar                  \" *** arabic page numbers
441 .af % 1
442 ..
443 .de m1                  \" *** position one space
444 .nr _0 \\n(hmu
445 .nr hm \\$1v
446 .nr tm +\\n(hmu-\\n(_0u
447 .rr _0
448 ..
449 .de m2                  \" *** position two space
450 .nr tm \\n(hmu+\\n(tpp+\\$1v
451 ..
452 .de m3                  \" *** position three space
453 .nr bm \\n(fmu+\\n(tpp+\\$1v
454 ..
455 .de m4                  \" *** position four space
456 .nr _0 \\n(fmu
457 .nr fm \\$1v
458 .nr bm +\\n(fmu-\\n(_0u
459 ..
460 .de sk                  \" *** leave a blank page (next page)
461 .if \\n(.$>0 \
462 .       tm Line \\n(c. -- I cannot skip multiple pages
463 .nr ?s 1
464 ..
465 .\"             *** MISCELLANEOUS USER SUPPORT COMMANDS ***
466 .if !\n(.g .ig
467 .de re                  \" *** reset tabs (TROFF defines 15 stops default)
468 .ta T 0.5i
469 ..
470 .if \n(.g .ig
471 .de re
472 .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
473 ..
474 .de ba                  \" *** set base indent
475 .ie \\n(.$ \
476 .       nr $i \\$1n
477 .el \
478 .       nr $i \\n(siu*\\n($0u
479 ..
480 .de hl                  \" *** draw horizontal line
481 .br
482 .ie \n(.g .do nr _I \\n[.in]
483 .el .nr _I \\n(.i
484 \l'\\n(.lu-\\n(_Iu'
485 .sp
486 ..
487 .\"             *** PARAGRAPHING ***
488 .de pp                  \" *** paragraph
489 .lp \\n(piu
490 ..
491 .de lp                  \" *** left aligned paragraph
492 .@p
493 .if \\n(.$ \
494 .       ti +\\$1
495 .nr $p 0 1
496 ..
497 .de ip                  \" *** indented paragraph w/ optional tag
498 .if (\\n(ii>0)&(\\n(ii<1n) \
499 .       nr ii \\n(iin
500 .nr _0 \\n(ii
501 .if \\n(.$>1 \
502 .       nr _0 \\$2n
503 .@p \\n(_0u
504 .nr _I \\n(.iu
505 .in 0
506 .di |i
507 \&\\$1
508 .br
509 .di
510 .in \\n(_Iu
511 .ds |j \\*(|i\\
512 .if \\w"\\*(|j" \
513 \{\
514 .       ti -\\n(_0u
515 .       ie \\w"\\*(|j">=\\n(_0 \
516 \{\
517 \\*(|j
518 .               br
519 .       \}
520 .       el \\*(|j\h'|\\n(_0u'\c
521 .\}
522 .rr _0
523 .rm |i |j
524 ..
525 .de np                  \" *** numbered paragraph
526 .\" use string comparison in case user has changed format of $p
527 .if '\\n($p'-1' \
528 .       nr $p 0                 \" reset number after .bu
529 .nr $p +1                       \" increment paragraph number
530 .@p \w'\0(000)\0'u
531 .ti -\w'\0(000)\0'u
532 \0(\\n($p)\h'|\w'\0(000)\0'u'\c
533 ..
534 .de bu                  \" *** bulleted paragraph
535 .br
536 .\" use string comparison in case user has changed format of $p
537 .if '\\n($p'-1' \
538 .       ns                      \" don't space between .bu paragraphs
539 .nr $p 0-1                      \" mark "bulleted paragraph" mode
540 .@p \w'\0\(bu\0'u
541 .ti -\w'\0\(bu\0'u
542 \0\(bu\0\c
543 ..
544 .de @p                  \" --- initialize for paragraph
545 .if "\\n(.z"|e" .tm Line \\n(c. -- Unmatched continued equation
546 .in \\n($iu+\\n(pou
547 .if \\n(.$ \
548 .       in +\\$1n
549 .ce 0
550 .fi
551 .@F \\n(pf
552 .sz \\n(pp
553 .sp \\n(psu
554 .ne \\n(.Lv+\\n(.Vu
555 .ns
556 ..
557 .\"             *** SECTION HEADINGS ***
558 .de sh                  \" *** section heading
559 .fi
560 .if (\\n(si>0)&(\\n(si<1n) \
561 .       nr si \\n(sin
562 .ce 0
563 .@d "\\$1" +1 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
564 .if !"\\$2"_" \
565 \{\
566 .       ds |n \&\\$2
567 .       $p "\\*(|n" "\\*($n" \\n($0
568 .       $0 "\\*(|n" "\\*($n" \\n($0
569 .       rm |n
570 .\}
571 .nr $p 0 1                      \" reset .np count
572 ..
573 .de @d                  \" --- change section depth
574 .if !""\\$1" \
575 .       nr $0 \\$1
576 .if \\n($0&(\\n(.$>1) \
577 .       nr $\\n($0 \\$2
578 .ds $n \&\"
579 .ie \\n($0>=1 \
580 \{\
581 .       if '\\n($1'0' \
582 .               nr $1 1
583 .       if (\\n(.$>=3) .if !"\\$3"-" \
584 .               nr $1 \\$3
585 .       as $n \\n($1
586 .\}
587 .el \
588 .       nr $1 0
589 .ie \\n($0>=2 \
590 \{\
591 .       if '\\n($2'0' \
592 .               nr $2 1
593 .       if (\\n(.$>=4) .if !"\\$4"-" \
594 .               nr $2 \\$4
595 .       as $n .\\n($2
596 .\}
597 .el \
598 .       nr $2 0
599 .ie \\n($0>=3 \
600 \{\
601 .       if '\\n($3'0' \
602 .               nr $3 1
603 .       if (\\n(.$>=5) .if !"\\$5"-" \
604 .               nr $3 \\$5
605 .       as $n .\\n($3
606 .\}
607 .el \
608 .       nr $3 0
609 .ie \\n($0>=4 \
610 \{\
611 .       if '\\n($4'0' \
612 .               nr $4 1
613 .       if (\\n(.$>=6) .if !"\\$6"-" \
614 .               nr $4 \\$6
615 .       as $n .\\n($4
616 .\}
617 .el \
618 .       nr $4 0
619 .ie \\n($0>=5 \
620 \{\
621 .       if '\\n($5'0' \
622 .               nr $5 1
623 .       if (\\n(.$>=7) .if !"\\$7"-" \
624 .               nr $5 \\$7
625 .       as $n .\\n($5
626 .\}
627 .el \
628 .       nr $5 0
629 .ie \\n($0>=6 \
630 \{\
631 .       if '\\n($6'0' \
632 .               nr $6 1
633 .       if (\\n(.$>=8) .if !"\\$8"-" \
634 .               nr $6 \\$8
635 .       as $n .\\n($6
636 .\}
637 .el \
638 .       nr $6 0
639 ..
640 .de sx                  \" *** heading up, no increment (2.1.1 -> 2.1)
641 .ce 0
642 .ul 0
643 .nr _0 \\n($0-1
644 .if \\n(.$ .nr _0 +1
645 .if \\n(.$ .nr _0 \\$1
646 .@d \\n(_0
647 .rr _0
648 .$p "" "" \\n($0
649 .nr $p 0 1                      \" reset .np count
650 ..
651 .de uh                  \" *** unnumbered section heading
652 .$p "\\$1"
653 .$0 "\\$1"
654 ..
655 .de $p                  \" $$$ print section heading
656 .if (\\n(si>0)&(\\n(.$>2) \
657 .       nr $i \\$3*\\n(si
658 .in \\n($iu
659 .ie !"\\$1\\$2"" \
660 \{\
661 .       sp \\n(ssu              \" one of them is non-null
662 .       ne \\n(.Lv+\\n(.Vu+\\n(psu+((\\n(spp*\\n($vu*\\n(.Lu)/100u)
663 .       \" exdent if \\$3 > 0
664 .       ie 0\\$3 \
665 .               ti -(\\n(siu-\\n(sou)
666 .       el \
667 .               ti +\\n(sou
668 .       @F \\n(sf
669 .       sz \\n(sp
670 .       if 0\\$3 \
671 .               $\\$3
672 .       if \w"\\$2">0 \\$2.
673 .       if \w"\\$1">0 \\$1\f1\ \ \&
674 .\}
675 .el \
676 .       sp \\n(psu
677 .@F \\n(pf
678 .sz \\n(pp
679 ..
680 .\"             *** COLUMNNED OUTPUT ***
681 .de 2c                  \" *** double columned output
682 .br
683 .if \\n($m>1 \
684 .       1c\"                    \" revert to 1c if already 2c
685 .nr $c 1
686 .nr $m 2
687 .if \\n(.$>1 \
688 .       nr $m \\$2
689 .if \\n(.$>0 \
690 .       nr $s \\$1n             \" param 1: column seperation
691 .nr $l (\\n(.l-((\\n($m-1)*\\n($s))/\\n($m
692 .xl \\n($lu
693 .mk _k
694 .ns
695 ..
696 .de 1c                  \" *** single columned output
697 .br
698 .nr $c 1
699 .nr $m 1
700 .ll \\n(_Lu                     \" return to normal output
701 .sp |\\n(.hu
702 .@O \\n(_ou
703 ..
704 .de bc                  \" *** begin column
705 .sp 24i
706 ..
707 .\"             *** FLOATING TABLES AND NONFLOATING BLOCKS ***
708 .de (z                  \" *** begin floating keep
709 .if \n@>4 .tm >> (z, .z=\n(.z
710 .@D 4 \\$1 \\$2
711 .@(
712 ..
713 .de )z                  \" *** end floating keep
714 .if \n@>4 .tm >> )z, .z=\n(.z
715 .sp \\n(zsu
716 .@)
717 .if \n@>4 .tm -- )z << @), .z=\n(.z
718 .rr _0
719 .if !\\n(?b \
720 .       nr dn +(\\n(ppp*\\n($vu)/200u+\\n(zsu
721 .nr dl -\n(.H                   \" fudge factor necessary to make it work
722 .ie ((\\n(dn+\n(.V)>=\\n(.t):(\\n(?a):((\\n(dl>\\n($l)&(\\n($c>1)) \
723 \{\
724 .       nr ?a 1
725 .       if (\\n(dl>\\n($l)&(\\n($m>1) \
726 .               nr ?w 1         \" mark wider than one column (top)
727 .       ds |x |t
728 .\}
729 .el \
730 \{\
731 .       nr ?b 1
732 .       if (\\n(dl>\\n($l)&(\\n($m>1) \
733 .               nr ?W 1         \" mark wider than one column (bottom)
734 .       nr _b +\\n(dnu
735 .       \" avoid moving @f back past the current position
736 .       if \\n(.p-\\n(nl-\n(.V<\\n(_b \
737 .               nr _b \\n(.p-\\n(nl-\n(.V
738 .       ch @f -\\n(_bu
739 .       ds |x |b
740 .\}
741 .da \\*(|x                      \" copy to save macro
742 .nf
743 .ls 1
744 .nr ?k 1
745 .if \n@>4 .tm -- )z >> \\*(|x
746 \!.if \\\\n(nl>(\\\\n(tm+2v) .ne \\n(dnu-\\n(zsu
747 .|k\"                           \" and the body
748 .ec
749 .if \n@>4 .tm -- )z << \\*(|x, .z=\\n(.z
750 .nr ?k 0
751 .rm |k\"                        \" remove the temp macro
752 .da
753 .in 0
754 .ls 1
755 .xl \\n($lu
756 .ev
757 .if \n@>4 .tm << )z, .z=\\n(.z
758 ..
759 .de @k                  \" --- output floating keep
760 .if \n@>4 .tm >> @k, $1=\\$1, .z=\\n(.z
761 .ev 1
762 .nf
763 .ls 1
764 .in 0
765 .sp \\n(zsu
766 .\\$1
767 .ec
768 .br
769 .rm \\$1
770 .ev
771 ..
772 .de (t                  \" XXX temp ref to (z
773 .(z \\$1 \\$2
774 ..
775 .de )t                  \" XXX temp ref to )t
776 .)z \\$1 \\$2
777 ..
778 .de (b                  \" *** begin block
779 .br
780 .@D 3 \\$1 \\$2
781 .sp \\n(bsu
782 .@(
783 ..
784 .de )b                  \" *** end block
785 .br
786 .@)
787 .if (\\n(bt=0):(\\n(.t<\\n(bt) \
788 .       ne \\n(dnu              \" make it all on one page
789 .ls 1
790 .nf
791 .|k
792 .ec
793 .fi
794 .in 0
795 .xl \\n($lu
796 .ev
797 .rm |k
798 .sp \\n(bsu+\\n(.Lv-1v
799 ..
800 .de @(                  \" --- begin keep
801 .if !"\\n(.z"" .tm Line \\n(c. -- Invalid nested keep \\n(.z
802 .@M
803 .di |k
804 \!'rs
805 ..
806 .de @M                  \" --- set modes for display
807 .nr ?k 1
808 .@C 1
809 .@F \\n(df
810 .if \\n($R .@V
811 .vs \\n(.sp*\\n($Vu/100u
812 .nf
813 .if "\\*(|p"F" \
814 .       fi                      \" set fill mode if "F" parameter
815 .if \\n(_d=4 \
816 .       in 0
817 .if \\n(_d=3 \
818 \{\
819 .       in +\\n(biu
820 .       xl -\\n(biu
821 .\}
822 .if \\n(_d=1 \
823 .       ce 10000
824 ..
825 .de @)                  \" --- end keep
826 .br
827 .if !"\\n(.z"|k" .tm Line \\n(c. -- Close of a keep which has never been opened
828 .nr ?k 0
829 .di
830 .in 0
831 .ce 0
832 ..
833 .de (c                  \" *** begin block centered text
834 .if "\\n(.z"|c" .tm Line \\n(c. -- Nested .(c requests
835 .di |c
836 ..
837 .de )c                  \" *** end block centered text
838 .if !"\\n(.z"|c" .tm Line \\n(c. -- Unmatched .)c
839 .br                             \" force out final line
840 .di
841 .if \n@>4 .tm >> .)c .l=\\n(.l .i=\\n(.i $i=\\n($i dl=\\n(dl
842 .ev 1
843 .ls 1
844 .in (\\n(.lu-\\n(.iu-\\n(dlu)/2u
845 .if \n@>4 .tm -- .)c << .in .l=\\n(.l .i=\\n(.i dl=\\n(dl
846 .nf
847 .|c
848 .ec
849 .in
850 .ls
851 .ev
852 .rm |c
853 ..
854 .\"             *** BLOCK QUOTES (OR WHATEVER) AND LISTS ***
855 .de (q                  \" *** begin block quote
856 .br
857 .@C 1
858 .fi
859 .sp \\n(qsu
860 .in +\\n(qiu
861 .xl -\\n(qiu
862 .sz \\n(qp
863 ..
864 .de )q                  \" *** end block quote
865 .br
866 .ev
867 .sp \\n(qsu+\\n(.Lv-1v
868 .nr ?k 0
869 ..
870 .de (l                  \" *** begin list
871 .br
872 .sp \\n(bsu
873 .@D 3 \\$1 \\$2
874 .@M
875 ..
876 .de )l                  \" *** end list
877 .br
878 .ev
879 .sp \\n(bsu+\\n(.Lv-1v
880 .nr ?k 0
881 ..
882 .\"             *** PREPROCESSOR SUPPORT ***
883 .\"
884 .\"     EQN
885 .\"
886 .de EQ                  \" *** equation start
887 .ec
888 .if !\\n(?e \
889 \{\
890 .       if "\\n(.z"|e" .tm Line \\n(c. -- Nested .EQ request
891 .       @D 1 "\\$1" "\\$2"
892 .       @C 2
893 .       di |e
894 .\}
895 .ls 1
896 .in 0
897 .nf
898 ..
899 .de EN                  \" *** equation end
900 .br
901 .ie "\\$1"C" \
902 \{\
903 .       nr ?e 1
904 .       sp \\n(esu
905 .\}
906 .el \
907 \{\
908 .       nr ?e 0
909 .       di
910 .       if \\n(dn \
911 .               @q\"            \" actual equation output
912 .       rm |e
913 .       ev
914 .\}
915 ..
916 .de @q                  \" --- equation output
917 .nr _Q \\n(dnu
918 .ev
919 .sp \\n(esu                     \" output rest of preceeding text
920 .if !"\\n(.z"" \!.ne \\n(_Qu
921 .ne \\n(_Qu+\n(.Vu              \" keep it on one page
922 .@C 2\"                         \" .ev 2 may be jumbled from header
923 .if \\n(_d=1 \
924 .       in (\\n(.lu+\\n($iu-\\n(dlu)/2u
925 .if \\n(_d=2 \
926 .       in \\n($iu
927 .if \\n(_d=3 \
928 .       in \\n(biu+\\n($iu
929 .if \\n(_d=4 \
930 .       in 0
931 .mk _q
932 .if \n@>1 .tm --@e: _Q=\\n(_Q _q=\\n(_q nl=\\n(nl |p=\\*(|p
933 .if !"\\*(|p"" \
934 \{\
935 .       rs
936 .       sp (\\n(_Qu-\\n(.vu)/2u
937 .       tl """\\*(|p"
938 .       rt \\n(_qu
939 .\}
940 .|e
941 .sp |\\n(_qu+\\n(_Qu
942 .sp \\n(esu+\\n(.Lv-1v
943 .rr _q
944 .rr _Q
945 ..
946 .\"
947 .\"     TBL
948 .\"
949 .de TS                  \" *** table start
950 .sp \\n(bsu
951 .@C 1
952 .fi                             \" drop into fill mode for text boxes
953 .if "\\$1"H" \
954 \{\
955 .       di |h                   \" save header part
956 .       nr ?T 1
957 .\}
958 .ls 1
959 .ch @f -(\\n(_bu+1v)            \" set pseudo-trap for bottom line
960 .if \\n(.p-\\n(_b-1v<=\\n(nl \
961 .       ch @f \\n(nlu+\n(.Vu
962 ..
963 .de TH                  \" *** end header part of table
964 .nr T. 0
965 .T# 0
966 .di
967 .nr _T \\n(?T
968 .nr ?T 0
969 .ne \\n(dnu+1v
970 .nr ?T \\n(_T
971 .nr _i \\n(.i
972 .in 0
973 .|h\"                           \" put in the initial header
974 .in \\n(_iu
975 .rr _i
976 .mk #T
977 ..
978 .de TE                  \" *** table end
979 .nr ?T 0
980 .ch @f -\\n(_bu                 \" reset pseudo-trap
981 .if \\n(.p-\\n(_b<=\\n(nl \
982 .       ch @f \\n(nlu+\n(.Vu
983 .ev
984 .sp \\n(bsu+\\n(.Lv-1v
985 .re
986 ..
987 .de T&
988 ..
989 .\"
990 .\"     REFER
991 .\"
992 .de ][                          \" *** refer output
993 .if \\$1>5 .tm Bad arg to []
994 .[\\$1
995 ..
996 .de [0                          \" --- other
997 .(f
998 .ip "\\*([F.\0"
999 .if !"\\*([A"" \\*([A,
1000 .if !"\\*([T"" \\f2\\*([T\\f1\c
1001 .if !"\\*([T"" .if !"\\*([O"" ,\ \"
1002 .ie !"\\*([O"" \\*([O
1003 .el .if !"\\*([T"" \&.
1004 .if !"\\*([D"" \\*([D.
1005 .@p
1006 .)f
1007 ..
1008 .de [1                          \" --- journal article
1009 .(f
1010 .ip "\\*([F.\0"
1011 \\*([A,
1012 .if !"\\*([T"" \\*(lq\\*([T,\\*(rq
1013 .if "\\*([V"" \\f2\\*([J\\f1,
1014 .if !"\\*([V"" \\f2\\*([J\\f1
1015 .if !"\\*([V"" \\f3\\*([V\\f1\c
1016 .if !"\\*([N"" (\\*([N)\c
1017 .if !"\\*([P"" \
1018 \{\
1019 .       ie \\n([P>0 \ pp.\&
1020 .       el \ p.\&
1021 \\*([P
1022 .\}
1023 .if !"\\*([I"" .if "\\*([R"" \\*([I,
1024 (\\*([D).
1025 .if !"\\*([O"" \\*([O
1026 .)f
1027 ..
1028 .de [2                          \" --- book
1029 .(f
1030 .ip "\\*([F.\0"
1031 \\*([A, \\f2\\*([T,\\f1
1032 \\*([I\c
1033 .if !"\\*([C"" , \\*([C\c
1034  (\\*([D).
1035 .if !"\\*([G"" Gov't. ordering no. \\*([G
1036 .if !"\\*([O"" \\*([O
1037 .)f
1038 ..
1039 .de [3                          \" --- article in book
1040 .(f
1041 .ip "\\*([F.\0"
1042 \\*([A, \\*(lq\\*([T,\\*(rq
1043 .if !"\\*([P"" pp. \\*([P
1044 in \\f2\\*([B\\f1, \c
1045 .if !"\\*([E"" ed. \\*([E, \c
1046 .if !"\\*([I"" \\*([I\c
1047 .if !"\\*([C"" , \\*([C\c
1048  (\\*([D).
1049 .if !"\\*([O"" \\*([O
1050 .)f
1051 ..
1052 .de [4                          \" --- report
1053 .(f
1054 .ip "\\*([F.\0"
1055 \\*([A, \\*(lq\\*([T,\\*(rq
1056 \\*([R\c
1057 .if !"\\*([G"" \& (\\*([G)\c
1058 .if !"\\*([I"" , \\*([I\c
1059 .if !"\\*([C"" , \\*([C\c
1060  (\\*([D).
1061 .if !"\\*([O"" \\*([O
1062 .)f
1063 ..
1064 .de [5                          \" --- tm style
1065 .(f
1066 .ip "\\*([F.\0"
1067 \\*([A, \\f2\\*([T\\f1,
1068 .ie \\n(TN \\*([M.
1069 .el Bell Laboratories internal memorandum (\\*([D).
1070 .)f
1071 ..
1072 .de ]<
1073 .$p References
1074 .lp
1075 .rm (f )f
1076 ..
1077 .de ]>
1078 .sp
1079 ..
1080 .de ]-
1081 .rm [V [P [A [T [N [C [B [O [R [I [E [D
1082 ..
1083 .ie \n(.V<1v \
1084 \{\
1085 .       ds [. \s-2\v'-.4m'\f1
1086 .       ds .] \v'.4m'\s+2\fP
1087 .\}
1088 .el \
1089 \{\
1090 .       ds [. " [
1091 .       ds .] ]
1092 .\}
1093 .\"
1094 .\"     IDEAL
1095 .\"
1096 .de IS                  \" *** start ideal picture
1097 .nr g7 \\n(.u
1098 .ls 1
1099 ..
1100 .de IF
1101 .if \\n(g7 .fi
1102 .ls
1103 ..
1104 .de IE                  \" *** end ideal picture
1105 .if \\n(g7 .fi
1106 .ls
1107 ..
1108 .\"
1109 .\"     PIC
1110 .\"
1111 .de PS          \" *** start picture: $1=height, $2=width in units or inches
1112 .sp 0.3
1113 .nr g7 \\$2
1114 .in (u;\\n(.l-\\n(g7>?0/2)
1115 .ne \\$1u
1116 .nr g7 \\n(.u
1117 .ls 1
1118 ..
1119 .de PE                  \" *** end picture
1120 .ls
1121 .in
1122 .if \\n(g7 .fi
1123 .sp .6
1124 ..
1125 .\"
1126 .\"     GREMLIN
1127 .\"
1128 .de GS                  \" *** start gremlin picture
1129 .nr g7 (\\n(.lu-\\n(g1u)/2u
1130 .if "\\$1"L" .nr g7 \\n(.iu
1131 .if "\\$1"R" .nr g7 \\n(.lu-\\n(g1u
1132 .in \\n(g7u
1133 .nr g7 \\n(.u
1134 .ls 1
1135 .nf
1136 .ne \\n(g2u
1137 ..
1138 .de GE                  \" *** end gremlin picture
1139 .GF
1140 .sp .6
1141 ..
1142 .de GF                  \" *** finish gremlin picture; stay at top
1143 .ls
1144 .in
1145 .if \\n(g7 .fi
1146 ..
1147 .\"             *** FONT AIDS ***
1148 .de sz                  \" *** set point size and vertical spacing
1149 .ps \\$1
1150 .if \\n($r .@v
1151 .vs \\n(.sp*\\n($vu/100u        \" default vs at pointsize + 20%
1152 ..
1153 .de @v                  \" --- possibly set $v from $r
1154 .if (1i>=240u)&(1p<=\\n($r)&(\\n($r<=4p) .nr $v \\n($r00/1p
1155 ..
1156 .de @V                  \" --- possibly set $V from $R
1157 .if (1i>=240u)&(1p<=\\n($R)&(\\n($R<=4p) .nr $V \\n($R00/1p
1158 ..
1159 .de @E                  \" --- store in _F argument to \f for restoring font
1160 .ie \\n(.f<10 \
1161 .       ds _F \\n(.f
1162 .el \
1163 \{\
1164 .       ie \\n(.f<100&\n(.g \
1165 .               ds _F (\\n(.f
1166 .       el \
1167 .               ds _F P
1168 .\}
1169 ..
1170 .de r                   \" *** enter roman font
1171 .@E
1172 .ft 1
1173 .if \\n(.$ \&\\$1\f\\*(_F\\$2
1174 ..
1175 .de i                   \" *** enter italic
1176 .@E
1177 .ft 2
1178 .if \\n(.$ \&\\$1\f\\*(_F\\$2
1179 ..
1180 .de b                   \" *** enter boldface
1181 .@E
1182 .ft 3
1183 .if \\n(.$ \&\\$1\f\\*(_F\\$2
1184 ..
1185 .de rb                  \" *** enter real boldface
1186 .@E
1187 .ft 3
1188 .if \\n(.$ \&\\$1\f\\*(_F\\$2
1189 ..
1190 .de bi                  \" *** enter bold italic
1191 .@E
1192 .ft 4
1193 .if \\n(.$ \&\\$1\f\\*(_F\\$2
1194 ..
1195 .de u                   \" *** enter underlined word
1196 \&\\$1\l'|0\(ul'\\$2
1197 ..
1198 .\" a better version of u
1199 .if !\n(.g .ig
1200 .de u
1201 \Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m'\\$2
1202 ..
1203 .de q                   \" *** enter quoted word
1204 \&\\*(lq\\$1\\*(rq\\$2
1205 ..
1206 .de bx                  \" *** enter boxed word
1207 \k~\(br\|\\$1\|\(br\l'|\\n~u\(rn'\l'|\\n~u\(ul'\^\\$2
1208 ..
1209 .de sm                  \" *** print in smaller font
1210 \s-1\\$1\\s0\\$2
1211 ..
1212 .de @F                  \" --- change font (0 -> no change)
1213 .nr ~ \\$1
1214 .if \\n~>0 \
1215 .       ft \\n~
1216 .rr ~
1217 ..
1218 .\"             *** FOOTNOTING ***
1219 .de (f                  \" *** begin footnote
1220 .ec
1221 .if "\\n(.z"|f" .tm Line \\n(c. -- Invalid footnote nesting
1222 .ie "\\n(.z"" \
1223 \{\
1224 .       nr _D \\n(dn
1225 .       nr _0 1v+\\n(nlu
1226 .       ev 2
1227 .       da |f
1228 .       in 0
1229 .       xl \\n($lu-\\n(fuu
1230 .       @F \\n(ff
1231 .       sz \\n(fp
1232 .       vs \\n(.sp*\\n($Vu/100u
1233 .       if !\\n(?f \
1234 \{\
1235 .               nr _b +1v       \" allow space for $s
1236 .               $s
1237 .       \}
1238 .       br
1239 .       if \\n(.p-\\n(_b-\\n(_0-\\n(.h-1v-\\n(fs<0 \
1240 \{\
1241 .               da\"            \" won't fit on page at all
1242 .               bc
1243 .               if !\\n(?f \
1244 .                       rm |f
1245 .               da |f
1246 .\" next five lines could be dropped if headers had their own environment
1247 .               in 0            \" reset everything from .bc
1248 .               xl \\n($lu-\\n(fuu
1249 .               @F \\n(ff
1250 .               sz \\n(fp
1251 .               vs \\n(.sp*\\n($Vu/100u
1252 .               if !\\n(?f \
1253 .                       $s
1254 .               br
1255 .       \}
1256 .       rr _0
1257 .       sp \\n(fsu
1258 .       nr ?f 1
1259 .       fi
1260 .       if !"\\$1"_" \
1261 .               ti \\n(fiu
1262 .       if \n@>2 .tm    << (f $f=\\n($f
1263 .\}
1264 .el \
1265 \{\
1266 .       ev 2
1267 .       in 0
1268 .       xl \\n($lu-\\n(fuu
1269 .       @F \\n(ff
1270 .       sz \\n(fp
1271 .       vs \\n(.sp*\\n($Vu/100u
1272 .       fi
1273 \!.(f \\$1
1274 \!.@N
1275 .\}
1276 ..
1277 .de @N                  \" --- set no fill mode in the top-level diversion
1278 .ie "\\n(.z"" .nf
1279 .el \!.@N
1280 ..
1281 .de )f                  \" *** end footnote
1282 .ie "\\n(.z"|f" \
1283 \{\
1284 .       if \\n* \
1285 .               nr $f +1
1286 .       ds * \\*{\\n($f\\*}\k*
1287 .       nr * 0
1288 .       in 0
1289 .       da
1290 .       ev
1291 .       if \\n(_w<\\n(dl \
1292 .               nr _w \\n(dl    \" compute maximum fn width
1293 .       nr _b +\\n(dn
1294 .       ch @f -\\n(_bu
1295 .       if \\n(.p-\\n(_b<=\\n(nl \
1296 .               ch @f \\n(nlu+\n(.Vu
1297 .       nr dn \\n(_D
1298 .       rr _D
1299 .\}
1300 .el \
1301 \{\
1302 .       br
1303 \!.)f
1304 .       ev
1305 .\}
1306 ..
1307 .@R ff
1308 .if \n(ff<=0 \
1309 .       nr ff 1                 \" footnote font: Times Roman
1310 .@R fp
1311 .if \n(fp<=0 \
1312 .       nr fp 8                 \" footnote pointsize
1313 .de $s                  \" $$$ footnote separator
1314 \l'2i'
1315 ..
1316 .\"             *** DELAYED TEXT ***
1317 .de (d                  \" *** begin delayed text
1318 .am |d )d
1319 .sp \\n(bsu
1320 ..
1321 .de )d                  \" *** end delayed text
1322 .if \\n# \
1323 .       nr $d +1
1324 .ds # [\\n($d]\k#
1325 .rr #
1326 ..
1327 .de pd                  \" *** print delayed text
1328 .|d
1329 .rm |d
1330 .nr $d 1 1
1331 .ds # [1]\k#
1332 ..
1333 .\"             *** INDEXES (TABLE OF CONTENTS) ***
1334 .nr _x 0 1
1335 .af _x a
1336 .de (x                  \" *** begin index entry
1337 .if \n@>4 .tm >> (x, .z=\\n(.z
1338 .ds |X x
1339 .if \\n(.$>0 \
1340 .       ds |X \\$1
1341 .ie "\\n(.z"" \
1342 .       nr _z 0
1343 .el \
1344 .       nr _z 1
1345 .@\\n(_z
1346 ..
1347 .de @0                  \" --- finish (x if no current diversion
1348 .am %\\*(|X )x
1349 .sp \\n(xsu
1350 .ti -\\n(piu
1351 ..
1352 .de @1                  \" --- finish (x if current diversion
1353 .if "\\n(_x"z" .nr _x 0
1354 .de =\\n+(_x )x
1355 ..
1356 .de )x                  \" *** end index entry
1357 .if \n@>4 .tm >> )x, .z=\\n(.z
1358 .ie "\\n(.z"" \
1359 \{\
1360 .       ds |x \\n%
1361 .       if \\n(.$>0 \
1362 .               ds |x \\$1
1363 .       if "\\*(|x"_" \
1364 .               ig ..
1365 .       am %\\*(|X ..
1366 .       if \w"\\$2">(\\n(.l-\\n(.i-\\n(.k) \
1367 .               ti +\\n(xuu
1368 \\\\a\\\\t\\$2\\*(|x
1369 ...
1370 .       rm |x
1371 .       rm |X
1372 .\}
1373 .el \
1374 \{\
1375 \!.(x \\*(|X
1376 \!\\\\*(=\\n(_x\\\\
1377 \!.)x \\$1 \\$2
1378 \!.rm =\\n(_x
1379 .\}
1380 ..
1381 .de xp                  \" *** print the index
1382 .br
1383 .@C 2
1384 .ls 1
1385 .vs \\n(.sp*\\n($Vu/100u
1386 .fi
1387 .in +\\n(piu
1388 .ds |X x
1389 .if \\n(.$>0 \
1390 .       ds |X \\$1
1391 .xl -(\\n(xuu+\w'...'u)
1392 .di |x
1393 .%\\*(|X
1394 .br
1395 .di
1396 .rm %\\*(|X
1397 .xl \\n($lu
1398 .rm |X
1399 .ev
1400 .nf
1401 .in 0
1402 .ta \\n(.lu-\\n(xuuR \\n(.luR
1403 .|x
1404 .fi
1405 .in
1406 .rm |x
1407 ..
1408 .de +c                  \" *** begin chapter
1409 .ep\"                           \" force out footnotes
1410 .if \\n(?o:\\n(?a \
1411 \{\
1412 .       bp                      \" force out a table or more footnote
1413 .       rs
1414 .       ep
1415 .\}
1416 .nr ?C 1
1417 .nr $f 1 1
1418 .ds * \\*{1\\*}\k*
1419 .if \\n(?R \
1420 .       pn 1
1421 .bp
1422 .in \\n($iu                     \" reset the indent
1423 .rs
1424 .ie \\n(.$ \
1425 .       $c "\\$1"
1426 .el \
1427 .       sp 3
1428 ..
1429 .de ++                  \" *** declare chapter type
1430 .nr _0 0
1431 .if "\\$1"C" \
1432 .       nr _0 1                 \" chapter
1433 .if "\\$1"RC" \
1434 .       nr _0 11                \" renumbered chapter
1435 .if "\\$1"A" \
1436 .       nr _0 2                 \" appendix
1437 .if "\\$1"RA" \
1438 .       nr _0 12                \" renumbered appendix
1439 .if "\\$1"P" \
1440 .       nr _0 3                 \" preliminary material
1441 .if "\\$1"B" \
1442 .       nr _0 4                 \" bibliographic material
1443 .if "\\$1"AB" \
1444 .       nr _0 5                 \" abstract
1445 .if \\n(_0=0 \
1446 .       tm Line \\n(c. -- Bad mode to .++
1447 .nr ?R 0
1448 .if \\n(_0>10 \
1449 .\{
1450 .       nr ?R 1
1451 .       nr _0 -10
1452 .\}
1453 .nr ch 0 1
1454 .if (\\n(_0=3):(\\n(_0=5) \
1455 .       pn 1                    \" must do before .ep
1456 .if !\\n(_0=\\n(_M .if \\n(_M=3 \
1457 .       pn 1                    \" must do before .ep
1458 .ep\"                           \" end page for correct page number types
1459 .if \\n(_0=1 \
1460 \{\
1461 .       af ch 1
1462 .       af % 1
1463 .\}
1464 .if \\n(_0=2 \
1465 \{\
1466 .       af ch A
1467 .       af % 1
1468 .\}
1469 .if \\n(_0=3 \
1470 .       af % i
1471 .if \\n(_0=4 \
1472 .       af % 1
1473 .if \\n(_0=5 \
1474 .       af % 1
1475 .if \\n(.$>1 \
1476 .       he \\$2
1477 .nr _M \\n(_0
1478 .rr _0
1479 ..
1480 .de $c                  \" $$$ print chapter title
1481 .sz 12
1482 .ft 3
1483 .ce 1000
1484 .if \\n(_M<3 \
1485 .       nr ch +1
1486 .ie \\n(_M=1 CHAPTER\ \ \\n(ch
1487 .el .if \\n(_M=2 APPENDIX\ \ \\n(ch
1488 .if \w"\\$1" .sp 3-\\n(.L
1489 .if \w"\\$1" \\$1
1490 .if (\\n(_M<3):(\w"\\$1") \
1491 .       sp 4-\\n(.L
1492 .ce 0
1493 .ft
1494 .sz
1495 .ie \\n(_M=1 \
1496 .       $C Chapter \\n(ch "\\$1"
1497 .el .if \\n(_M=2 \
1498 .       $C Appendix \\n(ch "\\$1"
1499 ..
1500 .de tp                  \" *** title page
1501 .hx
1502 .bp
1503 .br
1504 .rs
1505 .pn \\n%
1506 ..
1507 .\"             *** DATES ***
1508 .if \n(mo=1 .ds mo January
1509 .if \n(mo=2 .ds mo February
1510 .if \n(mo=3 .ds mo March
1511 .if \n(mo=4 .ds mo April
1512 .if \n(mo=5 .ds mo May
1513 .if \n(mo=6 .ds mo June
1514 .if \n(mo=7 .ds mo July
1515 .if \n(mo=8 .ds mo August
1516 .if \n(mo=9 .ds mo September
1517 .if \n(mo=10 .ds mo October
1518 .if \n(mo=11 .ds mo November
1519 .if \n(mo=12 .ds mo December
1520 .if \n(dw=1 .ds dw Sunday
1521 .if \n(dw=2 .ds dw Monday
1522 .if \n(dw=3 .ds dw Tuesday
1523 .if \n(dw=4 .ds dw Wednesday
1524 .if \n(dw=5 .ds dw Thursday
1525 .if \n(dw=6 .ds dw Friday
1526 .if \n(dw=7 .ds dw Saturday
1527 .nr y2 \n(yr%100
1528 .af y2 00
1529 .nr y4 \n(yr+1900
1530 .ds td \*(mo \n(dy, \n(y4
1531 .\"             *** PARAMETRIC INITIALIZATIONS ***
1532 .rr x
1533 .nr $v \n(.v00+\n(.sp-1/\n(.sp  \" vs as percentage of ps for .sz request
1534 .nr $V \n($v                    \" same for displays & footnotes
1535 .nr hm 4v                       \" header margin
1536 .nr tm 7v                       \" top margin
1537 .nr bm 6v                       \" bottom margin
1538 .nr fm 3v                       \" footer margin
1539 .nr tf 3                        \" title font: (real) Times Bold
1540 .nr tp 10                       \" title point size
1541 .hy 14
1542 .nr bi 4m                       \" indent for blocks
1543 .nr pi 5n                       \" indent for paragraphs
1544 .nr pf 1                        \" normal text font
1545 .nr pp 10                       \" normal text point size
1546 .nr qi 4n                       \" indent for quotes
1547 .nr qp -1                       \" down one point
1548 .nr ii 5n                       \" indent for .ip's and .np's
1549 .nr $m 1                        \" max number of columns
1550 .nr $s 4n                       \" column separation
1551 .nr sf 3                        \" section font -- Times Bold
1552 .nr sp 10                       \" section title pointsize
1553 .nr ss 12p                      \" section prespacing
1554 .nr si 0                        \" section indent
1555 .\"             *** OTHER INITIALIZATION ***
1556 .\" GNU pic sets this register to 1, to indicate that \x should not be used.
1557 .@R 0x
1558 .ds { \v'-0.4m'\x'\\n(0x=0*-0.2m'\s-3
1559 .ds } \s0\v'0.4m'
1560 .\" for compatibility with traditional -me
1561 .\" (the first will work only in compatibility mode)
1562 .ds [ \*{
1563 .ds ] \*}
1564 .ds < \v'0.4m'\x'\\n(0x=0*0.2m'\s-3
1565 .ds > \s0\v'-0.4m'
1566 .ds - \(em
1567 .\" Avoid warnings from groff -ww.
1568 .@S |0
1569 .@S |1
1570 .@S |2
1571 .@S |3
1572 .@S $H
1573 .@S $0
1574 .@S $1
1575 .@S $2
1576 .@S $3
1577 .@S $4
1578 .@S $5
1579 .@S $6
1580 .@S $7
1581 .@S $8
1582 .@S $9
1583 .@S ..
1584 .@R po\"                        \" simulated page offset
1585 .@R $0\"                        \" section depth
1586 .@R $i\"                        \" paragraph base indent
1587 .@R $p\"                        \" numbered paragraph number
1588 .@R $r\"                        \" ratio of vs to ps (may override $v)
1589 .@R $R\"                        \" same for displays (may override $V)
1590 .@R df\"                        \" display font: same as surrounding text
1591 .@R so\"                        \" additional section title offset
1592 .@R fu\"                        \" footnote undent
1593 .@R bt\"                        \" block keep threshold
1594 .@R *\"                         \" has \** been referenced?
1595 .@R ?a\"                        \" pending floating keep at page top?
1596 .@R ?b\"                        \" pending floating keep at page bottom?
1597 .@R ?C\"                        \" at chapter header?
1598 .@R ?e\"                        \" in equation?
1599 .@R ?H\"                        \" suppress headers and footers next page?
1600 .@R ?I\"                        \" has the header trap been sprung?
1601 .@R ?n\"                        \" n1 mode?
1602 .@R ?o\"                        \" footnote overflow?
1603 .@R ?R\"                        \" renumbered chapter?
1604 .@R ?s\"                        \" skip next page?
1605 .@R ?T\"                        \" inside .TS H?
1606 .@R ?W\"                        \" wide floating keep at page bottom?
1607 .@R ?w\"                        \" wide floating keep at page top?
1608 .nr fi 0.3i
1609 .nr _o \n(.o
1610 .nr $b 3                        \" bold
1611 .nr ps 0.35v
1612 .if \n(ps<\n(.V .nr ps \n(.V
1613 .nr bs \n(ps                    \" block pre/post spacing
1614 .nr qs \n(ps                    \" quote pre/post spacing
1615 .nr zs 1v                       \" float-block pre/postspacing
1616 .nr xs 0.2v                     \" index prespacing
1617 .nr xu 0.5i                     \" index undent
1618 .nr fs 0.2v                     \" footnote prespacing
1619 .nr es 0.5v                     \" equation pre/postspacing
1620 .if \n(es<\n(.V .nr es \n(.V
1621 .wh 0 @h                        \" set header
1622 .nr $l \n(.lu                   \" line length
1623 .nr _L \n(.lu                   \" line length of page
1624 .nr $c 1                        \" current column number
1625 .nr $f 1 1                      \" footnote number
1626 .ds * \*{1\*}\k*\"              \" footnote "name"
1627 .nr $d 1 1                      \" delayed text number
1628 .ds # [1]\k#\"                  \" delayed text "name"
1629 .nr _M 1                        \" chapter mode is chapter
1630 .ds lq \(lq\"                   \" left quote
1631 .ds rq \(rq\"                   \" right quote
1632 .em @z
1633 .\"             *** FOREIGN LETTERS AND SPECIAL CHARACTERS ***
1634 .ds #h ((1u-(\\\\n(.fu%2u))*0.13m)
1635 .ds #v 0.6m
1636 .\"                     \" accents
1637 .ds ' \k_\h'-(\\n(.wu*8/10-\*(#h)'\(aa\h'|\\n_u'
1638 .ds ` \k_\h'-(\\n(.wu*7/10-\*(#h)'\(ga\h'|\\n_u'
1639 .\"                     \" umlaut
1640 .ds : \k_\h'-(\\n(.wu*8/10-\*(#h+0.1m)'\v'-\*(#v'\z.\h'0.2m'.\h'|\\n_u'\v'\*(#v'
1641 .\"                     \" circumflex and tilde
1642 .ds ^ \k_\h'-(\\n(.wu-\*(#h-0.05m)'^\h'|\\n_u'
1643 .ds ~ \k_\h'-(\\n(.wu-\*(#h-0.05m)'~\h'|\\n_u'
1644 .\"                     \" cedilla and czech
1645 .ds , \k_\h'-(\\n(.wu)',\h'|\\n_u'
1646 .ds v \k_\h'-(\\n(.wu*9/10-\*(#h)'\v'-\*(#v'\s-4v\s0\v'\*(#v'\h'|\\n_u'
1647 .\"                     \" Norwegian A or angstrom
1648 .ds o \k_\h'-(\\n(.wu+\w'\(de'u-\*(#h)/2u'\v'-0.4n'\z\(de\v'0.4n'\h'|\\n_u'
1649 .\"                     \" there exists, for all
1650 .ds qe \s-2\v'0.45m'\z\(em\v'-0.625m'\z\(em\v'-0.625m'\(em\v'0.8m'\s0\h'-0.1m'\v'-0.05m'\(br\v'0.05m'\h'0.1m'
1651 .ds qa \z\e\h'0.35m'\z\(sl\h'-0.33m'\v'-0.3m'\s-4\(em\s0\v'0.3m'\h'0.15m'
1652 .rm #h #v
1653 .ll 6.0i
1654 .lt 6.0i
1655 .de @U
1656 .tm The \\$1 macro has been removed from this version of the -me macros.
1657 ..
1658 .de lo
1659 .@U lo
1660 ..
1661 .de th
1662 .@U th
1663 ..
1664 .de ac
1665 .@U ac
1666 ..