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