home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-User.iso / usr / lib / tmac / tmac.an.new < prev    next >
Text File  |  1988-04-25  |  5KB  |  346 lines

  1. .\" Copyright (c) 1980 Regents of the University of California.
  2. .\" All rights reserved.  The Berkeley software License Agreement
  3. .\" specifies the terms and conditions for redistribution.
  4. .\"
  5. .\"    @(#)tmac.an.new    6.3 (Berkeley) 2/2/86
  6. .\"
  7. '    DT, PD, SM, and B macros invoked internally.
  8. '    # month name
  9. .if "\nd"0" .nr m \n(mo-1
  10. .if "\nm"0" .ds ]m January
  11. .if "\nm"1" .ds ]m February
  12. .if "\nm"2" .ds ]m March
  13. .if "\nm"3" .ds ]m April
  14. .if "\nm"4" .ds ]m May
  15. .if "\nm"5" .ds ]m June
  16. .if "\nm"6" .ds ]m July
  17. .if "\nm"7" .ds ]m August
  18. .if "\nm"8" .ds ]m September
  19. .if "\nm"9" .ds ]m October
  20. .if "\nm"10" .ds ]m November
  21. .if "\nm"11" .ds ]m December
  22. '    # set the date
  23. .if n \{.nr m \nm+1
  24. .     ie \nd .ds ]W Modified \nm/\nd/\ny
  25. .     el .ds ]W Printed \n(mo/\n(dy/\n(yr\}
  26. .if t \{.ie \nd .ds ]W \*(]m \nd, 19\ny
  27. .     el .ds ]W \*(]m \n(dy, 19\n(yr\}
  28. .if t .tr *\(**
  29. .ie n \{\
  30. .    ds lq \&"\"
  31. .    ds rq \&"\"
  32. .\}
  33. .el \{\
  34. .    ds rq ''
  35. .    ds lq ``
  36. .\}
  37. .de AT
  38. .if t \{\
  39. .    ds ]W 7th Edition
  40. .    if "\\$1"3" .ds ]W 7th Edition
  41. .    if "\\$1"4" .ds ]W System III
  42. .    if "\\$1"5" \{\
  43. .        ie "\\$2""  .ds ]W System V
  44. .        el .ds ]W System V Release \\$2
  45. .    \}
  46. .\}
  47. ..
  48. .de UC
  49. .if t \{\
  50. .    ds ]W 3rd Berkeley Distribution
  51. .    if "\\$1"3" .ds ]W 3rd Berkeley Distribution
  52. .    if "\\$1"4" .ds ]W 4th Berkeley Distribution
  53. .    if "\\$1"5" .ds ]W 4.2 Berkeley Distribution
  54. .    if "\\$1"6" .ds ]W 4.3 Berkeley Distribution
  55. .\}
  56. ..
  57. '    # reset the basic page layout
  58. .de }E
  59. .}f
  60. .in \\n()Ru+\\n(INu
  61. .ll \\n(LLu
  62. ..
  63. '    # default tabs
  64. .de DT
  65. 'ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
  66. ..
  67. '    # set type font and size
  68. .de }f
  69. .ps 10
  70. .ft 1
  71. ..
  72. '    # handle the head of the page
  73. .de }H
  74. .ev 1
  75. .}C
  76. .ie "\*(.T"va" 'sp .1i
  77. .el 'sp .5i
  78. .ft 1
  79. .ps 10
  80. .tl @\\*(]H@\\*(]D@\\*(]H@
  81. 'sp .5i
  82. .ev
  83. .ns
  84. '    # for NeXT on-line versions, print header only once. (mjh)
  85. .if n \{\
  86. .wh 0
  87. .\}
  88. ..
  89. '    # handle the foot of the page; for NeXT on-line, skip these.
  90. .if t \{\
  91. .de }F
  92. .ev 1
  93. .ft 1
  94. .ps 10
  95. 'sp .5i
  96. .tl @\\*(]W@\\*(]L@%@
  97. 'bp
  98. .ev
  99. ..
  100. .\}
  101. '    # the cut mark
  102. .if n .ig
  103. .if \nv>0 .ig
  104. .de }C
  105. .po 0i
  106. .lt 7.45i
  107. .tl '__''__'
  108. .po
  109. .lt
  110. ..
  111. '    # the final cut mark
  112. .de }M
  113. .}N
  114. .wh -1p }C
  115. .ll \\n(LLu
  116. ..
  117. '    # no runout unless there was a .TH
  118. .de }K
  119. .}N
  120. .pl 1
  121. .ll \\n(LLu
  122. ..
  123. .em }K
  124. '    # set title and heading
  125. .de TH
  126. .PD
  127. .DT
  128. .if n .nr IN .5i
  129. .if t .nr IN .5i
  130. .nr LL \\n(.l
  131. .ds ]H \\$1\|(\|\\$2\|)
  132. .ie "\\$5"" .ds ]D UNIX Programmer's Manual
  133. .el .ds ]D \\$5
  134. .wh 0 }H
  135. .if t .ie !"\*(.T"va" .wh -1i }F
  136. .if t .el .wh -1.4i }F
  137. .if n .wh -1.167i }F
  138. .em }M
  139. .if \\n(nl .bp 1
  140. .ds ]L \\$3
  141. .}E
  142. .DT
  143. .nr )I .5i
  144. .nr )R 0
  145. .if n .na
  146. .mk ka
  147. .if !'\\n(ka'-1' .bp
  148. .if t \{\
  149. .    ie "\\$4""  .ds ]W 7th Edition
  150. .    el .ds ]W \\$4
  151. .\}
  152. ..
  153. '    # section heading
  154. .de SH
  155. .ss 12
  156. .if "\\$2"SYNOPSIS" .ss 18
  157. .}X 0
  158. .nr )E 2
  159. .SM
  160. \&\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6
  161. ..
  162. '    # sub section heading
  163. .de SS
  164. .}X \\n()Ru+\\n(INu
  165. \&\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6
  166. .br
  167. ..
  168. '    # subroutine for section heading
  169. .de }X
  170. .}E
  171. .ti \\$1
  172. .sp \\n()Pu
  173. .ne 2
  174. .nr )R 0
  175. .fi
  176. .it 1 }N
  177. .B
  178. ..
  179. '    # end of SH (cf }X above and }N below)
  180. .de }2
  181. .nr )E 0
  182. .}E
  183. .nr )I .5i
  184. .ns
  185. ..
  186. '    # italic
  187. .de I
  188. .ft 2
  189. .it 1 }N
  190. .if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
  191. ..
  192. '    # bold
  193. .de B
  194. .ft 3
  195. .it 1 }N
  196. .if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
  197. ..
  198. '    # small
  199. .de SM
  200. .ps 9
  201. .it 1 }N
  202. .if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
  203. ..
  204. '    # combinations of Roman, italic, bold
  205. .de RI
  206. .}S 1 2 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  207. ..
  208. .de VS
  209. 'if '\\$1'4' .mc \s12\(br\s0
  210. ..
  211. .de VE
  212. 'mc
  213. ..
  214. .de RB
  215. .}S 1 3 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  216. ..
  217. .de IR
  218. .}S 2 1 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  219. ..
  220. .de IB
  221. .}S 2 3 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  222. ..
  223. .de BR
  224. .}S 3 1 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  225. ..
  226. .de BI
  227. .}S 3 2 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  228. ..
  229. '    # make special case of shift out of italic
  230. .de }S
  231. .ds ]F
  232. .if "\\$1"2" .if !"\\$5"" .ds ]F\^
  233. .ie !"\\$4"" .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  234. .el \\$3
  235. .}f
  236. ..
  237. '    # paragraph
  238. .de LP
  239. .PP
  240. ..
  241. .de PP
  242. .sp \\n()Pu
  243. .ne 2
  244. .}E
  245. .nr )I .5i
  246. .ns
  247. ..
  248. '    # synonym for .PP
  249. .de P
  250. .PP
  251. ..
  252. '    # paragraph distance
  253. .de PD
  254. .if t .nr )P .4v
  255. .if n .nr )P 1v
  256. .if !"\\$1"" .nr )P \\$1v
  257. ..
  258. '    # paragraph with hanging indent
  259. .de HP
  260. .sp \\n()Pu
  261. .ne 2
  262. .if !"\\$1"" .nr )I \\$1n
  263. .ll \\n(LLu
  264. .in \\n()Ru+\\n(INu+\\n()Iu
  265. .ti \\n()Ru+\\n(INu
  266. .}f
  267. ..
  268. '    # indented paragraph
  269. .de IP
  270. .TP \\$2
  271. \&\\$1
  272. ..
  273. '    # tagged paragraph (paragraph with hanging label)
  274. .de TP
  275. .if !"\\$1"" .nr )I \\$1n
  276. .sp \\n()Pu
  277. .ne 1.1v
  278. .in \\n()Ru
  279. .nr )E 1
  280. .ns
  281. .it 1 }N
  282. .di ]B
  283. ..
  284. '    # end of TP (cf }N below)
  285. .de }1
  286. .ds ]X \&\\*(]B\\
  287. .nr )E 0
  288. .if !"\\$1"" .nr )I \\$1n
  289. .}f
  290. .ll \\n(LLu
  291. .in \\n()Ru+\\n(INu+\\n()Iu
  292. .ti \\n(INu
  293. .ie !\\n()Iu+\\n()Ru-\w@\\*(]X@u-3p \{\\*(]X
  294. .br\}
  295. .el \\*(]X\h@|\\n()Iu+\\n()Ru@\c
  296. .}f
  297. ..
  298. '    # handle end of 1-line features
  299. .de }N
  300. .if \\n()E .br
  301. .di
  302. .if "\\n()E"0" .}f
  303. .if "\\n()E"1" .}1
  304. .if "\\n()E"2" .}2
  305. .nr )E 0
  306. ..
  307. '    # increase relative indent
  308. .de RS
  309. .nr ]\\n+()p \\n()I
  310. .nr )\\n()p \\n()R
  311. .ie !"\\$1"" .nr )R +\\$1n
  312. .el .nr )R +\\n()I
  313. .nr )I .5i
  314. .}E
  315. ..
  316. .de DS
  317. .RS
  318. .nf
  319. .sp
  320. ..
  321. '    # decrease relative indent
  322. .de RE
  323. .if !"\\$1"" \{.ie "\\$1"0" .nr )p 1 1
  324. .        el .nr )p \\$1 1\}
  325. .ds ]i \\*(]I\\n()p
  326. .ds ]r \\*(]R\\n()p
  327. .nr )I \\*(]i
  328. .nr )R \\*(]r
  329. .if \\n()p .nr )p -1
  330. .}E
  331. ..
  332. .de DE
  333. .fi
  334. .RE
  335. .sp .5
  336. ..
  337. .nr )p 0 1
  338. .ds ]I \\\\n(]
  339. .ds ]R \\\\n()
  340. .bd S B 3
  341. .if t .ds R \(rg
  342. .if n .ds R (Reg.)
  343. .ds S \s10
  344. .hy 14
  345. .if "\*(.T"va" .po -0.4i
  346.