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