\" -*- nroff -*-
ig
s.tmac
Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Written by James Clark (
[email protected])
This file is part of groff.
groff is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
groff is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with groff; see the file COPYING. If not, write to the Free Software
Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
.
if !\n(.g .ab These ms macros require groff.
if \n(.C \
ab The groff ms macros do not work in compatibility mode.
\" Enable warnings (only if none are given on the command line).
\" You can delete this if you want.
if (\n[.warn] == 65543) .warn
\" See if already loaded.
if r GS .nx
mso devtag.tmac
nr GS 1
nr need_eo_h 0
nr need_eo_tl 0
de @error
tm \\n(.F:\\n(.c: macro error: \\$*
.
de @warning
tm \\n(.F:\\n(.c: macro warning: \\$*
.
de @fatal
ab \\n(.F:\\n(.c: fatal macro error: \\$*
.
de @not-implemented
@error sorry, \\$0 not implemented
als \\$0 @nop
.
als TM @not-implemented
als CT @not-implemented
de @nop
.
de @init
if !rPO .nr PO \\n(.o
\" a non-empty environment
ev ne
\c
ev
ev nf
'nf
ev
.
ds REFERENCES References
ds ABSTRACT ABSTRACT
ds TOC Table of Contents
ds MONTH1 January
ds MONTH2 February
ds MONTH3 March
ds MONTH4 April
ds MONTH5 May
ds MONTH6 June
ds MONTH7 July
ds MONTH8 August
ds MONTH9 September
ds MONTH10 October
ds MONTH11 November
ds MONTH12 December
ds MO \\*[MONTH\n[mo]]
ds DY \n[dy] \*[MO] \n[year]
de ND
if \\n[.$] .ds DY "\\$*
.
de DA
if \\n[.$] .ds DY "\\$*
ds CF \\*[DY]
.
\" indexing
de IX
tm \\$1\t\\$2\t\\$3\t\\$4 ... \\n[PN]
.
\" print an error message and then try to recover
de @error-recover
@error \\$@ (recovering)
nr *pop-count 0
while !'\\n(.z'' \{\
\"@warning automatically terminating diversion \\n(.z
ie d @div-end!\\n(.z .@div-end!\\n(.z
el .*div-end-default
nr *pop-count +1
\" ensure that we don't loop forever
if \\n[*pop-count]>20 .@fatal recovery failed
\}
while !'\\n[.ev]'0' .ev
par@reset-env
par@reset
.
de *div-end-default
ds *last-div \\n(.z
br
di
ev nf
\\*[*last-div]
ev
.
\" ****************************
\" ******** module cov ********
\" ****************************
\" Cover sheet and first page.
de cov*err-not-after-first-page
@error \\$0 is not allowed after the first page has started
.
de cov*err-not-before-tl
@error \\$0 is not allowed before TL
.
de cov*err-not-again
@error \\$0 is not allowed more than once
.
de cov*err-not-after-ab
@error \\$0 is not allowed after first AB, LP, PP, IP, SH or NH
.
als AU cov*err-not-before-tl
als AI cov*err-not-before-tl
als AB cov*err-not-before-tl
de cov*first-page-init
rm cov*first-page-init
par@init
als RP cov*err-not-after-first-page
@init
ie \\n[cov*rp-format] \{\
pg@cs-top
als FS cov*FS
als FE cov*FE
\}
el \{\
pg@top
als FS @FS
als FE @FE
\}
wh 0 pg@top
CHECK-FOOTER-AND-KEEP
.
wh 0 cov*first-page-init
\" This handles the case where FS occurs before TL or LP.
de FS
br
\\*[FS]\\
.
nr cov*rp-format 0
nr cov*rp-no 0
\" released paper format
de RP
nr cov*rp-format 1
if \\n[.$] .if '\\$1'no' .nr cov*rp-no 1
if rPO .po \\n(POu
pn 0
.
de TL
br
als TL cov*err-not-again
rn @AB AB
rn @AU AU
rn @AI AI
di cov*tl-div
par@reset
ft B
ps +2
vs +3p
ll (u;\\n[LL]*5/6)
nr cov*n-au 0
DEVTAG-TL
.
de @AU
par@reset
if !'\\n(.z'' \{\
br
di
\}
nr cov*n-au +1
di cov*au-div!\\n[cov*n-au]
nf
ft I
ie (\\n[PS] >= 1000) \
ps (\\n[PS]z / 1000u)
el \
ps \\n[PS]
.
de @AI
par@reset
if !'\\n(.z'' \{\
br
di
\}
ie !\\n[cov*n-au] .@error AI before AU
el \{\
di cov*ai-div!\\n[cov*n-au]
nf
ft R
ie (\\n[PS] >= 1000) \
ps (\\n[PS]z / 1000u)
el \
ps \\n[PS]
\}
.
de LP
if !'\\n[.z]'' \{\
br
di
\}
br
cov*ab-init
cov*print
\\*[\\$0]\\
.
als IP LP
als PP LP
als XP LP
als QP LP
als RS LP
als NH LP
als SH LP
als MC LP
als RT LP
als XS LP
de cov*ab-init
als cov*ab-init @nop
als LP @LP
als IP @IP
als PP @PP
als XP @XP
als RT @RT
als XS @XS
als SH @SH
als NH @NH
als QP @QP
als RS @RS
als RE @RE
als QS @QS
als QE @QE
als MC @MC
als EQ @EQ
als EN @EN
als TS @TS
als AB cov*err-not-after-ab
als AU par@AU
als AI par@AI
als TL par@TL
.
de @AB
if !'\\n(.z'' \{\
br
di
\}
cov*ab-init
ie '\*(.T'html' \{\
cov*tl-au-print
als cov*tl-au-print @nop
\}
el .di cov*ab-div
par@ab-indent
par@reset
if !'\\$1'no' \{\
if '\*(.T'html' \{\
nf
sp
\}
ft I
ce 1
\\*[ABSTRACT]
sp
ft R
\}
ns
@PP
if '\*(.T'html' \{\
cov*tl-au-print
als cov*tl-au-print @nop
par@reset-env
par@reset
cov*print
\}
.
de AE
ie '\*(.T'html' \{\
als AE cov*err-not-again
\}
el \{\
ie '\\n(.z'cov*ab-div' \{\
als AE cov*err-not-again
br
di
\" nr cov*ab-height \\n[dn]
par@reset-env
par@reset
cov*print
\}
el .@error AE without AB
\}
.
de @div-end!cov*ab-div
AE
.
de cov*print
als cov*print @nop
ie d cov*tl-div \{\
ie \\n[cov*rp-format] .cov*rp-print
el .cov*draft-print
\}
el \{\
if \\n[cov*rp-format] \{\
@warning RP format but no TL
bp 1
als FS @FS
als FE @FE
CHECK-FOOTER-AND-KEEP
\}
br
\}
.
de cov*rp-print
nr cov*page-length \\n[.p]
pl 1000i
cov*tl-au-print
sp 3
if d cov*ab-div \{\
if !'\*(.T'html' . nf
cov*ab-div
\}
sp 3
par@reset
\\*[DY]
br
if \\n[cov*fn-height] \{\
sp |(u;\\n[cov*page-length]-\\n[FM]\
-\\n[cov*fn-height]-\\n[fn@sep-dist]>?\\n[nl])
fn@print-sep
ev nf
cov*fn-div
ev
ie \\n[cov*rp-no] .rm cov*fn-div
el \{\
rn cov*fn-div fn@overflow-div
nr fn@have-overflow 1
\}
\}
als FS @FS
als FE @FE
CHECK-FOOTER-AND-KEEP
\" If anything was printed below where the footer line is normally printed,
\" then that's an overflow.
if -\\n[FM]/2+1v+\\n[cov*page-length]<\\n[nl] .@error cover sheet overflow
pl \\n[cov*page-length]u
bp 1
if !\\n[cov*rp-no] .cov*tl-au-print
rs
sp 1
.
de cov*draft-print
cov*tl-au-print
if d cov*ab-div \{\
nf
sp 2
cov*ab-div
\}
sp 1
.
de cov*tl-au-print
par@reset
nf
rs
sp 3
ce 9999
if d cov*tl-div \{\
cov*tl-div
DEVTAG-EO-TL
\}
nr cov*i 1
nr cov*sp 1v
while \\n[cov*i]<=\\n[cov*n-au] \{\
ie '\*(.T'html' .br
el .sp \\n[cov*sp]u
cov*au-div!\\n[cov*i]
ie d cov*ai-div!\\n[cov*i] \{\
sp .5v
cov*ai-div!\\n[cov*i]
nr cov*sp 1v
\}
el .nr cov*sp .5v
nr cov*i +1
\}
ce 0
.
nr cov*fn-height 0
nr cov*in-fn 0
\" start of footnote on cover
de cov*FS
if \\n[cov*in-fn] \{\
@error nested FS
FE
\}
nr cov*in-fn 1
ev fn
par@reset-env
da cov*fn-div
if !\\n[cov*fn-height] .ns
ie \\n[.$] .FP "\\$1" no
el .@LP
.
de @div-end!cov*fn-div
cov*FE
.
\" end of footnote on cover
de cov*FE
ie '\\n(.z'cov*fn-div' \{\
br
ev
di
nr cov*in-fn 0
nr cov*fn-height +\\n[dn]
\}
el .@error FE without matching FS
.
\" ***************************
\" ******** module pg ********
\" ***************************
\" Page-level formatting.
\" > 0 if we have a footnote on the current page
nr pg@fn-flag 0
nr pg@colw 0
nr pg@fn-colw 0
nr HM 1i
nr FM 1i
ds LF
ds CF
ds RF
ds LH
ds CH -\\n[PN]-
ds RH
ds pg*OH '\\*[LH]'\\*[CH]'\\*[RH]'
ds pg*EH '\\*[LH]'\\*[CH]'\\*[RH]'
ds pg*OF '\\*[LF]'\\*[CF]'\\*[RF]'
ds pg*EF '\\*[LF]'\\*[CF]'\\*[RF]'
de OH
ds pg*\\$0 "\\$*
.
als EH OH
als OF OH
als EF OH
de PT
ie \\n%=1 .if \\n[pg*P1] .tl \\*[pg*OH]
el \{\
ie o .tl \\*[pg*OH]
el .tl \\*[pg*EH]
\}
.
de BT
ie o .tl \\*[pg*OF]
el .tl \\*[pg*EF]
.
nr pg*P1 0
de P1
nr pg*P1 1
.
wh -\n[FM]u pg@bottom
wh -\n[FM]u/2u pg*footer
nr MINGW 2n
nr pg@ncols 1
de @MC
if !'\\n(.z'' .error-recover MC while diversion open
br
ie \\n[pg@ncols]>1 .pg@super-eject
el \{\
\" flush out any floating keeps
while \\n[kp@tail]>\\n[kp@head] \{\
rs
bp
\}
\}
ie !\\n(.$ \{\
nr pg@colw \\n[LL]*7/15
nr pg*gutw \\n[LL]-(2*\\n[pg@colw])
nr pg@ncols 2
\}
el \{\
nr pg@colw (n;\\$1)<?\\n[LL]
ie \\n[.$]<2 .nr pg*gutw \\n[MINGW]
el .nr pg*gutw (n;\\$2)
nr pg@ncols \\n[LL]-\\n[pg@colw]/(\\n[pg@colw]+\\n[pg*gutw])+1
ie \\n[pg@ncols]>1 \
nr pg*gutw \\n[LL]-(\\n[pg@ncols]*\\n[pg@colw])/(\\n[pg@ncols]-1)
el .nr pg*gutw 0
\}
DEVTAG ".mc \\n[pg@ncols] \\n[pg@colw] \\n[pg*gutw]"
mk pg*col-top
ns
nr pg*col-num 0
nr pg@fn-colw \\n[pg@colw]*5/6
par@reset
.
de 2C
MC
.
de 1C
MC \\n[LL]u
.
\" top of page macro
de pg@top
ch pg*footer -\\n[FM]u/2u
nr PN \\n%
nr pg*col-num 0
nr pg@fn-bottom-margin 0
po \\n[PO]u
ev h
par@reset
sp (u;\\n[HM]/2)
PT
sp |\\n[HM]u
if d HD .HD
mk pg@header-bottom
ev
mk pg*col-top
pg*start-col
.
de pg*start-col
\" Handle footnote overflow before floating keeps, because the keep
\" might contain an embedded footnote.
fn@top-hook
kp@top-hook
tbl@top-hook
ns
.
de pg@cs-top
sp \\n[HM]u
\" move pg@bottom and pg*footer out of the way
ch pg@bottom \\n[.p]u*2u
ch pg*footer \\n[.p]u*2u
ns
.
de pg@bottom
tbl@bottom-hook
if \\n[pg@fn-flag] .fn@bottom-hook
nr pg*col-num +1
ie \\n[pg*col-num]<\\n[pg@ncols] .pg*end-col
el .pg*end-page
.
de pg*end-col
'sp |\\n[pg*col-top]u
po (u;\\n[PO]+(\\n[pg@colw]+\\n[pg*gutw]*\\n[pg*col-num]))
\"po +(u;\\n[pg@colw]+\\n[pg*gutw])
pg*start-col
.
de pg*end-page
po \\n[PO]u
\" Make sure we don't exit if there are still floats or footnotes left-over.
ie \\n[kp@head]<\\n[kp@tail]:\\n[fn@have-overflow] \{\
\" Switching environments ensures that we don't get an unnecessary
\" blank line at the top of the page.
ev ne
' bp
ev
\}
el \{\
\" If the text has ended and there are no more footnotes or keeps, exit.
if \\n[pg@text-ended] .ex
if r pg*next-number \{\
pn \\n[pg*next-number]
rr pg*next-number
if d pg*next-format \{\
af PN \\*[pg*next-format]
rm pg*next-format
\}
\}
' bp
\}
.
\" pg@begin number format
de pg@begin
ie \\n[.$]>0 \{\
nr pg*next-number (;\\$1)
ie \\n[.$]>1 .ds pg*next-format \\$2
el .rm pg*next-format
\}
el .rr pg*next-number
pg@super-eject
.
\" print the footer line
de pg*footer
ev h
par@reset
BT
ev
.
\" flush out any keeps or footnotes
de pg@super-eject
br
if !'\\n(.z'' .@error-recover diversion open while ejecting page
\" Make sure we stay in the end macro while there is still footnote overflow
\" left, or floating keeps.
while \\n[kp@tail]>\\n[kp@head]:\\n[pg@fn-flag] \{\
rs
bp
\}
bp
.
nr pg@text-ended 0
de pg@end-text
br
nr pg@text-ended 1
pg@super-eject
.
em pg@end-text
\" ***************************
\" ******** module fn ********
\" ***************************
\" Footnotes.
nr fn@sep-dist 8p
ev fn
\" Round it vertically
vs \n[fn@sep-dist]u
nr fn@sep-dist \n[.v]
ev
nr fn*text-num 0 1
nr fn*note-num 0 1
ds * \\*[par@sup-start]\En+[fn*text-num]\\*[par@sup-end]
nr fn*open 0
\" normal FS
de @FS
ie \\n[.$] .fn*do-FS "\\$1" no
el \{\
ie \\n[fn*text-num]>\\n[fn*note-num] .fn*do-FS \\n+[fn*note-num]
el .fn*do-FS
\}
.
\" Second argument of `no' means don't embellish the first argument.
de fn*do-FS
if \\n[fn*open] .@error-recover nested FS
nr fn*open 1
if \\n[.u] \{\
\" Ensure that the first line of the footnote is on the same page
\" as the reference. I think this is minimal.
ev fn
nr fn*need 1v
ev
ie \\n[pg@fn-flag] .nr fn*need +\\n[fn:PD]
el .nr fn*need +\\n[fn@sep-dist]
ne \\n[fn*need]u+\\n[.V]u>?0
\}
ev fn
par@reset-env
fn*start-div
par@reset
ie \\n[.$] .FP \\$@
el .@LP
.
de @FE
ie !\\n[fn*open] .@error FE without FS
el \{\
nr fn*open 0
br
ev
fn*end-div
\}
.
nr fn@have-overflow 0
\" called at the top of each column
de fn@top-hook
nr fn*max-width 0
nr fn*page-bottom-pos 0-\\n[FM]-\\n[pg@fn-bottom-margin]
ch pg@bottom \\n[fn*page-bottom-pos]u
if \\n[fn@have-overflow] \{\
nr fn@have-overflow 0
fn*start-div
ev nf
fn@overflow-div
ev
fn*end-div
\}
.
\" This is called at the bottom of the column if pg@fn-flag is set.
de fn@bottom-hook
nr pg@fn-flag 0
nr fn@have-overflow 0
nr fn@bottom-pos \\n[.p]-\\n[FM]-\\n[pg@fn-bottom-margin]+\\n[.v]
ev fn
nr fn@bottom-pos -\\n[.v]
ev
ie \\n[nl]+\\n[fn@sep-dist]+\n[.V]>\\n[fn@bottom-pos] \{\
rn fn@div fn@overflow-div
nr fn@have-overflow 1
\}
el \{\
if \\n[pg@ncols]>1 \
if \\n[fn*max-width]>\\n[pg@fn-colw] \
nr pg@fn-bottom-margin \\n[.p]-\\n[FM]-\\n[nl]+1v
wh \\n[fn@bottom-pos]u fn*catch-overflow
fn@print-sep
ev nf
fn@div
rm fn@div
ev
if '\\n(.z'fn@overflow-div' \{\
di
nr fn@have-overflow \\n[dn]>0
\}
ch fn*catch-overflow
\}
.
de fn*catch-overflow
di fn@overflow-div
.
nr fn*embed-count 0
de @div-end!fn@div
br
if '\\n[.ev]'fn' .ev
fn*end-div
nr fn*open 0
.
als @div-end!fn*embed-div @div-end!fn@div
de fn*start-div
ie '\\n(.z'' \{\
da fn@div
if !\\n[pg@fn-flag] .ns
\}
el .di fn*embed-div
.
de fn*end-div
ie '\\n(.z'fn@div' \{\
di
nr fn*page-bottom-pos -\\n[dn]
nr fn*max-width \\n[fn*max-width]>?\\n[dl]
if !\\n[pg@fn-flag] .nr fn*page-bottom-pos -\\n[fn@sep-dist]
nr pg@fn-flag 1
nr fn*page-bottom-pos \\n[nl]-\\n[.p]+\n[.V]>?\\n[fn*page-bottom-pos]
ch pg@bottom \\n[fn*page-bottom-pos]u
\}
el \{\
ie '\\n(.z'fn*embed-div' \{\
di
rn fn*embed-div fn*embed-div!\\n[fn*embed-count]
\!. fn*embed-start \\n[fn*embed-count]
rs
' sp (u;\\n[dn]+\\n[fn@sep-dist]+\\n[.V])
\!. fn*embed-end
nr fn*embed-count +1
\}
el \{\
ev fn
@error-recover unclosed diversion within footnote
\}
\}
.
de fn*embed-start
ie '\\n(.z'' \{\
fn*start-div
ev nf
fn*embed-div!\\$1
rm fn*embed-div!\\$1
ev
fn*end-div
di fn*null
\}
el \{\
\!. fn*embed-start \\$1
rs
\}
.
de fn*embed-end
ie '\\n(.z'fn*null' \{\
di
rm fn*null
\}
el \!.fn*embed-end
.
\" It's important that fn@print-sep use up exactly fn@sep-dist vertical space.
de fn@print-sep
ev fn
in 0
vs \\n[fn@sep-dist]u
\D'l 1i 0'
br
ev
.
\" ***************************
\" ******** module kp ********
\" ***************************
\" Keeps.
de KS
br
di kp*div
.
de KF
if !'\\n(.z'' .@error-recover KF while open diversion
di kp*fdiv
ev k
par@reset-env
par@reset
.
de KE
ie '\\n(.z'kp*div' .kp*end
el \{\
ie '\\n(.z'kp*fdiv' .kp*fend
el .@error KE without KS or KF
\}
.
de @div-end!kp*div
kp*end
.
de @div-end!kp*fdiv
kp*fend
.
de kp*need
ie '\\n(.z'' .ds@need \\$1
el \!.kp*need \\$1
.
\" end non-floating keep
de kp*end
br
di
kp*need \\n[dn]
ev nf
kp*div
ev
rm kp*div
.
\" Floating keeps.
nr kp@head 0
nr kp@tail 0
\" end floating keep
de kp*fend
br
ev
di
ie \\n[.t]-(\\n[.k]>0*1v)>\\n[dn] \{\
br
ev nf
kp*fdiv
rm kp*fdiv
ev
\}
el \{\
rn kp*fdiv kp*div!\\n[kp@tail]
nr kp*ht!\\n[kp@tail] 0\\n[dn]
nr kp@tail +1
\}
.
\" top of page processing for KF
nr kp*doing-top 0
de kp@top-hook
if !\\n[kp*doing-top] \{\
nr kp*doing-top 1
kp*do-top
nr kp*doing-top 0
\}
.
de kp*do-top
\" If the first keep won't fit, only force it out if we haven't had a footnote
\" and we're at the top of the page.
nr kp*force \\n[pg@fn-flag]=0&(\\n[nl]<=\\n[pg@header-bottom])
nr kp*fits 1
while \\n[kp@tail]>\\n[kp@head]&\\n[kp*fits] \{\
ie \\n[.t]>\\n[kp*ht!\\n[kp@head]]:\\n[kp*force] \{\
nr kp*force 0
\" It's important to advance kp@head before bringing
\" back the keep, so that if the last line of the
\" last keep springs the bottom of page trap, a new
\" page will not be started unnecessarily.
rn kp*div!\\n[kp@head] kp*temp
nr kp@head +1
ev nf
kp*temp
ev
rm kp*temp
\}
el .nr kp*fits 0
\}
.
\" ***************************
\" ******** module ds ********
\" ***************************
\" Displays and non-floating keeps.
de DE
ds*end!\\n[\\n[.ev]:ds-type]
nr \\n[.ev]:ds-type 0
.
de ds@auto-end
if \\n[\\n[.ev]:ds-type] \{\
@error automatically terminating display
DE
\}
.
de @div-end!ds*div
ie \\n[\\n[.ev]:ds-type] .DE
el .ds*end!2
.
de ds*end!0
@error DE without DS, ID, CD, LD or BD
.
de LD
br
nr \\n[.ev]:ds-type 1
par@reset
nf
sp \\n[DD]u
.
de ID
LD
ie \\n[.$] .in +(n;\\$1)
el .in +\\n[DI]u
.
de CD
LD
ce 9999
.
de RD
LD
rj 9999
.
de ds*common-end
par@reset
sp \\n[DD]u
.
als ds*end!1 ds*common-end
de BD
LD
nr \\n[.ev]:ds-type 2
di ds*div
.
de ds*end!2
br
ie '\\n(.z'ds*div' \{\
di
nf
in (u;\\n[.l]-\\n[dl]/2>?0)
ds*div
rm ds*div
ds*common-end
\}
el .@error-recover mismatched DE
.
de DS
br
di ds*div
ie '\\$1'B' \{\
LD
nr \\n[.ev]:ds-type 4
\}
el \{\
ie '\\$1'L' .LD
el \{\
ie '\\$1'C' .CD
el \{\
ie '\\$1'R' .RD
el \{\
ie '\\$1'I' .ID \\$2
el .ID \\$1
\}
\}
\}
nr \\n[.ev]:ds-type 3
\}
.
de ds@need
if '\\n(.z'' \{\
while \\n[.t]<=(\\$1)&(\\n[nl]>\\n[pg@header-bottom]) \{\
rs
' sp \\n[.t]u
\}
\}
.
de ds*end!3
br
ie '\\n(.z'ds*div' \{\
di
ds@need \\n[dn]
ev nf
ds*div
ev
rm ds*div
ds*common-end
\}
el .@error-recover mismatched DE
.
de ds*end!4
ie '\\n(.z'ds*div' \{\
br
di
nf
in (u;\\n[.l]-\\n[dl]/2>?0)
ds@need \\n[dn]
ds*div
rm ds*div
ds*common-end
\}
el .@error-recover mismatched DE
.
\" ****************************
\" ******** module par ********
\" ****************************
\" Paragraph-level formatting.
\" Load time initialization.
de par@load-init
\" PS and VS might have been set on the command-line
if !rPS .nr PS 10
if !rLL .nr LL 6i
ll \\n[LL]u
\" don't set LT so that it can be defaulted from LL
ie rLT .lt \\n[LT]u
el .lt \\n[LL]u
ie (\\n[PS] >= 1000) \
ps (\\n[PS]z / 1000u)
el \
ps \\n[PS]
\" don't set VS so that it can be defaulted from PS
ie rVS \{\
ie (\\n[VS] >= 1000) \
par*vs "(\\n[VS]p / 1000u)"
el \
par*vs \\n[VS]
\}
el \{\
ie (\\n[PS] >= 1000) \
par*vs "((\\n[PS]p / 1000u) + 2p)"
el \
par*vs "(\\n[PS] + 2)"
\}
if dFAM .fam \\*[FAM]
if !rHY .nr HY 14
hy \\n[HY]
TA
CHECK-FOOTER-AND-KEEP
.
de par*vs
\" If it's too big to be in points, treat it as units.
ie (p;\\$1)>=40p .vs (u;\\$1)
el .vs (p;\\$1)
.
de par@ab-indent
nr 0:li (u;\\n[LL]/12)
nr 0:ri \\n[0:li]
.
de par*env-init
aln \\n[.ev]:PS PS
aln \\n[.ev]:VS VS
aln \\n[.ev]:LL LL
aln \\n[.ev]:MCLL LL
aln \\n[.ev]:LT LT
aln \\n[.ev]:MCLT LT
aln \\n[.ev]:PI PI
aln \\n[.ev]:PD PD
ad \\n[par*adj]
par@reset-env
.
\" happens when the first page begins
de par@init
if !rLT .nr LT \\n[LL]
if !rFL .nr FL \\n[LL]*5/6
if !rVS \{\
ie (\\n[PS] >= 1000) \
nr VS (\\n[PS] + 2000)
el \
nr VS (\\n[PS] + 2)
\}
if !rDI .nr DI .5i
if !rFPS \{\
ie (\\n[PS] >= 1000) \
nr FPS (\\n[PS] - 2000)
el \
nr FPS (\\n[PS] - 2)
\}
if !rFVS \{\
ie (\\n[FPS] >= 1000) \
nr FVS (\\n[FPS] + 2000)
el \
nr FVS (\\n[FPS] + 2)
\}
\" don't change environment 0
ev h
ie (\\n[PS] >= 1000) \
ps (\\n[PS]z / 1000u)
el \
ps \\n[PS]
if !rQI .nr QI 5n
if !rPI .nr PI 5n
ie (\\n[VS] >= 1000) \
par*vs "(\\n[VS]p / 1000u)"
el \
par*vs \\n[VS]
if !rPD .nr PD .3v>?\n(.V
if !rDD .nr DD .5v>?\n(.V
if !rFI .nr FI 2n
if !rFPD .nr FPD \\n[PD]/2
ev
if !dFAM .ds FAM \\n[.fam]
nr par*adj \\n[.j]
par*env-init
ev h
par*env-init
ev
ev fn
par*env-init
ev
ev k
par*env-init
ev
aln 0:MCLL pg@colw
aln 0:MCLT pg@colw
aln k:MCLL pg@colw
aln k:MCLT pg@colw
aln fn:PS FPS
aln fn:VS FVS
aln fn:LL FL
aln fn:LT FL
aln fn:PI FI
aln fn:PD FPD
aln fn:MCLL pg@fn-colw
aln fn:MCLT pg@fn-colw
.
de par@reset-env
nr \\n[.ev]:il 0
nr \\n[.ev]:li 0
nr \\n[.ev]:ri 0
nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
nr \\n[.ev]:pli 0
nr \\n[.ev]:pri 0
nr \\n[.ev]:ds-type 0
.
\" par@reset
de par@reset
br
if \\n[need_eo_tl]>0 .DEVTAG-EO-TL
nr need_eo_tl 0
if \\n[need_eo_h]>0 .DEVTAG-EO-H
nr need_eo_h 0
ce 0
rj 0
ul 0
fi
ie \\n[pg@ncols]>1 \{\
ll (u;\\n[\\n[.ev]:MCLL]-\\n[\\n[.ev]:ri]-\\n[\\n[.ev]:pri])
lt \\n[\\n[.ev]:MCLT]u
\}
el \{\
ll (u;\\n[\\n[.ev]:LL]-\\n[\\n[.ev]:ri]-\\n[\\n[.ev]:pri])
lt \\n[\\n[.ev]:LT]u
\}
in (u;\\n[\\n[.ev]:li]+\\n[\\n[.ev]:pli])
ft 1
fam \\*[FAM]
ie (\\n[\\n[.ev]:PS] >= 1000) \
ps (\\n[\\n[.ev]:PS]z / 1000u)
el \
ps \\n[\\n[.ev]:PS]
ie (\\n[\\n[.ev]:VS] >= 1000) \
par*vs "(\\n[\\n[.ev]:VS]p / 1000u)"
el \
par*vs \\n[\\n[.ev]:VS]
ls 1
TA
hy \\n[HY]
.
de @RT
nr \\n[.ev]:pli 0
nr \\n[.ev]:pri 0
par@reset
.
\" This can be redefined by the user.
de TA
ta T 5n
.
\" \n[PORPHANS] sets number of initial lines of any paragraph,
\" which must be kept together, without any included page break.
\" Initialise to reproduce original behaviour; user may adjust it.
if !rPORPHANS .nr PORPHANS 1