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