home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / SOFTWARE / LIBS / NIHCL1.ZIP / NIHCL-3.0 / DOC / README.TR (.txt) < prev   
Text File  |  1993-01-02  |  58KB  |  2,612 lines

  1. .ig
  2. [Note: This file has been modified by the Free Software Foundation]
  3.  
  4.     A complete rewrite of the texttroff macro package.
  5.     It would be loosely modelled after the -ms macros
  6.  
  7.     main concept is to separate the elements of the page,
  8.     so a trap for the footer and a trap for the header separatly
  9.  
  10.     Also all default values are in well known registers,
  11.     initialized by the .IZ macro
  12. ..
  13. .\"
  14. .    \" IZ - initialize. Provide some default settings
  15. .de IZ
  16. .nr PS \n(.p    \" pointsize
  17. .nr VS \n(.v    \" linespacing
  18. .nr HM 1i    \" header margin
  19. .nr FM 1i    \" footer margin
  20. .nr LL \n(.l    \" line length
  21. .nr IN 36p    \" indent to allow outdenting headers
  22. .nr LT \n(.l-\n(INu    \" title length
  23. .\" trap setting
  24. .\"
  25. .\" for the top of page
  26. .wh 0 NP
  27. .\" for dealing with footnotes
  28. .wh 14i FO    \" footer trap, temp position
  29. .    \" to process footnote overflow, we fire this trap
  30. .    \" the trap for FO will be moved way up so we will fire
  31. .    \" this one when FO is putting the footnote out
  32. .wh -\\n(FMu Fx
  33. .    \" Now install FO on top of this position so it
  34. .    \" will be fired when no footnote needs to be processed
  35. .ch -\\n(FMu FO
  36. .\" for the bottom tittle
  37. .wh -\\n(FMu/2u BT
  38. ..
  39. .\"
  40. .    \" TA - set tabstops
  41. .de TA
  42. .ta \\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu +\\n(ENu
  43. ..
  44. .\"
  45. .    \" RS - Reset.    Bring troff into a known state
  46. .de RS
  47. .ps \\n(PS
  48. .vs \\n(VSu
  49. .ll \\n(LLu
  50. .lt \\n(LTu
  51. .in \\n(INu
  52. .po \\n(POu
  53. .nr FS \\n(VSu/4u    \" footnote separation
  54. .nr F 0 1        \" for footnote numbering
  55. .ev 1
  56. .    \" where footnotes are processed
  57. .ps \\n(PS-2
  58. .vs (\\n(VSu-2p)u
  59. .ll \\n(LLu-\\n(INu
  60. .ev
  61. .ev 2
  62. .    \" where the table of contents is stored
  63. .ps \\n(PS
  64. .vs \\n(VSu
  65. .ev
  66. .TA
  67. ..
  68. .\"
  69. .    \" string for footnote numebering. Note that the increment takes place here
  70. .    \" note that Fn is defined in texttroff to get the body font
  71. .ds * \v'-.3v'\\*(Fn\s-3\\n+F\s0\fP\v'.3v'
  72. .ig
  73.     Running headers & footers.
  74.     These will be called from the header & footer macro
  75.     halfway the current margins in the macros PT & BT
  76.     Note that we don't use the page counter (%) directly.
  77.     We stick the value in register PN.
  78.     This allows for changing the format of the page number with
  79.     the .af request without screwing up troff
  80.  
  81.     We will enable the possibility to change on odd & even pages eventually
  82. ..
  83. .\"
  84. .    \" PT - Page Trap & Bottom Trap macro
  85. .de PT
  86. .if \\n(Tc=2 .br
  87. .po +\\n(INu
  88. .pc %
  89. .ie \\n(Tc=3 .nr PN \\n%-\\n(Pc
  90. .el .nr PN \\n%
  91. .nr Pn \\n%
  92. .if \\n(Pn>1 .if e .tl '\\*(LT'\\*(CT'\\*(RT'
  93. .if \\n(Pn>1 .if o .tl '\\*(RT'\\*(CT'\\*(LT'
  94. .po
  95. ..
  96. .    \" default footer string definitions 
  97. .po +\\n(INu
  98. .de BT
  99. .nr PF \\n(.f
  100. .nr PX \\n(.s
  101. .ft 1
  102. .ps \\n(PS
  103. .lt \\n(LTu
  104. .po +\\n(INu
  105. .if e .tl '\\*(LB'\\*(CB'\\*(RB'
  106. .if o .tl '\\*(RB'\\*(CB'\\*(LB'
  107. .ft \\n(PF
  108. .ps \\n(PX
  109. .po
  110. .if \\n(Tc=2 \{\
  111. .    nr Pc \\n%
  112. .    nr Tc 3
  113. .    af PN i
  114. .    TC
  115. .\}
  116. ..
  117. .    \" default header string definitions
  118. .ds CT - \\n(PN -
  119. .\"
  120. .\"
  121. .    \" NP - header macro
  122. .ig
  123.     print the header halfway the margins
  124.     only print when not on the first page
  125. ..
  126. .de NP
  127. .\".tm in NP page \\n% PO \\n(PO .o \\n(.o
  128. .nr PF \\n(.f
  129. .nr PX \\n(.s
  130. .ft 1
  131. .ps \\n(PS
  132. 'sp |\\n(HMu/2u
  133. .if !\\n%=0 .PT
  134. .ps \\n(PX
  135. .ft \\n(PF
  136. 'sp |\\n(HMu
  137. .nr Fc 0 1    \" init footnote count
  138. .nr Fp 0-\\n(HMu    \" current footer place
  139. .ch FO -\\n(HMu    \" reset footer trap
  140. .if \\n(dn .Fz    \" proces left over footnote
  141. .ns    \" no space mode
  142. ..
  143. .\"
  144. .    \" FO - footer macro
  145. .de FO
  146. .nr dn 0    \" zero last diversion size
  147. .if \\n(Fc \{\
  148. .    ev 1        \" expand footnotes in ev1
  149. .\".if '\\n(.z'Fy' .tm in overlow .i \\n(.i
  150. .in \\n(INu        \" set indentation to the one for the page
  151. .    nf        \" retain vertical size
  152. .    FN        \" dump the footnotes
  153. .            \" remove them; Don't put a comment on the next line
  154. .            \" with .rm, some troffs go into an infinite loop
  155. .    rm FN
  156. .\".if '\\n(.z'Fy' .tm in overlow .i \\n(.i
  157. .    if \\n(.zFy .di    \"end overflow diversion
  158. .    nr Fc 0        \" disable fx
  159. .    in 0        \" clear indentation
  160. .ev
  161. .\}
  162. .        \" pop environment
  163. 'bp
  164. ..
  165. ."
  166. .\"    Fx - process footnote overflow
  167. .\"
  168. .de Fx
  169. .if \\n(Fc \{\
  170. .    \" the foonote didn't fit so
  171. .di Fy    \" divert the overflow into Fy (we are still in env 1, so nofill mode)
  172. .    \" since we are in nofill mode and head indentation set,
  173. .in 0    \" set no indentation, so we don't indent twice
  174. .\}
  175. ..
  176. .\"
  177. .\"    FS - Footnote Start
  178. .de FS
  179. .da FN    \" divert (or append) footnote
  180. .ev 1    \" in environment 1
  181. .if \\n+(Fc=1 .FM    \" if first include seperator
  182. .fi    \" process in fill mode
  183. .if !\\n(Fo .FP    \" Footnote paragraph if not processing overflow
  184. ..
  185. .\"
  186. .    \" FP - footnote paragraph
  187. .de FP
  188. .sp \\n(FSu
  189. \v'-.3'\s-3\\nF\s0\v'.3'\|\c
  190. ..
  191. .\"
  192. .\"    FE - Footnote End
  193. .de FE
  194. .br        \" flush the output buffer
  195. .nr Sv \\n(.v    \" save baselinespacing of this env
  196. .ev        \" pop env
  197. .di        \" end the diversion
  198. .nr Fp -\\n(dn    \" new footer position
  199. .if \\n(Fc=1 .nr Fp -(\\n(.v-\\n(Sv)    \" For Separator
  200. .ch FO \\n(Fpu    \" change the trap, Fp is negative
  201. .    \" See whether the stuff really fits.
  202. .    \"if not change trap and we overflow
  203. .if (\\n(nl+1v)>(\\n(.p+\\n(Fp) .ch FO \\n(nlu+1v    \" it didn't fit,
  204. .    \" so fire the FO macro on the next line
  205. ..
  206. .\"
  207. .    \" FM - footnote separator one inch line
  208. .de FM
  209. \l'1i'
  210. .br
  211. ..
  212. .\"
  213. .\"    Fz - process footnote overflow
  214. .de Fz
  215. .nr Fo 1
  216. .FS
  217. .nf    \" is already processed, so keep size
  218. .Fy    \" where Fx put it
  219. .nr Fo 0
  220. .FE
  221. ..
  222. .\"
  223. .\"    HE - next thing will be a header
  224. .\" minimalistic widow control in HE macro.
  225. .\" We aks for a couple of lines with the .ne statement, will trigger the
  226. .\" bottom of page trap on the moment when there is no space 
  227. .de HE
  228. .ne 1.5i
  229. ..
  230. .\"
  231. .\"    IC - in table of contents
  232. .\"    $1 type of header $3 number, $2 text
  233. .\"
  234. .de IC
  235. .nr Tc 1    \"flag that we have a contents
  236. .ev 2
  237. .if !'\\$3'NO' \{\
  238. .    nr Tx \w'\\$3\0'u
  239. .    if \\n(Tx>\\n(Ta .nr Ta \\n(Tx
  240. .\}
  241. .nr Tp \w'\0\\n(PN'u
  242. .da Tc
  243. \\!.xx "\\$1" "\\$2" \\$3 \\n(PN
  244. .br
  245. .di
  246. .ev
  247. ..
  248. .\"
  249. .\"    An item in the table of contents
  250. .de xx
  251. .if \\$1=1 .sp .5
  252. .ie !'\\$3'NO' \\$3\t\\$2\a\t\\$4
  253. .el .ie \\n(Ta \&\t\\$2\a\t\\$4
  254. .el \&\\$2\a\t\\$4
  255. ..
  256. .\"    EM
  257. .\" check for work at end of file
  258. .de EM
  259. .if \\n(Tc \{\
  260. \c
  261. .nr Tc 2
  262. .\}
  263. .\"tm EM called, Tc: \\n(Tc
  264. ..
  265. .\" do the things we want at the end of the paper
  266. .de TC
  267. .\"tm TC called
  268. 'bp
  269. .ft B
  270. .\".tm tabel of contents
  271. .ce
  272. .rs
  273. .sp
  274. .ti -\\n(INu
  275. \s+2Table of Contents\s0
  276. .sp 2
  277. .ft R
  278. .nf
  279. .ev 2
  280. .    \" where the table of contents is stored
  281. .nf
  282. .nr Tb \\n(LLu-\\n(Tpu-\\n(INu
  283. .nr c \w'1.1.1.1\0'u
  284. .ie \\n(Ta .ta \\n(Tau \\n(Tbu \\n(LLu-\\n(INuR
  285. .el .ta \\n(Tbu \\n(LLu-\\n(INuR
  286. .in \\n(INu
  287. .Tc
  288. .ev
  289. ..
  290. .\"
  291. .\"    set end macro
  292. .em EM
  293. .\" in texttroff .IZ
  294. .\" in texttroff .RS
  295. .\"
  296. .\"
  297. .\"
  298. .\" Begin of the PSmacros, coutesy of fred hansen (I believe)
  299. .\"
  300. .nr zT 0
  301. .if  "\*(.T"postscript"  'nr zT 1
  302. .if  "\*(.T"psc"  'nr zT 1
  303. .de PB
  304. 'ne \\$2p
  305. 'nr zw \\n(.l-\\n(.k-1m-\\$1p
  306. 'nr zH \\n(.k
  307. 'nr zV \\n(.d
  308. 'if  \\n(zT  \\{\\
  309. 'ie  !\\n(zw  \\{\\
  310. 'nr zx \\n(.l-\\$1p-10m
  311. 'nr zV \\n(zV+1v
  312. .sp 0
  313. \\v'-.75v'\\ \\v'+.75v'\\c\\}
  314. 'el \\{\\
  315. 'nr zx \\n(zw-10m
  316. \\v'-.75v'\\ \\v'+.75v'\\c\\}
  317. .sp |\\n(zVu
  318. 'if ((\\n(zx<=0)&(\\$2p>0.75v)) \\x'\\$2p-0.75v'\\c
  319. \\!%
  320. \\!%!
  321. \\!  PB
  322. 'if \\n(.j=3 \\{\\
  323. \\!    /troffadjust { neg 2 idiv } def
  324. 'ss\\}
  325. 'if \\n(.j=5 \\{\\
  326. \\!    /troffadjust { neg } def
  327. 'ss\\}
  328. 'if \\n(.j<3 \\{\\
  329. \\!    /troffadjust { pop 0 } def
  330. 'ss\\}\\}
  331. ..
  332. .de PE
  333. 'if \\n(zT \\{\\
  334. \\!  PE
  335. \\!.
  336. 'ie \\n(zx \\{\\
  337. 'if (\\$2p>0.75v) \\x'\\$2p-0.75v'\\c
  338. \\h'-\\n(.ku+\\n(zHu+\\$1p'\\c\\}
  339. 'el  .br\\}
  340. 'if !\\n(zT \\{\\
  341. 'if  !\\n(zw  \\{\\
  342.  \\h'-\\n(.k'\\ \\h'-\\n(.w'\\c
  343. .sp -1\\}
  344. \\x'\\$2p-0.75v'\\v'-.75v'\\D'l \\$1p \
  345. 0.0i'\\D'l 0.0i \\$2p'\\D'l -\\$1p 0.0i'\\D'l 0.0i \
  346. -\\$2p'\\v'+.75v'\\h'\\$1p'\\c\\}
  347. ..
  348. .\"
  349. .\" End of PSmacros
  350. .\"
  351. .\"
  352. .\" ix macro for index production. 
  353. .\"
  354. .de ix
  355. .ie '\\n(.z'' .tm ix: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9    \\n%
  356. .el \\!.ix \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9    \\n%
  357. ..
  358. .\"
  359. .\" End of ix macro
  360. .\"
  361. .IZ
  362. .nr IN 36p
  363. .nr LT 432p
  364. .nr PO 54p
  365. .br
  366. .ad b
  367. 'ft R
  368. .nr PS 12
  369. .ps \n(PS
  370. .nr VS 14p
  371. .vs \n(VSu
  372. .nr EN 8n
  373. .sp 0.5i
  374. .nr DP 0
  375. .ds Fn \fR
  376. .ds HF R
  377. .nr HS \n(.s
  378. .ds FF R
  379. .nr FS \n(.s
  380. .RS
  381. .nh
  382. .OC
  383. .ds Cl Release Notes
  384. .ll 6.75i
  385. .po .75i
  386. .nr Dr 1
  387. .nr DP 0
  388. .ds BU \s-2\(bu\s0
  389. .ds EM \(em
  390. .if\n(mo-0 .ds DT January
  391. .if\n(mo-1 .ds DT February
  392. .if\n(mo-2 .ds DT March
  393. .if\n(mo-3 .ds DT April
  394. .if\n(mo-4 .ds DT May
  395. .if\n(mo-5 .ds DT June
  396. .if\n(mo-6 .ds DT July
  397. .if\n(mo-7 .ds DT August
  398.