tmac.kun 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934
  1. .\" $Header$
  2. .\" PUBMAC
  3. .\"
  4. .\" MACROES FOR FORMATTING TEXT
  5. .\"
  6. .\" Th.A. Zoethout
  7. .\"
  8. .\" GENERAL PAGE CONTROL MACROES
  9. .\"
  10. .de SS \" SET POINT SIZES
  11. .\" .SS [ $1 [$2] ]
  12. . \" $1 = point size { 10 }
  13. . \" $2 = footnote point size { $1-2 }
  14. .ps 10
  15. .if \\n(.$>0 .ps \\$1 \" for troff
  16. .nr SS \\n(.s
  17. .ev 1
  18. .ie \\n(.$>1 .ps \\$2
  19. .el .ps \\n(SS-2
  20. .nr Sf \\n(.s
  21. .ps \\n(SS
  22. .ev
  23. .\\*(Ld
  24. .\\*(Vs
  25. ..
  26. .\"
  27. .de TP \" SET NUMBER OF FREE PAGES
  28. .\" .TP [$1]
  29. . \" $1 = number of free pages { 1 }
  30. . \" initially one free page
  31. .nr TP 1
  32. .if \\n(.$>0 .if \\$1>=0 .nr TP \\$1
  33. .if \\n(nl<0 .Pn
  34. .rm TP
  35. ..
  36. .de PL \" SET VERTICAL SIZES
  37. .\" .PL [ $1 [ $2 [$3] ] ]
  38. . \" $1 = paper size { A4 }
  39. . \" $2 = text size { 27.38c }
  40. . \" $3 = offset from top of paper { 1.35c }
  41. . \" constraints: $2+$3 <= $1
  42. .\" The distance from the foot margin to the bottom of the
  43. .\" paper (\n(Bd) is implicit { \n(.p - \n(Td - \n(Pl }
  44. .ie \\n(.$>0 .pl \\$1
  45. .el .pl 29.73c
  46. .ie \\n(.$>1 .nr Pl \\$2v
  47. .el .nr Pl 27.38c
  48. .if \\n(Pl>\\n(.p .Er F ".PL: page size(\\n(Pl) > paper size(\\n(.p)
  49. .ie \\n(.$>2 .nr Td \\$3v
  50. .el .nr Td 1.35c
  51. .nr Bd \\n(.p-\\n(Td-\\n(Pl
  52. .if \\n(Bd<=0 \
  53. . Er F ".PL: top offset(\\n(Td) + page size(\\n(Pl) > paper size(\\n(.p)
  54. .nr Tm \\n(Tdu+\\n(Ttu+\\n(Tsu
  55. .nr Bm \\n(Bsu+\\n(Btu+\\n(Bdu
  56. .ch Bm \\n(.pu-\\n(Bmu
  57. .if \\n(Fl>0 .Fp
  58. .rr Pl
  59. ..
  60. .de LL \" SET HORIZONTAL SIZES
  61. .\" .LL [ $1 [$2] ]
  62. . \" $1 = line length { 6.5i }
  63. . \" $2 = footnote line length { $1*10/11 }
  64. .ll 16.02c
  65. .if \\n(.$>0 .ll \\$1
  66. .lt \\n(.lu
  67. .nr LL \\n(.l
  68. .ev 1
  69. .ll \\n(LLu
  70. .lt \\n(LLu
  71. .ev
  72. .ie \\n(.$>1 .nr Lf \\$2m
  73. .el .nr Lf \\n(LLu*10/11
  74. ..
  75. .\" \" PAGE SIZES
  76. .\" Default is 11 inch, 6.5 inch line length
  77. .\" The .An macros set to European standard sizes.
  78. .\" LL PL TL Of
  79. .\" A0 74.09 118.92 108.92 5
  80. .\" A1 51.46 84.09 78.09 4
  81. .\" A2 35.045 59.46 52.46 3.5
  82. .\" A3 23.73 42.045 36.045 3
  83. .\" A4 16.02 29.73 27.38 1.35
  84. .\" A5 11.60 21.022 18.33 1.20
  85. .\" All sizes in cm.
  86. .\" The .An macros have one parameter. An optional -.
  87. .\" If this is used the page size is not altered, to allow
  88. .\" for example printing A5 pages on A4 paper.
  89. .\"
  90. .de A0 \" SET PAGE SIZE TO A0
  91. .\" .A0 [ - ]
  92. .if !\\n(.$ .pl 118.92c
  93. .PL \\n(.pu 108.92c 5c
  94. .LL 74.09c
  95. ..
  96. .de A1 \" SET PAGE SIZE TO A1
  97. .\" .A1 [ - ]
  98. .if !\\n(.$ .pl 84.09c
  99. .PL \\n(.pu 78.09c 4c
  100. .LL 51.45c
  101. ..
  102. .de A2 \" SET PAGE SIZE TO A2
  103. .\" .A2 [ - ]
  104. .if !\\n(.$ .pl 59.46c
  105. .PL \\n(.pu 52.46c 3.5c
  106. .LL 35.045c
  107. ..
  108. .de A3 \" SET PAGE SIZE TO A3
  109. .\" .A3 [ - ]
  110. .if !\\n(.$ .pl 42.045c
  111. .PL \\n(.pu 36.045c 3c
  112. .LL 23.73c
  113. ..
  114. .de A4 \" SET PAGE SIZE TO A4
  115. .\" .A4 [ - ]
  116. .if !\\n(.$ .pl 29.73c
  117. .PL \\n(.pu 27.38c 1.35c
  118. .LL 16.02c
  119. ..
  120. .de A5 \" SET PAGE SIZE TO A5
  121. .\" .A5 [ - ]
  122. .if !\\n(.$ .pl 21.022c
  123. .PL \\n(.pu 19c 0.9c
  124. .LL 12c
  125. ..
  126. .\"de PO \" PAGE OFFSET
  127. .\" .PO [$1]
  128. . \" $1 = page offset in characters { 1 }
  129. .\"ie \\n(.$>0 .po \\$1m
  130. .\"el .po 1m
  131. .rn po PO
  132. .\".
  133. .\"
  134. .\" MARGIN TEXT CONTROL
  135. .\"
  136. .de MT \" MARGIN TEXT SETTINGS
  137. .\" .MT $1 [$2] [$3]
  138. . \" $1 = Top or Bottom
  139. . \" $2 = Even[Odd], All { no title }
  140. . \" $3 = Vertical spacing to/from text { 2 }
  141. .ds Mc N
  142. .if \&\\$1\&T\& .ds Mc T
  143. .if \&\\$1\&B\& .ds Mc B
  144. .if \&\\*(Mc\&N\& .Er W ".MT: unknown margin type. T assumed
  145. .nr MT 2
  146. .if \&\\*(Mc\&N\& .nr MT 1
  147. .if \&\\*(Mc\&N\& .ds Mc T
  148. .nr \\*(Mcc 0
  149. .if \&\\$2\&E\& .nr \\*(Mcc 1
  150. .if \&\\$2\&O\& .nr \\*(Mcc 1
  151. .if \&\\$2\&A\& .nr \\*(Mcc 2
  152. .if \\n(\\*(Mcc=0 .nr \\*(Mct 0v
  153. .if \\n(\\*(Mcc>0 .nr MT +1
  154. .nr \\*(Mcs 2v
  155. .if \\n(\\*(Mcc=0 .nr \\*(Mcs 0
  156. .if \\n(MT<=\\n(.$ .nr \\*(Mcs \\$\\n(MTv
  157. .rr MT
  158. .rm Mc
  159. ..
  160. .de MS \" SET MARGIN TEXT FOR TOP OR BOTTOM OF PAGE
  161. .\" .MS $1 [ $2 [$3] ]
  162. . \" $1 = Top or Bottom
  163. . \" $2 = Even pages, Odd pages, All pages { A }
  164. . \" $3 = vertical spacing to/from text { 2 }
  165. .ds Mc N
  166. .if \&\\$1\&T\& .ds Mc T
  167. .if \&\\$1\&B\& .ds Mc B
  168. .if \&\\*(Mc\&N\& .Er W ".MS: unknown margin type. T assumed
  169. .nr MS 2
  170. .if \&\\*(Mc\&N\& .nr MS 1
  171. .if \&\\*(Mc\&N\& .ds Mc T
  172. .nr \\*(Mcc 0
  173. .if \&\\$\\n(MS\&E\& .nr \\*(Mcc 1
  174. .if \&\\$\\n(MS\&O\& .nr \\*(Mcc 3
  175. .if \&\\$\\n(MS\&A\& .nr \\*(Mcc 2
  176. .if \\n(\\*(Mcc>0 .nr MS +1
  177. .if \\n(\\*(Mcc=0 .nr \\*(Mcc 2
  178. .nr \\*(Mcs 2v
  179. .if \\n(MS<=\\n(.$ .nr \\*(Mcs \\$\\n(MSv
  180. .ev 2
  181. .ll \\n(LLu
  182. .lt \\n(LLu
  183. .if \\n(\\*(Mcc=1 .di \\*(Mce
  184. .if \\n(\\*(Mcc=2 .di \\*(Mct
  185. .if \\n(\\*(Mcc=3 .di \\*(Mco
  186. .if \\n(\\*(Mcc=3 .nr \\*(Mcc 1
  187. ..
  188. .de ME \" END SPECIFICATION OF TOP/BOTTOM MARGIN TITLE
  189. .\" .ME
  190. .ie \\n(MS=0 .Er W ".ME: no matching .MS
  191. .el \{\
  192. .br
  193. .di
  194. .cu 0
  195. .ev
  196. .nr \\*(Mct \\n(dn
  197. .nr Tm \\n(Tdu+\\n(Ttu+\\n(Tsu
  198. .nr Bm \\n(Bsu+\\n(Btu+\\n(Bdu
  199. .ch Bm \\n(.pu-\\n(Bmu
  200. .if \\n(Fl>0 .Fp
  201. .if \\n(Tmu+\\n(Bmu>=\\n(.pu \
  202. . Er F "top margin size + bottom margin size >= paper size
  203. .rm Mc
  204. .nr MS 0
  205. .if (\\n(nl>=(\\n(.pu-\\n(Bmu))&(\\n(Mi=0) .Bm \}
  206. ..
  207. .de PN \" SET FIRST PAGE NUMBER
  208. .\" .PN [ $1 [$2] ]
  209. . \" $1 = number of first page { 1 }
  210. . \" $2 = pagenumber format { 1 }
  211. .ie \\n(.$>0 .nr PN \\$1
  212. .el .nr PN 1
  213. .ie \\n(.$>1 .ds Pa \\$2
  214. .el .ds Pa 1
  215. .if \\n(nl<0 .Pn
  216. ..
  217. .de Pn \" set page number
  218. .if \\n(TP=0 .if \\n(PN>0 \{\
  219. .pn \\n(PN
  220. .af % \\*(Pa
  221. .rm Pa
  222. .nr PN 0 \}
  223. ..
  224. .\"
  225. .\" GLOBAL SIZE CONTROL
  226. .\"
  227. .de VS \" SET DEFAULT VERTICAL SPACING
  228. .\" .VS [$1 [$2] ]
  229. . \" $1 = default vertical spacing { 0.8v }
  230. . \" $2 = default vertical spacing in PS { 0.7v }
  231. .ie \\n(.$>0 .nr VS \\$1v
  232. .el .nr VS 0.8v
  233. .ie \\n(.$>1 .nr VP \\$2v
  234. .el .nr VP 0.7v
  235. .ds $0 VS
  236. .At "\\$1" "\\$2"
  237. .rn $0 Vs
  238. ..
  239. .de LD \" SET LINE DISTANCE
  240. .\" .LD [$1]
  241. . \" $1 = default line distance { SS+2 points }
  242. .ie \\n(.$>0 .vs \\$1
  243. .el .vs \\n(SS+2
  244. .ev 1
  245. .ie \\n(.$>0 .vs \\$1
  246. .el .vs \\n(Sf+2
  247. .ev
  248. .ds $0 LD
  249. .At "\\$1" "\\$2"
  250. .rn $0 Ld
  251. ..
  252. .de ND \" SET DEFAULT VERTICAL NEED
  253. .\" .ND [$1]
  254. . \" $1 = default need { 2 }
  255. .ie \\n(.$>0 .nr ND \\$1
  256. .el .nr ND 2
  257. ..
  258. .de IN \" SET DEFAULT INDENTATION
  259. .\" .IN [$1]
  260. . \" $1 = default indent { 3 }
  261. .ie \\n(.$>0 .nr IN \\$1n
  262. .el .nr IN 3n
  263. ..
  264. .\"
  265. .\" TEXT PROCESSING MODES
  266. .\"
  267. .de AD \" SET ADJUSTMENT
  268. .\" .AD [$1]
  269. . \" $1 = adjustment type L R C B { previous }
  270. .if \&\\$1\&L\& .ad l
  271. .if \&\\$1\&R\& .ad r
  272. .if \&\\$1\&C\& .ad c
  273. .if \&\\$1\&B\& .ad b
  274. .if \&\\$1\&\& .ad
  275. .ev 1
  276. .if \&\\$1\&L\& .ad l
  277. .if \&\\$1\&R\& .ad r
  278. .if \&\\$1\&C\& .ad c
  279. .if \&\\$1\&B\& .ad b
  280. .if \&\\$1\&\& .ad
  281. .ev
  282. ..
  283. .de NA \" NO ADJUSTMENT
  284. .\" .NA
  285. . \" .NA = .AD L
  286. .na
  287. .ev 1
  288. .na
  289. .ev
  290. ..
  291. .de NS \" NO SPACING
  292. .\" .NS
  293. . \" cancel first default vertical spacing.
  294. .nr NS 1
  295. ..
  296. .de HY \" HYPHENATION ON
  297. .\" .HY
  298. .hy 7
  299. .ev 1
  300. .hy 7
  301. .ev
  302. ..
  303. .de NH \" NO HYPHENATION
  304. .\" .NH
  305. .nh
  306. .ev 1
  307. .nh
  308. .ev
  309. ..
  310. .de HC \" SET HYPHENATION CHARACTER
  311. .\" .HC [$1]
  312. . \" $1 = hyphenation character { \% }
  313. .ie \\n(.$>0 \{\
  314. .ds Hc \\$1
  315. .hc \\$1
  316. .ev 1
  317. .hc \\$1
  318. .ev \}
  319. .el \{\
  320. .ds Hc \%
  321. .hc
  322. .ev 1
  323. .hc
  324. .ev \}
  325. ..
  326. .\"
  327. .\" LOCAL SIZE CONTROL
  328. .\"
  329. .de BP \" BEGIN PAGE
  330. .rs
  331. .sp 50c
  332. .ns
  333. ..
  334. .de N \" NEW LINE
  335. .\" .N [$1]
  336. . \" $1 = preceeding vertical spacing { 0 }
  337. . \" needs \n(ND+$1 lines on the page
  338. .ti \\n(.iu
  339. .ie \\n(.$>0 .sp \\$1
  340. .el .br
  341. .ne \\n(ND
  342. .rs
  343. ..
  344. .de A \" NEW ALINEA
  345. .\" .A [ $1 [$2] ]
  346. . \" $1 = preceeding vertical spacing { 0 }
  347. . \" $2 = indent of first text line { \n(IN }
  348. . \" needs \n(ND+\$1 lines on the page
  349. .ie \\n(.$>0 .sp \\$1
  350. .el .br
  351. .ne \\n(ND
  352. .ie \\n(.$=2 .ti +\\$2
  353. .el .ti +\\n(INu
  354. .rs
  355. ..
  356. .de P \" NEW PARAGRAPH
  357. .\" .P [ $1 [$2] ]
  358. . \" $1 = preceeding vertical spacing { 1 }
  359. . \" $2 = indent of first line { \n(IN }
  360. . \" .P $1 $2 = .A $1 $2
  361. . \" needs \n(ND+\$1 lines on the page
  362. .if \\n(.$=0 .A 0.8v
  363. .if \\n(.$=1 .A \\$1
  364. .if \\n(.$=2 .A \\$1 \\$2
  365. ..
  366. .de NE \" NEED LINES
  367. .\" .NE [$1]
  368. . \" $1 = number of lines needed on page { \n(ND }
  369. .br
  370. .ie \\n(.$=0 .ne \\n(NDv
  371. .el .ne \\$1v
  372. .rs
  373. ..
  374. .\" DATES
  375. .\"
  376. .de TA \" SET TAB POSITIONS
  377. .\" .TA [ $1 ... ]
  378. . \" $1 ... = tab positions { 9 17 25 33 41 49 57 65 73 }
  379. .if \\n(.$=0 .ta 9 17 25 33 41 49 57 65 73
  380. .if \\n(.$>0 .ta \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
  381. ..
  382. .de NC \" SET NO-BREAK CONTROL CHARACTER
  383. .\" .NC [ $1 ]
  384. . \" $1 = no-break control character
  385. .ie \\n(.$>0 .ds Nc \\$1
  386. .el .ds Nc 
  387. .ev 0
  388. .c2 \\*(Nc
  389. .ev
  390. .ev 1
  391. .c2 \\*(Nc
  392. .ev
  393. .ev 2
  394. .c2 \\*(Nc
  395. .ev
  396. ..
  397. .de SP \" SET UNPADDABLE SPACE CHARACTER
  398. .\" .SP [$1]
  399. . \" $1 = unpaddable space character { none }
  400. . \" initially set to ~
  401. .\\*(Sp
  402. .if \\n(.$>0 .ds Sp "tr \\$1
  403. .if \\n(.$>0 .\\*(Sp
  404. .if \\n(.$>0 .as Sp "\\$1
  405. ..
  406. .de IS \" INDENTATION START
  407. .\" .IS [ $1 [ $2 [$3] ] ]
  408. . \" $1 = indent from left margin { \n(IN }
  409. . \" $2 = indent from right margin { 0 }
  410. . \" $3 = preceeding vertical spacing { 0 }
  411. .ie \\n(IS>0 .Er W ".IS: nesting not allowed
  412. .el \{\
  413. .if \\n(.$>2 \{\
  414. .sp \\$3v
  415. .rs \}
  416. .nr IE \\n(.l
  417. .if \\n(.$>1 .ll -\\$2m
  418. .nr UN \\n(.i
  419. .if \\n(.$=0 .in +\\n(INu
  420. .if \\n(.$>0 .in +\\$1
  421. .nr IS 1 \}
  422. ..
  423. .de UN \" TEMPORARILY UNDENT
  424. .\" .UN [$1]
  425. . \" $1 = undent { \n(UN }
  426. .if \\n(.$=0 .if \\n(IS>0 .ti \\n(UNu
  427. .if \\n(.$=0 .if \\n(IS=0 .Er W ".UN: no matching .IS
  428. .if \\n(.$>0 .if \\$1m>=\\n(.iu .ti 0
  429. .if \\n(.$>0 .if \\$1m<\\n(.iu .ti -\\$1m
  430. ..
  431. .de IE \" INDENTATION END
  432. .\" .IE [$1]
  433. . \" $1 = succeeding vertical spacing { 0 }
  434. .ie \\n(IS=0 .Er W ".IE: no matching .IS
  435. .el \{\
  436. .nr IS 0
  437. .in \\n(UNu
  438. .ll \\n(IEu
  439. .if \\n(.$>0 \{\
  440. .sp \\$1v
  441. .rs \}
  442. .rr UN
  443. .rr IE \}
  444. ..
  445. .\"
  446. .\" LOCAL TEXTPROCESSING CONTROL
  447. .\"
  448. .de CS \" START CENTERED NONFILLED TEXT
  449. .\" .CS [$1]
  450. . \" $1 = preceding vertical spacing { 0 }
  451. .nr CS 1
  452. .if \\n(.$>0 .sp \\$1v
  453. .ce 1000
  454. ..
  455. .de CE \" END CENTERED NONFILLED TEXT
  456. .\" .CE [$1]
  457. . \" $1 = succeeding vertical spacing
  458. .if \\n(CS=0 .Er W ".CE: no matching .CS
  459. .nr CS 0
  460. .ce 0
  461. .if \\n(.$>0 .sp \\$1v
  462. ..
  463. .de C \" CENTER WORDS
  464. .\" .C $1 ...
  465. . \" $1 ... = words to be centered
  466. .if \\n(.$>0 \{\
  467. .Ct \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
  468. .ce 1
  469. \&\\*(St
  470. .rm St
  471. .if \\n(CS>0 .ce 1000 \}
  472. ..
  473. .de US \" START UNDERLINED TEXT
  474. .\" .US [$1]
  475. . \" $1 = Underl., Continuous underl. (non-filled) { U }
  476. .nr US 2
  477. .if \&\\$1\&C\& .nr US 1
  478. .if \\n(US=1 .cu 1000
  479. .if \\n(US=2 .ul 1000
  480. ..
  481. .de UE \" END UNDERLINED TEXT
  482. .\" .UE
  483. .if \\n(US=0 .Er W ".UE: no matching .US
  484. .if \\n(US=1 .cu 0
  485. .if \\n(US=2 .ul 0
  486. .nr US 0
  487. ..
  488. .de U \" UNDERLINE WORDS
  489. .\" .U $1 ...
  490. . \" $1 ... = words to be underlined
  491. .nr Bf \\n(.f
  492. .ft 2
  493. \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
  494. .ft \\n(Bf
  495. .rr Bf
  496. ..
  497. .de CU \" CONTINUOUS UNDERLINE WORDS
  498. .\" .CU $1 ...
  499. . \" $1 ... = words to be underlined
  500. .if \\n(.$>0 \{\
  501. .Ct \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
  502. \\*(Hc\l#\w\&\\*(St\&u\(ul#\h#-\w\&\\*(St\&u#\\*(St
  503. .rm St \}
  504. ..
  505. .de UW \" UNDERLINE WORD
  506. .\" .UW [ [$1] ) $2 ( $3 [ $4 [ $5 [ $6 [ $7 [ $8 [$9]]]]]] ]
  507. . \" $1 = non-underlined prefix
  508. . \" $2 = word to be underlined
  509. . \" $3 = non-underlined suffix
  510. . \" $4 $6 $8 = underlined tail
  511. . \" $5 $7 $9 = non-underlined tail
  512. .if \\n(.$=1 .ds St \f2\\$1\fP
  513. .if \\n(.$=2 .ds St \f2\\$1\fP\\$2
  514. .if \\n(.$>2 .ds St \\$1\f2\\$2\fP\\$3
  515. .if \\n(.$>3 .as St \f2\\$4\fP
  516. .if \\n(.$>4 .as St \\$5
  517. .if \\n(.$>5 .as St \f2\\$6\fP
  518. .if \\n(.$>6 .as St \\$7
  519. .if \\n(.$>7 .as St \f2\\$8\fP
  520. .if \\n(.$>8 .as St \\$9
  521. \&\\*(St
  522. .rm St
  523. ..
  524. .de BS \" EMBOLDING START
  525. .ie \\n(BS>0 .Er W ".BS: nesting not allowed
  526. .el \{\
  527. .ft 3
  528. .nr BS 1 \}
  529. ..
  530. .de BE \" EMBOLDING END
  531. .ie \\n(BS=0 .Er W ".BE: no matching .BS
  532. .el \{\
  533. .ft 1
  534. .nr BS 0 \}
  535. ..
  536. .de B \" EMBOLDEN WORDS
  537. .\" .B $1 ...
  538. . \" $1 ... = words to be emboldened
  539. .nr Bf \\n(.f
  540. .ft 3
  541. \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
  542. .ft \\n(Bf
  543. .rr Bf
  544. ..
  545. .de BW \" EMBOLDEN WORD
  546. .\" .BW [ [$1] ) $2 ( $3 [ $4 [ $5 [ $6 [ $7 [ $8 [$9]]]]]] ]
  547. . \" $1 = non-emboldened prefix
  548. . \" $2 = word to be emboldened
  549. . \" $3 = non-emboldened suffix
  550. . \" $4 $6 $8 = emboldened tail
  551. . \" $5 $7 $9 = non-emboldened tail
  552. .if \\n(.$=1 .ds St \f3\\$1\fP
  553. .if \\n(.$=2 .ds St \f3\\$1\fP\\$2
  554. .if \\n(.$>2 .ds St \\$1\f3\\$2\fP\\$3
  555. .if \\n(.$>3 .as St \f3\\$4\fP
  556. .if \\n(.$>4 .as St \\$5
  557. .if \\n(.$>5 .as St \f3\\$6\fP
  558. .if \\n(.$>6 .as St \\$7
  559. .if \\n(.$>7 .as St \f3\\$8\fP
  560. .if \\n(.$>8 .as St \\$9
  561. \&\\*(St
  562. .rm St
  563. ..
  564. .\" PAGE CONTROL SUPPORT
  565. .\"
  566. .de Tm \" top margin trap macro
  567. .ie \\n(Fl=0 .ch Bm \\n(.pu-\\n(Bmu
  568. .el .Ft \" process footnote
  569. .ev 2
  570. .sp \\n(Tdu
  571. .if \\n(TP=0 .Mm T
  572. .ev
  573. .if \\n(TP=0 .ns
  574. .nr TQ \\n(.i
  575. .nr TK \\n(.u
  576. .if \\n(TH=2 \{\
  577. . nr TQ \\n(.i \" insert table header
  578. . in 0
  579. . nf
  580. . nr TH 0
  581. . TT
  582. . nr TH 2
  583. . in \\n(TQu
  584. . if \\n(TK .fi\
  585. \}
  586. .mk #T
  587. ..
  588. .de Bm \" bottom margin trap macro
  589. .if \\n(Im .Er F "Macro package error: recursive trap
  590. .nr Im 1
  591. .ch Bm \\n(.p+1u \" The trap gets reset by Tm
  592. .if \\n(TS>0 \{\
  593. .nr Ft \\n(Fl
  594. .nr Fl 0 \" Disable footnote processing
  595. .nr T. 1 \" Draw box for this page
  596. .T# 1
  597. .nr Fl \\n(Ft \" Enable footnote processing
  598. .rr Ft
  599. .br \}
  600. .ch Id
  601. .if \\n(Fl>0 .Fb \" process footnotes
  602. .ev 2
  603. .if \\n(TP=0 .Mm B
  604. .ev
  605. .if \\n(TP>0 \{\
  606. .nr TP -1
  607. .if \\n(TP=0 .if \\n(PN=0 .ds Pa 1
  608. .if \\n(TP=0 .if \\n(PN=0 .nr PN 1 \}
  609. .Pn
  610. \\*(Ncbp \" Nc is no-break control character
  611. .if \\n(Fl>1 \\*(Ncbr \" footnote overflow from last page
  612. .rr Im
  613. ..
  614. .de Mm \" output margin
  615. . \" $1 = Top, Bottom
  616. .ll \\n(LLu
  617. .lt \\n(LLu
  618. .nr Mm \\n(.i
  619. .in 0
  620. \\*(Ncnf \" Nc is no-break control character
  621. .pc %
  622. .if \&\\$1\&B\& .sp |\\n(.pu-\\n(Bmu+\\n(Bsu
  623. .if \\n(\\$1c=1 .if e .\\$1e
  624. .if \\n(\\$1c=2 .\\$1t
  625. .if \\n(\\$1c=1 .if o .\\$1o
  626. .if \&\\$1\&T\& .sp \\n(Tsu
  627. \\*(Ncfi \" Nc is no-break control character
  628. .in \\n(Mmu
  629. .rr Mm
  630. ..
  631. .\"
  632. .\" PRESET MARGIN TEXTS
  633. .\"
  634. .rn tl TL \" TITLE REQUEST renamed
  635. .\"
  636. .de Tt \" title at top of page
  637. .TL \&\&\(hy\(hy % \(hy\(hy\&\&
  638. ..
  639. .de Te \" title at top of even page
  640. .TL \&%\&\&\&
  641. ..
  642. .de To \" title at top of odd page
  643. .TL \&\&\&%\&
  644. ..
  645. .de Bt \" title at bottom of page
  646. .TL \&\&\(hy\(hy % \(hy\(hy\&\&
  647. ..
  648. .de Be \" title at bottom of even page
  649. .TL \&%\&\&\&
  650. ..
  651. .de Bo \" title at bottom of odd page
  652. .TL \&\&\&%\&
  653. ..
  654. .\"
  655. .\" ERROR MESSAGE MACRO
  656. .\"
  657. .de Er \" errors
  658. .\" .Er $1 $2
  659. . \" $1 = Warning/Fatal
  660. . \" $2 = error message
  661. .tm Error, page \\n%: \\$2
  662. .lt \\n(.lu+\w'\\*(rE Error'u+1n
  663. .vs 0
  664. .TL \&\&\&\v'-1v'\\*(rE Error\v'1v'\&
  665. .vs
  666. .lt \\n(LLu
  667. .if \&\\$1\&F\& .br
  668. .if \&\\$1\&F\& .fl
  669. .if \&\\$1\&F\& .ex
  670. .rr Er
  671. ..
  672. .\"
  673. .\" OTHER SERVICE MACROES
  674. .\"
  675. .de Cr \" Check for non-overlapping constructs
  676. .if \\n(PS>0 \{\
  677. . Er W "Points not closed
  678. .Pe \}
  679. .if \\n(FS>0 \{\
  680. . Er W "Footnote not closed
  681. .FE \}
  682. .if \\n(DS>0 \{\
  683. . Er W "Display not closed
  684. .DE \}
  685. .if \\n(IS>0 \{\
  686. . Er W "Indentation not closed
  687. .IE \}
  688. .if \\n(CS>0 \{\
  689. . Er W "Centered text not closed
  690. .CE \}
  691. .if \\n(US>0 \{\
  692. . Er W "Underlined text not closed
  693. .UE \}
  694. .if \\n(BS>0 \{\
  695. . Er W "Embolded text not closed
  696. .BE \}
  697. .if \\n(RS>0 \{\
  698. . Er W "Reference not closed
  699. .RE \}
  700. ..
  701. .de Ct \" catenate arguments
  702. . \" $1 ... = to be glued with unpaddable space
  703. .ds St \\$1
  704. .if \\n(.$>1 .as St \ \\$2
  705. .if \\n(.$>2 .as St \ \\$3
  706. .if \\n(.$>3 .as St \ \\$4
  707. .if \\n(.$>4 .as St \ \\$5
  708. .if \\n(.$>5 .as St \ \\$6
  709. .if \\n(.$>6 .as St \ \\$7
  710. .if \\n(.$>7 .as St \ \\$8
  711. .if \\n(.$>8 .as St \ \\$9
  712. ..
  713. .\"
  714. .\" INITIALIZATION
  715. .\"
  716. .nr MS 0 \" margin title setting indicator
  717. .nr Tt 1v \" length of top title { no title }
  718. .nr Tc 0 \" case of top title { no title }
  719. .nr Ts 2v \" vertical spacing succeeding top title
  720. .nr Bt 1v \" length of bottom title
  721. .nr Bc 2 \" case of bottom title { ALL }
  722. .nr Bs 2v-0.3c \" vertical spacing preceeding bottom title
  723. .wh 0 Tm \" set top margin trap macro
  724. .wh \n(.pu-1v Bm \" set bottom margin trap macro, A4 determines final pos
  725. .A4 \" Paper size is A4
  726. .SS 10 \" Point size is 10
  727. .LD \" default baseline spacing
  728. .VS \" default extra vertical spacing
  729. .NC \" Set no-break to our own default
  730. .nr PN 1 \" other pagenumber indicator { first pagenumber = 1 }
  731. .nr TP 1 \" number of unnumbered pages at start of text
  732. .nr NS 0 \" don't cancel default spacing
  733. .nr ND 2 \" default need
  734. .nr IN 3n \" default indent
  735. .ds Hc \%
  736. .nr IS 0 \" indent indicator
  737. .nr CS 0 \" center indicator
  738. .nr US 0 \" underline indicator
  739. .nr BS 0 \" bold indicator
  740. . \" refer set up
  741. .ie \n(.V<=(1v/5) \{\
  742. .ds <. .\h'-0.2m' \" . is placed directly after the word
  743. .ds <, ,\h'-0.2m' \" , is placed directly after the word
  744. .ds [. \v'-0.4m'\s-2\^\f1 \" The reference is placed n-e and smaller
  745. .ds .] \s0\v'0.4m'\fP\}
  746. .el \{\
  747. .ds >. . \" The . follows the reference
  748. .ds >, , \" The , follows the reference
  749. .ds [. \f1[ \" The ref. is enclosed in [ and ]
  750. .ds .] ]\fP\}
  751. .ie (\w\&\(lh\&) .ds rE \(lh
  752. .el .ds rE \(pl\(pl\(pl
  753. . \" unpaddable space
  754. .ds Sp "tr ~
  755. .tr ~
  756. .as Sp ~
  757. .em Cr \" check for non-closed constructs at end of input
  758. .\"
  759. .de At \" parameterpassing macro
  760. .\" .At $1...
  761. .if \\n(.$>=1 .as $0 " \\$1
  762. .if \\n(.$>=2 .as $0 " \\$2
  763. .if \\n(.$>=3 .as $0 " \\$3
  764. .if \\n(.$>=4 .as $0 " \\$4
  765. .if \\n(.$>=5 .as $0 " \\$5
  766. .if \\n(.$>=6 .as $0 " \\$6
  767. .if \\n(.$>=7 .as $0 " \\$7
  768. .if \\n(.$>=8 .as $0 " \\$8
  769. .if \\n(.$>=9 .as $0 " \\$9
  770. ..
  771. .\"
  772. .\" CATCH MACROES FOR SECTIONS file tmac.q1
  773. .\"
  774. .de RP
  775. .ds $0 RP
  776. .rn RP ]R
  777. .so MACDIR/tmac.q1
  778. ..
  779. .de SN
  780. .ds $0 SN
  781. .rn SN ]R
  782. .At "\\$1" "\\$2" "\\$3" "\\$4" "\\$5"
  783. .so MACDIR/tmac.q1
  784. ..
  785. .de SM
  786. .ds $0 SM
  787. .rn SM ]R
  788. .At "\\$1" "\\$2" "\\$3" "\\$4"
  789. .so MACDIR/tmac.q1
  790. ..
  791. .de S1
  792. .ds $0 S1
  793. .rn S1 ]R
  794. .At "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  795. .so MACDIR/tmac.q1
  796. ..
  797. .de S2
  798. .ds $0 S2
  799. .rn S2 ]R
  800. .At "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  801. .so MACDIR/tmac.q1
  802. ..
  803. .de S3
  804. .ds $0 S3
  805. .rn S3 ]R
  806. .At "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  807. .so MACDIR/tmac.q1
  808. ..
  809. .de S4
  810. .ds $0 S4
  811. .rn S4 ]R
  812. .At "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  813. .so MACDIR/tmac.q1
  814. ..
  815. .de AP
  816. .ds $0 AP
  817. .rn AP ]R
  818. .At "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  819. .so MACDIR/tmac.q1
  820. ..
  821. .\" CATCH MACROES FOR POINTS file tmac.q2
  822. .\"
  823. .de PM
  824. .ds $0 PM
  825. .rn PM ]R
  826. .At "\\$1"
  827. .so MACDIR/tmac.q2
  828. ..
  829. .de PS
  830. .ds $0 PS
  831. .rn PS ]R
  832. .At "\\$1" "\\$2" "\\$3" "\\$4"
  833. .so MACDIR/tmac.q2
  834. ..
  835. .nr PS 0
  836. .\" CATCH MACROES FOR DISPLAYS file tmac.q3
  837. .\"
  838. .de DB
  839. .ds $0 DB
  840. .rn DB ]R
  841. .At "\\$1"
  842. .so MACDIR/tmac.q3
  843. ..
  844. .de DS
  845. .ds $0 DS
  846. .rn DS ]R
  847. .At "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8"
  848. .so MACDIR/tmac.q3
  849. ..
  850. .nr DS 0
  851. .\" CATCH MACROES FOR FOOTNOTES file tmac.q4
  852. .\"
  853. .de FN
  854. .ds $0 FN
  855. .rn FN ]R
  856. .At "\\$1" "\\$2"
  857. .so MACDIR/tmac.q4
  858. ..
  859. .de FS
  860. .ds $0 FS
  861. .rn FS ]R
  862. .At "\\$1" "\\$2" "\\$3"
  863. .so MACDIR/tmac.q4
  864. ..
  865. .nr FS 0
  866. .nr Fl 0
  867. .\" CATCH MACRO FOR EQUATIONS file tmac.q5
  868. .\"
  869. .de EQ
  870. .ds $0 EQ
  871. .rn EQ ]R
  872. .At "\\$1" "\\$2" "\\$3" "\\$4"
  873. .so MACDIR/tmac.q5
  874. ..
  875. .\" CATCH MACROES FOR TABLES file tmac.q6
  876. .\"
  877. .de TS
  878. .ds $0 TS
  879. .rn TS ]R
  880. .At "\\$1" "\\$2"
  881. .so MACDIR/tmac.q6
  882. ..
  883. .\"nr TS 0
  884. .\" CATCH MACROES FOR BIBLIGRAPHIC REFERENCES file tmac.q7
  885. .\"
  886. .de RS
  887. .ds $0 RS
  888. .rn RS ]R
  889. .At "\\$1" "\\$2" "\\$3"
  890. .so MACDIR/tmac.q7
  891. ..
  892. .de RF
  893. .ds $0 RF
  894. .rn RF ]R
  895. .At "\\$1"
  896. .so MACDIR/tmac.q7
  897. ..
  898. .nr RS 0
  899. .\" CATCH MACROES FOR INDEX REFERENCES file tmac.q8
  900. .\"
  901. .de IX
  902. .ds $0 IX
  903. .rn IX ]R
  904. .At "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  905. .so MACDIR/tmac.q8
  906. ..
  907. .de IW
  908. .ds $0 IW
  909. .rn IW ]R
  910. .At "\\$1" "\\$2" "\\$3"
  911. .so MACDIR/tmac.q8
  912. ..
  913. .de IR
  914. .ds $0 IR
  915. .rn IR ]R
  916. .At "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  917. .so MACDIR/tmac.q8
  918. ..
  919. .\" CATCH MACROES FOR INDEX REFERENCES file tmac.q9
  920. .\"
  921. .de ]-
  922. .ds $0 ]-
  923. .rn ]- ]R
  924. .so MACDIR/tmac.q9
  925. ..
  926. .de ]<
  927. .ds $0 ]<
  928. .rn ]< ]R
  929. .so MACDIR/tmac.q9
  930. ..
  931. .de [
  932. .tm Error, page \\n%: did you forget refer?
  933. .rm [
  934. ..