home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / com / utils / elm / sources / tmac.n < prev    next >
Text File  |  1990-04-28  |  26KB  |  764 lines

  1. .\" @(#)$Id: tmac.n,v 4.1 90/04/28 22:41:47 syd Exp $
  2. .\" The News macro package
  3. .\"
  4. .\" This  is  the macro package that is used to format news documents.  It
  5. .\" was written because many sites do not have one of the -mm or -ms pack-
  6. .\" ages that the documents use.   This is NOT compatible with EITHER, but
  7. .\" (I hope) will become the standard for all news  documents  (man  pages
  8. .\" excepted, since everyone seems to have -man.)
  9. .\"
  10. .\" This package was written using  only  the  "NROFF/TROFF Users' Guide",
  11. .\" and  therefore  if  you  can run NROFF/TROFF, you can legitimately use
  12. .\" this package.  However, because NROFF/TROFF are proprietary  programs,
  13. .\" I  cannot  place  this  package in the public domain.  This should not
  14. .\" matter, because if you legitimately have  NROFF/TROFF,  you  have  the
  15. .\" documentation; if not, you can't run off the documentation anyway.
  16. .\"
  17. .\" This  package may be circulated freely with the news documentation; it
  18. .\" may not be sold, but is to be distributed with  the  unformatted  news
  19. .\" documents.  However,  the name of the author and the place at which it
  20. .\" was written (in the author's own  time,  of  course)  are  not  to  be
  21. .\" removed  from the package regardless of how it is modified or altered.
  22. .\" Further, please do not distribute this package if you make any changes
  23. .\" because  I  don't want to get bug reports of macros I haven't written;
  24. .\" if you have a goodie you want me to add, send it to me and we'll talk.
  25. .\" (I really do like feedback!)  I'd really appreciate your cooperation.
  26. .\"
  27. .\" Author:    Matt Bishop
  28. .\"        Research Institute for Advanced Computer Science
  29. .\"        Mail Stop 230-5
  30. .\"         NASA Ames Research Center
  31. .\"        Moffett Field, CA  94035
  32. .\"
  33. .\" version 1.0        September 28, 1985    mab@riacs.arpa
  34. .\"     initial version
  35. .\" version 1.1        October 25, 1985    mab@riacs.arpa
  36. .\"    fixed an incredibly obscure footnote bug (that occurred twice in
  37. .\"    the news documentation!) which put footnoted words on  one  page
  38. .\"    and the footnote on the next if the word was in the next-to-last
  39. .\"    or last line; commented it, and generally cleaned up
  40. .\" Version 1.2        October 27, 1985    mab@riacs.arpa
  41. .\"    Added a few more comments and a check to keep footnotes lined up
  42. .\"    with the bottom margin.
  43. .\" Version 1.3        February 12, 1986    mab@riacs.arpa
  44. .\"    Added an error check to catch unmatched ef's and ed's
  45. .\" Version 1.4        December 29, 1986    mab@riacs.edu
  46. .\"    Changed footnote for ux, pd, and vx macros and  added  a  string
  47. .\"    for rg ("Registered Trademark")
  48. .\" Version 1.5        January 2, 1989        Matt.Bishop@dartmouth.edu
  49. .\"    Minor modifications for nroff compatibility
  50. .\" Version 1.6        March 15, 1989        Matt.Bishop@dartmouth.edu
  51. .\"                        ..!bear.dartmouth.edu!bishop
  52. .\"    Fixed a bug in footnote handling (again, sigh ...)  This one
  53. .\"    occurred when the the "fo" trap position was reset just beneath
  54. .\"    the current line; the footnote overflow trap would kick in and
  55. .\"    never be closed.
  56. .\"
  57. .\"
  58. .\" **********
  59. .\" these preserve and restore various things
  60. .\" they are used to shorten other macros
  61. .de yf                    \" restore fonts
  62. .ft \\n(f2                \" previous font
  63. .ft \\n(f1                \" current font
  64. ..
  65. .de yi                    \" restore indents
  66. 'in \\n(i2u                \" previous indent
  67. 'in \\n(i1u                \" current indent
  68. ..
  69. .de ys                    \" restore point sizes
  70. .ps \\n(s2                \" previous point size
  71. .ps \\n(s1                \" current point size
  72. ..
  73. .de yv                    \" restore vertical spacings
  74. .vs \\n(v2u                \" previous vertical spacing
  75. .vs \\n(v1u                \" current vertical spacing
  76. ..
  77. .de ya                    \" restore everything
  78. .yf                    \" restore fonts
  79. .yi                    \" restore indents
  80. .ys                    \" restore point sizes
  81. .yv                    \" restore vertical spacing
  82. .if \\n(f1==0 .ft CW            \" unknown font, set to CW
  83. ..
  84. .de zf                    \" preserve fonts
  85. .nr f1 \\n(.f                \" current font
  86. .ft                    \" switch to previous font
  87. .nr f2 \\n(.f                \" previous font
  88. .ft                    \" back to current font
  89. ..
  90. .de zi                    \" preserve indents
  91. .nr i1 \\n(.iu                \" current indent
  92. 'in                    \" switch to previous indent
  93. .nr i2 \\n(.iu                \" previous indent
  94. 'in                    \" back to current indent
  95. ..
  96. .de zs                    \" preserve point sizes
  97. .nr s1 \\n(.su                \" current point size
  98. .ps                    \" switch to previous point size
  99. .nr s2 \\n(.su                \" previous point size
  100. .ps                    \" back to current point size
  101. ..
  102. .de zv                    \" preserve vertical spacings
  103. .nr v1 \\n(.vu                \" current vertical spacing
  104. .vs                    \" switch to previous vertical spacing
  105. .nr v2 \\n(.vu                \" previous vertical spacing
  106. .vs                    \" back to current vertical spacing
  107. ..
  108. .de za                    \" save everything
  109. .zf                    \" save fonts
  110. .zi                    \" save indents
  111. .zs                    \" save point sizes
  112. .zv                    \" save vertical spacings
  113. ..
  114. .\" **********
  115. .\" these actually print the header and footer titles
  116. .\" they are defined separately from the "hd" and "fo" macros
  117. .\" to make user redefinition easy
  118. .de pt                    \" print header title
  119. .                    \" omit header on first page
  120. .if \\n%>1 \{\
  121. '    sp |\\$1u            \" move to proper position
  122. .    ft 1                \" change to default font
  123. .    ps \\n(ps            \" change to default point size
  124. .    vs \\n(vs            \" change to default spacing
  125. .    tl '\\*(h0'\\*(h1'\\*(h2'    \" center title
  126. .    vs                \" restore current vertical spacing
  127. .    ps                \" restore current point size
  128. .    ft                \" restore current font
  129. .\}
  130. ..
  131. .de pf                    \" print footer title
  132. .ft 1                    \" change to default font
  133. .ps \\n(ps                \" change to default point size
  134. .vs \\n(vs                \" change to default spacing
  135. .ie \\n%=1 .tl '\\*(h0'\\*(h1'\\*(h2'    \" on first page, print the header here
  136. .el        .tl '\\*(f0'\\*(f1'\\*(f2'    \" on other pages, print the footer
  137. .vs                    \" restore current vertical spacing
  138. .ps                    \" restore current point size
  139. .ft                    \" restore current font
  140. ..
  141. .\" **********
  142. .\" these are the top of page (header) and bottom of page (footer) macros
  143. .\" they don't actually print anything, just call the right macros
  144. .de hd                    \" header -- do top of page processing
  145. .if t .if \\n(cm .tl '\(rn'''        \" drop cut mark if needed
  146. .pt \\n(ttu                \" print header
  147. .nr fc 0 1                \" init footnote count
  148. .nr fs \\n(.pu-\\n(bmu-1u        \" if any footnotes, start print here
  149. .nr fp 0-\\n(bmu            \" reset current footer place
  150. .ch fo -\\n(bmu                \" reset footer trap
  151. .if \\n(dn .fz                \" put leftover footnotes st bottom
  152. .ya                    \" restore font, etc.
  153. 'sp |\\n(tmu                \" move to top of body
  154. .ns                    \" don't allow any more space
  155. ..
  156. .de fo                    \" footer -- do bottom of page processing
  157. .za                    \" save font, etc.
  158. .rs                    \" you want motions here
  159. .nr dn 0                \" clobber diversion size register
  160. .if \\n(fc .fd                \" now print the footnotes, if any
  161. 'bp                    \" force out page
  162. ..
  163. .\" **********
  164. .\" these are the footnote macros
  165. .\" here's an overview:
  166. .\"    Footnotes are processed in environment #1, which is  initialized
  167. .\"    at the bottom of this package.  When "fn" is called, nroff/troff
  168. .\"    switches to this environment.  The body of the footnote is saved
  169. .\"    in  the  diversion  "tf" (for "temporary footnote"), so you will
  170. .\"    NEVER spring a trap during the first reading of a footnote. When
  171. .\"    "ef" ("end footnote") is called,  the diversion  is  closed.  If
  172. .\"    this  is the first footnote on the page (ie, the number register
  173. .\"    "fc" is 1), and the footnote height (plus the height of 1  line)
  174. .\"    crosses  the  bottom  margin,  you get the footnoted word on one
  175. .\"    page and the footnote on the other.  In this case we  just  call
  176. .\"    "fo"  manually  (taking case it cannot be re-invoked on the same
  177. .\"    page!)  If this situation does not occur,  we  just  adjust  the
  178. .\"    footer  trap's  position upwards (we'll get to how far in a min-
  179. .\"    ute); if this puts the trap above the current line,  we  reposi-
  180. .\"    tion  the trap just beneath the current line to be sure of trig-
  181. .\"    triggering it once the current line is forced out.
  182. .\"     To reposition the footer trap, we proceed as  follows.  Because
  183. .\"    the  trap  may be sprung in the middle of a line, it is possible
  184. .\"    that the footnote will not fit on the page (regardless of  where
  185. .\"    on the page the footnoted word occurs -- really!) if we move the
  186. .\"    trap up by the size of  the  footnote  diversion  "tf".  So,  we
  187. .\"    fudge things a little bit -- for the first footnote on each page
  188. .\"    we move the footer trap up 1 extra line ("line" being 1v in env-
  189. .\"    ironment  #0).   Unless  the point size and vertical spacing are
  190. .\"    increased between the first footnote and the footer trap's being
  191. .\"    sprung,  this  will  keep  the footnotes on the same page as the
  192. .\"    footnoted word.  But as there may be now as much as 1v of  space
  193. .\"    between the footnote and the bottom margin, which looks HIDEOUS,
  194. .\"    we use the number register "fs" to mark where  the  footer  trap
  195. .\"    would  REALLY go, and just space to it when it comes time to put
  196. .\"    out the footnotes.
  197. .de fd                    \" dump footnotes
  198. .nr gs 1v                \" get a measure of 1 line in env #0
  199. .ev 1                    \" switch to footnote environment
  200. .nr gs +2v                \" min of 2 lines of footnotes
  201. .                    \" if the number register ns > 0,
  202. .                    \" the last text line may contain a
  203. .                    \" footnote that is too big to fit;
  204. .                    \" this checks for such a note and
  205. .                    \" if so, forces the footnote into
  206. .                    \" the "fy" diversion that carries
  207. .                    \" it onto the next text page
  208. .ie (\\n(nsu>0)&(\\n(gsu>=\\n(.tu) 'sp \\n(gsu    \" be sure you can get it down
  209. .el .if \\n(fsu>\\n(nlu 'sp \\n(fsu-\\n(nlu    \" move to footnote start position
  210. 'nf                    \" don't reprocess footnotes
  211. 'in 0                    \" don't indent them any more either
  212. .tf                    \" drop text of footnotes
  213. .rm tf
  214. .if '\\n(.z'fy' .di            \" end overflow diversion, if any
  215. .nr fc 0                \" re-init footnote count
  216. .ev                    \" return to usual environment
  217. ..
  218. .de fn                    \" start footnote
  219. .                    \" look for nested footnotes -- ILLEGAL
  220. .ie \\n(if>0 .er "footnote within footnote"
  221. .el .da tf                \" append footnote to footnote diversion
  222. .nr if +1                \" increment level of footnoting
  223. .nr fc +1                \" one more footnote on this page
  224. .if \\n(fc=1 .nr fp -1v            \" The reason for this "fudge factor"
  225. .                    \" is that there is no way to force
  226. .                    \" NROFF/TROFF to invoke a macro at
  227. .                    \" the end of each line.  At times,
  228. .                    \" the trap boundary will not match up
  229. .                    \" with the bottom of a line, so the
  230. .                    \" "fo" trap which is set at 2320 may
  231. .                    \" not be triggered until 2340 -- and
  232. .                    \" then the footnote won't fit.  This
  233. .                    \" gives some slack so the footnote is
  234. .                    \" more likely to fit. *sigh*
  235. .ev 1                    \" enter footnote environment
  236. .if \\n(fc=1 .fs            \" drop separator if first footnote
  237. .br                    \" flush out any previous line in footnote
  238. .fi                    \" process footnote in fill mode
  239. ..
  240. .de ef                    \" end footnote
  241. .br                    \" flush out the line in footnote
  242. .ie \\n(if<=0 .er "end footnote has no corresponding begin footnote"
  243. .el \{\
  244. .    nr if -1            \" decrement level of footnoting
  245. .    nr fg 2v            \" remember this for repositioning fo
  246. .    ev                \" back to usual environment
  247. .    if \\n(if=0 \{\
  248. .        di            \" end of footnote proper
  249. .        nr fp -\\n(dnu        \" "fo" will be moved at least up this far
  250. .        nr fs -\\n(dnu        \" increase size of footnote
  251. .        ch fo \\n(fpu        \" reposition "fo" trap (first guess)
  252. .                    \" the first part of the "ie" clause
  253. .                    \" is taken in the special case
  254. .                    \" described above
  255. .        ie (\\n(fc=1)&((\\n(nlu+1v+\\n(fgu)>=(\\n(.pu-\\n(bmu)) \{\
  256. .            nr ns \\n(dnu    \" suppress footnote separator
  257. .                    \" since this footnote contains it
  258. .                    \" keep "fo" from being invoked twice
  259. .            ch fo \\n(.pu+1i
  260. .            fo        \" force the page out AT ONCE
  261. .            nr ns 0        \" re-enable footnote separator
  262. .        \}
  263. .                    \" footnote won't fit completely
  264. .                    \" invoke the footer trap but
  265. .                    \" don't worry about the footnote
  266. .                    \" separator (it's already there)
  267. .        el .if (\\n(nlu+1v)>=(\\n(.pu+\\n(fpu) \{\
  268. .                    \" as before we must reposition the
  269. .                    \" "fo" trap to prevent "fo" from
  270. .                    \" being invoked twice
  271. .            ch fo \\n(.pu+1i
  272. .            fo        \" force the page out AT ONCE
  273. .        \}
  274. .    \}
  275. .\}
  276. ..
  277. .de fs                    \" drop footnote separator
  278. .                    \" only if not already dropped
  279. .if \\n(ns=0 \l'1i'
  280. .nr ns 0                \" in case footnotes are over 1 page long
  281. ..
  282. .de fx                    \" process footnote overflow
  283. .if \\n(fc .di fy            \" stuff them in the right place
  284. ..
  285. .de fz                    \" deposit footnote overflow
  286. .fn                    \" treat it as a footnote
  287. .nf                    \" it's already been processed
  288. .in 0                    \"   and indented
  289. .fy                    \" "fx" put it here
  290. .ef                    \" end the footnote
  291. ..
  292. .\" **********
  293. .\" the ones after here are user-invoked (like "fn" and "ef" above)
  294. .\" title, author, etc.
  295. .de mt                    \" main title
  296. \&
  297. .sp |\\n(mtu                \" space
  298. .ft 3                    \" in bold
  299. .ps \\n(ps+2p                \" large point size and
  300. .vs \\n(vs+2p                \" vertical spacing
  301. .ce 1000                \" center the title
  302. .nr t2 1                \" space it
  303. ..
  304. .de au                    \" author
  305. .nr t2 0                \" spacing here
  306. .sp 2v                    \" space
  307. .ft 2                    \" in italics
  308. .ps \\n(ps                \" usual point size and
  309. .vs \\n(vs                \" vertical spacing
  310. .ce 1000                \" center the name(s)
  311. ..
  312. .de ai                    \" author's institution
  313. .if \\n(t2 .sp 2v            \" space after a title
  314. .nr t2 0                \" institution
  315. .ft 2                    \" in italics
  316. .ps \\n(ps                \" usual point size and
  317. .vs \\n(vs                \" vertical spacing
  318. .ce 1000                \" center the name(s)
  319. ..
  320. .de bt                    \" begin text macro
  321. .nr t2 0                \" hold it here
  322. .nr it +1                \" mark as called
  323. .ce 0                    \" end any centering
  324. .sn 3v                    \" a little bit of space
  325. ..
  326. .\" paragraph
  327. .de si                    \" start indented section
  328. .nr lo \\n(lm                \" remember the current level
  329. .nr lm +1                \" go to the next level
  330. .ie '\\$1'' .nr l\\n(lm \\n(l\\n(lo+5n    \" if no arg, indent 5n
  331. .el         .nr l\\n(lm \\$1n        \" otherwise, indent that much
  332. ..
  333. .de ei                    \" end indent
  334. .nr lm -1                \" down one level
  335. .if \\n(lm<0 .nr lm 0            \" make sure you don't go too far
  336. ..
  337. .de pg                    \" plain old paragraph
  338. .if !\\n(it .bt                \" end the title and such
  339. .sn \\n(pdu                \" inter-paragraph spacing
  340. .ft 1                    \" reset a few things (paranoia)
  341. .                    \" these ONLY if not in footnote
  342. .ie \\n(if=0 \{\
  343. .    ps \\n(ps            \" reset point size
  344. .    vs \\n(vs            \" reset vertical spacing
  345. .    ne 1v+\\n(.Vu            \" slightly more than 1 line
  346. .\}
  347. .el \{\
  348. .    ps \\n(ps-2p            \" reset point size
  349. .    vs \\n(vs-2p            \" reset vertical spacing
  350. .\}
  351. .in \\n(l\\n(lmu            \" stop any indenting
  352. .ce 0                    \" stop any centering
  353. .if !'\\$1'L' .if !'\\$1'l' .ti +\\n(piu    \" indent the sucker
  354. ..
  355. .de lp                    \" labelled paragraph
  356. .pg l                    \" reset paragraph
  357. .if \\n(.$>1 .nr li \\$2n        \" if indent given use it
  358. .in +\\n(liu                \" indent for paragraph
  359. .ti -\\n(liu                \" force first line NOT to indent
  360. .ta +\\n(liu                \" for the label
  361. \&\\$1\t\c
  362. .if \\w'\\$1'u>=(\\n(l\\n(lmu+\\n(liu) .br    \" don't overwrite
  363. ..
  364. .\" The following two macros (hu & hn) have been modified for ELM usage.
  365. .\" If the macros have text as part of the macro call, the text will be
  366. .\" increased in size by two points.  After printing the text, the font
  367. .\" will be returned to normal, otherwise the font will be left bold.
  368. .\"
  369. .\" section
  370. .de hu                    \" header, unnumbered
  371. .                    \" format: .hu [text]
  372. .if !\\n(it .bt                \" end the title and such
  373. .br                    \" force out previous line
  374. .b
  375. .ie \\n(hP .ps \\n(hP
  376. .el        .ps \\n(ps
  377. .ie \\n(hv .vs \\n(hv
  378. .el        .vs \\n(vs
  379. .in \\n(l\\n(lmu            \" stop any indenting
  380. .sn \\n(hsu                \" inter-section spacing
  381. .ne 3v+\\n(.Vu                \" slightly more than 3 lines
  382. .fi                    \" process the text, too
  383. .if \\n(.$>=1 \{\
  384. .ps +2
  385. \\$1
  386. .\}
  387. .if \\n(.$>=2 \\$2
  388. .if \\n(.$>=3 \\$3
  389. .if \\n(.$>=4 \\$4
  390. .if \\n(.$>=5 \\$5
  391. .if \\n(.$>=6 \\$6
  392. .if \\n(.$>=7 \\$7
  393. .if \\n(.$>=8 \\$8
  394. .if \\n(.$=9 \\$9
  395. .if \\n(.$>=1 \{\
  396. .ps -2
  397. .br
  398. .ft 1
  399. .\}
  400. ..
  401. .de hn                    \" header, numbered
  402. .                    \" format: .hn [level] [text]
  403. .if !\\n(it .bt                \" end the title and such
  404. .br                    \" force out previous line
  405. .b
  406. .ie \\n(hP .ps \\n(hP
  407. .el        .ps \\n(ps
  408. .ie \\n(hv .vs \\n(hv
  409. .el        .vs \\n(vs
  410. .in \\n(l\\n(lmu            \" stop any indenting
  411. .sn \\n(hsu                \" inter-section spacing
  412. .ne 3v+\\n(.Vu                \" slightly more than 3 lines
  413. .fi                    \" process the text, too
  414. .ie !'\\$1'' .nr hn \\$1
  415. .el          .nr hn 1
  416. .ie \\n(hn>0 .nr hn -1
  417. .el          .nr hn 0
  418. .ie \\n(hn=0 \{\
  419. .    nr h0 +1            \" add 1 to main section header
  420. .    nr h1 0                \" zap remaining section numbers
  421. .    nr h2 0                \" zap remaining section numbers
  422. .    nr h3 0                \" zap remaining section numbers
  423. .ie \\n(.$>=2 \{\
  424. .ps +2
  425. \\n(h0.
  426. .ps -2
  427. .\}
  428. .el \\n(h0.
  429. .\}
  430. .el .ie \\n(hn=1 \{\
  431. .    nr h1 +1            \" add 1 to the section header
  432. .    nr h2 0                \" zap remaining section numbers
  433. .    nr h3 0                \" zap remaining section numbers
  434. .ie \\n(.$>=2 \{\
  435. .ps +2
  436. \\n(h0.\\n(h1.
  437. .ps -2
  438. .\}
  439. .el \\n(h0.\\n(h1.
  440. .\}
  441. .el .ie \\n(hn=2 \{\
  442. .    nr h2 +1            \" add 1 to the section header
  443. .    nr h3 0                \" zap remaining section numbers
  444. .ie \\n(.$>=2 \{\
  445. .ps +2
  446. \\n(h0.\\n(h1.\\n(h2.
  447. .ps -2
  448. .\}
  449. .el \\n(h0.\\n(h1.\\n(h2.
  450. .\}
  451. .el \{\
  452. .    nr h3 +1            \" add 1 to the section number
  453. .ie \\n(.$>=2 \{\
  454. .ps +2
  455. \\n(h0.\\n(h1.\\n(h2.\\n(h3.
  456. .ps -2
  457. .\}
  458. .el \\n(h0.\\n(h1.\\n(h2.\\n(h3.
  459. .\}
  460. .if \\n(.$>=2 \{\
  461. .ps +2
  462. \\$2
  463. .\}
  464. .if \\n(.$>=3 \\$3
  465. .if \\n(.$>=4 \\$4
  466. .if \\n(.$>=5 \\$5
  467. .if \\n(.$>=6 \\$6
  468. .if \\n(.$>=7 \\$7
  469. .if \\n(.$>=8 \\$8
  470. .if \\n(.$>=9 \\$9
  471. .if \\n(.$>=2 \{\
  472. .br
  473. .ft 1
  474. .ps -2
  475. .\}
  476. ..
  477. .\" displays (no floats, thank God!)
  478. .de sd                    \" start display
  479. .                    \" look for nested displays -- ILLEGAL
  480. .ie \\n(id>0 .er "display within display"
  481. .el \{\
  482. .    ie '\\$1'c' .nr sf 1        \" center the sucker
  483. .    el          .nr sf 0        \" don't center it
  484. .\}
  485. .sn \\n(pdu                \" a little bit of space
  486. .ev 2                    \" switch to display environment
  487. .nf                    \" what you type is what you get
  488. .if \\n(id=0 .di dd            \" start saving text
  489. .rs                    \" don't eat leading space
  490. .nr id +1                \" increment level of display
  491. ..
  492. .de ed                    \" end display
  493. .br                    \" flush line
  494. .ie \\n(id<=0 .er "end display has no corresponding begin display"
  495. .el \{\
  496. .    nr id -1            \" decrement level of display
  497. .    if \\n(id=0 \{\
  498. .        di            \" end diversion
  499. .        fi            \" resume filling
  500. .        in -\\n(piu        \" dedent
  501. .        ev            \" pop environment
  502. .        ne \\n(dnu        \" be sure you have room
  503. .        nf            \" don't reprocess display
  504. .        rs            \" don't eat leading space
  505. .        zi            \" save indents
  506. .        ie \\n(sf .in (\\n(llu-\\n(dlu)/2u    \" center on the line length
  507. .        el .in +\\n(piu        \" indent the sucker
  508. .        dd            \" drop display
  509. .        yi            \" restore indents
  510. .    \}
  511. .\}
  512. .fi                    \" resume filling
  513. .sn \\n(pdu                \" a little bit of space
  514. ..
  515. .\" **********
  516. .\" fonts -- if argument(s), apply only to first
  517. .de b                    \" bold (font 3)
  518. .ie \\n(.$>0 \\&\\$3\\f3\\$1\\fP\\$2
  519. .el .ft 3
  520. ..
  521. .de i                    \" italics (font 2)
  522. .ie \\n(.$>0 \\&\\$3\\f2\\$1\\fP\\$2
  523. .el .ft 2
  524. ..
  525. .de r                    \" roman (font 1)
  526. .ft 1                    \" just restore it
  527. ..
  528. .de bi                    \" bold italics (embolden font 2)
  529. \\&\\$3\c
  530. \\kb\\f2\\$1\\fP\\h'|\\nbu+2u'\\f2\\$1\\fP\\$2
  531. ..
  532. .\" **********
  533. .\" point sizes -- if argument(s), apply only to first
  534. .de sm                    \" reduce point size by 2
  535. .ie \\n(.$>0 \\&\\$3\\s-2\\$1\\s0\\$2
  536. .el .ps -2
  537. ..
  538. .de is                    \" increase point size by 2
  539. .ie \\n(.$>0 \\&\\$3\\s+2\\$1\\s0\\$2
  540. .el .ps +2
  541. ..
  542. .de nl                    \" return to normal size
  543. .ps \\n(ps                \" just reset the point size
  544. ..
  545. .\" **********
  546. .\" handy force space/inhibit more space macros
  547. .de sn                    \" space, then turn on nospace mode
  548. .sp \\$1                \" space
  549. .ns                    \" ignore any more space requests
  550. ..
  551. .de sr                    \" force out space
  552. .rs                    \" turn on spacing mode
  553. .sp \\$1                \" space
  554. ..
  555. .\" **********
  556. .\" end of text and error macros
  557. .de et                    \" end of text macro
  558. .                    \" this: (1) flushes rest of line
  559. .                    \" (2) trips the footer, taking
  560. .                    \" care of footnotes
  561. .sp \\n(.pu
  562. .                    \" check for open displays or footnotes
  563. .if \\n(id>0 .er "unfinished display"
  564. .if \\n(if>0 .er "unfinished footnote"
  565. .                    \" this one means an -mn bug (*sigh*)
  566. .if !'\\n(.z'' .er "diversion \\n(.z not closed"
  567. ..
  568. .de er                    \" print error message
  569. .                    \" flag it as an error
  570. .ds ws "** ERROR **
  571. .                    \" if you have it, give the file name
  572. .if !'\\*(.f'' .as ws " file \\*(.f,
  573. .                    \" put out the line number
  574. .as ws " line \\n(.c
  575. .                    \" and finally the error message
  576. .tm \\*(ws: \\$1
  577. ..
  578. .\" **********
  579. .\" macros in this section are VERY specific to the news documentation
  580. .de pa                    \" protocol appellation (darn names!)
  581. \\&\\$3\\f2\\$1\\fP\\$2
  582. ..
  583. .de ng                    \" news group name
  584. \\&\\$3\\f3\\$1\\fP\\$2
  585. ..
  586. .de cn                    \" computer name
  587. \\&\\$3\\f2\\$1\\fP\\$2
  588. ..
  589. .de hf                    \" header field
  590. \\&\\$3\\*(lq\\$1\\*(rq\\$2
  591. ..
  592. .de cf                    \" contents of field
  593. \\&\\$3\\*(lq\\$1\\*(rq\\$2
  594. ..
  595. .de qc                    \" quote control char (command)
  596. \\&\\$3\\f3<\\s-2\\$1\\s0>\\fP\\$2
  597. ..
  598. .de qp                    \" quote printing char (command)
  599. \\&\\$3\\f3\\$1\\fP\\$2
  600. ..
  601. .de op                    \" option
  602. \\&\\$3\\f3\\$1\\fP\\$2
  603. ..
  604. .\" **********
  605. .\" trademarked names
  606. .de pd                    \" print "PDP-11"
  607. .ie \\n(p1 \\&\\$2\\s-1PDP\\s0-11\\$1
  608. .el \{\
  609. .    nr p1 +1            \" mark footnote as dropped
  610. \\&\\$2\\s-1PDP\\s0-11\\*(rg\\$1
  611. .    fn                \" put out the footnote
  612. \\&\\*(rgPDP-11 is a registered trademark of Digital Equipment Corporation.
  613. .    ef                \" short and sweet ...
  614. .\}
  615. ..
  616. .de ux                    \" print "UNIX"
  617. .ie \\n(ux \\&\\$2\\s-1UNIX\\s0\\$1
  618. .el \{\
  619. .    nr ux +1            \" mark footnote as dropped
  620. \\&\\$2\\s-1UNIX\\s0\\*(rg\\$1
  621. .    fn                \" put out the footnote
  622. \\&\\*(rgUNIX is a registered trademark of AT&T.
  623. .    ef                \" short and sweet ...
  624. .\}
  625. ..
  626. .de vx                    \" print "VAX"
  627. .ie \\n(vx \\&\\$2\\s-1VAX\\s0\\$1
  628. .el \{\
  629. .    nr vx +1            \" mark footnote as dropped
  630. \\&\\$2\\s-1VAX\\s0\\*(rg\\$1
  631. .    fn                \" put out the footnote
  632. \\&\\*(rgVAX is a trademark of Digital Equipment Corporation.
  633. .    ef                \" short and sweet ...
  634. .\}
  635. ..
  636. .\" **********
  637. .\" set up string and number registers
  638. .                    \" set up for the date
  639. .if \n(mo=1  .ds mo January
  640. .if \n(mo=2  .ds mo February
  641. .if \n(mo=3  .ds mo March
  642. .if \n(mo=4  .ds mo April
  643. .if \n(mo=5  .ds mo May
  644. .if \n(mo=6  .ds mo June
  645. .if \n(mo=7  .ds mo July
  646. .if \n(mo=8  .ds mo August
  647. .if \n(mo=9  .ds mo September
  648. .if \n(mo=10 .ds mo October
  649. .if \n(mo=11 .ds mo November
  650. .if \n(mo=12 .ds mo December
  651. .ds dy "\*(mo \n(dy, 19\n(yr
  652. .if \n(dw=1  .ds dw Sunday
  653. .if \n(dw=2  .ds dw Monday
  654. .if \n(dw=3  .ds dw Tuesday
  655. .if \n(dw=4  .ds dw Wednesday
  656. .if \n(dw=5  .ds dw Thursday
  657. .if \n(dw=6  .ds dw Friday
  658. .if \n(dw=7  .ds dw Saturday
  659. .                    \" NROFF dependencies
  660. .if n \{\
  661. .                    \" string registers
  662. .    ds rg (R)
  663. .    ds lq ""
  664. .    ds rq ""
  665. .    ds f1 "\*(dy
  666. .                    \" number registers
  667. .    nr hs 1v            \" space before section header
  668. .    nr pd 1v            \" inter-paragraph spacing
  669. .    nr bm 1.0i            \" height of bottom margin
  670. .\}
  671. .                    \" NROFF dependencies
  672. .if t \{\
  673. .                    \" string registers
  674. .    ds rg \\u\\s-2\\(rg\\s0\\d
  675. .    ds lq ``
  676. .    ds rq ''
  677. .                    \" number registers
  678. .    nr hs 1v            \" space before section header
  679. .    nr pd 0.3v            \" inter-paragraph spacing
  680. .    nr bm 1.0i+1v            \" height of bottom margin (wacky laser)
  681. .\}
  682. .                    \" these are the same for [NT]ROFF
  683. .ds dg \(dg
  684. .ds vr "News Version B2.11
  685. .ds pv "News macros 1.5
  686. .ds h1 - % -
  687. .nr bt 0.5i+1v                \" bottom of page to footer
  688. .nr cm 0                \" no cut marks
  689. .nr fc 0 1                \" init footnote count
  690. .nr fl 5.5i                \" footnote line length
  691. .nr fp 0-\n(bmu                \" fo macro trap location
  692. .nr h0 0                \" init section header level 0
  693. .nr h1 0                \" init section header level 1
  694. .nr h2 0                \" init section header level 2
  695. .nr h3 0                \" init section header level 3
  696. .nr id 0                \" 1 in display
  697. .nr if 0                \" 1 in keep
  698. .nr it 0                \" 1 when beyond title, etc.
  699. .nr li 5n                \" indent for labelled paragraph
  700. .nr ll 6.5i                \" line length
  701. .nr lm 0                \" left margin
  702. .nr l0 0                \" first indent level
  703. .nr mt 1.5i+1v                \" title goes down this far
  704. .nr pi 5n                \" regular paragraph indent
  705. .nr po 1.0i                \" page offset
  706. .nr ps 10                \" point size
  707. .nr tm 1.0i                \" height of top margin
  708. .nr tt 0.5i-0.5v            \" top of page to header
  709. .nr p1 0                \" no PDP-TM message yet
  710. .nr ux 0                \" no UNIX-TM message yet
  711. .nr vx 0                \" no VAX-TM message yet
  712. .nr vs 12                \" vertical spacing
  713. .\" set things up
  714. .\" DSINC changes for XROFF
  715. .nr f1 1
  716. .nr f2 1
  717. .nr s1 10
  718. .nr s2 10
  719. .nr v1 12
  720. .nr v2 12
  721. .ps 10
  722. .vs 12
  723. .\" DSINC end changes for XROFF
  724. .po \n(pou                \" set page offset
  725. .ps \n(ps                \" set previous, current
  726. .ps \n(ps                \"   point sizes
  727. .vs \n(vs                \" set previous, current
  728. .vs \n(vs                \"   vertical spacings
  729. .ll \n(llu                \" set line length
  730. .lt \n(llu                \" set title line length
  731. .ev 1                    \" *** footnote environment
  732. .ps \n(ps-2p                \" set previous, current
  733. .ps \n(ps-2p                \"   point sizes
  734. .vs \n(vs-2p                \" set previous, current
  735. .vs \n(vs-2p                \"   vertical spacings
  736. .ll \n(flu                \" set line length
  737. .lt \n(flu                \" set title line length
  738. .ev                    \" *** pop environment
  739. .ev 2                    \" *** footnote environment
  740. .ps \n(ps                \" set previous, current
  741. .ps \n(ps                \"   point sizes
  742. .vs \n(vs                \" set previous, current
  743. .vs \n(vs                \"   vertical spacings
  744. .ll \n(llu                \" set line length
  745. .lt \n(llu                \" set title line length
  746. .ev                    \" *** pop environment
  747. .\" now set internal registers (for the first header section)
  748. .nr f1 \n(.f                \" saved font #1
  749. .nr f2 \n(.f                \" saved font #2
  750. .nr s1 \n(.s                \" saved point size #1
  751. .nr s2 \n(.s                \" saved point size #2
  752. .nr v1 \n(.v                \" saved vertical spacing #1
  753. .nr v2 \n(.v                \" saved vertical spacing #2
  754. .\" install traps
  755. .wh 0i hd                \" position header trap
  756. .wh -\n(bmu fo                \" position footer trap
  757. .wh \n(.pu+1i fx            \" put footnote overflow trap here
  758. .ch fx -\n(bmu                \" move it over fo
  759. .wh -\n(btu pf                \" print the bottom margin here
  760. .em et                    \" at end of file, call et
  761. .\" couple of miscellaneous requests
  762. .bd S 3 3                \" embolden special font chars if B
  763. .hy 2                    \" don't hyphenate last lines
  764.