3 Copyright
(C
) 1989, 1990, 1991, 1992 Free Software Foundation
, Inc.
4 Written by James Clark
(jjc@jclark.com
)
6 This file is part of groff.
8 groff is free software; you can redistribute it
and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version
2, or (at your option
) any later
13 groff is distributed in the hope that it will
be useful
, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY
or
15 FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License
18 You should have received
a copy of the GNU General Public License along
19 with groff; see the file COPYING. If
not, write to the Free Software
20 Foundation
, 59 Temple Place
- Suite
330, Boston
, MA
02111-1307, USA.
22 .if !\n(.g .ab These ms macros require groff.
24 . ab The groff ms macros do not work in compatibility mode.
25 .\" Enable warnings. You can delete this if you want.
27 .\" See if already loaded.
31 .tm \\n(.F:\\n(.c: macro error: \\$*
34 .tm \\n(.F:\\n(.c: macro warning: \\$*
37 .ab \\n(.F:\\n(.c: fatal macro error: \\$*
40 .@error sorry, \\$0 not implemented
43 .als TM @not-implemented
44 .als CT @not-implemented
49 .\" a non-empty environment
57 .ds REFERENCES References
59 .ds TOC Table of Contents
72 .ds MO \\*[MONTH\n[mo]]
73 .ds DY \n[dy] \*[MO] \n[year]
75 .if \\n[.$] .ds DY "\\$*
78 .if \\n[.$] .ds DY "\\$*
83 .tm \\$1\t\\$2\t\\$3\t\\$4 ... \\n[PN]
85 .\" print an error message and then try to recover
87 .@error \\$@ (recovering)
90 . \"@warning automatically terminating diversion \\n(.z
91 . ie d @div-end!\\n(.z .@div-end!\\n(.z
92 . el .*div-end-default
94 . \" ensure that we don't loop forever
95 . if \\n[*pop-count]>20 .@fatal recovery failed
97 .while !'\\n[.ev]'0' .ev
109 .\" ****************************
110 .\" ******** module cov ********
111 .\" ****************************
112 .\" Cover sheet and first page.
113 .de cov*err-not-after-first-page
114 .@error \\$0 is not allowed after the first page has started
116 .de cov*err-not-before-tl
117 .@error \\$0 is not allowed before TL
119 .de cov*err-not-again
120 .@error \\$0 is not allowed more than once
122 .de cov*err-not-after-ab
123 .@error \\$0 is not allowed after first AB, LP, PP, IP, SH or NH
125 .als AU cov*err-not-before-tl
126 .als AI cov*err-not-before-tl
127 .als AB cov*err-not-before-tl
128 .de cov*first-page-init
129 .rm cov*first-page-init
131 .als RP cov*err-not-after-first-page
133 .ie \\n[cov*rp-format] \{\
145 .wh 0 cov*first-page-init
146 .\" This handles the case where FS occurs before TL or LP.
153 .\" released paper format
156 .if \\n[.$] .if '\\$1'no' .nr cov*rp-no 1
161 .als TL cov*err-not-again
180 .di cov*au-div!\\n[cov*n-au]
191 .ie !\\n[cov*n-au] .@error AI before AU
193 . di cov*ai-div!\\n[cov*n-au]
220 .als cov*ab-init @nop
238 .als AB cov*err-not-after-ab
263 .ie '\\n(.z'cov*ab-div' \{\
264 . als AE cov*err-not-again
267 .\" nr cov*ab-height \\n[dn]
272 .el .@error AE without AB
274 .de @div-end!cov*ab-div
280 . ie \\n[cov*rp-format] .cov*rp-print
281 . el .cov*draft-print
284 . if \\n[cov*rp-format] \{\
285 . @warning RP format but no TL
294 .nr cov*page-length \\n[.p]
306 .if \\n[cov*fn-height] \{\
307 . sp |(u;\\n[cov*page-length]-\\n[FM]\
308 -\\n[cov*fn-height]-\\n[fn@sep-dist]>?\\n[nl])
313 . ie \\n[cov*rp-no] .rm cov*fn-div
315 . rn cov*fn-div fn@overflow-div
316 . nr fn@have-overflow 1
321 .\" If anything was printed below where the footer line is normally printed,
322 .\" then that's an overflow.
323 .if -\\n[FM]/2+1v+\\n[cov*page-length]<\\n[nl] .@error cover sheet overflow
324 .pl \\n[cov*page-length]u
326 .if !\\n[cov*rp-no] .cov*tl-au-print
348 .while \\n[cov*i]<=\\n[cov*n-au] \{\
350 . cov*au-div!\\n[cov*i]
351 . ie d cov*ai-div!\\n[cov*i] \{\
353 . cov*ai-div!\\n[cov*i]
363 .\" start of footnote on cover
365 .if \\n[cov*in-fn] \{\
373 .if !\\n[cov*fn-height] .ns
374 .ie \\n[.$] .FP "\\$1" no
377 .de @div-end!cov*fn-div
380 .\" end of footnote on cover
382 .ie '\\n(.z'cov*fn-div' \{\
387 . nr cov*fn-height +\\n[dn]
389 .el .@error FE without matching FS
391 .\" ***************************
392 .\" ******** module pg ********
393 .\" ***************************
394 .\" Page-level formatting.
395 .\" > 0 if we have a footnote on the current page
407 .ds pg*OH '\\*[LH]'\\*[CH]'\\*[RH]'
408 .ds pg*EH '\\*[LH]'\\*[CH]'\\*[RH]'
409 .ds pg*OF '\\*[LF]'\\*[CF]'\\*[RF]'
410 .ds pg*EF '\\*[LF]'\\*[CF]'\\*[RF]'
418 .ie \\n%=1 .if \\n[pg*P1] .tl \\*[pg*OH]
420 . ie o .tl \\*[pg*OH]
432 .wh -\n[FM]u pg@bottom
433 .wh -\n[FM]u/2u pg*footer
437 .if !'\\n(.z'' .error-recover MC while diversion open
439 .ie \\n[pg@ncols]>1 .pg@super-eject
441 . \" flush out any floating keeps
442 . while \\n[kp@tail]>\\n[kp@head] \{\
448 . nr pg@colw \\n[LL]*7/15
449 . nr pg*gutw \\n[LL]-(2*\\n[pg@colw])
453 . nr pg@colw (n;\\$1)<?\\n[LL]
454 . ie \\n[.$]<2 .nr pg*gutw \\n[MINGW]
455 . el .nr pg*gutw (n;\\$2)
456 . nr pg@ncols \\n[LL]-\\n[pg@colw]/(\\n[pg@colw]+\\n[pg*gutw])+1
457 . ie \\n[pg@ncols]>1 \
458 . nr pg*gutw \\n[LL]-(\\n[pg@ncols]*\\n[pg@colw])/(\\n[pg@ncols]-1)
464 .nr pg@fn-colw \\n[pg@colw]*5/6
473 .\" top of page macro
475 .ch pg*footer -\\n[FM]u/2u
478 .nr pg@fn-bottom-margin 0
479 .nr pg*saved-po \\n[PO]
493 .\" Handle footnote overflow before floating keeps, because the keep
494 .\" might contain an embedded footnote.
502 .\" move pg@bottom and pg*footer out of the way
503 .ch pg@bottom \\n[.p]u*2u
504 .ch pg*footer \\n[.p]u*2u
509 .if \\n[pg@fn-flag] .fn@bottom-hook
511 .ie \\n[pg*col-num]<\\n[pg@ncols] .pg*end-col
515 'sp |\\n[pg*col-top]u
516 .po (u;\\n[pg*saved-po]+(\\n[pg@colw]+\\n[pg*gutw]*\\n[pg*col-num]))
517 .\"po +(u;\\n[pg@colw]+\\n[pg*gutw])
521 .po \\n[pg*saved-po]u
522 .\" Make sure we don't exit if there are still floats
or footnotes left-over.
523 .ie \\n[kp@head]<\\n[kp@tail]:\\n[fn@have-overflow] \{\
524 . \" Switching environments ensures that we don't get an unnecessary
525 . \" blank line at the top of the page.
531 . \" If the text has ended and there are no more footnotes or keeps, exit.
532 . if \\n[pg@text-ended] .ex
533 . if r pg*next-number \{\
534 . pn \\n[pg*next-number]
536 . if d pg*next-format \{\
537 . af PN \\*[pg*next-format]
544 .\" pg@begin number format
547 . nr pg*next-number (;\\$1)
548 . ie \\n[.$]>1 .ds pg*next-format \\$2
549 . el .rm pg*next-format
551 .el .rr pg*next-number
554 .\" print the footer line
561 .\" flush out any keeps or footnotes
564 .if !'\\n
(.z'' .@error-recover diversion open while ejecting page
565 .\" Make sure we stay in the end macro while there is still footnote overflow
566 .\" left, or floating keeps.
567 .while \\n[kp@tail]>\\n[kp@head]:\\n[pg@fn-flag] \{\
580 .\" ***************************
581 .\" ******** module fn ********
582 .\" ***************************
586 .\" Round it vertically
588 .nr fn@sep-dist \n[.v]
592 .ds * \\*[par@sup-start]\En+[fn*text-num]\\*[par@sup-end]
596 .ie \\n[.$] .fn*do-FS "\\$1" no
598 . ie \\n[fn*text-num]>\\n[fn*note-num] .fn*do-FS \\n+[fn*note-num]
602 .\" Second argument of `no' means don't embellish the first argument.
604 .if \\n[fn*open] .@error-recover nested FS
607 . \" Ensure that the first line of the footnote is on the same page
608 . \" as the reference. I think this is minimal.
612 . ie \\n[pg@fn-flag] .nr fn*need +\\n[fn:PD]
613 . el .nr fn*need +\\n[fn@sep-dist]
614 . ne \\n[fn*need]u+\\n[.V]u>?0
624 .ie !\\n[fn*open] .@error FE without FS
632 .nr fn@have-overflow 0
633 .\" called at the top of each column
636 .nr fn*page-bottom-pos 0-\\n[FM]-\\n[pg@fn-bottom-margin]
637 .ch pg@bottom \\n[fn*page-bottom-pos]u
638 .if \\n[fn@have-overflow] \{\
639 . nr fn@have-overflow 0
647 .\" This is called at the bottom of the column if pg@fn-flag is set.
650 .nr fn@have-overflow 0
651 .nr fn@bottom-pos \\n[.p]-\\n[FM]-\\n[pg@fn-bottom-margin]+\\n[.v]
653 .nr fn@bottom-pos -\\n[.v]
655 .ie \\n[nl]+\\n[fn@sep-dist]+\n[.V]>\\n[fn@bottom-pos] \{\
656 . rn fn@div fn@overflow-div
657 . nr fn@have-overflow 1
660 . if \\n[pg@ncols]>1 \
661 . if \\n[fn*max-width]>\\n[pg@fn-colw] \
662 . nr pg@fn-bottom-margin \\n[.p]-\\n[FM]-\\n[nl]+1v
663 . wh \\n[fn@bottom-pos]u fn*catch-overflow
669 . if '\\n(.z'fn@overflow-div' \{\
671 . nr fn@have-overflow \\n[dn]>0
673 . ch fn*catch-overflow
676 .de fn*catch-overflow
682 .if '\\n[.ev]'fn' .ev
686 .als @div-end!fn*embed-div @div-end!fn@div
690 . if !\\n[pg@fn-flag] .ns
695 .ie '\\n(.z'fn@div' \{\
697 . nr fn*page-bottom-pos -\\n[dn]
698 . nr fn*max-width \\n[fn*max-width]>?\\n[dl]
699 . if !\\n[pg@fn-flag] .nr fn*page-bottom-pos -\\n[fn@sep-dist]
701 . nr fn*page-bottom-pos \\n[nl]-\\n[.p]+\n[.V]>?\\n[fn*page-bottom-pos]
702 . ch pg@bottom \\n[fn*page-bottom-pos]u
705 . ie '\\n(.z'fn*embed-div' \{\
707 . rn fn*embed-div fn*embed-div!\\n[fn*embed-count]
708 \!. fn*embed-start \\n[fn*embed-count]
710 ' sp (u;\\n[dn]+\\n[fn@sep-dist]+\\n[.V])
712 . nr fn*embed-count +1
716 . @error-recover unclosed diversion within footnote
725 . rm fn*embed-div!\\$1
731 \!. fn*embed-start \\$1
736 .ie '\\n(.z'fn*null' \{\
742 .\" It's important that fn@print-sep use up exactly fn@sep-dist vertical space.
746 .vs \\n[fn@sep-dist]u
751 .\" ***************************
752 .\" ******** module kp ********
753 .\" ***************************
760 .if !'\\n(.z'' .@error-recover KF while open diversion
767 .ie '\\n(.z'kp*div' .kp*end
769 . ie '\\n(.z'kp*fdiv' .kp*fend
770 . el .@error KE without KS or KF
780 .ie '\\n(.z'' .ds@need \\$1
783 .\" end non-floating keep
796 .\" end floating keep
801 .ie \\n[.t]-(\\n[.k]>0*1v)>\\n[dn] \{\
809 . rn kp*fdiv kp*div!\\n[kp@tail]
810 . nr kp*ht!\\n[kp@tail] 0\\n[dn]
814 .\" top of page processing for KF
817 .if !\\n[kp*doing-top] \{\
824 .\" If the first keep won't fit, only force it out if we haven't had a footnote
825 .\" and we're at the top of the page.
826 .nr kp*force \\n[pg@fn-flag]=0&(\\n[nl]<=\\n[pg@header-bottom])
828 .while \\n[kp@tail]>\\n[kp@head]&\\n[kp*fits] \{\
829 . ie \\n[.t]>\\n[kp*ht!\\n[kp@head]]:\\n[kp*force] \{\
831 . \" It's important to advance kp@head before bringing
832 . \" back the keep, so that if the last line of the
833 . \" last keep springs the bottom of page trap, a new
834 . \" page will not be started unnecessarily.
835 . rn kp*div!\\n[kp@head] kp*temp
845 .\" ***************************
846 .\" ******** module ds ********
847 .\" ***************************
848 .\" Displays and non-floating keeps.
850 .ds*end!\\n[\\n[.ev]:ds-type]
851 .nr \\n[.ev]:ds-type 0
854 .if \\n[\\n[.ev]:ds-type] \{\
855 . @error automatically terminating display
860 .ie \\n[\\n[.ev]:ds-type] .DE
864 .@error DE without DS, ID, CD, LD or BD
868 .nr \\n[.ev]:ds-type 1
875 .ie \\n[.$] .in +(n;\\$1)
890 .als ds*end!1 ds*common-end
893 .nr \\n[.ev]:ds-type 2
898 .ie '\\n(.z'ds*div' \{\
901 . in (u;\\n[.l]-\\n[dl]/2)
906 .el .@error-recover mismatched DE
913 . nr \\n[.ev]:ds-type 4
922 . ie '\\$1'I' .ID \\$2
927 . nr \\n[.ev]:ds-type 3
932 . while \\n[.t]<=(\\$1)&(\\n[nl]>\\n[pg@header-bottom]) \{\
940 .ie '\\n
(.z'ds*div' \{\
949 .el .@error-recover mismatched DE
952 .ie '\\n(.z'ds*div' \{\
956 . in (u;\\n[.l]-\\n[dl]/2)
962 .el .@error-recover mismatched DE
964 .\" ****************************
965 .\" ******** module par ********
966 .\" ****************************
967 .\" Paragraph-level formatting.
968 .\" Load time initialization.
970 .\" PS and VS might have been set on the command-line
974 .\" don't set LT so that it can be defaulted from LL
978 .\" don't set VS so that it can be defaulted from PS
979 .ie rVS .par*vs \\n[VS]
980 .el .par*vs \\n[PS]+2
981 .if dFAM .fam \\*[FAM]
987 .\" If it's too big to be in points, treat it as units.
988 .ie (p;\\$1)>=40p .vs (u;\\$1)
992 .nr 0:li (u;\\n[LL]/12)
999 .aln \\n[.ev]:MCLL LL
1001 .aln \\n[.ev]:MCLT LT
1007 .\" happens when the first page begins
1009 .if !rLT .nr LT \\n[LL]
1010 .if !rFL .nr FL \\n[LL]*5/6
1011 .if !rVS .nr VS \\n[PS]+2
1013 .if !rFPS .nr FPS \\n[PS]-2
1014 .if !rFVS .nr FVS \\n[FPS]+2
1015 .\" don't change environment 0
1021 .if !rPD .nr PD .3v>?\n(.V
1022 .if !rDD .nr DD .5v>?\n(.V
1024 .if !rFPD .nr FPD \\n[PD]/2
1026 .if !dFAM .ds FAM \\n[.fam]
1048 .aln fn:MCLL pg@fn-colw
1049 .aln fn:MCLT pg@fn-colw
1055 .nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
1058 .nr \\n[.ev]:ds-type 0
1067 .ie \\n[pg@ncols]>1 \{\
1068 . ll (u;\\n[\\n[.ev]:MCLL]-\\n[\\n[.ev]:ri]-\\n[\\n[.ev]:pri])
1069 . lt \\n[\\n[.ev]:MCLT]u
1072 . ll (u;\\n[\\n[.ev]:LL]-\\n[\\n[.ev]:ri]-\\n[\\n[.ev]:pri])
1073 . lt \\n[\\n[.ev]:LT]u
1075 .in (u;\\n[\\n[.ev]:li]+\\n[\\n[.ev]:pli])
1078 .ps \\n[\\n[.ev]:PS]
1079 .par*vs \\n[\\n[.ev]:VS]
1089 .\" This can be redefined by the user.
1095 .nr \\n[.ev]:pli \\$1
1096 .nr \\n[.ev]:pri \\$2
1098 .sp \\n[\\n[.ev]:PD]u
1109 .nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
1113 .nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
1114 .ti +\\n[\\n[.ev]:ai]u
1117 .nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
1118 .par*start \\n[QI] \\n[QI]
1121 .par*start \\n[\\n[.ev]:PI] 0
1122 .ti -\\n[\\n[.ev]:PI]u
1125 .if \\n[.$]>1 .nr \\n[.ev]:ai (n;\\$2)
1126 .par*start \\n[\\n[.ev]:ai] 0
1128 . \" Divert the label so as to freeze any spaces.
1135 . ti -\\n[\\n[.ev]:ai]u
1136 . ie \\n[dl]+1n<=\\n[\\n[.ev]:ai] \\*[par*label]\h'|\\n[\\n[.ev]:ai]u'\c
1144 .\" We don't want margin characters to be attached when we divert
1145 .\" the tag. Since there's no way to save and restore the current
1146 .\" margin character, we have to switch to a new environment, taking
1147 .\" what we need of the old environment with us.
1148 .de par*push-tag-env
1149 .nr par*saved-font \\n[.f]
1150 .nr par*saved-size \\n[.s]z
1151 .nr par*saved-ss \\n[.ss]
1152 .ds par*saved-fam \\n[.fam]
1156 .ft \\n[par*saved-font]
1157 .ps \\n[par*saved-size]u
1158 .ss \\n[par*saved-ss]
1159 .fam \\*[par*saved-fam]
1166 .nr \\n[.ev]:li!\\n[\\n[.ev]:il] \\n[\\n[.ev]:li]
1167 .nr \\n[.ev]:ri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ri]
1168 .nr \\n[.ev]:ai!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ai]
1169 .nr \\n[.ev]:pli!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pli]
1170 .nr \\n[.ev]:pri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pri]
1172 .nr \\n[.ev]:li +\\n[\\n[.ev]:ai]
1173 .nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
1178 .ie \\n[\\n[.ev]:il] \{\
1180 . nr \\n[.ev]:ai \\n[\\n[.ev]:ai!\\n[\\n[.ev]:il]]
1181 . nr \\n[.ev]:li \\n[\\n[.ev]:li!\\n[\\n[.ev]:il]]
1182 . nr \\n[.ev]:ri \\n[\\n[.ev]:ri!\\n[\\n[.ev]:il]]
1183 . nr \\n[.ev]:pli \\n[\\n[.ev]:pli!\\n[\\n[.ev]:il]]
1184 . nr \\n[.ev]:pri \\n[\\n[.ev]:pri!\\n[\\n[.ev]:il]]
1186 .el .@error unbalanced \\$0
1191 .nr \\n[.ev]:li!\\n[\\n[.ev]:il] \\n[\\n[.ev]:li]
1192 .nr \\n[.ev]:ri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ri]
1193 .nr \\n[.ev]:ai!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ai]
1194 .nr \\n[.ev]:pli!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pli]
1195 .nr \\n[.ev]:pri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pri]
1197 .nr \\n[.ev]:li +\\n[QI]
1198 .nr \\n[.ev]:ri +\\n[QI]
1199 .nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
1203 .\" start boxed text
1209 .nr par*box-in \\n[.in]
1210 .\" remember what 1n is, just in case the point size changes
1215 .ti \\n[par*box-in]u+1n
1217 .de @div-end!par*box-div
1221 .\" Postpone the drawing of the box until we're in the top-level diversion,
1222 .\" in case there's a footnote inside the box.
1224 .ie '\\n(.z'par*box-div' \{\
1226 . if \n[.V]>.25m .sp
1228 . if \n[.V]>.25m .sp
1234 . nr \\n[.ev]:ri -\\n[par*box-n]
1235 . nr \\n[.ev]:li -\\n[par*box-n]
1236 . in -\\n[par*box-n]u
1237 . ll +\\n[par*box-n]u
1238 . lt +\\n[par*box-n]u
1239 . par*box-draw \\n[.i]u \\n[.l]u-(\\n[.H]u==1n*1n)
1241 .el .@error B2 without B1
1243 .de par*box-mark-top
1248 .el \!.par*box-mark-top
1252 . nr par*box-in \\n[.i]
1253 . nr par*box-ll \\n[.l]
1254 . nr par*box-vpt \\n[.vpt]
1255 . nr par*box-ad \\n[.j]
1261 \D'l (u;\\n[.l]-\\n[.i]) 0'\
1262 \D'l 0 |\\n[par*box-top]u'\
1263 \D'l -(u;\\n[.l]-\\n[.i]) 0'\
1264 \D'l 0 -|\\n[par*box-top]u'
1267 . in \\n[par*box-in]u
1268 . ll \\n[par*box-ll]u
1269 . vpt \\n[par*box-vpt]
1270 . ad \\n[par*box-ad]
1272 .el \!.par*box-draw \\$1 \\$2
1276 .\" Keep together the heading and the first two lines of the next paragraph.
1277 .ne 3v+\\n[\\n[.ev]:PD]u+\\n(.Vu
1281 .\" TL, AU, and AI are aliased to these in cov*ab-init.
1301 .\" In paragraph macros.
1303 .ps \\n[\\n[.ev]:PS]
1314 .\" par*define-font-macro macro font
1315 .de par*define-font-macro
1318 . nr par*prev-font \\\\n[.f]
1319 \&\\\\$3\f[\\$2]\\\\$1\f[\\\\n[par*prev-font]]\\\\$2
1324 .par*define-font-macro B B
1325 .par*define-font-macro I I
1326 .par*define-font-macro BI BI
1327 .par*define-font-macro CW CR
1328 .\" underline a word
1330 \Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m'\\$2
1334 .nr par*bxw \w'\\$1'+.4m
1335 \Z'\v'.25m'\D'l 0 -1m'\D'l \\n[par*bxw]u 0'\D'l 0 1m'\D'l -\\n[par*bxw]u 0''\
1339 .\" The first time UX is used, put a registered mark after it.
1342 \s[\\n[.s]*8u/10u]UNIX\s0\\$1\\*[par*ux-rg]
1345 .ds par@sup-start \v'-.9m\s'\En[.s]*7u/10u'+.7m'
1346 .als { par@sup-start
1347 .ds par@sup-end \v'-.7m\s0+.9m'
1349 .\" footnote paragraphs
1350 .\" FF is the footnote format
1352 .\" This can be redefined. It gets a second argument of `no' if the first
1353 .\" argument was supplied by the user, rather than automatically.
1356 .if !d par*fp!\\n[FF] \{\
1357 . @error unknown footnote format `\\n[FF]'
1360 .ie '\\$2'no' .par*fp!\\n[FF]-no "\\$1"
1361 .el .par*fp!\\n[FF] "\\$1"
1365 \
&\\*[par@sup-start
]\\$
1\\*[par@sup-end
]\ \c
1388 .@IP "\\$1." (u;\\n[\\n[.ev]:PI]*2)
1391 .@IP "\\$1" (u;\\n[\\n[.ev]:PI]*2)
1393 .\" ***************************
1394 .\" ******** module nh ********
1395 .\" ***************************
1396 .\" Numbered headings.
1397 .\" nh*hl is the level of the last heading
1399 .\" numbered heading
1406 . nr H\\n[nh*hl] 0\\$1
1409 . if !\\n[nh*hl] \{\
1412 . @error missing arguments to .NH S
1416 . nr nh*ohl \\n[nh*hl]
1419 . ie \\n[nh*hl]<=0 \{\
1424 . if \\n[nh*hl]-\\n[nh*ohl]>1 \
1425 . @warning .NH \\n[nh*ohl] followed by .NH \\n[nh*hl]
1429 . while \\n[nh*hl]>\\n[nh*ohl] \{\
1437 .while \\n[nh*i]<\\n[nh*hl] \{\
1439 . as SN \\n[H\\n[nh*i]].
1444 .\" ****************************
1445 .\" ******** module toc ********
1446 .\" ****************************
1447 .\" Table of contents generation.
1451 .ie \\n[.$] .XA "\\$1"
1454 .de @div-end!toc*div
1458 .ie '\\n(.z'toc*div' \{\
1459 . if d toc*num .toc*end-entry
1461 . ie '\\$1'no' .ds toc*num
1462 . el .ds toc*num "\\$1
1464 . el .ds toc*num \\n[PN]
1471 .el .@error XA without XS
1474 .ie '\\n(.z'toc*div' \{\
1475 . if d toc*num .toc*end-entry
1479 .el .@error XS without XE
1497 .char \[toc*leader-char] .\h'1m'
1498 .lc \[toc*leader-char]
1499 .ta (u;\\n[.l]-\\n[.i]-\w'000') (u;\\n[.l]-\\n[.i])R
1504 .\" print the table of contents on page i
1510 .\" ****************************
1511 .\" ******** module eqn ********
1512 .\" ****************************
1521 .ie '\\$1'L' .nr eqn*type 0
1523 . ie '\\$1'I' .nr eqn*type 1
1526 . if !'\\$1'C' .ds eqn*num "\\$1
1533 .de @div-end!eqn*div
1536 .\" Note that geqn mark and lineup work correctly in centered equations.
1538 .ie !'\\n(.z'eqn*div' .@error-recover mismatched EN
1543 . if !'\\*[eqn*num]'' .nr eqn*have-num 1
1544 . if \\n[dl]:\\n[eqn*have-num] \{\
1547 . ds eqn*tabs \\n[.tabs]
1550 . ds@need \\n[dn]u-1v+\n[.V]u
1552 . ie \\n[eqn*type]=0 \{\
1553 . ta (u;\\n[.l]-\\n[.i])R
1554 \\*[eqn*div]\t\\*[eqn*num]
1557 . ie \\n[eqn*type]=1 .ta \\n[DI]u \
1558 (u;\\n[.l]-\\n[.i])R
1559 . el .ta (u;\\n[.l]-\\n[.i]/2)C \
1560 (u;\\n[.l]-\\n[.i])R
1561 \t\\*[eqn*div]\t\\*[eqn*num]
1565 . ta (u;\\n[.l]-\\n[.i])R
1574 .\" ****************************
1575 .\" ******** module tbl ********
1576 .\" ****************************
1578 .nr tbl*have-header 0
1579 .\" This gets called if TS occurs before the first paragraph.
1582 .\" cov*ab-init aliases TS to @TS
1587 .if '\\$1'H' .di tbl*header-div
1590 .if \\n[tbl*have-header] \{\
1591 . ie \\n[.t]-\\n[tbl*header-ht]-1v .tbl*print-header
1595 .de tbl*print-header
1602 .ie '\\n[.z]'tbl*header-div' \{\
1607 . ie \\n[dn]+\\n[FM]+\\n[HM]+2v>=\\n[.p] \{\
1608 . @error ridiculously long table header
1613 . nr tbl*header-ht \\n[dn]
1614 . ds@need \\n[dn]u+1v
1616 . nr tbl*have-header 1
1619 .el .@error-recover .TH without .TS H
1621 .de @div-end!tbl*header-div
1626 .ie '\\n(.z'tbl*header-div' .@error-recover .TS H but no .TH before .TE
1628 . nr tbl*have-header 0
1635 .if \\n[tbl*have-header] \{\
1642 .\" ****************************
1643 .\" ******** module pic ********
1644 .\" ****************************
1650 .ie \\n[.$]<2 .@error bad arguments to PS (not preprocessed with pic?)
1652 . ds@need (u;\\$1)+1v
1653 . in +(u;\\n[.l]-\\n[.i]-\\$2/2>?0)
1660 .\" ****************************
1661 .\" ******** module ref ********
1662 .\" ****************************
1665 .rm [A [B [C [D [E [G [I [J [N [O [P [Q [R [S [T [V
1669 .ds ref*spec!0 Q A T1 S V N P I C D O
1671 .ds ref*spec!1 Q A T2 J S V N P I C D O
1673 .ds ref*spec!2 Q A T1 S V P I C D O
1674 .\" Article within book
1675 .ds ref*spec!3 Q A T2 B E S V P I C D O
1677 .ds ref*spec!4 Q A T2 R G P I C D O
1684 .ie d ref*spec!\\$1 .ref*build \\*[ref*spec!\\$1]
1686 . @error unknown reference type `\\$1'
1687 . ref*build \\*[ref*spec!0]
1693 .\" start of reference number
1694 .ds [. \\*[par@sup-start]
1695 .\" end of reference number
1696 .ds .] \\*[par@sup-end]
1697 .\" period before reference
1699 .\" period after reference
1701 .\" comma before reference
1703 .\" comma after reference
1705 .\" start collected references
1707 .als ref*print ref*end-print
1712 .\" end collected references
1715 .als ref*print ref*normal-print
1717 .de ref*normal-print
1718 .ie d [F .FS "\\*([.\\*([F\\*(.]"
1724 .ie d [F .IP "\\*([F."
1728 .als ref*print ref*normal-print
1730 .rm ref*string ref*post-punct
1731 .nr ref*suppress-period 1
1734 . ie d ref*add-\\$1 .ref*add-\\$1
1735 . el .ref*add-dflt \\$1
1739 .\" now add a final period
1740 .ie d ref*string \{\
1741 . if !\\n[ref*suppress-period] .as ref*string .
1742 . if d ref*post-punct \{\
1743 . as ref*string "\\*[ref*post-punct]
1750 .ref*field T , "\fI" "" "\fP"
1751 .if r [T .nr ref*suppress-period \\n([T
1754 .ref*field T , "\\*Q" "" "\\*U"
1755 .if r [T .nr ref*suppress-period \\n([T
1758 .ie \\n([P>0 .ref*field P , "pp. "
1759 .el .ref*field P , "p. "
1762 .ref*field J , \fI "" \fP
1768 .ref*field E , "ed. "
1774 .ref*field B "" "in \fI" "" \fP
1778 .ie r [O .nr ref*suppress-period \\n([O
1779 .el .nr ref*suppress-period 1
1783 .if r [A .nr ref*suppress-period \\n([A
1788 .\" First argument is the field letter.
1789 .\" Second argument is the punctuation character to use to separate this field
1790 .\" from the previous field.
1791 .\" Third argument is a string with which to prefix this field.
1792 .\" Fourth argument is a string with which to postfix this field.
1793 .\" Fifth argument is a string to add after the punctuation character supplied
1794 .\" by the next field.
1796 .if d ref*string \{\
1797 . ie d ref*post-punct \{\
1798 . as ref*string "\\$2\\*[ref*post-punct] \"
1801 . el .as ref*string "\\$2 \"
1803 .as ref*string "\\$3\\*([\\$1\\$4
1804 .if \\n[.$]>4 .ds ref*post-punct "\\$5
1805 .nr ref*suppress-period 0
1807 .\" ****************************
1808 .\" ******** module acc ********
1809 .\" ****************************
1810 .\" Accents and special characters.
1815 .\" The idea of this definition is for the top of the 3 to be at the x-height.
1816 .if !c\[yogh] .char \[yogh] \Z'\v'\w'x'*0-\En[rst]u'\s[\En[.s]*8u/10u]\
1817 \v'\w'3'*0+\En[rst]u'3\s0'\h'\w'\s[\En[.s]*8u/10u]3'u'
1820 .ds \\$1 \Z'\v'(u;\w'x'*0+\En[rst]-\En[.cht])'\
1821 \h'(u;-\En[skw]+(-\En[.w]-\w'\\$2'/2)+\En[.csk])'\\$2'
1824 .ds \\$1 \Z'\v'\En[.cdp]u'\h'(u;-\En[.w]-\w'\\$2'/2)'\\$2'
1827 .ds \\$1 \Z'\h'(u;-\En[.w]-\w'\\$2'/2)'\
1828 \v'(u;\En[.cdp]-\En[.cht]+\En[rst]+\En[rsb]/2)'\\$2'
1831 .ds \\$1 \Z'\h'(u;\w'x'-\w'\\$2'/2)'\\$2'
1833 .acc*prefix-def ' \'
1834 .acc*prefix-def ` \`
1836 .acc*prefix-def , \(ac
1837 .acc*prefix-def : \(ad
1839 .\" improved accent marks
1845 .acc*over-def : \(ad
1846 .acc*over-def v \(ah
1847 .acc*over-def _ \(a-
1848 .acc*over-def o \(ao
1849 .acc*under-def , \(ac
1850 .acc*under-def . \s[\En[.s]*8u/10u]\v'.2m'.\v'-.2m'\s0
1851 .acc*under-def hook \(ho
1853 .char \[hooko] o\\\\*[hook]
1856 .ds D- \(-D\" Icelandic uppercase eth
1857 .ds d- \(Sd\" Icelandic lowercase eth
1858 .ds Th \(TP\" Icelandic uppercase thorn
1859 .ds th \(Tp\" Icelandic lowercase thorn
1860 .ds 8 \(ss\" German double s
1861 .ds Ae \(AE\" AE ligature
1862 .ds ae \(ae\" ae ligature
1863 .ds Oe \(OE\" OE ligature
1864 .ds oe \(oe\" oe ligature
1865 .ds ? \(r?\" upside down ?
1866 .ds ! \(r!\" upside down !
1869 .\" Make sure that no blank lines creep in at the end of this file.