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