home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / util / gnu / groff_src.lha / groff-1.10src / tmac / tmac.e < prev    next >
Text File  |  1995-06-29  |  30KB  |  1,659 lines

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