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