Sync: tmac/fallbacks.tmac: import, adjust troffrc
[s-roff.git] / tmac / e.tmac
blobc3b0bbc459d5fcb0b26d7bb75a66e42b1962b58a
1 .\"     @(#)e.tmac      2.31 (Berkeley) 5/21/88
2 .\"     Modified by James Clark for use with groff.
3 .\" Adapted to S-roff by Steffen (Daode) Nurpmeso <sdaoden@users.sf.net>.
4 .\"
5 .\" Copyright (c) 1988 Regents of the University of California.
6 .\" All rights reserved.
7 .\"
8 .\" Redistribution and use in source and binary forms are permitted
9 .\" provided that this notice is preserved and that due credit is given
10 .\" to the University of California at Berkeley. The name of the University
11 .\" may not be used to endorse or promote products derived from this
12 .\" software without specific prior written permission. This software
13 .\" is provided ``as is'' without express or implied warranty.
14 .\"     %beginstrip%
15 .\"
16 .\"**********************************************************************
17 .\"*                                                                    *
18 .\"*    ******  - M E   N R O F F / T R O F F   M A C R O S  ******     *
19 .\"*                                                                    *
20 .\"*    Produced for your edification and enjoyment by:                 *
21 .\"*            Eric Allman                                             *
22 .\"*            Electronics Research Laboratory                         *
23 .\"*            U.C. Berkeley.                                          *
24 .\"*    current address:                                                *
25 .\"*            Britton-Lee, Inc.                                       *
26 .\"*            1919 Addison Street Suite 105                           *
27 .\"*            Berkeley, California  94704                             *
28 .\"*                                                                    *
29 .\"*    VERSION 2.31    First Release: 11 Sept 1978                     *
30 .\"*                                                                    *
31 .\"*    Documentation is available.                                     *
32 .\"*                                                                    *
33 .\"**********************************************************************
34 .\"
35 .\"     Code on .de commands:
36 .\"             ***     a user interface macro.
37 .\"             &&&     a user interface macro which is redefined
38 .\"                     when used to be the real thing.
39 .\"             $$$     a macro which may be redefined by the user
40 .\"                     to provide variant functions.
41 .\"             ---     an internal macro.
42 .\"
44 .do nr need_eo_h 0
45 .do nr need_eo_tl 0
46 .do nr need_tl 1
48 .do mso devtag.tmac
50 .if !\n(.g .ig
51 .de @R                  \" --- initialize number register to 0, if undefined
52 .if !r\\$1 .nr \\$1 0
55 .\" --- check whether grohtml needs end of title/heading
56 .de @html_check_need_title
57 .do if (\\n[need_eo_tl] == 1) \
58 \{\
59 .       do nr need_eo_tl 0
60 .       do DEVTAG-EO-TL
61 .\}
62 .do if (\\n[need_tl] == 1) \
63 \{\
64 .       do DEVTAG-TL
65 .       do nr need_tl 0
66 .       do nr need_eo_tl 1
67 .\}
68 .do if \\n[need_eo_h]>0 .do DEVTAG-EO-H
69 .do nr need_eo_h 0
72 .de @check_need_title
75 .ie '\*(.T'html' \
76 .       do als check_need_title @html_check_need_title
77 .el \
78 .       do als check_need_title @check_need_title
80 .@R pf
81 .if \n(pf .nx
83 .if !\n(.g .ig
84 .de @S                  \" --- initialize string/macro to empty, if undefined
85 .if !d\\$1 .ds \\$1 \" empty
88 .@R @\"                 \" debugging level
91 .\"             *** INTERNAL GP MACROS ***
94 .de @C                  \" --- change ev's, taking info with us
95 .nr _S \\n(.s
96 .nr _V \\n(.v
97 .nr _F \\n(.f
98 .nr _J \\n(.j
99 .do ds _A \\n[.fam]
100 .nr _I \\n(.i
101 .ev \\$1
102 .ps \\n(_S
103 .vs \\n(_Vu
104 .ft \\n(_F
105 .ad \\n(_J
106 .do @fam \\*(_A
107 'in \\n(_Iu
108 .xl \\n($lu
109 .lt \\n($lu
110 .rr _S
111 .rr _V
112 .rr _F
113 .rr _I
114 .rr _J
115 .ls 1
116 'ce 0
119 .de @D                  \" --- determine display type (Indent, Left, Center)
120 .ds |p "\\$3
121 .nr _d 0
122 .if "\\$2"C" \
123 .       nr _d 1
124 .if "\\$2"L" \
125 .       nr _d 2
126 .if "\\$2"I" \
127 .       nr _d 3
128 .if "\\$2"M" \
129 .       nr _d 4
130 .if !\\n(_d \
132 .       nr _d \\$1
133 .       ds |p "\\$2
138 .de @z                  \" --- end macro
139 .if \n@>1 .tm >> @z, .z=\\n(.z ?a=\\n(?a
140 .if !"\\n(.z"" \
142 .       tm Line \\n(c. -- Unclosed block, footnote, or other diversion (\\n(.z)
143 .       di
144 .       ex
146 .if \\n(?a \
147 .       bp                      \" force out final table
148 .ds bp
149 .ds @b\"                        \" don't start another page
151 .if \n@>1 .tm << @z
155 .\"             *** STANDARD HEADERS AND FOOTERS ***
158 .ie \n(.g .ds $* \\\\$*
159 .el .ds $* \\\\$1 \\\\$2 \\\\$3 \\\\$4 \\\\$5 \\\\$6 \\\\$7 \\\\$8 \\\\$9
161 .de he                  \" *** define header
162 .ie !\\n(.$ \
164 .       rm |4
165 .       rm |5
167 .el \
169 .       ds |4 "\*($*
170 .       ds |5 "\*($*
174 .de eh                  \" *** define even header
175 .ie !\\n(.$ \
176 .       rm |4
177 .el \
178 .       ds |4 "\*($*
181 .de oh                  \" *** define odd header
182 .ie !\\n(.$ \
183 .       rm |5
184 .el \
185 .       ds |5 "\*($*
188 .de fo                  \" *** define footer
189 .ie !\\n(.$ \
191 .       rm |6
192 .       rm |7
194 .el \
196 .       ds |6 "\*($*
197 .       ds |7 "\*($*
201 .de ef                  \" *** define even foot
202 .ie !\\n(.$ \
203 .       rm |6
204 .el \
205 .       ds |6 "\*($*
208 .de of                  \" *** define odd footer
209 .ie !\\n(.$ \
210 .       rm |7
211 .el \
212 .       ds |7 "\*($*
215 .de ep                  \" *** end page (must always be followed by a .bp)
216 .if \\n(nl>0 \
218 .       wh 0
219 .       rs
220 .       @b
225 .\"             *** INTERNAL HEADER AND FOOTER MACROS ***
228 .de @h                  \" --- header
229 .if \n@>1 .tm >> @h %=\\n% ?a=\\n(?a ?b=\\n(?b ?w=\\n(?w
230 .if (\\n(.i+\\n(.o)>=\\n(.l \
231 .       tm Line \\n(c. -- Offset + indent exceeds line length
232 .\" initialize a pile of junk
233 .nr ?h \\n(?H                   \" transfer "next page" to "this page"
234 .nr ?H 0
235 .nr ?c \\n(?C
236 .nr ?C 0
237 .rn |4 |0
238 .rn |5 |1
239 .rn |6 |2
240 .rn |7 |3
241 .nr _w 0                        \" reset max footnote width
242 .nr ?W 0                        \" no wide floats this page (yet)
243 .nr ?I 1
244 .\" begin actual header stuff
245 .ev 2
247 .if \\n(hm>0 \
248 .       if !'\*(.T'html' \
249 .               sp |\\n(hmu     \" move to header position
250 .@t $h\"                        \" output header title
251 .if \\n(tm<=0 \
252 .       nr tm \n(.Vu
253 .if !'\*(.T'html' \
254 .       sp |\\n(tmu             \" move to top of text
256 .mk _k                          \" for columned output
257 .if \\n(?n .nm 1                \" restore line numbering if n1 mode
258 .nr $c 1                        \" set first column
259 .if \n@>4 .tm -- @h >> .ns nl=\\n(nl %=\\n% _k=\\n(_k tm=\\n(tm
260 .ie \\n(?s \
262 .       nr ?s 0
263 .       rs
264 '       @b
266 .el \
267 .       @n\"                    \" begin the column
268 .if \n@>2 .tm << @h
271 .de @n                  \" --- new column or page
272 .if \n@>3 .tm >> @n nl=\\n(nl %=\\n% ?f=\\n(?f ?o=\\n(?o
273 .if \\n(bm<=0 \
274 .       nr bm \\n(.Vu
275 .if (\\n(_w<=\\n($l)&(\\n(?W=0) \
277 .       nr _b (\\n(ppp*\\n($vu)/200u    \" compute fudge factor (must be < 1P)
278 .       if \\n(_bu>((\\n(bmu-\\n(fmu-((\\n(tpp*\\n($vu)/100u))/2u) \
279 .               nr _b (\\n(ppp*\\n($vu)/100u-\n(.Vu
280 .       nr _b +\\n(bmu
282 .nr _B \\n(_bu
283 .ch @f
284 .wh -\\n(_bu @f
285 .nr _b +(\\n(ppp*\\n($vu)/100u \" add 1 paragraph v in case of sweep past
286 .if \n@>2 .tm @n .p=\\n(.p bm=\\n(bm _b=\\n(_b _B=\\n(_B
287 .nr ?f 0                        \" reset footnote flag
288 .if \\n(?o \
290 .       (f _\"                  \" reprocess footnotes which run off page
291 .       nf
292 .       |o
293 .       fi
294 .       )f
295 .       rm |o
297 .nr ?o 0
298 .if \\n(?T \
300 .       nr _i \\n(.i
301 .       in 0
302 .       |h\"                    \" output the table header
303 .       in \\n(_iu
304 .       rr _i
305 .       mk #T                   \" for tbl commands
306 .       ns
308 .if (\\n(?a)&((\\n($c<2):(\\n(?w=0)) \
310 .       nr ?a 0                 \" output floating keep
311 .       @k |t
312 .       if \\n(?w \
313 .               mk _k           \" don't overstrike wide keeps
314 .       nr ?w 0
317 .$H\"                           \" special column header macro
321 .de @f                  \" --- footer
322 .if \n@>1 .tm >> @f %=\\n% nl=\\n(nl ?a=\\n(?a ?b=\\n(?b ?f=\\n(?f
323 .if \n@>2 .nr VL \\n(.pu-\\n(nlu
324 .if \n@>2 .tm @f bm=\\n(bm _B=\\n(_B _b=\\n(_b .p-nl=\\n(VL
326 .if \\n(?T \
328 .       nr T. 1                 \" for tbl commands (to output bottom line)
329 .       T# 1\"                  \" output the sides and bottom lines
330 .       br
332 .ev 2
333 .ce 0
334 .if \\n(?b \
336 .       nr ?b 0
337 .       @k |b\"                 \" output bottom of page tables
339 .if \\n(?f \
340 .       @o\"                    \" output footnote if present
341 .ie \\n($c<\\n($m \
342 .       @c\"                    \" handle new column
343 .el \
344 .       @e\"                    \" new page
346 .if \n@>2 .tm << @f
349 .de @o                  \" --- output footnote
351 .ls 1
352 .in 0
353 .if \n@>2 .tm @o last printed text = \\n(nl placing @r trap at -\\n(_B
354 .wh -\\n(_Bu @r
357 .if \n@>2 .tm @o triggered @r (?o) = \\n(?o
358 .if \\n(?o \
360 .       di                      \" just in case triggered @r
361 .       if \\n(dn=0 \
363 .               rm |o
364 .               nr ?o 0
365 .       \}
366 .       nr dn \\n(_D
367 .       rr _D
369 .rm |f
370 .ch @r
373 .de @c                  \" --- new column
374 .if \n@>2 .tm   >> @c %=\\n%
376 .sp |\\n(_ku
377 .@O +\\n($lu+\\n($su
378 .nr $c +1
382 .de @e                  \" --- end page
383 .if \n@>2 .tm   >> @e
384 .@O \\n(_ou
386 .sp |\\n(.pu-\\n(fmu-((\\n(tpp*\\n($vu)/100u)   \" move to footer position
387 .@t $f\"                        \" output footer title
388 .nr ?h 0
392 .de @t                  \" --- output header or footer title
393 .if !\\n(?h \
395 .       sz \\n(tp\"             \" set header/footer type fonts, etc.
396 .       @F \\n(tf
397 .       lt \\n(_Lu              \" make title span entire page
398 .       nf
399 .       \\$1
400 .       br
404 .de $h                  \" $$$ print header
405 .ds |z
406 .if !\\n(?c \
408 .       if e .ds |z "\\*(|0
409 .       if o .ds |z "\\*(|1
411 .if !\(ts\\*(|z\(ts\(ts \
412 '       tl \\*(|z
413 .rm |z
416 .de $f                  \" $$$ print footer
417 .ds |z
418 .if \\n(?c \
420 .       if e .ds |z "\\*(|0
421 .       if o .ds |z "\\*(|1
423 .if \(ts\\*(|z\(ts\(ts \
425 .       if e .ds |z "\\*(|2
426 .       if o .ds |z "\\*(|3
428 .if !\(ts\\*(|z\(ts\(ts \
429 '       tl \\*(|z
430 .rm |z
433 .de @r                  \" --- reprocess overflow footnotes
434 .if \n@>3 .tm           >> @r .z=\\n(.z ?f=\\n(?f ?a=\\n(?a ?b=\\n(?b _b=\\n(_b
435 .di |o                          \" save overflow footnote
436 .nr ?o 1
437 .nr _D \\n(dn
442 .\"             *** COMMANDS WITH VARIANT DEFINITIONS ***
445 .if !'\*(.T'html' .rn bp @b     \" --- begin page
447 .de bp                  \" *** begin new page (overrides columns)
448 .nr $c \\n($m                   \" force new page, not new column
449 .ie \\n(nl>0 \
450 .       @b \\$1
451 .el \
453 .       if \\n(.$>0 \
454 .               pn \\$1
455 .       if \\n(?I \
456 .               @h\"            \" 'spring' the header trap
459 .wh 0 @h                        \" reset header
462 .rn ll xl               \" *** special line length (local)
463 .de ll                  \" *** line length (global to environments)
464 .xl \\$1
465 .lt \\$1
466 .nr $l \\n(.l
467 .if (\\n($m<=1):(\\n($l>\\n(_L) \
468 .       nr _L \\n(.l
471 .rn po @O               \" --- local page offset
473 .de po                  \" *** page offset
474 .@O \\$1
475 .nr _o \\n(.o
478 .\" Redefine the fam request to set the family in
479 .\" environment 2 as well as the current environment.
480 .if !\n(.g .ig
481 .do rn fam @fam         \" --- set family in current environment
482 .do de fam              \" *** set font family in ev 2 and current ev
483 .do @fam \\$1
484 .ev 2
485 .do @fam \\$1
490 .\"             *** MISCELLANEOUS ROFF COMMANDS ***
493 .de hx                  \" *** suppress headers and footers next page
494 .nr ?H 1
497 .de ix                  \" *** indent, no break
498 'in \\$1
501 .de bl                  \" *** contiguous blank lines
503 .ne \\$1
505 .sp \\$1
508 .de n1                  \" *** line numbering 1
509 .nm 1
510 .xl -\w'0000'u
511 .nr ?n 1
514 .de n2                  \" *** line numbering 2
515 .nm \\$1
516 .ie \\n(.$ \
517 .       xl -\w'0000'u
518 .el \
519 .       xl \\n($lu
522 .de pa                  \" *** new page
523 .bp \\$1
526 .de ro                  \" *** roman page numbers
527 .af % i
530 .de ar                  \" *** arabic page numbers
531 .af % 1
534 .de m1                  \" *** position one space
535 .nr _0 \\n(hmu
536 .nr hm \\$1v
537 .nr tm +\\n(hmu-\\n(_0u
538 .rr _0
541 .de m2                  \" *** position two space
542 .nr tm \\n(hmu+\\n(tpp+\\$1v
545 .de m3                  \" *** position three space
546 .nr bm \\n(fmu+\\n(tpp+\\$1v
549 .de m4                  \" *** position four space
550 .nr _0 \\n(fmu
551 .nr fm \\$1v
552 .nr bm +\\n(fmu-\\n(_0u
555 .de sk                  \" *** leave a blank page (next page)
556 .if \\n(.$>0 \
557 .       tm Line \\n(c. -- I cannot skip multiple pages
558 .nr ?s 1
562 .\"             *** MISCELLANEOUS USER SUPPORT COMMANDS ***
565 .if !\n(.g .ig
566 .de re                  \" *** reset tabs (TROFF defines 15 stops default)
567 .ta T 0.5i
570 .if \n(.g .ig
571 .de re
572 .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
575 .de ba                  \" *** set base indent
576 .ie \\n(.$ \
577 .       nr $i \\$1n
578 .el \
579 .       nr $i \\n(siu*\\n($0u
582 .de hl                  \" *** draw horizontal line
584 .if '\*(.T'html' \
586 .       HR
587 .       do return
589 .ie \n(.g .do nr _I \\n[.in]
590 .el .nr _I \\n(.i
591 \l'\\n(.lu-\\n(_Iu'
596 .\"             *** PARAGRAPHING ***
599 .de pp                  \" *** paragraph
600 .lp \\n(piu
603 .de lp                  \" *** left aligned paragraph
605 .if \\n(.$ \
606 .       ti +\\$1
607 .nr $p 0 1
610 .de ip                  \" *** indented paragraph w/ optional tag
611 .if (\\n(ii>0)&(\\n(ii<1n) \
612 .       nr ii \\n(iin
613 .nr _0 \\n(ii
614 .if \\n(.$>1 \
615 .       nr _0 \\$2n
616 .@p \\n(_0u
617 .nr _I \\n(.iu
618 .in 0
619 .di |i
620 \&\\$1
623 .in \\n(_Iu
624 .ds |j \\*(|i\\
625 .ie \\w"\\*(|j" \
627 .       ti -\\n(_0u
628 .       ie \\w"\\*(|j">=\\n(_0 \
630 .               do DEVTAG-COL 1
631 \\*(|j
632 .               do DEVTAG-COL-NEXT 2
633 .               br
634 .       \}
635 .       el \
637 .               do DEVTAG-COL 1
638 \\*(|j\h'|\\n(_0u'\c
639 .               do DEVTAG-COL 2
640 .       \}
642 .el .do DEVTAG-COL 2
643 .rr _0
644 .rm |i |j
647 .de np                  \" *** numbered paragraph
648 .\" use string comparison in case user has changed format of $p
649 .if '\\n($p'-1' \
650 .       nr $p 0                 \" reset number after .bu
651 .nr $p +1                       \" increment paragraph number
652 .@p \w'\0(000)\0'u
653 .ti -\w'\0(000)\0'u
654 \0(\\n($p)\h'|\w'\0(000)\0'u'\c
657 .de bu                  \" *** bulleted paragraph
659 .\" use string comparison in case user has changed format of $p
660 .if '\\n($p'-1' \
661 .       ns                      \" don't space between .bu paragraphs
662 .nr $p 0-1                      \" mark "bulleted paragraph" mode
663 .@p \w'\0\(bu\0'u
664 .ti -\w'\0\(bu\0'u
665 \0\(bu\0\c
668 .de @p                  \" --- initialize for paragraph
669 .do check_need_title
670 .if "\\n(.z"|e" .tm Line \\n(c. -- Unmatched continued equation
671 .in \\n($iu+\\n(pou
672 .if \\n(.$ \
673 .       in +\\$1n
674 .ce 0
676 .@F \\n(pf
677 .sz \\n(pp
678 .sp \\n(psu
679 .ne \\n(.Lv+\\n(.Vu
684 .\"             *** SECTION HEADINGS ***
687 .de sh                  \" *** section heading
689 .do check_need_title
690 .if (\\n(si>0)&(\\n(si<1n) \
691 .       nr si \\n(sin
692 .if '\*(.T'html' .nr si 0
693 .ce 0
694 .if '\*(.T'html' \
696 .       do DEVTAG-SH \\$1
697 .       do nr need_eo_h 1
699 .@d "\\$1" +1 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
700 .if !"\\$2"_" \
702 .       ds |n \&\\$2
703 .       $p "\\*(|n" "\\*($n" \\n($0
704 .       $0 "\\*(|n" "\\*($n" \\n($0
705 .       rm |n
707 .nr $p 0 1                      \" reset .np count
710 .de @d                  \" --- change section depth
711 .if !""\\$1" \
712 .       nr $0 \\$1
713 .if \\n($0&(\\n(.$>1) \
714 .       nr $\\n($0 \\$2
715 .ds $n \&\"
716 .ie \\n($0>=1 \
718 .       if '\\n($1'0' \
719 .               nr $1 1
720 .       if (\\n(.$>=3) .if !"\\$3"-" \
721 .               nr $1 \\$3
722 .       as $n \\n($1
724 .el \
725 .       nr $1 0
726 .ie \\n($0>=2 \
728 .       if '\\n($2'0' \
729 .               nr $2 1
730 .       if (\\n(.$>=4) .if !"\\$4"-" \
731 .               nr $2 \\$4
732 .       as $n .\\n($2
734 .el \
735 .       nr $2 0
736 .ie \\n($0>=3 \
738 .       if '\\n($3'0' \
739 .               nr $3 1
740 .       if (\\n(.$>=5) .if !"\\$5"-" \
741 .               nr $3 \\$5
742 .       as $n .\\n($3
744 .el \
745 .       nr $3 0
746 .ie \\n($0>=4 \
748 .       if '\\n($4'0' \
749 .               nr $4 1
750 .       if (\\n(.$>=6) .if !"\\$6"-" \
751 .               nr $4 \\$6
752 .       as $n .\\n($4
754 .el \
755 .       nr $4 0
756 .ie \\n($0>=5 \
758 .       if '\\n($5'0' \
759 .               nr $5 1
760 .       if (\\n(.$>=7) .if !"\\$7"-" \
761 .               nr $5 \\$7
762 .       as $n .\\n($5
764 .el \
765 .       nr $5 0
766 .ie \\n($0>=6 \
768 .       if '\\n($6'0' \
769 .               nr $6 1
770 .       if (\\n(.$>=8) .if !"\\$8"-" \
771 .               nr $6 \\$8
772 .       as $n .\\n($6
774 .el \
775 .       nr $6 0
778 .de sx                  \" *** heading up, no increment (2.1.1 -> 2.1)
779 .ce 0
780 .ul 0
781 .nr _0 \\n($0-1
782 .if \\n(.$ .nr _0 +1
783 .if \\n(.$ .nr _0 \\$1
784 .@d \\n(_0
785 .rr _0
786 .$p "" "" \\n($0
787 .nr $p 0 1                      \" reset .np count
790 .de uh                  \" *** unnumbered section heading
791 .$p "\\$1"
792 .$0 "\\$1"
795 .de $p                  \" $$$ print section heading
796 .if (\\n(si>0)&(\\n(.$>2) \
797 .       nr $i \\$3*\\n(si
798 .in \\n($iu
799 .ie !"\\$1\\$2"" \
801 .       sp \\n(ssu              \" one of them is non-null
802 .       ne \\n(.Lv+\\n(.Vu+\\n(psu+((\\n(spp*\\n($vu*\\n(.Lu)/100u)
803 .       \" exdent if \\$3 > 0
804 .       ie 0\\$3 \
805 .               ti -(\\n(siu-\\n(sou)
806 .       el \
807 .               ti +\\n(sou
808 .       @F \\n(sf
809 .       sz \\n(sp
810 .       if 0\\$3 \
811 .               $\\$3
812 .       if \w"\\$2">0 \\$2.
813 .       if \w"\\$1">0 \\$1\f1\ \ \&
815 .el \
816 .       sp \\n(psu
817 .@F \\n(pf
818 .sz \\n(pp
822 .\"             *** COLUMNNED OUTPUT ***
825 .de 2c                  \" *** double columned output
827 .if \\n($m>1 \
828 .       1c\"                    \" revert to 1c if already 2c
829 .nr $c 1
830 .nr $m 2
831 .if \\n(.$>1 \
832 .       nr $m \\$2
833 .if \\n(.$>0 \
834 .       nr $s \\$1n             \" param 1: column seperation
835 .nr $l (\\n(.l-((\\n($m-1)*\\n($s))/\\n($m
836 .xl \\n($lu
837 .mk _k
841 .de 1c                  \" *** single columned output
843 .nr $c 1
844 .nr $m 1
845 .ll \\n(_Lu                     \" return to normal output
846 .sp |\\n(.hu
847 .@O \\n(_ou
850 .de bc                  \" *** begin column
851 .sp 24i
855 .\"             *** FLOATING TABLES AND NONFLOATING BLOCKS ***
858 .de (z                  \" *** begin floating keep
859 .if \n@>4 .tm >> (z, .z=\n(.z
860 .@D 4 \\$1 \\$2
864 .de )z                  \" *** end floating keep
865 .if \n@>4 .tm >> )z, .z=\n(.z
866 .sp \\n(zsu
868 .if \n@>4 .tm -- )z << @), .z=\n(.z
869 .rr _0
870 .if !\\n(?b \
871 .       nr dn +(\\n(ppp*\\n($vu)/200u+\\n(zsu
872 .nr dl -\n(.H                   \" fudge factor necessary to make it work
873 .ie ((\\n(dn+\n(.V)>=\\n(.t):(\\n(?a):((\\n(dl>\\n($l)&(\\n($c>1)) \
875 .       nr ?a 1
876 .       if (\\n(dl>\\n($l)&(\\n($m>1) \
877 .               nr ?w 1         \" mark wider than one column (top)
878 .       ds |x |t
880 .el \
882 .       nr ?b 1
883 .       if (\\n(dl>\\n($l)&(\\n($m>1) \
884 .               nr ?W 1         \" mark wider than one column (bottom)
885 .       nr _b +\\n(dnu
886 .       \" avoid moving @f back past the current position
887 .       if \\n(.p-\\n(nl-\n(.V<\\n(_b \
888 .               nr _b \\n(.p-\\n(nl-\n(.V
889 .       ch @f -\\n(_bu
890 .       ds |x |b
892 .da \\*(|x                      \" copy to save macro
894 .ls 1
895 .nr ?k 1
896 .if \n@>4 .tm -- )z >> \\*(|x
897 \!.if \\\\n(nl>(\\\\n(tm+2v) .ne \\n(dnu-\\n(zsu
898 .|k\"                           \" and the body
900 .if \n@>4 .tm -- )z << \\*(|x, .z=\\n(.z
901 .nr ?k 0
902 .rm |k\"                        \" remove the temp macro
904 .in 0
905 .ls 1
906 .xl \\n($lu
908 .if \n@>4 .tm << )z, .z=\\n(.z
911 .de @k                  \" --- output floating keep
912 .if \n@>4 .tm >> @k, $1=\\$1, .z=\\n(.z
913 .ev 1
915 .ls 1
916 .in 0
917 .sp \\n(zsu
918 .\\$1
921 .rm \\$1
925 .de (t                  \" XXX temp ref to (z
926 .(z \\$1 \\$2
929 .de )t                  \" XXX temp ref to )t
930 .)z \\$1 \\$2
933 .de (b                  \" *** begin block
935 .@D 3 \\$1 \\$2
936 .sp \\n(bsu
938 .if '\*(.T'html' .sp \\n(bsu
941 .de )b                  \" *** end block
944 .if (\\n(bt=0):(\\n(.t<\\n(bt) \
945 .       ne \\n(dnu              \" make it all on one page
946 .ls 1
951 .in 0
952 .xl \\n($lu
954 .rm |k
955 .sp \\n(bsu+\\n(.Lv-1v
958 .de @(                  \" --- begin keep
959 .if !"\\n(.z"" .tm Line \\n(c. -- Invalid nested keep \\n(.z
961 .di |k
962 \!'rs
965 .de @M                  \" --- set modes for display
966 .nr ?k 1
967 .@C 1
968 .@F \\n(df
969 .if \\n($R .@V
970 .vs \\n(.sp*\\n($Vu/100u
972 .if "\\*(|p"F" \
973 .       fi                      \" set fill mode if "F" parameter
974 .if \\n(_d=4 \
975 .       in 0
976 .if \\n(_d=3 \
978 .       in +\\n(biu
979 .       xl -\\n(biu
981 .if \\n(_d=1 \
982 .       ce 10000
985 .de @)                  \" --- end keep
987 .if !"\\n(.z"|k" .tm Line \\n(c. -- Close of a keep which has never been opened
988 .nr ?k 0
990 .in 0
991 .ce 0
994 .de (c                  \" *** begin block centered text
995 .if "\\n(.z"|c" .tm Line \\n(c. -- Nested .(c requests
996 .di |c
999 .de )c                  \" *** end block centered text
1000 .if !"\\n(.z"|c" .tm Line \\n(c. -- Unmatched .)c
1001 .br                             \" force out final line
1003 .if \n@>4 .tm >> .)c .l=\\n(.l .i=\\n(.i $i=\\n($i dl=\\n(dl
1004 .ev 1
1005 .ls 1
1006 .in (\\n(.lu-\\n(.iu-\\n(dlu)/2u
1007 .if \n@>4 .tm -- .)c << .in .l=\\n(.l .i=\\n(.i dl=\\n(dl
1014 .rm |c
1018 .\"             *** BLOCK QUOTES (OR WHATEVER) AND LISTS ***
1021 .de (q                  \" *** begin block quote
1023 .@C 1
1025 .sp \\n(qsu
1026 .in +\\n(qiu
1027 .xl -\\n(qiu
1028 .sz \\n(qp
1031 .de )q                  \" *** end block quote
1034 .sp \\n(qsu+\\n(.Lv-1v
1035 .nr ?k 0
1038 .de (l                  \" *** begin list
1040 .sp \\n(bsu
1041 .@D 3 \\$1 \\$2
1043 .if '\*(.T'html' .sp \\n(bsu
1046 .de )l                  \" *** end list
1049 .sp \\n(bsu+\\n(.Lv-1v
1050 .nr ?k 0
1054 .\"             *** PREPROCESSOR SUPPORT ***
1058 .\"     EQN
1060 .de EQ                  \" *** equation start
1061 .do if \\n[need_eo_h]>0 .do DEVTAG-EO-H
1062 .do nr need_eo_h 0
1064 .do HTML-IMAGE
1065 .if !\\n(?e \
1067 .       if "\\n(.z"|e" .tm Line \\n(c. -- Nested .EQ request
1068 .       @D 1 "\\$1" "\\$2"
1069 .       @C 2
1070 .       di |e
1072 .ls 1
1073 .in 0
1077 .de EN                  \" *** equation end
1079 .do HTML-IMAGE-END
1080 .ie "\\$1"C" \
1082 .       nr ?e 1
1083 .       sp \\n(esu
1085 .el \
1087 .       nr ?e 0
1088 .       di
1089 .       if \\n(dn \
1090 .               @q\"            \" actual equation output
1091 .       rm |e
1092 .       ev
1096 .de @q                  \" --- equation output
1097 .nr _Q \\n(dnu
1099 .sp \\n(esu                     \" output rest of preceeding text
1100 .if !"\\n(.z"" \!.ne \\n(_Qu
1101 .ne \\n(_Qu+\n(.Vu              \" keep it on one page
1102 .@C 2\"                         \" .ev 2 may be jumbled from header
1103 .if \\n(_d=1 \
1104 .       in (\\n(.lu+\\n($iu-\\n(dlu)/2u
1105 .if \\n(_d=2 \
1106 .       in \\n($iu
1107 .if \\n(_d=3 \
1108 .       in \\n(biu+\\n($iu
1109 .if \\n(_d=4 \
1110 .       in 0
1111 .mk _q
1112 .if \n@>1 .tm --@e: _Q=\\n(_Q _q=\\n(_q nl=\\n(nl |p=\\*(|p
1113 .if !"\\*(|p"" \
1115 .       rs
1116 .       sp (\\n(_Qu-\\n(.vu)/2u
1117 .       tl """\\*(|p"
1118 .       rt \\n(_qu
1121 .sp |\\n(_qu+\\n(_Qu
1122 .sp \\n(esu+\\n(.Lv-1v
1123 .rr _q
1124 .rr _Q
1128 .\"     TBL
1130 .de TS                  \" *** table start
1131 .sp \\n(bsu
1132 .do HTML-IMAGE
1133 .@C 1
1134 .fi                             \" drop into fill mode for text boxes
1135 .if "\\$1"H" \
1137 .       di |h                   \" save header part
1138 .       nr ?T 1
1140 .ls 1
1141 .ch @f -(\\n(_bu+1v)            \" set pseudo-trap for bottom line
1142 .if \\n(.p-\\n(_b-1v<=\\n(nl \
1143 .       ch @f \\n(nlu+\n(.Vu
1146 .de TH                  \" *** end header part of table
1147 .nr T. 0
1148 .T# 0
1150 .nr _T \\n(?T
1151 .nr ?T 0
1152 .ne \\n(dnu+1v
1153 .nr ?T \\n(_T
1154 .nr _i \\n(.i
1155 .in 0
1156 .|h\"                           \" put in the initial header
1157 .in \\n(_iu
1158 .rr _i
1159 .mk #T
1162 .de TE                  \" *** table end
1163 .nr ?T 0
1164 .ch @f -\\n(_bu                 \" reset pseudo-trap
1165 .if \\n(.p-\\n(_b<=\\n(nl \
1166 .       ch @f \\n(nlu+\n(.Vu
1168 .do HTML-IMAGE-END
1169 .sp \\n(bsu+\\n(.Lv-1v
1173 .de T&
1177 .\"     REFER
1179 .de ][                          \" *** refer output
1180 .if \\$1>5 .tm Bad arg to []
1181 .[\\$1
1184 .de [0                          \" --- other
1186 .ip "\\*([F.\0"
1187 .if !"\\*([A"" \\*([A,
1188 .if !"\\*([T"" \\f2\\*([T\\f1\c
1189 .if !"\\*([T"" .if !"\\*([O"" ,\ \"
1190 .ie !"\\*([O"" \\*([O
1191 .el .if !"\\*([T"" \&.
1192 .if !"\\*([D"" \\*([D.
1197 .de [1                          \" --- journal article
1199 .ip "\\*([F.\0"
1200 \\*([A,
1201 .if !"\\*([T"" \\*(lq\\*([T,\\*(rq
1202 .if "\\*([V"" \\f2\\*([J\\f1,
1203 .if !"\\*([V"" \\f2\\*([J\\f1
1204 .if !"\\*([V"" \\f3\\*([V\\f1\c
1205 .if !"\\*([N"" (\\*([N)\c
1206 .if !"\\*([P"" \
1208 .       ie \\n([P>0 \ pp.\&
1209 .       el \ p.\&
1210 \\*([P
1212 .if !"\\*([I"" .if "\\*([R"" \\*([I,
1213 (\\*([D).
1214 .if !"\\*([O"" \\*([O
1218 .de [2                          \" --- book
1220 .ip "\\*([F.\0"
1221 \\*([A, \\f2\\*([T,\\f1
1222 \\*([I\c
1223 .if !"\\*([C"" , \\*([C\c
1224  (\\*([D).
1225 .if !"\\*([G"" Gov't. ordering no. \\*([G
1226 .if !"\\*([O"" \\*([O
1230 .de [3                          \" --- article in book
1232 .ip "\\*([F.\0"
1233 \\*([A, \\*(lq\\*([T,\\*(rq
1234 .if !"\\*([P"" pp. \\*([P
1235 in \\f2\\*([B\\f1, \c
1236 .if !"\\*([E"" ed. \\*([E, \c
1237 .if !"\\*([I"" \\*([I\c
1238 .if !"\\*([C"" , \\*([C\c
1239  (\\*([D).
1240 .if !"\\*([O"" \\*([O
1244 .de [4                          \" --- report
1246 .ip "\\*([F.\0"
1247 \\*([A, \\*(lq\\*([T,\\*(rq
1248 \\*([R\c
1249 .if !"\\*([G"" \& (\\*([G)\c
1250 .if !"\\*([I"" , \\*([I\c
1251 .if !"\\*([C"" , \\*([C\c
1252  (\\*([D).
1253 .if !"\\*([O"" \\*([O
1257 .de [5                          \" --- tm style
1259 .ip "\\*([F.\0"
1260 \\*([A, \\f2\\*([T\\f1,
1261 .ie \\n(TN \\*([M.
1262 .el Bell Laboratories internal memorandum (\\*([D).
1266 .de ]<
1267 .$p References
1269 .rm (f )f
1272 .de ]>
1276 .de ]-
1277 .rm [V [P [A [T [N [C [B [O [R [I [E [D
1280 .ie \n(.V<1v \
1282 .       ds [. \s-2\v'-.4m'\f1
1283 .       ds .] \v'.4m'\s+2\fP
1285 .el \
1287 .       ds [. " [
1288 .       ds .] ]
1292 .\"     IDEAL
1294 .de IS                  \" *** start ideal picture
1295 .nr g7 \\n(.u
1296 .ls 1
1299 .de IF
1300 .if \\n(g7 .fi
1304 .de IE                  \" *** end ideal picture
1305 .if \\n(g7 .fi
1310 .\"     PIC
1312 .de PS          \" *** start picture: $1=height, $2=width in units or inches
1313 .sp 0.3
1314 .do HTML-IMAGE
1315 .nr g7 \\$2
1316 .in (u;\\n(.l-\\n(g7>?0/2)
1317 .ne \\$1u
1318 .nr g7 \\n(.u
1319 .ls 1
1322 .de PE                  \" *** end picture
1325 .if \\n(g7 .fi
1326 .do HTML-IMAGE-END
1327 .sp .6
1331 .\"     GREMLIN
1333 .de GS                  \" *** start gremlin picture
1334 .ie '\*(.T'html' \
1336 .       ie "\\$1"L" .do HTML-IMAGE-LEFT
1337 .       el .ie "\\$1"R" .do HTML-IMAGE-RIGHT
1338 .       el .do HTML-IMAGE
1340 .el \
1342 .       nr g7 (\\n(.lu-\\n(g1u)/2u
1343 .       if "\\$1"L" .nr g7 \\n(.iu
1344 .       if "\\$1"R" .nr g7 \\n(.lu-\\n(g1u
1345 .       in \\n(g7u
1346 .       nr g7 \\n(.u
1347 .       ls 1
1348 .       nf
1349 .       ne \\n(g2u
1353 .de GE                  \" *** end gremlin picture
1354 .ie '\*(.T'html' .do HTML-IMAGE-END
1355 .el \
1357 .       GF
1358 .       sp .6
1362 .de GF                  \" *** finish gremlin picture; stay at top
1365 .if \\n(g7 .fi
1369 .\"             *** FONT AIDS ***
1372 .de sz                  \" *** set point size and vertical spacing
1373 .ps \\$1
1374 .if \\n($r .@v
1375 .vs \\n(.sp*\\n($vu/100u        \" default vs at pointsize + 20%
1378 .de @v                  \" --- possibly set $v from $r
1379 .if (1i>=240u)&(1p<=\\n($r)&(\\n($r<=4p) .nr $v \\n($r00/1p
1382 .de @V                  \" --- possibly set $V from $R
1383 .if (1i>=240u)&(1p<=\\n($R)&(\\n($R<=4p) .nr $V \\n($R00/1p
1386 .de @E                  \" --- store in _F argument to \f for restoring font
1387 .ie \\n(.f<10 \
1388 .       ds _F \\n(.f
1389 .el \
1391 .       ie \\n(.f<100&\n(.g \
1392 .               ds _F (\\n(.f
1393 .       el \
1394 .               ds _F P
1398 .de r                   \" *** enter roman font
1399 .do check_need_title
1401 .ft 1
1402 .if \\n(.$ \&\\$1\f\\*(_F\\$2
1403 .do check_need_title
1406 .de i                   \" *** enter italic
1407 .do check_need_title
1409 .ft 2
1410 .if \\n(.$ \&\\$1\f\\*(_F\\$2
1411 .do check_need_title
1414 .de b                   \" *** enter boldface
1415 .do check_need_title
1417 .ft 3
1418 .if \\n(.$ \&\\$1\f\\*(_F\\$2
1419 .do check_need_title
1422 .de rb                  \" *** enter real boldface
1423 .do check_need_title
1425 .ft 3
1426 .if \\n(.$ \&\\$1\f\\*(_F\\$2
1427 .do check_need_title
1430 .de bi                  \" *** enter bold italic
1431 .do check_need_title
1433 .ft 4
1434 .if \\n(.$ \&\\$1\f\\*(_F\\$2
1435 .do check_need_title
1438 .de u                   \" *** enter underlined word
1439 \&\\$1\l'|0\(ul'\\$2
1442 .\" a better version of u
1443 .if !\n(.g .ig
1444 .de u
1445 \Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m'\\$2
1448 .de q                   \" *** enter quoted word
1449 \&\\*(lq\\$1\\*(rq\\$2
1452 .de bx                  \" *** enter boxed word
1453 .ie '\*(.T'html' \\$1\\$2
1454 .el \k~\(br\|\\$1\|\(br\l'|\\n~u\(rn'\l'|\\n~u\(ul'\^\\$2
1457 .de sm                  \" *** print in smaller font
1458 \s-1\\$1\\s0\\$2
1461 .de @F                  \" --- change font (0 -> no change)
1462 .nr ~ \\$1
1463 .if \\n~>0 \
1464 .       ft \\n~
1465 .rr ~
1469 .\"             *** FOOTNOTING ***
1472 .de (f                  \" *** begin footnote
1474 .if "\\n(.z"|f" .tm Line \\n(c. -- Invalid footnote nesting
1475 .ie "\\n(.z"" \
1477 .       nr _D \\n(dn
1478 .       nr _0 1v+\\n(nlu
1479 .       ev 2
1480 .       da |f
1481 .       in 0
1482 .       xl \\n($lu-\\n(fuu
1483 .       @F \\n(ff
1484 .       sz \\n(fp
1485 .       vs \\n(.sp*\\n($Vu/100u
1486 .       if !\\n(?f \
1488 .               nr _b +1v       \" allow space for $s
1489 .               $s
1490 .       \}
1491 .       br
1492 .       if \\n(.p-\\n(_b-\\n(_0-\\n(.h-1v-\\n(fs<0 \
1494 .               da\"            \" won't fit on page at all
1495 .               bc
1496 .               if !\\n(?f \
1497 .                       rm |f
1498 .               da |f
1499 .\" next five lines could be dropped if headers had their own environment
1500 .               in 0            \" reset everything from .bc
1501 .               xl \\n($lu-\\n(fuu
1502 .               @F \\n(ff
1503 .               sz \\n(fp
1504 .               vs \\n(.sp*\\n($Vu/100u
1505 .               if !\\n(?f \
1506 .                       $s
1507 .               br
1508 .       \}
1509 .       rr _0
1510 .       sp \\n(fsu
1511 .       nr ?f 1
1512 .       fi
1513 .       if !"\\$1"_" \
1514 .               ti \\n(fiu
1515 .       if \n@>2 .tm    << (f $f=\\n($f
1517 .el \
1519 .       ev 2
1520 .       in 0
1521 .       xl \\n($lu-\\n(fuu
1522 .       @F \\n(ff
1523 .       sz \\n(fp
1524 .       vs \\n(.sp*\\n($Vu/100u
1525 .       fi
1526 \!.(f \\$1
1527 \!.@N
1531 .de @N                  \" --- set no fill mode in the top-level diversion
1532 .ie "\\n(.z"" .nf
1533 .el \!.@N
1536 .de )f                  \" *** end footnote
1537 .ie "\\n(.z"|f" \
1539 .       if \\n* \
1540 .               nr $f +1
1541 .       ds * \\*{\\n($f\\*}\k*
1542 .       nr * 0
1543 .       in 0
1544 .       da
1545 .       ev
1546 .       if \\n(_w<\\n(dl \
1547 .               nr _w \\n(dl    \" compute maximum fn width
1548 .       nr _b +\\n(dn
1549 .       ch @f -\\n(_bu
1550 .       if \\n(.p-\\n(_b<=\\n(nl \
1551 .               ch @f \\n(nlu+\n(.Vu
1552 .       nr dn \\n(_D
1553 .       rr _D
1555 .el \
1557 .       br
1558 \!.)f
1559 .       ev
1563 .@R ff
1564 .if \n(ff<=0 \
1565 .       nr ff 1                 \" footnote font: Times Roman
1566 .@R fp
1567 .if \n(fp<=0 \
1568 .       nr fp 8                 \" footnote pointsize
1570 .de $s                  \" $$$ footnote separator
1571 \l'2i'
1575 .\"             *** DELAYED TEXT ***
1578 .de (d                  \" *** begin delayed text
1579 .am |d )d
1580 .sp \\n(bsu
1583 .de )d                  \" *** end delayed text
1584 .if \\n# \
1585 .       nr $d +1
1586 .ds # [\\n($d]\k#
1587 .rr #
1590 .de pd                  \" *** print delayed text
1592 .rm |d
1593 .nr $d 1 1
1594 .ds # [1]\k#
1598 .\"             *** INDEXES (TABLE OF CONTENTS) ***
1601 .nr _x 0 1
1602 .do nr _xn 0
1603 .af _x a
1605 .de (x                  \" *** begin index entry
1606 .if \n@>4 .tm >> (x, .z=\\n(.z
1607 .ds |X x
1608 .if \\n(.$>0 \
1609 .       ds |X \\$1
1610 .ie "\\n(.z"" \
1611 .       nr _z 0
1612 .el \
1613 .       nr _z 1
1614 .@\\n(_z
1617 .de @0                  \" --- finish (x if no current diversion
1618 .am %\\*(|X )x
1619 .sp \\n(xsu
1620 .ti -\\n(piu
1623 .de @1                  \" --- finish (x if current diversion
1624 .if "\\n(_x"z" .nr _x 0
1625 .de =\\n+(_x )x
1628 .de )x                  \" *** end index entry
1629 .if \n@>4 .tm >> )x, .z=\\n(.z
1630 .ie "\\n(.z"" \
1632 .       ds |x \\n%
1633 .       if \\n(.$>0 \
1634 .               ds |x \\$1
1635 .       if "\\*(|x"_" \
1636 .               ig ..
1637 .       am %\\*(|X ..
1638 .       if \w"\\$2">(\\n(.l-\\n(.i-\\n(.k) \
1639 .               ti +\\n(xuu
1640 \\\\a\\\\t\\$2\\*(|x
1642 .       rm |x
1643 .       rm |X
1645 .el \
1647 \!.(x \\*(|X
1648 \!\\\\*(=\\n(_x\\\\
1649 \!.)x \\$1 \\$2
1650 \!.rm =\\n(_x
1654 .de xp                  \" *** print the index
1656 .@C 2
1657 .ls 1
1658 .vs \\n(.sp*\\n($Vu/100u
1660 .in +\\n(piu
1661 .ds |X x
1662 .if \\n(.$>0 \
1663 .       ds |X \\$1
1664 .xl -(\\n(xuu+\w'...'u)
1665 .di |x
1666 .%\\*(|X
1669 .rm %\\*(|X
1670 .xl \\n($lu
1671 .rm |X
1674 .in 0
1675 .ta \\n(.lu-\\n(xuuR \\n(.luR
1679 .rm |x
1683 .\"             *** HTML VERSIONS OF .x(, .x), AND .xp ***
1686 .de (x-html    \" --- create TAG and divert text
1687 .nr _x +1
1688 .do nr _xn +1
1689 .do TAG "_x\\n[_x]
1691 .do di |x\\n[_xn]
1695 .de )x-html    \" --- end diversion
1700 .de xp-html    \" --- create list of links
1701 .do nr _xx 1
1703 .do ev xp-html-ev
1705 .do ULS
1706 .do while \\n[_xx]<=\\n[_xn] \
1708 .       br
1709 .       do unformat |x\\n[_xx]
1710 .       do di xp-html-div
1711 .       br
1712 .       ll 100i
1713 .       fi
1714 .       do |x\\n[_xx]
1715 .       br
1716 .       di
1717 .       do asciify xp-html-div
1718 .       do rm xp-html-as
1719 .       do as xp-html-as #
1720 .       do as xp-html-as _x\\n[_xx]
1721 .       ll
1722 .       LI
1723 .       do URL \\*[xp-html-as] "\\*[xp-html-div]
1724 .       do rm xp-html-as
1725 .       do nr _xx +1
1727 .do ULE
1732 .if '\*(.T'html' \
1734 .       rm (x
1735 .       do als (x (x-html
1736 .       rm )x
1737 .       do als )x )x-html
1738 .       rm xp
1739 .       do als xp xp-html
1743 .\"             *** CHAPTERS AND TITLES ***
1746 .de +c                          \" *** begin chapter
1747 .ep\"                           \" force out footnotes
1748 .if \\n(?o:\\n(?a \
1750 .       bp                      \" force out a table or more footnote
1751 .       rs
1752 .       ep
1754 .nr ?C 1
1755 .nr $f 1 1
1756 .ds * \\*{1\\*}\k*
1757 .if \\n(?R \
1758 .       pn 1
1760 .in \\n($iu                     \" reset the indent
1762 .ie \\n(.$ \
1763 .       $c "\\$1"
1764 .el \
1765 .       sp 3
1768 .de ++                  \" *** declare chapter type
1769 .nr _0 0
1770 .if "\\$1"C" \
1771 .       nr _0 1                 \" chapter
1772 .if "\\$1"RC" \
1773 .       nr _0 11                \" renumbered chapter
1774 .if "\\$1"A" \
1775 .       nr _0 2                 \" appendix
1776 .if "\\$1"RA" \
1777 .       nr _0 12                \" renumbered appendix
1778 .if "\\$1"P" \
1779 .       nr _0 3                 \" preliminary material
1780 .if "\\$1"B" \
1781 .       nr _0 4                 \" bibliographic material
1782 .if "\\$1"AB" \
1783 .       nr _0 5                 \" abstract
1784 .if \\n(_0=0 \
1785 .       tm Line \\n(c. -- Bad mode to .++
1786 .nr ?R 0
1787 .if \\n(_0>10 \
1789 .       nr ?R 1
1790 .       nr _0 -10
1792 .nr ch 0 1
1793 .if (\\n(_0=3):(\\n(_0=5) \
1794 .       pn 1                    \" must do before .ep
1795 .if !\\n(_0=\\n(_M .if \\n(_M=3 \
1796 .       pn 1                    \" must do before .ep
1797 .ep\"                           \" end page for correct page number types
1798 .if \\n(_0=1 \
1800 .       af ch 1
1801 .       af % 1
1803 .if \\n(_0=2 \
1805 .       af ch A
1806 .       af % 1
1808 .if \\n(_0=3 \
1809 .       af % i
1810 .if \\n(_0=4 \
1811 .       af % 1
1812 .if \\n(_0=5 \
1813 .       af % 1
1814 .if \\n(.$>1 \
1815 .       he \\$2
1816 .nr _M \\n(_0
1817 .rr _0
1820 .de $c                  \" $$$ print chapter title
1821 .sz 12
1822 .ft 3
1823 .ce 1000
1824 .if \\n(_M<3 \
1825 .       nr ch +1
1826 .ie \\n(_M=1 CHAPTER\ \ \\n(ch
1827 .el .if \\n(_M=2 APPENDIX\ \ \\n(ch
1828 .if \w"\\$1" .sp 3-\\n(.L
1829 .if \w"\\$1" \\$1
1830 .if (\\n(_M<3):(\w"\\$1") \
1831 .       sp 4-\\n(.L
1832 .ce 0
1835 .ie \\n(_M=1 \
1836 .       $C Chapter \\n(ch "\\$1"
1837 .el .if \\n(_M=2 \
1838 .       $C Appendix \\n(ch "\\$1"
1841 .de tp                  \" *** title page
1846 .pn \\n%
1849 .\"             *** DATES ***
1850 .if \n(mo=1 .ds mo January
1851 .if \n(mo=2 .ds mo February
1852 .if \n(mo=3 .ds mo March
1853 .if \n(mo=4 .ds mo April
1854 .if \n(mo=5 .ds mo May
1855 .if \n(mo=6 .ds mo June
1856 .if \n(mo=7 .ds mo July
1857 .if \n(mo=8 .ds mo August
1858 .if \n(mo=9 .ds mo September
1859 .if \n(mo=10 .ds mo October
1860 .if \n(mo=11 .ds mo November
1861 .if \n(mo=12 .ds mo December
1862 .if \n(dw=1 .ds dw Sunday
1863 .if \n(dw=2 .ds dw Monday
1864 .if \n(dw=3 .ds dw Tuesday
1865 .if \n(dw=4 .ds dw Wednesday
1866 .if \n(dw=5 .ds dw Thursday
1867 .if \n(dw=6 .ds dw Friday
1868 .if \n(dw=7 .ds dw Saturday
1869 .nr y2 \n(yr%100
1870 .af y2 00
1871 .nr y4 \n(yr+1900
1872 .ds td \*(mo \n(dy, \n(y4
1875 .\"             *** PARAMETRIC INITIALIZATIONS ***
1878 .rr x
1879 .nr $v \n(.v00+\n(.sp-1/\n(.sp  \" vs as percentage of ps for .sz request
1880 .nr $V \n($v                    \" same for displays & footnotes
1881 .nr hm 4v                       \" header margin
1882 .nr tm 7v                       \" top margin
1883 .nr bm 6v                       \" bottom margin
1884 .nr fm 3v                       \" footer margin
1885 .nr tf 3                        \" title font: (real) Times Bold
1886 .nr tp 10                       \" title point size
1887 .hy 14
1888 .nr bi 4m                       \" indent for blocks
1889 .nr pi 5n                       \" indent for paragraphs
1890 .nr pf 1                        \" normal text font
1891 .nr pp 10                       \" normal text point size
1892 .nr qi 4n                       \" indent for quotes
1893 .nr qp -1                       \" down one point
1894 .nr ii 5n                       \" indent for .ip's and .np's
1895 .nr $m 1                        \" max number of columns
1896 .nr $s 4n                       \" column separation
1897 .nr sf 3                        \" section font -- Times Bold
1898 .nr sp 10                       \" section title pointsize
1899 .nr ss 12p                      \" section prespacing
1900 .nr si 0                        \" section indent
1903 .\"             *** OTHER INITIALIZATION ***
1906 .\" GNU pic sets this register to 1, to indicate that \x should not be used.
1907 .@R 0x
1908 .ds { \v'-0.4m'\x'\\n(0x=0*-0.2m'\s-3
1909 .ds } \s0\v'0.4m'
1910 .\" for compatibility with traditional -me
1911 .\" (the first will work only in compatibility mode)
1912 .ds [ \*{
1913 .ds ] \*}
1914 .ds < \v'0.4m'\x'\\n(0x=0*0.2m'\s-3
1915 .ds > \s0\v'-0.4m'
1916 .ds - \(em
1917 .\" Avoid warnings from groff -ww.
1918 .@S |0
1919 .@S |1
1920 .@S |2
1921 .@S |3
1922 .@S $H
1923 .@S $0
1924 .@S $1
1925 .@S $2
1926 .@S $3
1927 .@S $4
1928 .@S $5
1929 .@S $6
1930 .@S $7
1931 .@S $8
1932 .@S $9
1933 .@S ..
1935 .@R po\"                        \" simulated page offset
1936 .@R $0\"                        \" section depth
1937 .@R $i\"                        \" paragraph base indent
1938 .@R $p\"                        \" numbered paragraph number
1939 .@R $r\"                        \" ratio of vs to ps (may override $v)
1940 .@R $R\"                        \" same for displays (may override $V)
1941 .@R df\"                        \" display font: same as surrounding text
1942 .@R so\"                        \" additional section title offset
1943 .@R fu\"                        \" footnote undent
1944 .@R bt\"                        \" block keep threshold
1945 .@R *\"                         \" has \** been referenced?
1946 .@R ?a\"                        \" pending floating keep at page top?
1947 .@R ?b\"                        \" pending floating keep at page bottom?
1948 .@R ?C\"                        \" at chapter header?
1949 .@R ?e\"                        \" in equation?
1950 .@R ?H\"                        \" suppress headers and footers next page?
1951 .@R ?I\"                        \" has the header trap been sprung?
1952 .@R ?n\"                        \" n1 mode?
1953 .@R ?o\"                        \" footnote overflow?
1954 .@R ?R\"                        \" renumbered chapter?
1955 .@R ?s\"                        \" skip next page?
1956 .@R ?T\"                        \" inside .TS H?
1957 .@R ?W\"                        \" wide floating keep at page bottom?
1958 .@R ?w\"                        \" wide floating keep at page top?
1960 .nr fi 0.3i
1961 .nr _o \n(.o
1962 .nr $b 3                        \" bold
1963 .nr ps 0.35v
1964 .if \n(ps<\n(.V .nr ps \n(.V
1965 .nr bs \n(ps                    \" block pre/post spacing
1966 .nr qs \n(ps                    \" quote pre/post spacing
1967 .nr zs 1v                       \" float-block pre/postspacing
1968 .nr xs 0.2v                     \" index prespacing
1969 .nr xu 0.5i                     \" index undent
1970 .nr fs 0.2v                     \" footnote prespacing
1971 .nr es 0.5v                     \" equation pre/postspacing
1972 .if \n(es<\n(.V .nr es \n(.V
1973 .wh 0 @h                        \" set header
1974 .nr $l \n(.lu                   \" line length
1975 .nr _L \n(.lu                   \" line length of page
1976 .nr $c 1                        \" current column number
1977 .nr $f 1 1                      \" footnote number
1978 .ds * \*{1\*}\k*\"              \" footnote "name"
1979 .nr $d 1 1                      \" delayed text number
1980 .ds # [1]\k#\"                  \" delayed text "name"
1981 .nr _M 1                        \" chapter mode is chapter
1982 .ds lq \(lq\"                   \" left quote
1983 .ds rq \(rq\"                   \" right quote
1984 .em @z
1987 .\"             *** FOREIGN LETTERS AND SPECIAL CHARACTERS ***
1990 .ds #h ((1u-(\\\\n(.fu%2u))*0.13m)
1991 .ds #v 0.6m
1993 .\"                     \" accents
1994 .ds ' \k_\h'-(\\n(.wu*8/10-\*(#h)'\(aa\h'|\\n_u'
1995 .ds ` \k_\h'-(\\n(.wu*7/10-\*(#h)'\(ga\h'|\\n_u'
1997 .\"                     \" umlaut
1998 .ds : \k_\h'-(\\n(.wu*8/10-\*(#h+0.1m)'\v'-\*(#v'\z.\h'0.2m'.\h'|\\n_u'\v'\*(#v'
2000 .\"                     \" circumflex and tilde
2001 .ds ^ \k_\h'-(\\n(.wu-\*(#h-0.05m)'^\h'|\\n_u'
2002 .ds ~ \k_\h'-(\\n(.wu-\*(#h-0.05m)'~\h'|\\n_u'
2004 .\"                     \" cedilla and czech
2005 .ds , \k_\h'-(\\n(.wu)',\h'|\\n_u'
2006 .ds v \k_\h'-(\\n(.wu*9/10-\*(#h)'\v'-\*(#v'\s-4v\s0\v'\*(#v'\h'|\\n_u'
2008 .\"                     \" Norwegian A or angstrom
2009 .ds o \k_\h'-(\\n(.wu+\w'\(de'u-\*(#h)/2u'\v'-0.4n'\z\(de\v'0.4n'\h'|\\n_u'
2011 .\"                     \" there exists, for all
2012 .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'
2013 .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'
2014 .rm #h #v
2015 .ll 6.0i
2016 .lt 6.0i
2018 .de @U
2019 .tm The \\$1 macro has been removed from this version of the -me macros.
2022 .de lo
2023 .@U lo
2026 .de th
2027 .@U th
2030 .de ac
2031 .@U ac
2034 .\" s-ts-mode