| Commit | Line | Data |
|---|---|---|
| 92d0a6a6 JR |
1 | .\" -*- nroff -*- |
| 2 | .ig | |
| 3 | ||
| 4 | s.tmac | |
| 5 | ||
| 4d3e9548 JL |
6 | Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2006, 2007, |
| 7 | 2009 | |
| 92d0a6a6 JR |
8 | Free Software Foundation, Inc. |
| 9 | Written by James Clark (jjc@jclark.com) | |
| 10 | ||
| 11 | This file is part of groff. | |
| 12 | ||
| 13 | groff is free software; you can redistribute it and/or modify it under | |
| 14 | the terms of the GNU General Public License as published by the Free | |
| 4d3e9548 JL |
15 | Software Foundation, either version 3 of the License, or |
| 16 | (at your option) any later version. | |
| 92d0a6a6 JR |
17 | |
| 18 | groff is distributed in the hope that it will be useful, but WITHOUT ANY | |
| 19 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
| 20 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
| 21 | for more details. | |
| 22 | ||
| 4d3e9548 JL |
23 | You should have received a copy of the GNU General Public License |
| 24 | along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 92d0a6a6 JR |
25 | .. |
| 26 | .if !\n(.g .ab These ms macros require groff. | |
| 27 | .if \n(.C \ | |
| 28 | . ab The groff ms macros do not work in compatibility mode. | |
| 29 | .\" Enable warnings (only if none are given on the command line). | |
| 30 | .\" You can delete this if you want. | |
| 31 | .if (\n[.warn] == 65543) .warn | |
| 32 | .\" See if already loaded. | |
| 33 | .if r GS .nx | |
| 465b256c | 34 | .mso devtag.tmac |
| 92d0a6a6 | 35 | .nr GS 1 |
| 465b256c JR |
36 | .nr need_eo_h 0 |
| 37 | .nr need_eo_tl 0 | |
| 92d0a6a6 JR |
38 | .de @error |
| 39 | .tm \\n(.F:\\n(.c: macro error: \\$* | |
| 40 | .. | |
| 41 | .de @warning | |
| 42 | .tm \\n(.F:\\n(.c: macro warning: \\$* | |
| 43 | .. | |
| 44 | .de @fatal | |
| 45 | .ab \\n(.F:\\n(.c: fatal macro error: \\$* | |
| 46 | .. | |
| 47 | .de @not-implemented | |
| 48 | .@error sorry, \\$0 not implemented | |
| 49 | .als \\$0 @nop | |
| 50 | .. | |
| 51 | .als TM @not-implemented | |
| 52 | .als CT @not-implemented | |
| 53 | .de @nop | |
| 54 | .. | |
| 55 | .de @init | |
| 56 | .if !rPO .nr PO \\n(.o | |
| 57 | .\" a non-empty environment | |
| 58 | .ev ne | |
| 59 | \c | |
| 60 | .ev | |
| 61 | .ev nf | |
| 62 | 'nf | |
| 63 | .ev | |
| 64 | .. | |
| 65 | .ds REFERENCES References | |
| 66 | .ds ABSTRACT ABSTRACT | |
| 67 | .ds TOC Table of Contents | |
| 68 | .ds MONTH1 January | |
| 69 | .ds MONTH2 February | |
| 70 | .ds MONTH3 March | |
| 71 | .ds MONTH4 April | |
| 72 | .ds MONTH5 May | |
| 73 | .ds MONTH6 June | |
| 74 | .ds MONTH7 July | |
| 75 | .ds MONTH8 August | |
| 76 | .ds MONTH9 September | |
| 77 | .ds MONTH10 October | |
| 78 | .ds MONTH11 November | |
| 79 | .ds MONTH12 December | |
| 4d3e9548 | 80 | .ds MO \E*[MONTH\n[mo]] |
| 92d0a6a6 JR |
81 | .ds DY \n[dy] \*[MO] \n[year] |
| 82 | .de ND | |
| 83 | .if \\n[.$] .ds DY "\\$* | |
| 84 | .. | |
| 85 | .de DA | |
| 86 | .if \\n[.$] .ds DY "\\$* | |
| 87 | .ds CF \\*[DY] | |
| 88 | .. | |
| 89 | .\" indexing | |
| 90 | .de IX | |
| 91 | .tm \\$1\t\\$2\t\\$3\t\\$4 ... \\n[PN] | |
| 92 | .. | |
| 93 | .\" print an error message and then try to recover | |
| 94 | .de @error-recover | |
| 95 | .@error \\$@ (recovering) | |
| 96 | .nr *pop-count 0 | |
| 97 | .while !'\\n(.z'' \{\ | |
| 98 | . \"@warning automatically terminating diversion \\n(.z | |
| 99 | . ie d @div-end!\\n(.z .@div-end!\\n(.z | |
| 100 | . el .*div-end-default | |
| 101 | . nr *pop-count +1 | |
| 102 | . \" ensure that we don't loop forever | |
| 103 | . if \\n[*pop-count]>20 .@fatal recovery failed | |
| 104 | .\} | |
| 105 | .while !'\\n[.ev]'0' .ev | |
| 106 | .par@reset-env | |
| 107 | .par@reset | |
| 108 | .. | |
| 109 | .de *div-end-default | |
| 110 | .ds *last-div \\n(.z | |
| 111 | .br | |
| 112 | .di | |
| 113 | .ev nf | |
| 114 | .\\*[*last-div] | |
| 115 | .ev | |
| 116 | .. | |
| 117 | .\" **************************** | |
| 118 | .\" ******** module cov ******** | |
| 119 | .\" **************************** | |
| 120 | .\" Cover sheet and first page. | |
| 121 | .de cov*err-not-after-first-page | |
| 122 | .@error \\$0 is not allowed after the first page has started | |
| 123 | .. | |
| 124 | .de cov*err-not-before-tl | |
| 125 | .@error \\$0 is not allowed before TL | |
| 126 | .. | |
| 127 | .de cov*err-not-again | |
| 128 | .@error \\$0 is not allowed more than once | |
| 129 | .. | |
| 130 | .de cov*err-not-after-ab | |
| 131 | .@error \\$0 is not allowed after first AB, LP, PP, IP, SH or NH | |
| 132 | .. | |
| 133 | .als AU cov*err-not-before-tl | |
| 134 | .als AI cov*err-not-before-tl | |
| 135 | .als AB cov*err-not-before-tl | |
| 136 | .de cov*first-page-init | |
| 4d3e9548 JL |
137 | .\" Invoked by `.wh 0' trap on first page. |
| 138 | .\" We should not come here again, but at short page length, | |
| 139 | .\" recursion may occur; remove trap and macro to avoid it. | |
| 140 | .ch cov*first-page-init | |
| 92d0a6a6 | 141 | .rm cov*first-page-init |
| 4d3e9548 JL |
142 | .if !'\\n[.ev]'0' \{\ |
| 143 | . @error must be in top-level environment, not `\\n[.ev]', | |
| 144 | . @error when first page is started | |
| 145 | .\} | |
| 92d0a6a6 JR |
146 | .par@init |
| 147 | .als RP cov*err-not-after-first-page | |
| 148 | .@init | |
| 149 | .ie \\n[cov*rp-format] \{\ | |
| 150 | . pg@cs-top | |
| 151 | . als FS cov*FS | |
| 152 | . als FE cov*FE | |
| 153 | .\} | |
| 154 | .el \{\ | |
| 155 | . pg@top | |
| 156 | . als FS @FS | |
| 157 | . als FE @FE | |
| 158 | .\} | |
| 159 | .wh 0 pg@top | |
| 160 | .CHECK-FOOTER-AND-KEEP | |
| 161 | .. | |
| 162 | .wh 0 cov*first-page-init | |
| 163 | .\" This handles the case where FS occurs before TL or LP. | |
| 164 | .de FS | |
| 165 | .br | |
| 166 | \\*[FS]\\ | |
| 167 | .. | |
| 168 | .nr cov*rp-format 0 | |
| 169 | .nr cov*rp-no 0 | |
| 170 | .\" released paper format | |
| 171 | .de RP | |
| 172 | .nr cov*rp-format 1 | |
| 173 | .if \\n[.$] .if '\\$1'no' .nr cov*rp-no 1 | |
| 174 | .if rPO .po \\n(POu | |
| 175 | .pn 0 | |
| 176 | .. | |
| 177 | .de TL | |
| 178 | .br | |
| 179 | .als TL cov*err-not-again | |
| 180 | .rn @AB AB | |
| 181 | .rn @AU AU | |
| 182 | .rn @AI AI | |
| 465b256c | 183 | .di cov*tl-div |
| 92d0a6a6 JR |
184 | .par@reset |
| 185 | .ft B | |
| 186 | .ps +2 | |
| 187 | .vs +3p | |
| 188 | .ll (u;\\n[LL]*5/6) | |
| 189 | .nr cov*n-au 0 | |
| 465b256c | 190 | .DEVTAG-TL |
| 92d0a6a6 JR |
191 | .. |
| 192 | .de @AU | |
| 193 | .par@reset | |
| 194 | .if !'\\n(.z'' \{\ | |
| 195 | . br | |
| 196 | . di | |
| 197 | .\} | |
| 198 | .nr cov*n-au +1 | |
| 199 | .di cov*au-div!\\n[cov*n-au] | |
| 200 | .nf | |
| 201 | .ft I | |
| 465b256c JR |
202 | .ie (\\n[PS] >= 1000) \ |
| 203 | . ps (\\n[PS]z / 1000u) | |
| 204 | .el \ | |
| 205 | . ps \\n[PS] | |
| 92d0a6a6 JR |
206 | .. |
| 207 | .de @AI | |
| 465b256c | 208 | .par@reset |
| 92d0a6a6 JR |
209 | .if !'\\n(.z'' \{\ |
| 210 | . br | |
| 211 | . di | |
| 212 | .\} | |
| 213 | .ie !\\n[cov*n-au] .@error AI before AU | |
| 214 | .el \{\ | |
| 215 | . di cov*ai-div!\\n[cov*n-au] | |
| 216 | . nf | |
| 217 | . ft R | |
| 465b256c JR |
218 | . ie (\\n[PS] >= 1000) \ |
| 219 | . ps (\\n[PS]z / 1000u) | |
| 220 | . el \ | |
| 221 | . ps \\n[PS] | |
| 92d0a6a6 JR |
222 | .\} |
| 223 | .. | |
| 4d3e9548 | 224 | . |
| 92d0a6a6 JR |
225 | .de LP |
| 226 | .if !'\\n[.z]'' \{\ | |
| 227 | . br | |
| 228 | . di | |
| 229 | .\} | |
| 230 | .br | |
| 231 | .cov*ab-init | |
| 232 | .cov*print | |
| 4d3e9548 | 233 | .nop \\*[\\$0]\\ |
| 92d0a6a6 | 234 | .. |
| 4d3e9548 | 235 | . |
| 92d0a6a6 JR |
236 | .als IP LP |
| 237 | .als PP LP | |
| 238 | .als XP LP | |
| 239 | .als QP LP | |
| 240 | .als RS LP | |
| 241 | .als NH LP | |
| 242 | .als SH LP | |
| 243 | .als MC LP | |
| 244 | .als RT LP | |
| 245 | .als XS LP | |
| 4d3e9548 | 246 | . |
| 92d0a6a6 JR |
247 | .de cov*ab-init |
| 248 | .als cov*ab-init @nop | |
| 249 | .als LP @LP | |
| 250 | .als IP @IP | |
| 251 | .als PP @PP | |
| 252 | .als XP @XP | |
| 253 | .als RT @RT | |
| 254 | .als XS @XS | |
| 255 | .als SH @SH | |
| 256 | .als NH @NH | |
| 257 | .als QP @QP | |
| 258 | .als RS @RS | |
| 259 | .als RE @RE | |
| 260 | .als QS @QS | |
| 261 | .als QE @QE | |
| 262 | .als MC @MC | |
| 263 | .als EQ @EQ | |
| 264 | .als EN @EN | |
| 265 | .als TS @TS | |
| 266 | .als AB cov*err-not-after-ab | |
| 267 | .als AU par@AU | |
| 268 | .als AI par@AI | |
| 269 | .als TL par@TL | |
| 270 | .. | |
| 4d3e9548 | 271 | . |
| 92d0a6a6 JR |
272 | .de @AB |
| 273 | .if !'\\n(.z'' \{\ | |
| 274 | . br | |
| 275 | . di | |
| 276 | .\} | |
| 277 | .cov*ab-init | |
| 465b256c JR |
278 | .ie '\*(.T'html' \{\ |
| 279 | . cov*tl-au-print | |
| 280 | . als cov*tl-au-print @nop | |
| 281 | .\} | |
| 282 | .el .di cov*ab-div | |
| 92d0a6a6 JR |
283 | .par@ab-indent |
| 284 | .par@reset | |
| 285 | .if !'\\$1'no' \{\ | |
| 465b256c | 286 | . if '\*(.T'html' \{\ |
| 4d3e9548 JL |
287 | . nf |
| 288 | . sp | |
| 465b256c | 289 | . \} |
| 92d0a6a6 JR |
290 | . ft I |
| 291 | . ce 1 | |
| 292 | \\*[ABSTRACT] | |
| 293 | . sp | |
| 294 | . ft R | |
| 295 | .\} | |
| 296 | .ns | |
| 297 | .@PP | |
| 298 | .if '\*(.T'html' \{\ | |
| 299 | . cov*tl-au-print | |
| 300 | . als cov*tl-au-print @nop | |
| 301 | . par@reset-env | |
| 302 | . par@reset | |
| 303 | . cov*print | |
| 304 | .\} | |
| 305 | .. | |
| 306 | .de AE | |
| 307 | .ie '\*(.T'html' \{\ | |
| 308 | . als AE cov*err-not-again | |
| 309 | .\} | |
| 310 | .el \{\ | |
| 311 | . ie '\\n(.z'cov*ab-div' \{\ | |
| 312 | . als AE cov*err-not-again | |
| 313 | . br | |
| 314 | . di | |
| 315 | .\" nr cov*ab-height \\n[dn] | |
| 316 | . par@reset-env | |
| 317 | . par@reset | |
| 318 | . cov*print | |
| 319 | . \} | |
| 320 | . el .@error AE without AB | |
| 321 | .\} | |
| 322 | .. | |
| 323 | .de @div-end!cov*ab-div | |
| 324 | .AE | |
| 325 | .. | |
| 326 | .de cov*print | |
| 327 | .als cov*print @nop | |
| 328 | .ie d cov*tl-div \{\ | |
| 329 | . ie \\n[cov*rp-format] .cov*rp-print | |
| 330 | . el .cov*draft-print | |
| 331 | .\} | |
| 332 | .el \{\ | |
| 333 | . if \\n[cov*rp-format] \{\ | |
| 334 | . @warning RP format but no TL | |
| 335 | . bp 1 | |
| 336 | . als FS @FS | |
| 337 | . als FE @FE | |
| 338 | . CHECK-FOOTER-AND-KEEP | |
| 339 | . \} | |
| 340 | . br | |
| 341 | .\} | |
| 342 | .. | |
| 343 | .de cov*rp-print | |
| 344 | .nr cov*page-length \\n[.p] | |
| 345 | .pl 1000i | |
| 346 | .cov*tl-au-print | |
| 347 | .sp 3 | |
| 348 | .if d cov*ab-div \{\ | |
| 4d3e9548 | 349 | . if !'\*(.T'html' .nf |
| 465b256c | 350 | . cov*ab-div |
| 92d0a6a6 JR |
351 | .\} |
| 352 | .sp 3 | |
| 353 | .par@reset | |
| 354 | \\*[DY] | |
| 355 | .br | |
| 356 | .if \\n[cov*fn-height] \{\ | |
| 357 | . sp |(u;\\n[cov*page-length]-\\n[FM]\ | |
| 358 | -\\n[cov*fn-height]-\\n[fn@sep-dist]>?\\n[nl]) | |
| 359 | . fn@print-sep | |
| 360 | . ev nf | |
| 361 | . cov*fn-div | |
| 362 | . ev | |
| 363 | . ie \\n[cov*rp-no] .rm cov*fn-div | |
| 364 | . el \{\ | |
| 365 | . rn cov*fn-div fn@overflow-div | |
| 366 | . nr fn@have-overflow 1 | |
| 367 | . \} | |
| 368 | .\} | |
| 369 | .als FS @FS | |
| 370 | .als FE @FE | |
| 371 | .CHECK-FOOTER-AND-KEEP | |
| 372 | .\" If anything was printed below where the footer line is normally printed, | |
| 373 | .\" then that's an overflow. | |
| 374 | .if -\\n[FM]/2+1v+\\n[cov*page-length]<\\n[nl] .@error cover sheet overflow | |
| 375 | .pl \\n[cov*page-length]u | |
| 376 | .bp 1 | |
| 377 | .if !\\n[cov*rp-no] .cov*tl-au-print | |
| 378 | .rs | |
| 379 | .sp 1 | |
| 380 | .. | |
| 381 | .de cov*draft-print | |
| 382 | .cov*tl-au-print | |
| 383 | .if d cov*ab-div \{\ | |
| 384 | . nf | |
| 385 | . sp 2 | |
| 386 | . cov*ab-div | |
| 387 | .\} | |
| 388 | .sp 1 | |
| 389 | .. | |
| 390 | .de cov*tl-au-print | |
| 391 | .par@reset | |
| 392 | .nf | |
| 393 | .rs | |
| 394 | .sp 3 | |
| 395 | .ce 9999 | |
| 465b256c JR |
396 | .if d cov*tl-div \{\ |
| 397 | . cov*tl-div | |
| 398 | . DEVTAG-EO-TL | |
| 399 | .\} | |
| 92d0a6a6 JR |
400 | .nr cov*i 1 |
| 401 | .nr cov*sp 1v | |
| 402 | .while \\n[cov*i]<=\\n[cov*n-au] \{\ | |
| 465b256c JR |
403 | . ie '\*(.T'html' .br |
| 404 | . el .sp \\n[cov*sp]u | |
| 92d0a6a6 JR |
405 | . cov*au-div!\\n[cov*i] |
| 406 | . ie d cov*ai-div!\\n[cov*i] \{\ | |
| 407 | . sp .5v | |
| 408 | . cov*ai-div!\\n[cov*i] | |
| 409 | . nr cov*sp 1v | |
| 410 | . \} | |
| 411 | . el .nr cov*sp .5v | |
| 412 | . nr cov*i +1 | |
| 413 | .\} | |
| 414 | .ce 0 | |
| 415 | .. | |
| 416 | .nr cov*fn-height 0 | |
| 417 | .nr cov*in-fn 0 | |
| 418 | .\" start of footnote on cover | |
| 419 | .de cov*FS | |
| 420 | .if \\n[cov*in-fn] \{\ | |
| 421 | . @error nested FS | |
| 422 | . FE | |
| 423 | .\} | |
| 424 | .nr cov*in-fn 1 | |
| 425 | .ev fn | |
| 426 | .par@reset-env | |
| 427 | .da cov*fn-div | |
| 428 | .if !\\n[cov*fn-height] .ns | |
| 429 | .ie \\n[.$] .FP "\\$1" no | |
| 430 | .el .@LP | |
| 431 | .. | |
| 432 | .de @div-end!cov*fn-div | |
| 433 | .cov*FE | |
| 434 | .. | |
| 435 | .\" end of footnote on cover | |
| 436 | .de cov*FE | |
| 437 | .ie '\\n(.z'cov*fn-div' \{\ | |
| 438 | . br | |
| 439 | . ev | |
| 440 | . di | |
| 441 | . nr cov*in-fn 0 | |
| 442 | . nr cov*fn-height +\\n[dn] | |
| 443 | .\} | |
| 444 | .el .@error FE without matching FS | |
| 445 | .. | |
| 446 | .\" *************************** | |
| 447 | .\" ******** module pg ******** | |
| 448 | .\" *************************** | |
| 449 | .\" Page-level formatting. | |
| 450 | .\" > 0 if we have a footnote on the current page | |
| 451 | .nr pg@fn-flag 0 | |
| 452 | .nr pg@colw 0 | |
| 453 | .nr pg@fn-colw 0 | |
| 454 | .nr HM 1i | |
| 455 | .nr FM 1i | |
| 456 | .ds LF | |
| 457 | .ds CF | |
| 458 | .ds RF | |
| 459 | .ds LH | |
| 4d3e9548 | 460 | .ds CH -\En[PN]- |
| 92d0a6a6 | 461 | .ds RH |
| 4d3e9548 JL |
462 | .ds pg*OH '\E*[LH]'\E*[CH]'\E*[RH]' |
| 463 | .ds pg*EH '\E*[LH]'\E*[CH]'\E*[RH]' | |
| 464 | .ds pg*OF '\E*[LF]'\E*[CF]'\E*[RF]' | |
| 465 | .ds pg*EF '\E*[LF]'\E*[CF]'\E*[RF]' | |
| 92d0a6a6 JR |
466 | .de OH |
| 467 | .ds pg*\\$0 "\\$* | |
| 468 | .. | |
| 469 | .als EH OH | |
| 470 | .als OF OH | |
| 471 | .als EF OH | |
| 472 | .de PT | |
| 473 | .ie \\n%=1 .if \\n[pg*P1] .tl \\*[pg*OH] | |
| 474 | .el \{\ | |
| 475 | . ie o .tl \\*[pg*OH] | |
| 476 | . el .tl \\*[pg*EH] | |
| 477 | .\} | |
| 478 | .. | |
| 479 | .de BT | |
| 480 | .ie o .tl \\*[pg*OF] | |
| 481 | .el .tl \\*[pg*EF] | |
| 482 | .. | |
| 483 | .nr pg*P1 0 | |
| 484 | .de P1 | |
| 4d3e9548 JL |
485 | .ie r bell_localisms \{\ |
| 486 | . DS L | |
| 487 | . ft CW | |
| 488 | .\} | |
| 489 | .el .nr pg*P1 1 | |
| 92d0a6a6 JR |
490 | .. |
| 491 | .wh -\n[FM]u pg@bottom | |
| 492 | .wh -\n[FM]u/2u pg*footer | |
| 493 | .nr MINGW 2n | |
| 494 | .nr pg@ncols 1 | |
| 495 | .de @MC | |
| 496 | .if !'\\n(.z'' .error-recover MC while diversion open | |
| 497 | .br | |
| 498 | .ie \\n[pg@ncols]>1 .pg@super-eject | |
| 499 | .el \{\ | |
| 500 | . \" flush out any floating keeps | |
| 501 | . while \\n[kp@tail]>\\n[kp@head] \{\ | |
| 502 | . rs | |
| 503 | . bp | |
| 504 | . \} | |
| 505 | .\} | |
| 506 | .ie !\\n(.$ \{\ | |
| 507 | . nr pg@colw \\n[LL]*7/15 | |
| 508 | . nr pg*gutw \\n[LL]-(2*\\n[pg@colw]) | |
| 509 | . nr pg@ncols 2 | |
| 510 | .\} | |
| 511 | .el \{\ | |
| 512 | . nr pg@colw (n;\\$1)<?\\n[LL] | |
| 513 | . ie \\n[.$]<2 .nr pg*gutw \\n[MINGW] | |
| 514 | . el .nr pg*gutw (n;\\$2) | |
| 515 | . nr pg@ncols \\n[LL]-\\n[pg@colw]/(\\n[pg@colw]+\\n[pg*gutw])+1 | |
| 516 | . ie \\n[pg@ncols]>1 \ | |
| 517 | . nr pg*gutw \\n[LL]-(\\n[pg@ncols]*\\n[pg@colw])/(\\n[pg@ncols]-1) | |
| 518 | . el .nr pg*gutw 0 | |
| 519 | .\} | |
| 465b256c | 520 | .DEVTAG ".mc \\n[pg@ncols] \\n[pg@colw] \\n[pg*gutw]" |
| 92d0a6a6 JR |
521 | .mk pg*col-top |
| 522 | .ns | |
| 523 | .nr pg*col-num 0 | |
| 524 | .nr pg@fn-colw \\n[pg@colw]*5/6 | |
| 525 | .par@reset | |
| 526 | .. | |
| 527 | .de 2C | |
| 528 | .MC | |
| 529 | .. | |
| 530 | .de 1C | |
| 531 | .MC \\n[LL]u | |
| 532 | .. | |
| 533 | .\" top of page macro | |
| 534 | .de pg@top | |
| 535 | .ch pg*footer -\\n[FM]u/2u | |
| 536 | .nr PN \\n% | |
| 537 | .nr pg*col-num 0 | |
| 538 | .nr pg@fn-bottom-margin 0 | |
| 92d0a6a6 JR |
539 | .po \\n[PO]u |
| 540 | .ev h | |
| 541 | .par@reset | |
| 542 | .sp (u;\\n[HM]/2) | |
| 543 | .PT | |
| 544 | .sp |\\n[HM]u | |
| 545 | .if d HD .HD | |
| 546 | .mk pg@header-bottom | |
| 547 | .ev | |
| 548 | .mk pg*col-top | |
| 549 | .pg*start-col | |
| 550 | .. | |
| 551 | .de pg*start-col | |
| 552 | .\" Handle footnote overflow before floating keeps, because the keep | |
| 553 | .\" might contain an embedded footnote. | |
| 554 | .fn@top-hook | |
| 555 | .kp@top-hook | |
| 556 | .tbl@top-hook | |
| 557 | .ns | |
| 558 | .. | |
| 559 | .de pg@cs-top | |
| 560 | .sp \\n[HM]u | |
| 561 | .\" move pg@bottom and pg*footer out of the way | |
| 562 | .ch pg@bottom \\n[.p]u*2u | |
| 563 | .ch pg*footer \\n[.p]u*2u | |
| 564 | .ns | |
| 565 | .. | |
| 566 | .de pg@bottom | |
| 567 | .tbl@bottom-hook | |
| 568 | .if \\n[pg@fn-flag] .fn@bottom-hook | |
| 569 | .nr pg*col-num +1 | |
| 570 | .ie \\n[pg*col-num]<\\n[pg@ncols] .pg*end-col | |
| 571 | .el .pg*end-page | |
| 572 | .. | |
| 573 | .de pg*end-col | |
| 574 | 'sp |\\n[pg*col-top]u | |
| 465b256c | 575 | .po (u;\\n[PO]+(\\n[pg@colw]+\\n[pg*gutw]*\\n[pg*col-num])) |
| 92d0a6a6 JR |
576 | .\"po +(u;\\n[pg@colw]+\\n[pg*gutw]) |
| 577 | .pg*start-col | |
| 578 | .. | |
| 579 | .de pg*end-page | |
| 465b256c | 580 | .po \\n[PO]u |
| 92d0a6a6 JR |
581 | .\" Make sure we don't exit if there are still floats or footnotes left-over. |
| 582 | .ie \\n[kp@head]<\\n[kp@tail]:\\n[fn@have-overflow] \{\ | |
| 583 | . \" Switching environments ensures that we don't get an unnecessary | |
| 584 | . \" blank line at the top of the page. | |
| 585 | . ev ne | |
| 586 | ' bp | |
| 587 | . ev | |
| 588 | .\} | |
| 589 | .el \{\ | |
| 590 | . \" If the text has ended and there are no more footnotes or keeps, exit. | |
| 591 | . if \\n[pg@text-ended] .ex | |
| 592 | . if r pg*next-number \{\ | |
| 593 | . pn \\n[pg*next-number] | |
| 594 | . rr pg*next-number | |
| 595 | . if d pg*next-format \{\ | |
| 596 | . af PN \\*[pg*next-format] | |
| 597 | . rm pg*next-format | |
| 598 | . \} | |
| 599 | . \} | |
| 600 | ' bp | |
| 601 | .\} | |
| 602 | .. | |
| 603 | .\" pg@begin number format | |
| 604 | .de pg@begin | |
| 605 | .ie \\n[.$]>0 \{\ | |
| 606 | . nr pg*next-number (;\\$1) | |
| 607 | . ie \\n[.$]>1 .ds pg*next-format \\$2 | |
| 608 | . el .rm pg*next-format | |
| 609 | .\} | |
| 610 | .el .rr pg*next-number | |
| 611 | .pg@super-eject | |
| 612 | .. | |
| 613 | .\" print the footer line | |
| 614 | .de pg*footer | |
| 615 | .ev h | |
| 616 | .par@reset | |
| 617 | .BT | |
| 618 | .ev | |
| 619 | .. | |
| 620 | .\" flush out any keeps or footnotes | |
| 621 | .de pg@super-eject | |
| 622 | .br | |
| 623 | .if !'\\n(.z'' .@error-recover diversion open while ejecting page | |
| 624 | .\" Make sure we stay in the end macro while there is still footnote overflow | |
| 625 | .\" left, or floating keeps. | |
| 626 | .while \\n[kp@tail]>\\n[kp@head]:\\n[pg@fn-flag] \{\ | |
| 627 | . rs | |
| 628 | . bp | |
| 629 | .\} | |
| 630 | .bp | |
| 631 | .. | |
| 632 | .nr pg@text-ended 0 | |
| 633 | .de pg@end-text | |
| 634 | .br | |
| 635 | .nr pg@text-ended 1 | |
| 636 | .pg@super-eject | |
| 637 | .. | |
| 638 | .em pg@end-text | |
| 639 | .\" *************************** | |
| 640 | .\" ******** module fn ******** | |
| 641 | .\" *************************** | |
| 642 | .\" Footnotes. | |
| 643 | .nr fn@sep-dist 8p | |
| 644 | .ev fn | |
| 645 | .\" Round it vertically | |
| 646 | .vs \n[fn@sep-dist]u | |
| 647 | .nr fn@sep-dist \n[.v] | |
| 648 | .ev | |
| 649 | .nr fn*text-num 0 1 | |
| 650 | .nr fn*note-num 0 1 | |
| 4d3e9548 | 651 | .ds * \E*[par@sup-start]\En+[fn*text-num]\E*[par@sup-end] |
| 92d0a6a6 JR |
652 | .nr fn*open 0 |
| 653 | .\" normal FS | |
| 654 | .de @FS | |
| 655 | .ie \\n[.$] .fn*do-FS "\\$1" no | |
| 656 | .el \{\ | |
| 657 | . ie \\n[fn*text-num]>\\n[fn*note-num] .fn*do-FS \\n+[fn*note-num] | |
| 658 | . el .fn*do-FS | |
| 659 | .\} | |
| 660 | .. | |
| 661 | .\" Second argument of `no' means don't embellish the first argument. | |
| 662 | .de fn*do-FS | |
| 663 | .if \\n[fn*open] .@error-recover nested FS | |
| 664 | .nr fn*open 1 | |
| 665 | .if \\n[.u] \{\ | |
| 666 | . \" Ensure that the first line of the footnote is on the same page | |
| 667 | . \" as the reference. I think this is minimal. | |
| 668 | . ev fn | |
| 669 | . nr fn*need 1v | |
| 670 | . ev | |
| 671 | . ie \\n[pg@fn-flag] .nr fn*need +\\n[fn:PD] | |
| 672 | . el .nr fn*need +\\n[fn@sep-dist] | |
| 673 | . ne \\n[fn*need]u+\\n[.V]u>?0 | |
| 674 | .\} | |
| 675 | .ev fn | |
| 676 | .par@reset-env | |
| 677 | .fn*start-div | |
| 678 | .par@reset | |
| 679 | .ie \\n[.$] .FP \\$@ | |
| 680 | .el .@LP | |
| 681 | .. | |
| 682 | .de @FE | |
| 683 | .ie !\\n[fn*open] .@error FE without FS | |
| 684 | .el \{\ | |
| 685 | . nr fn*open 0 | |
| 686 | . br | |
| 687 | . ev | |
| 688 | . fn*end-div | |
| 689 | .\} | |
| 690 | .. | |
| 691 | .nr fn@have-overflow 0 | |
| 692 | .\" called at the top of each column | |
| 693 | .de fn@top-hook | |
| 694 | .nr fn*max-width 0 | |
| 695 | .nr fn*page-bottom-pos 0-\\n[FM]-\\n[pg@fn-bottom-margin] | |
| 696 | .ch pg@bottom \\n[fn*page-bottom-pos]u | |
| 697 | .if \\n[fn@have-overflow] \{\ | |
| 698 | . nr fn@have-overflow 0 | |
| 699 | . fn*start-div | |
| 700 | . ev nf | |
| 701 | . fn@overflow-div | |
| 702 | . ev | |
| 703 | . fn*end-div | |
| 704 | .\} | |
| 705 | .. | |
| 706 | .\" This is called at the bottom of the column if pg@fn-flag is set. | |
| 707 | .de fn@bottom-hook | |
| 708 | .nr pg@fn-flag 0 | |
| 709 | .nr fn@have-overflow 0 | |
| 710 | .nr fn@bottom-pos \\n[.p]-\\n[FM]-\\n[pg@fn-bottom-margin]+\\n[.v] | |
| 711 | .ev fn | |
| 712 | .nr fn@bottom-pos -\\n[.v] | |
| 713 | .ev | |
| 714 | .ie \\n[nl]+\\n[fn@sep-dist]+\n[.V]>\\n[fn@bottom-pos] \{\ | |
| 715 | . rn fn@div fn@overflow-div | |
| 716 | . nr fn@have-overflow 1 | |
| 717 | .\} | |
| 718 | .el \{\ | |
| 719 | . if \\n[pg@ncols]>1 \ | |
| 720 | . if \\n[fn*max-width]>\\n[pg@fn-colw] \ | |
| 721 | . nr pg@fn-bottom-margin \\n[.p]-\\n[FM]-\\n[nl]+1v | |
| 722 | . wh \\n[fn@bottom-pos]u fn*catch-overflow | |
| 723 | . fn@print-sep | |
| 724 | . ev nf | |
| 725 | . fn@div | |
| 726 | . rm fn@div | |
| 727 | . ev | |
| 728 | . if '\\n(.z'fn@overflow-div' \{\ | |
| 729 | . di | |
| 730 | . nr fn@have-overflow \\n[dn]>0 | |
| 731 | . \} | |
| 732 | . ch fn*catch-overflow | |
| 733 | .\} | |
| 734 | .. | |
| 735 | .de fn*catch-overflow | |
| 736 | .di fn@overflow-div | |
| 737 | .. | |
| 738 | .nr fn*embed-count 0 | |
| 739 | .de @div-end!fn@div | |
| 740 | .br | |
| 741 | .if '\\n[.ev]'fn' .ev | |
| 742 | .fn*end-div | |
| 743 | .nr fn*open 0 | |
| 744 | .. | |
| 745 | .als @div-end!fn*embed-div @div-end!fn@div | |
| 746 | .de fn*start-div | |
| 747 | .ie '\\n(.z'' \{\ | |
| 748 | . da fn@div | |
| 749 | . if !\\n[pg@fn-flag] .ns | |
| 750 | .\} | |
| 751 | .el .di fn*embed-div | |
| 752 | .. | |
| 753 | .de fn*end-div | |
| 754 | .ie '\\n(.z'fn@div' \{\ | |
| 755 | . di | |
| 756 | . nr fn*page-bottom-pos -\\n[dn] | |
| 757 | . nr fn*max-width \\n[fn*max-width]>?\\n[dl] | |
| 758 | . if !\\n[pg@fn-flag] .nr fn*page-bottom-pos -\\n[fn@sep-dist] | |
| 759 | . nr pg@fn-flag 1 | |
| 760 | . nr fn*page-bottom-pos \\n[nl]-\\n[.p]+\n[.V]>?\\n[fn*page-bottom-pos] | |
| 761 | . ch pg@bottom \\n[fn*page-bottom-pos]u | |
| 762 | .\} | |
| 763 | .el \{\ | |
| 764 | . ie '\\n(.z'fn*embed-div' \{\ | |
| 765 | . di | |
| 766 | . rn fn*embed-div fn*embed-div!\\n[fn*embed-count] | |
| 767 | \!. fn*embed-start \\n[fn*embed-count] | |
| 768 | . rs | |
| 769 | ' sp (u;\\n[dn]+\\n[fn@sep-dist]+\\n[.V]) | |
| 770 | \!. fn*embed-end | |
| 771 | . nr fn*embed-count +1 | |
| 772 | . \} | |
| 773 | . el \{\ | |
| 774 | . ev fn | |
| 775 | . @error-recover unclosed diversion within footnote | |
| 776 | . \} | |
| 777 | .\} | |
| 778 | .. | |
| 779 | .de fn*embed-start | |
| 780 | .ie '\\n(.z'' \{\ | |
| 781 | . fn*start-div | |
| 782 | . ev nf | |
| 783 | . fn*embed-div!\\$1 | |
| 784 | . rm fn*embed-div!\\$1 | |
| 785 | . ev | |
| 786 | . fn*end-div | |
| 787 | . di fn*null | |
| 788 | .\} | |
| 789 | .el \{\ | |
| 790 | \!. fn*embed-start \\$1 | |
| 791 | . rs | |
| 792 | .\} | |
| 793 | .. | |
| 794 | .de fn*embed-end | |
| 795 | .ie '\\n(.z'fn*null' \{\ | |
| 796 | . di | |
| 797 | . rm fn*null | |
| 798 | .\} | |
| 799 | .el \!.fn*embed-end | |
| 800 | .. | |
| 801 | .\" It's important that fn@print-sep use up exactly fn@sep-dist vertical space. | |
| 802 | .de fn@print-sep | |
| 803 | .ev fn | |
| 804 | .in 0 | |
| 805 | .vs \\n[fn@sep-dist]u | |
| 806 | \D'l 1i 0' | |
| 807 | .br | |
| 808 | .ev | |
| 809 | .. | |
| 810 | .\" *************************** | |
| 811 | .\" ******** module kp ******** | |
| 812 | .\" *************************** | |
| 813 | .\" Keeps. | |
| 814 | .de KS | |
| 815 | .br | |
| 816 | .di kp*div | |
| 817 | .. | |
| 818 | .de KF | |
| 819 | .if !'\\n(.z'' .@error-recover KF while open diversion | |
| 820 | .di kp*fdiv | |
| 821 | .ev k | |
| 822 | .par@reset-env | |
| 823 | .par@reset | |
| 824 | .. | |
| 825 | .de KE | |
| 826 | .ie '\\n(.z'kp*div' .kp*end | |
| 827 | .el \{\ | |
| 828 | . ie '\\n(.z'kp*fdiv' .kp*fend | |
| 829 | . el .@error KE without KS or KF | |
| 830 | .\} | |
| 831 | .. | |
| 832 | .de @div-end!kp*div | |
| 833 | .kp*end | |
| 834 | .. | |
| 835 | .de @div-end!kp*fdiv | |
| 836 | .kp*fend | |
| 837 | .. | |
| 838 | .de kp*need | |
| 839 | .ie '\\n(.z'' .ds@need \\$1 | |
| 840 | .el \!.kp*need \\$1 | |
| 841 | .. | |
| 842 | .\" end non-floating keep | |
| 843 | .de kp*end | |
| 844 | .br | |
| 845 | .di | |
| 846 | .kp*need \\n[dn] | |
| 847 | .ev nf | |
| 848 | .kp*div | |
| 849 | .ev | |
| 850 | .rm kp*div | |
| 851 | .. | |
| 852 | .\" Floating keeps. | |
| 853 | .nr kp@head 0 | |
| 854 | .nr kp@tail 0 | |
| 855 | .\" end floating keep | |
| 856 | .de kp*fend | |
| 857 | .br | |
| 858 | .ev | |
| 859 | .di | |
| 860 | .ie \\n[.t]-(\\n[.k]>0*1v)>\\n[dn] \{\ | |
| 861 | . br | |
| 862 | . ev nf | |
| 863 | . kp*fdiv | |
| 864 | . rm kp*fdiv | |
| 865 | . ev | |
| 866 | .\} | |
| 867 | .el \{\ | |
| 868 | . rn kp*fdiv kp*div!\\n[kp@tail] | |
| 869 | . nr kp*ht!\\n[kp@tail] 0\\n[dn] | |
| 870 | . nr kp@tail +1 | |
| 871 | .\} | |
| 872 | .. | |
| 873 | .\" top of page processing for KF | |
| 874 | .nr kp*doing-top 0 | |
| 875 | .de kp@top-hook | |
| 876 | .if !\\n[kp*doing-top] \{\ | |
| 877 | . nr kp*doing-top 1 | |
| 878 | . kp*do-top | |
| 879 | . nr kp*doing-top 0 | |
| 880 | .\} | |
| 881 | .. | |
| 882 | .de kp*do-top | |
| 883 | .\" If the first keep won't fit, only force it out if we haven't had a footnote | |
| 884 | .\" and we're at the top of the page. | |
| 885 | .nr kp*force \\n[pg@fn-flag]=0&(\\n[nl]<=\\n[pg@header-bottom]) | |
| 886 | .nr kp*fits 1 | |
| 887 | .while \\n[kp@tail]>\\n[kp@head]&\\n[kp*fits] \{\ | |
| 888 | . ie \\n[.t]>\\n[kp*ht!\\n[kp@head]]:\\n[kp*force] \{\ | |
| 889 | . nr kp*force 0 | |
| 890 | . \" It's important to advance kp@head before bringing | |
| 891 | . \" back the keep, so that if the last line of the | |
| 892 | . \" last keep springs the bottom of page trap, a new | |
| 893 | . \" page will not be started unnecessarily. | |
| 894 | . rn kp*div!\\n[kp@head] kp*temp | |
| 895 | . nr kp@head +1 | |
| 896 | . ev nf | |
| 897 | . kp*temp | |
| 898 | . ev | |
| 899 | . rm kp*temp | |
| 900 | . \} | |
| 901 | . el .nr kp*fits 0 | |
| 902 | .\} | |
| 903 | .. | |
| 904 | .\" *************************** | |
| 905 | .\" ******** module ds ******** | |
| 906 | .\" *************************** | |
| 907 | .\" Displays and non-floating keeps. | |
| 908 | .de DE | |
| 909 | .ds*end!\\n[\\n[.ev]:ds-type] | |
| 910 | .nr \\n[.ev]:ds-type 0 | |
| 911 | .. | |
| 92d0a6a6 JR |
912 | .de ds@auto-end |
| 913 | .if \\n[\\n[.ev]:ds-type] \{\ | |
| 914 | . @error automatically terminating display | |
| 915 | . DE | |
| 916 | .\} | |
| 917 | .. | |
| 918 | .de @div-end!ds*div | |
| 919 | .ie \\n[\\n[.ev]:ds-type] .DE | |
| 920 | .el .ds*end!2 | |
| 921 | .. | |
| 922 | .de ds*end!0 | |
| 923 | .@error DE without DS, ID, CD, LD or BD | |
| 924 | .. | |
| 925 | .de LD | |
| 926 | .br | |
| 927 | .nr \\n[.ev]:ds-type 1 | |
| 928 | .par@reset | |
| 929 | .nf | |
| 930 | .sp \\n[DD]u | |
| 931 | .. | |
| 932 | .de ID | |
| 933 | .LD | |
| 934 | .ie \\n[.$] .in +(n;\\$1) | |
| 935 | .el .in +\\n[DI]u | |
| 936 | .. | |
| 937 | .de CD | |
| 938 | .LD | |
| 939 | .ce 9999 | |
| 940 | .. | |
| 941 | .de RD | |
| 942 | .LD | |
| 943 | .rj 9999 | |
| 944 | .. | |
| 945 | .de ds*common-end | |
| 946 | .par@reset | |
| 947 | .sp \\n[DD]u | |
| 948 | .. | |
| 949 | .als ds*end!1 ds*common-end | |
| 950 | .de BD | |
| 951 | .LD | |
| 952 | .nr \\n[.ev]:ds-type 2 | |
| 953 | .di ds*div | |
| 954 | .. | |
| 955 | .de ds*end!2 | |
| 956 | .br | |
| 957 | .ie '\\n(.z'ds*div' \{\ | |
| 958 | . di | |
| 959 | . nf | |
| 960 | . in (u;\\n[.l]-\\n[dl]/2>?0) | |
| 961 | . ds*div | |
| 962 | . rm ds*div | |
| 963 | . ds*common-end | |
| 964 | .\} | |
| 965 | .el .@error-recover mismatched DE | |
| 966 | .. | |
| 967 | .de DS | |
| 968 | .br | |
| 969 | .di ds*div | |
| 970 | .ie '\\$1'B' \{\ | |
| 971 | . LD | |
| 972 | . nr \\n[.ev]:ds-type 4 | |
| 973 | .\} | |
| 974 | .el \{\ | |
| 975 | . ie '\\$1'L' .LD | |
| 976 | . el \{\ | |
| 977 | . ie '\\$1'C' .CD | |
| 978 | . el \{\ | |
| 979 | . ie '\\$1'R' .RD | |
| 980 | . el \{\ | |
| 981 | . ie '\\$1'I' .ID \\$2 | |
| 982 | . el .ID \\$1 | |
| 983 | . \} | |
| 984 | . \} | |
| 985 | . \} | |
| 986 | . nr \\n[.ev]:ds-type 3 | |
| 987 | .\} | |
| 988 | .. | |
| 92d0a6a6 JR |
989 | .de ds@need |
| 990 | .if '\\n(.z'' \{\ | |
| 991 | . while \\n[.t]<=(\\$1)&(\\n[nl]>\\n[pg@header-bottom]) \{\ | |
| 992 | . rs | |
| 993 | ' sp \\n[.t]u | |
| 994 | . \} | |
| 995 | .\} | |
| 996 | .. | |
| 997 | .de ds*end!3 | |
| 998 | .br | |
| 999 | .ie '\\n(.z'ds*div' \{\ | |
| 1000 | . di | |
| 1001 | . ds@need \\n[dn] | |
| 1002 | . ev nf | |
| 1003 | . ds*div | |
| 1004 | . ev | |
| 1005 | . rm ds*div | |
| 1006 | . ds*common-end | |
| 1007 | .\} | |
| 1008 | .el .@error-recover mismatched DE | |
| 1009 | .. | |
| 1010 | .de ds*end!4 | |
| 1011 | .ie '\\n(.z'ds*div' \{\ | |
| 1012 | . br | |
| 1013 | . di | |
| 1014 | . nf | |
| 1015 | . in (u;\\n[.l]-\\n[dl]/2>?0) | |
| 1016 | . ds@need \\n[dn] | |
| 1017 | . ds*div | |
| 1018 | . rm ds*div | |
| 1019 | . ds*common-end | |
| 1020 | .\} | |
| 1021 | .el .@error-recover mismatched DE | |
| 1022 | .. | |
| 1023 | .\" **************************** | |
| 1024 | .\" ******** module par ******** | |
| 1025 | .\" **************************** | |
| 1026 | .\" Paragraph-level formatting. | |
| 1027 | .\" Load time initialization. | |
| 1028 | .de par@load-init | |
| 1029 | .\" PS and VS might have been set on the command-line | |
| 1030 | .if !rPS .nr PS 10 | |
| 1031 | .if !rLL .nr LL 6i | |
| 1032 | .ll \\n[LL]u | |
| 1033 | .\" don't set LT so that it can be defaulted from LL | |
| 1034 | .ie rLT .lt \\n[LT]u | |
| 1035 | .el .lt \\n[LL]u | |
| 465b256c JR |
1036 | .ie (\\n[PS] >= 1000) \ |
| 1037 | . ps (\\n[PS]z / 1000u) | |
| 1038 | .el \ | |
| 1039 | . ps \\n[PS] | |
| 92d0a6a6 | 1040 | .\" don't set VS so that it can be defaulted from PS |
| 465b256c JR |
1041 | .ie rVS \{\ |
| 1042 | . ie (\\n[VS] >= 1000) \ | |
| 1043 | . par*vs "(\\n[VS]p / 1000u)" | |
| 1044 | . el \ | |
| 1045 | . par*vs \\n[VS] | |
| 1046 | .\} | |
| 1047 | .el \{\ | |
| 1048 | . ie (\\n[PS] >= 1000) \ | |
| 1049 | . par*vs "((\\n[PS]p / 1000u) + 2p)" | |
| 1050 | . el \ | |
| 1051 | . par*vs "(\\n[PS] + 2)" | |
| 1052 | .\} | |
| 92d0a6a6 JR |
1053 | .if dFAM .fam \\*[FAM] |
| 1054 | .if !rHY .nr HY 14 | |
| 1055 | .hy \\n[HY] | |
| 1056 | .TA | |
| 1057 | .CHECK-FOOTER-AND-KEEP | |
| 1058 | .. | |
| 1059 | .de par*vs | |
| 1060 | .\" If it's too big to be in points, treat it as units. | |
| 1061 | .ie (p;\\$1)>=40p .vs (u;\\$1) | |
| 1062 | .el .vs (p;\\$1) | |
| 1063 | .. | |
| 1064 | .de par@ab-indent | |
| 1065 | .nr 0:li (u;\\n[LL]/12) | |
| 1066 | .nr 0:ri \\n[0:li] | |
| 1067 | .. | |
| 1068 | .de par*env-init | |
| 1069 | .aln \\n[.ev]:PS PS | |
| 1070 | .aln \\n[.ev]:VS VS | |
| 1071 | .aln \\n[.ev]:LL LL | |
| 1072 | .aln \\n[.ev]:MCLL LL | |
| 1073 | .aln \\n[.ev]:LT LT | |
| 1074 | .aln \\n[.ev]:MCLT LT | |
| 1075 | .aln \\n[.ev]:PI PI | |
| 1076 | .aln \\n[.ev]:PD PD | |
| 1077 | .ad \\n[par*adj] | |
| 1078 | .par@reset-env | |
| 1079 | .. | |
| 1080 | .\" happens when the first page begins | |
| 1081 | .de par@init | |
| 1082 | .if !rLT .nr LT \\n[LL] | |
| 1083 | .if !rFL .nr FL \\n[LL]*5/6 | |
| 465b256c JR |
1084 | .if !rVS \{\ |
| 1085 | . ie (\\n[PS] >= 1000) \ | |
| 1086 | . nr VS (\\n[PS] + 2000) | |
| 1087 | . el \ | |
| 1088 | . nr VS (\\n[PS] + 2) | |
| 1089 | .\} | |
| 92d0a6a6 | 1090 | .if !rDI .nr DI .5i |
| 465b256c JR |
1091 | .if !rFPS \{\ |
| 1092 | . ie (\\n[PS] >= 1000) \ | |
| 1093 | . nr FPS (\\n[PS] - 2000) | |
| 1094 | . el \ | |
| 1095 | . nr FPS (\\n[PS] - 2) | |
| 1096 | .\} | |
| 1097 | .if !rFVS \{\ | |
| 1098 | . ie (\\n[FPS] >= 1000) \ | |
| 1099 | . nr FVS (\\n[FPS] + 2000) | |
| 1100 | . el \ | |
| 1101 | . nr FVS (\\n[FPS] + 2) | |
| 1102 | .\} | |
| 92d0a6a6 JR |
1103 | .\" don't change environment 0 |
| 1104 | .ev h | |
| 465b256c JR |
1105 | .ie (\\n[PS] >= 1000) \ |
| 1106 | . ps (\\n[PS]z / 1000u) | |
| 1107 | .el \ | |
| 1108 | . ps \\n[PS] | |
| 92d0a6a6 JR |
1109 | .if !rQI .nr QI 5n |
| 1110 | .if !rPI .nr PI 5n | |
| 465b256c JR |
1111 | .ie (\\n[VS] >= 1000) \ |
| 1112 | . par*vs "(\\n[VS]p / 1000u)" | |
| 1113 | .el \ | |
| 1114 | . par*vs \\n[VS] | |
| 92d0a6a6 JR |
1115 | .if !rPD .nr PD .3v>?\n(.V |
| 1116 | .if !rDD .nr DD .5v>?\n(.V | |
| 1117 | .if !rFI .nr FI 2n | |
| 1118 | .if !rFPD .nr FPD \\n[PD]/2 | |
| 1119 | .ev | |
| 1120 | .if !dFAM .ds FAM \\n[.fam] | |
| 1121 | .nr par*adj \\n[.j] | |
| 1122 | .par*env-init | |
| 1123 | .ev h | |
| 1124 | .par*env-init | |
| 1125 | .ev | |
| 1126 | .ev fn | |
| 1127 | .par*env-init | |
| 1128 | .ev | |
| 1129 | .ev k | |
| 1130 | .par*env-init | |
| 1131 | .ev | |
| 1132 | .aln 0:MCLL pg@colw | |
| 1133 | .aln 0:MCLT pg@colw | |
| 1134 | .aln k:MCLL pg@colw | |
| 1135 | .aln k:MCLT pg@colw | |
| 1136 | .aln fn:PS FPS | |
| 1137 | .aln fn:VS FVS | |
| 1138 | .aln fn:LL FL | |
| 1139 | .aln fn:LT FL | |
| 1140 | .aln fn:PI FI | |
| 1141 | .aln fn:PD FPD | |
| 1142 | .aln fn:MCLL pg@fn-colw | |
| 1143 | .aln fn:MCLT pg@fn-colw | |
| 1144 | .. | |
| 1145 | .de par@reset-env | |
| 1146 | .nr \\n[.ev]:il 0 | |
| 1147 | .nr \\n[.ev]:li 0 | |
| 1148 | .nr \\n[.ev]:ri 0 | |
| 1149 | .nr \\n[.ev]:ai \\n[\\n[.ev]:PI] | |
| 1150 | .nr \\n[.ev]:pli 0 | |
| 1151 | .nr \\n[.ev]:pri 0 | |
| 1152 | .nr \\n[.ev]:ds-type 0 | |
| 1153 | .. | |
| 1154 | .\" par@reset | |
| 1155 | .de par@reset | |
| 1156 | .br | |
| 465b256c JR |
1157 | .if \\n[need_eo_tl]>0 .DEVTAG-EO-TL |
| 1158 | .nr need_eo_tl 0 | |
| 1159 | .if \\n[need_eo_h]>0 .DEVTAG-EO-H | |
| 1160 | .nr need_eo_h 0 | |
| 92d0a6a6 JR |
1161 | .ce 0 |
| 1162 | .rj 0 | |
| 1163 | .ul 0 | |
| 1164 | .fi | |
| 1165 | .ie \\n[pg@ncols]>1 \{\ | |
| 1166 | . ll (u;\\n[\\n[.ev]:MCLL]-\\n[\\n[.ev]:ri]-\\n[\\n[.ev]:pri]) | |
| 1167 | . lt \\n[\\n[.ev]:MCLT]u | |
| 1168 | .\} | |
| 1169 | .el \{\ | |
| 1170 | . ll (u;\\n[\\n[.ev]:LL]-\\n[\\n[.ev]:ri]-\\n[\\n[.ev]:pri]) | |
| 1171 | . lt \\n[\\n[.ev]:LT]u | |
| 1172 | .\} | |
| 1173 | .in (u;\\n[\\n[.ev]:li]+\\n[\\n[.ev]:pli]) | |
| 1174 | .ft 1 | |
| 1175 | .fam \\*[FAM] | |
| 465b256c JR |
1176 | .ie (\\n[\\n[.ev]:PS] >= 1000) \ |
| 1177 | . ps (\\n[\\n[.ev]:PS]z / 1000u) | |
| 1178 | .el \ | |
| 1179 | . ps \\n[\\n[.ev]:PS] | |
| 1180 | .ie (\\n[\\n[.ev]:VS] >= 1000) \ | |
| 1181 | . par*vs "(\\n[\\n[.ev]:VS]p / 1000u)" | |
| 1182 | .el \ | |
| 1183 | . par*vs \\n[\\n[.ev]:VS] | |
| 92d0a6a6 JR |
1184 | .ls 1 |
| 1185 | .TA | |
| 1186 | .hy \\n[HY] | |
| 1187 | .. | |
| 1188 | .de @RT | |
| 1189 | .nr \\n[.ev]:pli 0 | |
| 1190 | .nr \\n[.ev]:pri 0 | |
| 1191 | .par@reset | |
| 1192 | .. | |
| 1193 | .\" This can be redefined by the user. | |
| 1194 | .de TA | |
| 1195 | .ta T 5n | |
| 1196 | .. | |
| 465b256c JR |
1197 | .\" \n[PORPHANS] sets number of initial lines of any paragraph, |
| 1198 | .\" which must be kept together, without any included page break. | |
| 1199 | .\" Initialise to reproduce original behaviour; user may adjust it. | |
| 1200 | .if !rPORPHANS .nr PORPHANS 1 | |
| 1201 | . | |
| 92d0a6a6 JR |
1202 | .de par*start |
| 1203 | .ds@auto-end | |
| 1204 | .nr \\n[.ev]:pli \\$1 | |
| 1205 | .nr \\n[.ev]:pri \\$2 | |
| 1206 | .par@reset | |
| 1207 | .sp \\n[\\n[.ev]:PD]u | |
| 465b256c | 1208 | .ne \\n[PORPHANS]v+\\n(.Vu |
| 92d0a6a6 JR |
1209 | .. |
| 1210 | .de par@finish | |
| 1211 | .nr \\n[.ev]:pli 0 | |
| 1212 | .nr \\n[.ev]:pri 0 | |
| 1213 | .par@reset | |
| 1214 | .. | |
| 1215 | .\" normal LP | |
| 1216 | .de @LP | |
| 1217 | .par*start 0 0 | |
| 1218 | .nr \\n[.ev]:ai \\n[\\n[.ev]:PI] | |
| 1219 | .. | |
| 1220 | .de @PP | |
| 1221 | .par*start 0 0 | |
| 1222 | .nr \\n[.ev]:ai \\n[\\n[.ev]:PI] | |
| 1223 | .if !'\*(.T'html' .ti +\\n[\\n[.ev]:ai]u | |
| 1224 | .. | |
| 1225 | .de @QP | |
| 1226 | .nr \\n[.ev]:ai \\n[\\n[.ev]:PI] | |
| 1227 | .par*start \\n[QI] \\n[QI] | |
| 1228 | .. | |
| 1229 | .de @XP | |
| 1230 | .par*start \\n[\\n[.ev]:PI] 0 | |
| 1231 | .ti -\\n[\\n[.ev]:PI]u | |
| 1232 | .. | |
| 1233 | .de @IP | |
| 1234 | .if \\n[.$]>1 .nr \\n[.ev]:ai (n;\\$2) | |
| 1235 | .par*start \\n[\\n[.ev]:ai] 0 | |
| 1236 | .if !'\\$1'' \{\ | |
| 1237 | . \" Divert the label so as to freeze any spaces. | |
| 1238 | . di par*label | |
| 1239 | . par*push-tag-env | |
| 1240 | \&\\$1 | |
| 1241 | . par*pop-tag-env | |
| 1242 | . di | |
| 1243 | . chop par*label | |
| 1244 | . ti -\\n[\\n[.ev]:ai]u | |
| 92d0a6a6 | 1245 | . ie \\n[dl]+1n<=\\n[\\n[.ev]:ai] \{\ |
| 465b256c JR |
1246 | . DEVTAG-COL 1 |
| 1247 | \\*[par*label]\h'|\\n[\\n[.ev]:ai]u'\c | |
| 1248 | . DEVTAG-COL 2 | |
| 92d0a6a6 JR |
1249 | . \} |
| 1250 | . el \{\ | |
| 465b256c JR |
1251 | . DEVTAG-COL 1 |
| 1252 | \\*[par*label] | |
| 1253 | . DEVTAG-COL-NEXT 2 | |
| 92d0a6a6 JR |
1254 | . br |
| 1255 | . \} | |
| 1256 | . rm par*label | |
| 1257 | .\} | |
| 1258 | .. | |
| 1259 | .\" We don't want margin characters to be attached when we divert | |
| 1260 | .\" the tag. Since there's no way to save and restore the current | |
| 1261 | .\" margin character, we have to switch to a new environment, taking | |
| 1262 | .\" what we need of the old environment with us. | |
| 1263 | .de par*push-tag-env | |
| 1264 | .nr par*saved-font \\n[.f] | |
| 1265 | .nr par*saved-size \\n[.s]z | |
| 1266 | .nr par*saved-ss \\n[.ss] | |
| 1267 | .ds par*saved-fam \\n[.fam] | |
| 1268 | .ev par | |
| 1269 | .nf | |
| 1270 | .TA | |
| 1271 | .ft \\n[par*saved-font] | |
| 1272 | .ps \\n[par*saved-size]u | |
| 1273 | .ss \\n[par*saved-ss] | |
| 1274 | .fam \\*[par*saved-fam] | |
| 1275 | .. | |
| 1276 | .de par*pop-tag-env | |
| 1277 | .ev | |
| 1278 | .. | |
| 1279 | .de @RS | |
| 1280 | .br | |
| 1281 | .nr \\n[.ev]:li!\\n[\\n[.ev]:il] \\n[\\n[.ev]:li] | |
| 1282 | .nr \\n[.ev]:ri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ri] | |
| 1283 | .nr \\n[.ev]:ai!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ai] | |
| 1284 | .nr \\n[.ev]:pli!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pli] | |
| 1285 | .nr \\n[.ev]:pri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pri] | |
| 1286 | .nr \\n[.ev]:il +1 | |
| 1287 | .nr \\n[.ev]:li +\\n[\\n[.ev]:ai] | |
| 1288 | .nr \\n[.ev]:ai \\n[\\n[.ev]:PI] | |
| 1289 | .par@reset | |
| 1290 | .. | |
| 1291 | .de @RE | |
| 1292 | .br | |
| 1293 | .ie \\n[\\n[.ev]:il] \{\ | |
| 1294 | . nr \\n[.ev]:il -1 | |
| 1295 | . nr \\n[.ev]:ai \\n[\\n[.ev]:ai!\\n[\\n[.ev]:il]] | |
| 1296 | . nr \\n[.ev]:li \\n[\\n[.ev]:li!\\n[\\n[.ev]:il]] | |
| 1297 | . nr \\n[.ev]:ri \\n[\\n[.ev]:ri!\\n[\\n[.ev]:il]] | |
| 1298 | . nr \\n[.ev]:pli \\n[\\n[.ev]:pli!\\n[\\n[.ev]:il]] | |
| 1299 | . nr \\n[.ev]:pri \\n[\\n[.ev]:pri!\\n[\\n[.ev]:il]] | |
| 1300 | .\} | |
| 1301 | .el .@error unbalanced \\$0 | |
| 1302 | .par@reset | |
| 1303 | .. | |
| 1304 | .de @QS | |
| 1305 | .br | |
| 1306 | .nr \\n[.ev]:li!\\n[\\n[.ev]:il] \\n[\\n[.ev]:li] | |
| 1307 | .nr \\n[.ev]:ri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ri] | |
| 1308 | .nr \\n[.ev]:ai!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ai] | |
| 1309 | .nr \\n[.ev]:pli!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pli] | |
| 1310 | .nr \\n[.ev]:pri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pri] | |
| 1311 | .nr \\n[.ev]:il +1 | |
| 1312 | .nr \\n[.ev]:li +\\n[QI] | |
| 1313 | .nr \\n[.ev]:ri +\\n[QI] | |
| 1314 | .nr \\n[.ev]:ai \\n[\\n[.ev]:PI] | |
| 1315 | .par@reset | |
| 1316 | .. | |
| 1317 | .als @QE @RE | |
| 1318 | .\" start boxed text | |
| 1319 | .de B1 | |
| 1320 | .br | |
| 1321 | .HTML-IMAGE | |
| 1322 | .di par*box-div | |
| 1323 | .nr \\n[.ev]:li +1n | |
| 1324 | .nr \\n[.ev]:ri +1n | |
| 1325 | .nr par*box-in \\n[.in] | |
| 1326 | .\" remember what 1n is, just in case the point size changes | |
| 1327 | .nr par*box-n 1n | |
| 1328 | .in +1n | |
| 1329 | .ll -1n | |
| 1330 | .lt -1n | |
| 1331 | .ti \\n[par*box-in]u+1n | |
| 1332 | .. | |
| 1333 | .de @div-end!par*box-div | |
| 1334 | .B2 | |
| 1335 | .. | |
| 1336 | .\" end boxed text | |
| 1337 | .\" Postpone the drawing of the box until we're in the top-level diversion, | |
| 1338 | .\" in case there's a footnote inside the box. | |
| 1339 | .de B2 | |
| 1340 | .ie '\\n(.z'par*box-div' \{\ | |
| 1341 | . br | |
| 1342 | . if \n[.V]>.25m .sp | |
| 1343 | . di | |
| 1344 | . if \n[.V]>.25m .sp | |
| 1345 | . ds@need \\n[dn] | |
| 1346 | . par*box-mark-top | |
| 1347 | . ev nf | |
| 1348 | . par*box-div | |
| 1349 | . ev | |
| 1350 | . nr \\n[.ev]:ri -\\n[par*box-n] | |
| 1351 | . nr \\n[.ev]:li -\\n[par*box-n] | |
| 1352 | . in -\\n[par*box-n]u | |
| 1353 | . ll +\\n[par*box-n]u | |
| 1354 | . lt +\\n[par*box-n]u | |
| 1355 | . par*box-draw \\n[.i]u \\n[.l]u-(\\n[.H]u==1n*1n) | |
| 1356 | .\} | |
| 1357 | .el .@error B2 without B1 | |
| 1358 | .HTML-IMAGE-END | |
| 1359 | .. | |
| 1360 | .de par*box-mark-top | |
| 1361 | .ie '\\n[.z]'' \{\ | |
| 1362 | . rs | |
| 1363 | . mk par*box-top | |
| 1364 | .\} | |
| 1365 | .el \!.par*box-mark-top | |
| 1366 | .. | |
| 1367 | .de par*box-draw | |
| 1368 | .ie '\\n[.z]'' \{\ | |
| 1369 | . nr par*box-in \\n[.i] | |
| 1370 | . nr par*box-ll \\n[.l] | |
| 1371 | . nr par*box-vpt \\n[.vpt] | |
| 1372 | . nr par*box-ad \\n[.j] | |
| 1373 | . ad l | |
| 1374 | . vpt 0 | |
| 1375 | . in \\$1 | |
| 1376 | . ll \\$2 | |
| 1377 | \v'-1v+.25m'\ | |
| 1378 | \D'l (u;\\n[.l]-\\n[.i]) 0'\ | |
| 1379 | \D'l 0 |\\n[par*box-top]u'\ | |
| 1380 | \D'l -(u;\\n[.l]-\\n[.i]) 0'\ | |
| 1381 | \D'l 0 -|\\n[par*box-top]u' | |
| 1382 | . br | |
| 1383 | . sp -1 | |
| 1384 | . in \\n[par*box-in]u | |
| 1385 | . ll \\n[par*box-ll]u | |
| 1386 | . vpt \\n[par*box-vpt] | |
| 1387 | . ad \\n[par*box-ad] | |
| 1388 | .\} | |
| 1389 | .el \!.par*box-draw \\$1 \\$2 | |
| 1390 | .. | |
| 465b256c JR |
1391 | .\" \n[HORPHANS] sets how many lines of the following paragraph must be |
| 1392 | .\" kept together, with a preceding section header. Initialise it, | |
| 1393 | .\" to reproduce original behaviour; user may change it. | |
| 1394 | .if !rHORPHANS .nr HORPHANS 1 | |
| 1395 | . | |
| 1396 | .\" \n[GROWPS] and \n[PSINCR] cause auto-increment of header point size. | |
| 1397 | .\" Initialise them, so they have no effect, unless explicitly set by the user. | |
| 1398 | .if !rGROWPS .nr GROWPS 0 | |
| 1399 | .if !rPSINCR .nr PSINCR 1p | |
| 1400 | . | |
| 92d0a6a6 JR |
1401 | .de SH-NO-TAG |
| 1402 | .par@finish | |
| 465b256c JR |
1403 | .\" Keep the heading and the first few lines of the next paragraph together. |
| 1404 | .\" (\n[HORPHANS] defines "first few" -- default = 1; user may redefine it). | |
| 1405 | .nr sh*minvs \\n[HORPHANS]v | |
| 1406 | .if \\n[sh*psincr]<0 .nr sh*psincr 0 | |
| 1407 | .ie \\n(VS<1000 .par*vs \\n(VSp+\\n[sh*psincr]u | |
| 1408 | .el .par*vs \\n(VSp/1000u+\\n[sh*psincr]u | |
| 1409 | .ne 2v+\\n[sh*minvs]u+\\n[\\n[.ev]:PD]u+\\n(.Vu | |
| 1410 | .\" Adjust point size for heading text, as specified by \n[GROWPS] and \n[PSINCR]. | |
| 1411 | .ie \\n(PS<1000 .ps \\n(PS+\\n[sh*psincr]u | |
| 1412 | .el .ps \\n(PSz/1000u+\\n[sh*psincr]u | |
| 92d0a6a6 JR |
1413 | .sp 1 |
| 1414 | .ft B | |
| 1415 | .. | |
| 1416 | .de @SH | |
| 465b256c JR |
1417 | .\" Standard ms implementation does not expect an argument, |
| 1418 | .\" but allow ".SH n" to make heading point size match ".NH n", | |
| 1419 | .\" for same "n", when \n[GROWPS] and \n[PSINCR] are set. | |
| 1420 | . nr sh*psincr 0 | |
| 1421 | . if 0\\$1>0 .nr sh*psincr (\\n[GROWPS]-0\\$1)*\\n[PSINCR] | |
| 92d0a6a6 | 1422 | . SH-NO-TAG |
| 465b256c JR |
1423 | . DEVTAG-SH 1 |
| 1424 | . if '\*(.T'html' .nr need_eo_h 1 | |
| 92d0a6a6 JR |
1425 | .. |
| 1426 | .\" TL, AU, and AI are aliased to these in cov*ab-init. | |
| 1427 | .de par@TL | |
| 1428 | .par@finish | |
| 1429 | .sp 1 | |
| 1430 | .ft B | |
| 1431 | .ps +2 | |
| 1432 | .vs +3p | |
| 1433 | .ce 9999 | |
| 465b256c JR |
1434 | .DEVTAG-TL |
| 1435 | .nr need_eo_tl 1 | |
| 92d0a6a6 JR |
1436 | .. |
| 1437 | .de par@AU | |
| 1438 | .par@finish | |
| 1439 | .sp 1 | |
| 1440 | .ft I | |
| 1441 | .ce 9999 | |
| 1442 | .. | |
| 1443 | .de par@AI | |
| 1444 | .par@finish | |
| 1445 | .sp .5 | |
| 1446 | .ce 9999 | |
| 1447 | .. | |
| 1448 | .\" In paragraph macros. | |
| 1449 | .de NL | |
| 465b256c JR |
1450 | .ie (\\n[\\n[.ev]:PS] >= 1000) \ |
| 1451 | . ps (\\n[\\n[.ev]:PS]z / 1000u) | |
| 1452 | .el \ | |
| 1453 | . ps \\n[\\n[.ev]:PS] | |
| 92d0a6a6 JR |
1454 | .. |
| 1455 | .de SM | |
| 1456 | .ps -2 | |
| 1457 | .. | |
| 1458 | .de LG | |
| 1459 | .ps +2 | |
| 1460 | .. | |
| 1461 | .de R | |
| 1462 | .ft R | |
| 1463 | .. | |
| 1464 | .\" par*define-font-macro macro font | |
| 1465 | .de par*define-font-macro | |
| 1466 | .de \\$1 | |
| 4d3e9548 JL |
1467 | .ie \En[.$] \{\ |
| 1468 | . nr par*prev-font \En[.f] | |
| 1469 | \&\E$3\f[\\$2]\E$1\f[\En[par*prev-font]]\E$2 | |
| 92d0a6a6 JR |
1470 | .\} |
| 1471 | .el .ft \\$2 | |
| 1472 | \\.. | |
| 1473 | .. | |
| 1474 | .par*define-font-macro B B | |
| 1475 | .par*define-font-macro I I | |
| 1476 | .par*define-font-macro BI BI | |
| 1477 | .par*define-font-macro CW CR | |
| 1478 | .\" underline a word | |
| 1479 | .de UL | |
| 1480 | \Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m'\\$2 | |
| 1481 | .. | |
| 1482 | .\" box a word | |
| 1483 | .de BX | |
| 1484 | .nr par*bxw \w'\\$1'+.4m | |
| 1485 | \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''\ | |
| 1486 | \Z'\h'.2m'\\$1'\ | |
| 1487 | \h'\\n[par*bxw]u' | |
| 1488 | .. | |
| 1489 | .\" The first time UX is used, put a registered mark after it. | |
| 1490 | .ds par*ux-rg \(rg | |
| 1491 | .de UX | |
| 1492 | \s[\\n[.s]*8u/10u]UNIX\s0\\$1\\*[par*ux-rg] | |
| 1493 | .ds par*ux-rg | |
| 1494 | .. | |
| 1495 | .ds par@sup-start \v'-.9m\s'\En[.s]*7u/10u'+.7m' | |
| 1496 | .als { par@sup-start | |
| 1497 | .ds par@sup-end \v'-.7m\s0+.9m' | |
| 1498 | .als } par@sup-end | |
| 1499 | .\" footnote paragraphs | |
| 1500 | .\" FF is the footnote format | |
| 1501 | .nr FF 0 | |
| 1502 | .\" This can be redefined. It gets a second argument of `no' if the first | |
| 1503 | .\" argument was supplied by the user, rather than automatically. | |
| 1504 | .de FP | |
| 1505 | .br | |
| 1506 | .if !d par*fp!\\n[FF] \{\ | |
| 1507 | . @error unknown footnote format `\\n[FF]' | |
| 1508 | . nr FF 0 | |
| 1509 | .\} | |
| 1510 | .ie '\\$2'no' .par*fp!\\n[FF]-no "\\$1" | |
| 1511 | .el .par*fp!\\n[FF] "\\$1" | |
| 1512 | .. | |
| 1513 | .de par*fp!0 | |
| 1514 | .@PP | |
| 1515 | \&\\*[par@sup-start]\\$1\\*[par@sup-end]\ \c | |
| 1516 | .. | |
| 1517 | .de par*fp!0-no | |
| 1518 | .@PP | |
| 1519 | \&\\$1\ \c | |
| 1520 | .. | |
| 1521 | .de par*fp!1 | |
| 1522 | .@PP | |
| 1523 | \&\\$1.\ \c | |
| 1524 | .. | |
| 1525 | .de par*fp!1-no | |
| 1526 | .@PP | |
| 1527 | \&\\$1\ \c | |
| 1528 | .. | |
| 1529 | .de par*fp!2 | |
| 1530 | .@LP | |
| 1531 | \&\\$1.\ \c | |
| 1532 | .. | |
| 1533 | .de par*fp!2-no | |
| 1534 | .@LP | |
| 1535 | \&\\$1\ \c | |
| 1536 | .. | |
| 1537 | .de par*fp!3 | |
| 1538 | .@IP "\\$1." (u;\\n[\\n[.ev]:PI]*2) | |
| 1539 | .. | |
| 1540 | .de par*fp!3-no | |
| 1541 | .@IP "\\$1" (u;\\n[\\n[.ev]:PI]*2) | |
| 1542 | .. | |
| 1543 | .\" *************************** | |
| 1544 | .\" ******** module nh ******** | |
| 1545 | .\" *************************** | |
| 1546 | .\" Numbered headings. | |
| 1547 | .\" nh*hl is the level of the last heading | |
| 1548 | .nr nh*hl 0 | |
| 4d3e9548 JL |
1549 | .\" SN-DOT and SN-NO-DOT represent the section number of |
| 1550 | .\" the current heading, with and without a terminating dot. | |
| 1551 | .ds SN-DOT | |
| 1552 | .ds SN-NO-DOT | |
| 1553 | .\" SN-STYLE sets the statement numbering style used in headings | |
| 1554 | .\" (either SN-DOT or SN-NO-DOT); for backward compatibility with | |
| 1555 | .\" earlier ms versions, the default is SN-DOT | |
| 1556 | .als SN-STYLE SN-DOT | |
| 1557 | .\" Also for backward compatibility, let SN represent SN-DOT. | |
| 1558 | .als SN SN-DOT | |
| 92d0a6a6 JR |
1559 | .\" numbered heading |
| 1560 | .de @NH | |
| 1561 | .ie '\\$1'S' \{\ | |
| 1562 | . shift | |
| 1563 | . nr nh*hl 0 | |
| 1564 | . while \\n[.$] \{\ | |
| 1565 | . nr nh*hl +1 | |
| 1566 | . nr H\\n[nh*hl] 0\\$1 | |
| 1567 | . shift | |
| 1568 | . \} | |
| 1569 | . if !\\n[nh*hl] \{\ | |
| 1570 | . nr H1 1 | |
| 1571 | . nr nh*hl 1 | |
| 1572 | . @error missing arguments to .NH S | |
| 1573 | . \} | |
| 1574 | .\} | |
| 1575 | .el \{\ | |
| 1576 | . nr nh*ohl \\n[nh*hl] | |
| 1577 | . ie \\n[.$] \{\ | |
| 1578 | . nr nh*hl 0\\$1 | |
| 1579 | . ie \\n[nh*hl]<=0 \{\ | |
| 1580 | . nr nh*ohl 0 | |
| 1581 | . nr nh*hl 1 | |
| 1582 | . \} | |
| 1583 | . el \{\ | |
| 1584 | . if \\n[nh*hl]-\\n[nh*ohl]>1 \ | |
| 1585 | . @warning .NH \\n[nh*ohl] followed by .NH \\n[nh*hl] | |
| 1586 | . \} | |
| 1587 | . \} | |
| 1588 | . el .nr nh*hl 1 | |
| 1589 | . while \\n[nh*hl]>\\n[nh*ohl] \{\ | |
| 1590 | . nr nh*ohl +1 | |
| 1591 | . nr H\\n[nh*ohl] 0 | |
| 1592 | . \} | |
| 1593 | . nr H\\n[nh*hl] +1 | |
| 1594 | .\} | |
| 465b256c JR |
1595 | .ds SN-NO-DOT \\n(H1 |
| 1596 | .nr nh*i 1 | |
| 92d0a6a6 JR |
1597 | .while \\n[nh*i]<\\n[nh*hl] \{\ |
| 1598 | . nr nh*i +1 | |
| 465b256c | 1599 | . as SN-NO-DOT .\\n[H\\n[nh*i]] |
| 92d0a6a6 | 1600 | .\} |
| 465b256c | 1601 | .ds SN-DOT \\*[SN-NO-DOT]. |
| 465b256c | 1602 | .nr sh*psincr (\\n[GROWPS]-\\n[nh*hl])*\\n[PSINCR] |
| 92d0a6a6 | 1603 | .SH-NO-TAG |
| 465b256c JR |
1604 | .DEVTAG-NH "\\$1" |
| 1605 | . if '\*(.T'html' .nr need_eo_h 1 | |
| 4d3e9548 | 1606 | \\*[SN-STYLE] |
| 92d0a6a6 JR |
1607 | .. |
| 1608 | .\" **************************** | |
| 1609 | .\" ******** module toc ******** | |
| 1610 | .\" **************************** | |
| 1611 | .\" Table of contents generation. | |
| 1612 | .de @XS | |
| 1613 | .da toc*div | |
| 1614 | .ev h | |
| 1615 | .ie \\n[.$] .XA "\\$1" | |
| 1616 | .el .XA | |
| 1617 | .. | |
| 1618 | .de @div-end!toc*div | |
| 1619 | .XE | |
| 1620 | .. | |
| 1621 | .de XA | |
| 1622 | .ie '\\n(.z'toc*div' \{\ | |
| 1623 | . if d toc*num .toc*end-entry | |
| 1624 | . ie \\n[.$] \{\ | |
| 1625 | . ie '\\$1'no' .ds toc*num | |
| 1626 | . el .ds toc*num "\\$1 | |
| 1627 | . \} | |
| 1628 | . el .ds toc*num \\n[PN] | |
| 1629 | . br | |
| 1630 | . par@reset | |
| 1631 | . na | |
| 1632 | . ll -8n | |
| 1633 | . in (n;0\\$2) | |
| 1634 | .\} | |
| 1635 | .el .@error XA without XS | |
| 1636 | .. | |
| 1637 | .de XE | |
| 1638 | .ie '\\n(.z'toc*div' \{\ | |
| 1639 | . if d toc*num .toc*end-entry | |
| 1640 | . ev | |
| 1641 | . di | |
| 1642 | .\} | |
| 1643 | .el .@error XE without XS | |
| 1644 | .. | |
| 1645 | .de toc*end-entry | |
| 1646 | \\a\\t\\*[toc*num] | |
| 1647 | .br | |
| 1648 | .rm toc*num | |
| 1649 | .. | |
| 1650 | .de PX | |
| 1651 | .1C | |
| 1652 | .if !'\\$1'no' \{\ | |
| 1653 | . ce 1 | |
| 465b256c JR |
1654 | . ie (\\n[PS] >= 1000) \ |
| 1655 | . ps ((\\n[PS]z / 1000u) + 2z) | |
| 1656 | . el \ | |
| 1657 | . ps \\n[PS]+2 | |
| 92d0a6a6 JR |
1658 | . ft B |
| 1659 | \\*[TOC] | |
| 1660 | . ft | |
| 1661 | . ps | |
| 1662 | .\} | |
| 1663 | .nf | |
| 1664 | .char \[toc*leader-char] .\h'1m' | |
| 1665 | .lc \[toc*leader-char] | |
| 1666 | .ta (u;\\n[.l]-\\n[.i]-\w'000') (u;\\n[.l]-\\n[.i])R | |
| 1667 | .sp 2 | |
| 1668 | .toc*div | |
| 1669 | .par@reset | |
| 1670 | .. | |
| 1671 | .\" print the table of contents on page i | |
| 1672 | .de TC | |
| 1673 | .P1 | |
| 1674 | .pg@begin 1 i | |
| 1675 | .PX \\$1 | |
| 1676 | .. | |
| 1677 | .\" **************************** | |
| 1678 | .\" ******** module eqn ******** | |
| 1679 | .\" **************************** | |
| 1680 | .\" Eqn support. | |
| 1681 | .de EQ | |
| 1682 | .. | |
| 1683 | .de EN | |
| 1684 | .. | |
| 1685 | .de @EQ | |
| 1686 | .br | |
| 1687 | .ds eqn*num "\\$2 | |
| 1688 | .ie '\\$1'L' .nr eqn*type 0 | |
| 1689 | .el \{\ | |
| 1690 | . ie '\\$1'I' .nr eqn*type 1 | |
| 1691 | . el \{\ | |
| 1692 | . nr eqn*type 2 | |
| 1693 | . if !'\\$1'C' .ds eqn*num "\\$1 | |
| 1694 | . \} | |
| 1695 | .\} | |
| 1696 | .di eqn*div | |
| 1697 | .in 0 | |
| 4d3e9548 JL |
1698 | .if '\*(.T'html' \{\ |
| 1699 | . nr eqn*ll \\n[.l] | |
| 1700 | . ll 1000n | |
| 1701 | .\} | |
| 1702 | .if \\n[eqn*type]=0 .EQN-HTML-IMAGE-LEFT | |
| 92d0a6a6 JR |
1703 | .if \\n[eqn*type]=1 \{\ |
| 1704 | . if '\*(.T'html' .RS | |
| 4d3e9548 | 1705 | .EQN-HTML-IMAGE-INLINE |
| 92d0a6a6 | 1706 | .\} |
| 4d3e9548 | 1707 | .if \\n[eqn*type]=2 .EQN-HTML-IMAGE |
| 465b256c | 1708 | .nf |
| 92d0a6a6 JR |
1709 | .. |
| 1710 | .de @div-end!eqn*div | |
| 1711 | .@EN | |
| 1712 | .. | |
| 1713 | .\" Note that geqn mark and lineup work correctly in centered equations. | |
| 1714 | .de @EN | |
| 1715 | .ie !'\\n(.z'eqn*div' .@error-recover mismatched EN | |
| 1716 | .el \{\ | |
| 1717 | . br | |
| 1718 | . di | |
| 1719 | . nr eqn*have-num 0 | |
| 1720 | . if !'\\*[eqn*num]'' .nr eqn*have-num 1 | |
| 1721 | . ie \\n[dl]:\\n[eqn*have-num] \{\ | |
| 4d3e9548 | 1722 | . sp \\n[DD]u |
| 92d0a6a6 JR |
1723 | . par@reset |
| 1724 | . ds eqn*tabs \\n[.tabs] | |
| 1725 | . nf | |
| 1726 | . ie \\n[dl] \{\ | |
| 1727 | .\" --fixme-- this really should not be necessary | |
| 1728 | .\" and indicates that there is extra space creeping into | |
| 1729 | .\" an equation when ps4html is enabled.. | |
| 4d3e9548 JL |
1730 | . ie r ps4html .ds@need \\n[dn]u-1v+\n[.V]u+1i |
| 1731 | . el .ds@need \\n[dn]u-1v+\n[.V]u | |
| 92d0a6a6 JR |
1732 | . chop eqn*div |
| 1733 | . ie \\n[eqn*type]=0 \{\ | |
| 1734 | . ta (u;\\n[.l]-\\n[.i])R | |
| 1735 | \\*[eqn*div]\t\\*[eqn*num] | |
| 1736 | . \} | |
| 1737 | . el \{\ | |
| 1738 | . ie \\n[eqn*type]=1 .ta \\n[DI]u \ | |
| 1739 | (u;\\n[.l]-\\n[.i])R | |
| 1740 | . el .ta (u;\\n[.l]-\\n[.i]/2)C \ | |
| 1741 | (u;\\n[.l]-\\n[.i])R | |
| 1742 | \t\\*[eqn*div]\t\\*[eqn*num] | |
| 1743 | . \} | |
| 1744 | . \} | |
| 1745 | . el \{\ | |
| 1746 | . ta (u;\\n[.l]-\\n[.i])R | |
| 1747 | \t\\*[eqn*num] | |
| 1748 | . \} | |
| 4d3e9548 JL |
1749 | .\". if !'\*(.T'html' .sp \\n[DD]u |
| 1750 | . sp \\n[DD]u | |
| 92d0a6a6 JR |
1751 | . ta \\*[eqn*tabs] |
| 1752 | . \} | |
| 1753 | . el \{ | |
| 1754 | .\" must terminate empty equations in html and ps4html as they contain | |
| 4d3e9548 | 1755 | .\" the EQN-HTML-IMAGE-END suppression nodes |
| 92d0a6a6 JR |
1756 | . if \\n[dl] .chop eqn*div |
| 1757 | . if '\*(.T'html' \\*[eqn*div] | |
| 1758 | . if r ps4html \\*[eqn*div] | |
| 1759 | . \} | |
| 1760 | . if !'\*(.T'html' .fi | |
| 4d3e9548 | 1761 | . if \\n[eqn*type]=0 .EQN-HTML-IMAGE-END |
| 92d0a6a6 | 1762 | . if \\n[eqn*type]=1 \{\ |
| 4d3e9548 | 1763 | . EQN-HTML-IMAGE-END |
| 92d0a6a6 JR |
1764 | . if '\*(.T'html' .RE |
| 1765 | . \} | |
| 4d3e9548 JL |
1766 | . if \\n[eqn*type]=2 .EQN-HTML-IMAGE-END |
| 1767 | . if '\*(.T'html' \ | |
| 1768 | . ll \\n[eqn*ll]u | |
| 92d0a6a6 JR |
1769 | .\} |
| 1770 | .. | |
| 4d3e9548 | 1771 | . |
| 92d0a6a6 JR |
1772 | .\" **************************** |
| 1773 | .\" ******** module tbl ******** | |
| 1774 | .\" **************************** | |
| 1775 | .\" Tbl support. | |
| 1776 | .nr tbl*have-header 0 | |
| 1777 | .\" This gets called if TS occurs before the first paragraph. | |
| 1778 | .de TS | |
| 1779 | .LP | |
| 1780 | .\" cov*ab-init aliases TS to @TS | |
| 1781 | \\*[TS]\\ | |
| 1782 | .. | |
| 1783 | .de @TS | |
| 1784 | .sp \\n[DD]u | |
| 92d0a6a6 | 1785 | .if '\\$1'H' .di tbl*header-div |
| 4d3e9548 JL |
1786 | .if '\*(.T'html' \{\ |
| 1787 | . nr tbl*ll \\n[.l] | |
| 1788 | . ll 1000n | |
| 1789 | .\} | |
| 92d0a6a6 JR |
1790 | .HTML-IMAGE |
| 1791 | .. | |
| 1792 | .de tbl@top-hook | |
| 1793 | .if \\n[tbl*have-header] \{\ | |
| 1794 | . ie \\n[.t]-\\n[tbl*header-ht]-1v .tbl*print-header | |
| 1795 | . el .sp \\n[.t]u | |
| 1796 | .\} | |
| 1797 | .. | |
| 1798 | .de tbl*print-header | |
| 1799 | .ev nf | |
| 1800 | .tbl*header-div | |
| 1801 | .ev | |
| 1802 | .mk #T | |
| 1803 | .. | |
| 1804 | .de TH | |
| 1805 | .ie '\\n[.z]'tbl*header-div' \{\ | |
| 1806 | . nr T. 0 | |
| 1807 | . T# | |
| 1808 | . br | |
| 1809 | . di | |
| 1810 | . ie \\n[dn]+\\n[FM]+\\n[HM]+2v>=\\n[.p] \{\ | |
| 1811 | . @error ridiculously long table header | |
| 1812 | . ds@need \\n[dn] | |
| 1813 | . tbl*print-header | |
| 1814 | . \} | |
| 1815 | . el \{\ | |
| 1816 | . nr tbl*header-ht \\n[dn] | |
| 1817 | . ds@need \\n[dn]u+1v | |
| 1818 | . tbl*print-header | |
| 1819 | . nr tbl*have-header 1 | |
| 1820 | . \} | |
| 1821 | .\} | |
| 1822 | .el .@error-recover .TH without .TS H | |
| 1823 | .. | |
| 1824 | .de @div-end!tbl*header-div | |
| 1825 | .TH | |
| 1826 | .TE | |
| 1827 | .. | |
| 1828 | .de TE | |
| 1829 | .ie '\\n(.z'tbl*header-div' .@error-recover .TS H but no .TH before .TE | |
| 1830 | .el \{\ | |
| 1831 | . nr tbl*have-header 0 | |
| 1832 | . if !'\*(.T'html' .sp \\n[DD]u | |
| 1833 | .\} | |
| 4d3e9548 JL |
1834 | .HTML-IMAGE-END |
| 1835 | .if '\*(.T'html' \ | |
| 1836 | . ll \\n[tbl*ll]u | |
| 92d0a6a6 JR |
1837 | .\" reset tabs |
| 1838 | .TA | |
| 1839 | .. | |
| 1840 | .de tbl@bottom-hook | |
| 1841 | .if \\n[tbl*have-header] \{\ | |
| 1842 | . nr T. 1 | |
| 1843 | . T# | |
| 1844 | .\} | |
| 1845 | .. | |
| 1846 | .de T& | |
| 1847 | .. | |
| 1848 | .\" **************************** | |
| 1849 | .\" ******** module pic ******** | |
| 1850 | .\" **************************** | |
| 1851 | .\" Pic support. | |
| 1852 | .\" PS height width | |
| 1853 | .de PS | |
| 1854 | .br | |
| 1855 | .sp \\n[DD]u | |
| 1856 | .ie \\n[.$]<2 .@error bad arguments to PS (not preprocessed with pic?) | |
| 1857 | .el \{\ | |
| 1858 | . ds@need (u;\\$1)+1v | |
| 1859 | . in +(u;\\n[.l]-\\n[.i]-\\$2/2>?0) | |
| 1860 | .\} | |
| 1861 | .HTML-IMAGE | |
| 1862 | .. | |
| 1863 | .de PE | |
| 1864 | .HTML-IMAGE-END | |
| 1865 | .par@reset | |
| 1866 | .sp \\n[DD]u+.5m | |
| 1867 | .. | |
| 1868 | .\" **************************** | |
| 1869 | .\" ******** module ref ******** | |
| 1870 | .\" **************************** | |
| 1871 | .\" Refer support. | |
| 1872 | .de ]- | |
| 1873 | .rm [A [B [C [D [E [G [I [J [N [O [P [Q [R [S [T [V | |
| 1874 | .rm ref*string | |
| 1875 | .. | |
| 1876 | .\" Other | |
| 1877 | .ds ref*spec!0 Q A T1 S V N P I C D O | |
| 1878 | .\" Journal article | |
| 1879 | .ds ref*spec!1 Q A T2 J S V N P I C D O | |
| 1880 | .\" Book | |
| 1881 | .ds ref*spec!2 Q A T1 S V P I C D O | |
| 1882 | .\" Article within book | |
| 1883 | .ds ref*spec!3 Q A T2 B E S V P I C D O | |
| 1884 | .\" Tech report | |
| 1885 | .ds ref*spec!4 Q A T2 R G P I C D O | |
| 1886 | .\" ][ type | |
| 1887 | .de ][ | |
| 1888 | .if r [T \{\ | |
| 1889 | . als [T1 [T | |
| 1890 | . als [T2 [T | |
| 1891 | .\} | |
| 1892 | .ie d ref*spec!\\$1 .ref*build \\*[ref*spec!\\$1] | |
| 1893 | .el \{\ | |
| 1894 | . @error unknown reference type `\\$1' | |
| 1895 | . ref*build \\*[ref*spec!0] | |
| 1896 | .\} | |
| 1897 | .ref*print | |
| 1898 | .rm ref*string | |
| 1899 | .rm [F [T1 [T2 | |
| 1900 | .. | |
| 1901 | .\" start of reference number | |
| 4d3e9548 | 1902 | .ds [. \E*[par@sup-start] |
| 92d0a6a6 | 1903 | .\" end of reference number |
| 4d3e9548 | 1904 | .ds .] \E*[par@sup-end] |
| 92d0a6a6 JR |
1905 | .\" period before reference |
| 1906 | .ds <. . | |
| 1907 | .\" period after reference | |
| 1908 | .ds >. \" empty | |
| 1909 | .\" comma before reference | |
| 1910 | .ds <, , | |
| 1911 | .\" comma after reference | |
| 1912 | .ds >, \" empty | |
| 1913 | .\" start collected references | |
| 1914 | .de ]< | |
| 1915 | .als ref*print ref*end-print | |
| 1916 | .SH | |
| 1917 | \&\\*[REFERENCES] | |
| 1918 | .par@reset | |
| 1919 | .. | |
| 1920 | .\" end collected references | |
| 1921 | .de ]> | |
| 1922 | .par@finish | |
| 1923 | .als ref*print ref*normal-print | |
| 1924 | .. | |
| 1925 | .de ref*normal-print | |
| 1926 | .ie d [F .FS "\\*([.\\*([F\\*(.]" | |
| 1927 | .el .FS \& | |
| 1928 | \\*[ref*string] | |
| 1929 | .FE | |
| 1930 | .. | |
| 1931 | .de ref*end-print | |
| 1932 | .ie d [F .IP "\\*([F." | |
| 1933 | .el .XP | |
| 1934 | \\*[ref*string] | |
| 1935 | .. | |
| 1936 | .als ref*print ref*normal-print | |
| 1937 | .de ref*build | |
| 1938 | .rm ref*string ref*post-punct | |
| 1939 | .nr ref*suppress-period 1 | |
| 1940 | .while \\n[.$] \{\ | |
| 1941 | . if d [\\$1 \{\ | |
| 1942 | . ie d ref*add-\\$1 .ref*add-\\$1 | |
| 1943 | . el .ref*add-dflt \\$1 | |
| 1944 | . \} | |
| 1945 | . shift | |
| 1946 | .\} | |
| 1947 | .\" now add a final period | |
| 1948 | .ie d ref*string \{\ | |
| 1949 | . if !\\n[ref*suppress-period] .as ref*string . | |
| 1950 | . if d ref*post-punct \{\ | |
| 1951 | . as ref*string "\\*[ref*post-punct] | |
| 1952 | . rm ref*post-punct | |
| 1953 | . \} | |
| 1954 | .\} | |
| 1955 | .el .ds ref*string | |
| 1956 | .. | |
| 1957 | .de ref*add-T1 | |
| 4d3e9548 | 1958 | .ref*field T , " " "\fI" "" "\fP" |
| 92d0a6a6 JR |
1959 | .if r [T .nr ref*suppress-period \\n([T |
| 1960 | .. | |
| 1961 | .de ref*add-T2 | |
| 4d3e9548 | 1962 | .ref*field T , " " "\\*Q" "" "\\*U" |
| 92d0a6a6 JR |
1963 | .if r [T .nr ref*suppress-period \\n([T |
| 1964 | .. | |
| 1965 | .de ref*add-P | |
| 4d3e9548 JL |
1966 | .ie \\n([P>0 .ref*field P , " " "pp. " |
| 1967 | .el .ref*field P , " " "p. " | |
| 92d0a6a6 JR |
1968 | .. |
| 1969 | .de ref*add-J | |
| 4d3e9548 | 1970 | .ref*field J , " " \fI "" \fP |
| 92d0a6a6 JR |
1971 | .. |
| 1972 | .de ref*add-D | |
| 4d3e9548 | 1973 | .ref*field D "" " " ( ) |
| 92d0a6a6 JR |
1974 | .. |
| 1975 | .de ref*add-E | |
| 4d3e9548 | 1976 | .ref*field E , " " "ed. " |
| 92d0a6a6 JR |
1977 | .. |
| 1978 | .de ref*add-G | |
| 4d3e9548 | 1979 | .ref*field G "" " " ( ) |
| 92d0a6a6 JR |
1980 | .. |
| 1981 | .de ref*add-B | |
| 4d3e9548 | 1982 | .ref*field B "" " " "in \fI" "" \fP |
| 92d0a6a6 JR |
1983 | .. |
| 1984 | .de ref*add-O | |
| 4d3e9548 | 1985 | .ref*field O . " " |
| 92d0a6a6 JR |
1986 | .ie r [O .nr ref*suppress-period \\n([O |
| 1987 | .el .nr ref*suppress-period 1 | |
| 1988 | .. | |
| 1989 | .de ref*add-A | |
| 4d3e9548 | 1990 | .ref*field A , " " |
| 92d0a6a6 JR |
1991 | .if r [A .nr ref*suppress-period \\n([A |
| 1992 | .. | |
| 465b256c | 1993 | .de ref*add-V |
| 4d3e9548 | 1994 | .ref*field V "" " " \fB \fR |
| 465b256c JR |
1995 | .. |
| 1996 | .de ref*add-N | |
| 4d3e9548 | 1997 | .ref*field N "" ( "" ")" |
| 465b256c | 1998 | .. |
| 92d0a6a6 | 1999 | .de ref*add-dflt |
| 4d3e9548 | 2000 | .ref*field \\$1 , " " |
| 92d0a6a6 JR |
2001 | .. |
| 2002 | .\" First argument is the field letter. | |
| 2003 | .\" Second argument is the punctuation character to use to separate this field | |
| 2004 | .\" from the previous field. | |
| 4d3e9548 JL |
2005 | .\" Third argument is a string to insert after the punctuation character of |
| 2006 | .\" the previous field (normally a space) | |
| 2007 | .\" Fourth argument is a string with which to prefix this field. | |
| 2008 | .\" Fifth argument is a string with which to postfix this field. | |
| 2009 | .\" Sixth argument is a string to add after the punctuation character supplied | |
| 92d0a6a6 JR |
2010 | .\" by the next field. |
| 2011 | .de ref*field | |
| 2012 | .if d ref*string \{\ | |
| 2013 | . ie d ref*post-punct \{\ | |
| 4d3e9548 | 2014 | . as ref*string "\\$2\\*[ref*post-punct]\\$3\" |
| 92d0a6a6 JR |
2015 | . rm ref*post-punct |
| 2016 | . \} | |
| 4d3e9548 | 2017 | . el .as ref*string "\\$2\\$3\" |
| 92d0a6a6 | 2018 | .\} |
| 4d3e9548 JL |
2019 | .as ref*string "\\$4\\*([\\$1\\$5 |
| 2020 | .if \\n[.$]>5 .ds ref*post-punct "\\$6 | |
| 92d0a6a6 JR |
2021 | .nr ref*suppress-period 0 |
| 2022 | .. | |
| 2023 | .\" **************************** | |
| 2024 | .\" ******** module acc ******** | |
| 2025 | .\" **************************** | |
| 2026 | .\" Accents and special characters. | |
| 2027 | .ds Q \(lq | |
| 2028 | .ds U \(rq | |
| 2029 | .ds - \(em | |
| 2030 | .\" Characters | |
| 2031 | .\" The idea of this definition is for the top of the 3 to be at the x-height. | |
| 2032 | .if !c\[yogh] .char \[yogh] \Z'\v'\w'x'*0-\En[rst]u'\s[\En[.s]*8u/10u]\ | |
| 2033 | \v'\w'3'*0+\En[rst]u'3\s0'\h'\w'\s[\En[.s]*8u/10u]3'u' | |
| 2034 | .\" Accents | |
| 2035 | .de acc*over-def | |
| 2036 | .ds \\$1 \Z'\v'(u;\w'x'*0+\En[rst]-\En[.cht])'\ | |
| 2037 | \h'(u;-\En[skw]+(-\En[.w]-\w'\\$2'/2)+\En[.csk])'\\$2' | |
| 2038 | .. | |
| 2039 | .de acc*under-def | |
| 2040 | .ds \\$1 \Z'\v'\En[.cdp]u'\h'(u;-\En[.w]-\w'\\$2'/2)'\\$2' | |
| 2041 | .. | |
| 2042 | .de acc*slash-def | |
| 2043 | .ds \\$1 \Z'\h'(u;-\En[.w]-\w'\\$2'/2)'\ | |
| 2044 | \v'(u;\En[.cdp]-\En[.cht]+\En[rst]+\En[rsb]/2)'\\$2' | |
| 2045 | .. | |
| 2046 | .de acc*prefix-def | |
| 2047 | .ds \\$1 \Z'\h'(u;\w'x'-\w'\\$2'/2)'\\$2' | |
| 2048 | .. | |
| 2049 | .acc*prefix-def ' \' | |
| 2050 | .acc*prefix-def ` \` | |
| 2051 | .acc*prefix-def ^ ^ | |
| 2052 | .acc*prefix-def , \(ac | |
| 2053 | .acc*prefix-def : \(ad | |
| 2054 | .acc*prefix-def ~ ~ | |
| 2055 | .\" improved accent marks | |
| 2056 | .de AM | |
| 2057 | .acc*over-def ' \' | |
| 2058 | .acc*over-def ` \` | |
| 2059 | .acc*over-def ^ ^ | |
| 2060 | .acc*over-def ~ ~ | |
| 2061 | .acc*over-def : \(ad | |
| 2062 | .acc*over-def v \(ah | |
| 2063 | .acc*over-def _ \(a- | |
| 2064 | .acc*over-def o \(ao | |
| 2065 | .acc*under-def , \(ac | |
| 2066 | .acc*under-def . \s[\En[.s]*8u/10u]\v'.2m'.\v'-.2m'\s0 | |
| 2067 | .acc*under-def hook \(ho | |
| 2068 | .acc*slash-def / / | |
| 4d3e9548 | 2069 | .char \[hooko] o\E*[hook] |
| 92d0a6a6 JR |
2070 | .ds q \[hooko] |
| 2071 | .ds 3 \[yogh] | |
| 2072 | .ds D- \(-D\" Icelandic uppercase eth | |
| 2073 | .ds d- \(Sd\" Icelandic lowercase eth | |
| 2074 | .ds Th \(TP\" Icelandic uppercase thorn | |
| 2075 | .ds th \(Tp\" Icelandic lowercase thorn | |
| 2076 | .ds 8 \(ss\" German double s | |
| 2077 | .ds Ae \(AE\" AE ligature | |
| 2078 | .ds ae \(ae\" ae ligature | |
| 2079 | .ds Oe \(OE\" OE ligature | |
| 2080 | .ds oe \(oe\" oe ligature | |
| 2081 | .ds ? \(r?\" upside down ? | |
| 2082 | .ds ! \(r!\" upside down ! | |
| 2083 | .. | |
| 2084 | .de CHECK-FOOTER-AND-KEEP | |
| 4d3e9548 JL |
2085 | .if '\*(.T'html' \{\ |
| 2086 | . rm KF | |
| 2087 | . als KF KS | |
| 2088 | . | |
| 2089 | . rm FS | |
| 2090 | . de FS | |
| 2091 | . sp | |
| 2092 | . HTML-NS <cite> | |
| 92d0a6a6 | 2093 | \\.. |
| 4d3e9548 JL |
2094 | . rm FE |
| 2095 | . de FE | |
| 2096 | . HTML-NS </cite> | |
| 2097 | . sp | |
| 92d0a6a6 | 2098 | \\.. |
| 4d3e9548 | 2099 | .\} |
| 92d0a6a6 JR |
2100 | .. |
| 2101 | .par@load-init | |
| 4d3e9548 JL |
2102 | .\" **************************** |
| 2103 | .\" ******** module bell ******** | |
| 2104 | .\" **************************** | |
| 2105 | .\" Emulate Bell Labs localisms. Note, (a) they're not documented, and | |
| 2106 | .\" (b) the .P1 and .UC macros collide with different ones in Berkeley ms. | |
| 2107 | .\" We hack around this by conditionalizing the behavior of P1; UC was | |
| 2108 | .\" not defined by groff and will be a no-op if called Berkeley style | |
| 2109 | .\" with no arguments, so there is no problem with hijacking it here. | |
| 2110 | .\" | |
| 2111 | .\" What's done here is sufficient to give back the Guide to EQN (1976) its | |
| 2112 | .\" section headings and restore some text that had gone missing as macro | |
| 2113 | .\" arguments; no warranty express or implied is given as to how well the | |
| 2114 | .\" typographic details these produce match the original Bell Labs macros. | |
| 2115 | .\" | |
| 2116 | .\" P1 is now defined in module pg. | |
| 2117 | .de SC | |
| 2118 | .nr bell_localisms 1 | |
| 2119 | .NH | |
| 2120 | \\$* | |
| 2121 | .. | |
| 2122 | .de UC | |
| 2123 | .if r bell_localisms \f(CW\\$*\fP | |
| 2124 | .. | |
| 2125 | .de P2 | |
| 2126 | .if r bell_localisms \{\ | |
| 2127 | . ft | |
| 2128 | . DE | |
| 2129 | .\} | |
| 2130 | .. | |
| 92d0a6a6 | 2131 | .\" Make sure that no blank lines creep in at the end of this file. |