docs/master
view style @ 82:ff4537327162
Mayor rework: Replaced .DS with .VS, a better verbatim environment.
VS is no Keep.
By translating characters in the typewriter fonts, we don't need to
escape the minus, backtick and single quote characters.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Wed, 06 Jun 2012 17:58:09 +0200 |
parents | 5fb821ed6f3c |
children | 99ab58dc891f |
line source
1 .do xflag 3
2 .de __
3 ..
4 .blm __ \" ignore empty lines in input
5 .lc_ctype en_US.utf8
6 .mediasize a4
8 .fp 1 R LinLibertine_R otf
9 .feature R +onum
10 .fp 2 I LinLibertine_RI otf
11 .feature I +onum
12 .fp 3 B LinLibertine_RB otf
13 .feature B +onum
14 .fp 4 BI LinLibertine_RBI otf
15 .feature BI +onum
16 .fp 5 CW TerminusMedium-4.36 ttf
17 .fp 0 CI TerminusMediumItalic-4.36 ttf
18 .fp 0 CB TerminusBold-4.36 ttf
19 .fp 0 L TerminusMedium-4.36 ttf
20 .ftr CW -\-`\`'\'
21 .ftr CI -\-`\`'\'
22 .ftr CB -\-`\`'\'
23 .ftr L -\-`\`'\'
24 .fp 0 SC LinLibertine_R otf
25 .feature SC +onum +smcp
26 .fp 0 IC LinLibertine_RI otf
27 .feature IC +onum +smcp
28 .fp 0 BC LinLibertine_RB otf
29 .feature BC +onum +smcp
31 .ig
32 . nr PS 11
33 . nr VS 13
34 . padj
35 ..
37 .nr PI 3n
38 .nr PD .3v
39 .nr lu 0
40 .af PN i
42 .ds _E '\\\\n(PN''\f(SCMarkus Schnalke: The Modern Mail Handler\fP' \" left
43 .ds _O '\f(SCChapter \\\\n(H1\ \ \\\\*(_C\fP''\\\\n(PN' \" right
44 .ds _o '\f(SC\\\\*(_C\fP''\\\\n(PN' \" right
45 .ds CH "
47 .nr HM 3.3c
48 .nr FM 6.6c
49 .nr LL 13c
50 .ll 13c
51 .nr LT \n(LL
52 .if t .nr PO 3.3c
54 . \" _M - change margins for text block on next page
55 .de _M
56 .if t .if o .nr PO +(21c-\n(.lu-(2u*3.3c))c
57 .if t .if e .nr PO -(21c-\n(.lu-(2u*3.3c))c
58 .ds CF "
59 ..
60 .wh -1u _M
62 . \" CW - Set text in CW font (similar to .B and .I)
63 .de CW
64 .nr PQ \\n(.f
65 .if t \{\
66 . ft CW
67 . if !^\\$1^^ \&\\$1\f\\n(PQ\\$2
68 .\}
69 .if n \{\
70 . ie ^\\$1^^ .ul 999
71 . el .ul 1
72 . if \\n(.$=1 \&\\$1
73 . if \\n(.$>1 \&\\$1\c
74 . if \\n(.$>1 \&\\$2
75 .\}
76 ..
78 . \" refer(1) stuff
79 .ds [. " [
80 .ds .] ]
81 .rm ]<
82 .de ]<
83 . LP
84 . de FP
85 . IP \\\\$1.
86 \\..
87 . rm FS FE
88 ..
90 . \" PT - page top macro of ms
91 .am PT
92 . rs
93 ..
96 . \" RN - Reset PN and continue on an odd page ($1=number-format)
97 .de RN
98 .ie e .pn 1
99 .el \{
100 . pn 0
101 . bp
102 .\}
103 .ie \\n(.$=1 .af PN \\$1
104 .el .af PN 1
105 ..
108 . \" T_ - Add TOC entry ($1=pre-space $2=indent-level $3=text)
109 .de T_
110 .tm TOC____.sp \\$1
111 .tm TOC____\&\\h'\\$2u*2u*\\n(PIu'\\$3\0\0\a\t\\n(PN\fR
112 ..
114 . \" NH - redefine numbered heading
115 .de NH
116 .SH
117 .nr NS \\$1
118 .if !\\n(.$ .nr NS 1
119 .if !\\n(NS .nr NS 1
120 .nr H\\n(NS +1
121 .if \\n(NS<2 .nr H2 0
122 .if \\n(NS<3 .nr H3 0
123 .ds SN \\n(H1
124 .if \\n(NS>1 .as SN \&.\\n(H2
125 .if \\n(NS>2 .as SN \&.\\n(H3
126 ..
128 . \" H- - Chapter unnumbered and not in TOC ($2=="no" -> no page hdrs)
129 .de H-
130 .EH "
131 .OH "
132 .bp
133 .if e .rs \" move to an odd page
134 .if e .bp
135 .lg 0
136 .nr PS +6
137 .nr VS +6
138 .SH
139 .ce 1
140 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
141 \&\\$1
142 .br
143 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
144 .nr PS -6
145 .nr VS -6
146 .lg
147 .if !,\\$2,no, \{
148 . EH "\\\\*(_E
149 . ie \\n(H1 .OH "\\\\*(_O
150 . el .OH "\\\\*(_o
151 . ds CF \\n(PN
152 .\}
153 .RT
154 .sp 4
155 .nr PP 0
156 ..
158 . \" H0 - Chapter ($2=="no" -> not numbered)
159 .de H0
160 .EH "
161 .OH "
162 .bp
163 .if e .rs \" begin chapter on an odd page
164 .if e .bp
165 .lg 0
166 .nr PS +6
167 .nr VS +6
168 .ie ,\\$2,no, .SH
169 .el \{\
170 . NH 1
171 . ce 1
172 Chapter \\*(SN
173 . sp .5
174 .\}
175 .ce 1
176 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
177 \&\\$1
178 .br
179 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
180 .nr PS -6
181 .nr VS -6
182 .lg
183 .\" add to TOC
184 .rm t_
185 .if !,\\$2,no, .ds t_ \\*(SN\0\0
186 .T_ .5v 0 "\fB\\*(t_\\$1
187 .\" set page headers and footers
188 .EH "\\\\*(_E
189 .ds _C "\\$1
190 .ie \\n(H1 .OH "\\\\*(_O
191 .el .OH "\\\\*(_o
192 .ds CF \\n(PN
193 .RT
194 .sp 4
195 .nr PP 0
196 ..
199 . \" H1 - Section ($2=="no" -> not numbered)
200 .de H1
201 .br
202 .ne 7
203 .sp
204 .lg 0
205 .nr PS +2
206 .nr VS +2
207 .ie '\\$2'no' .SH
208 .el .NH 2
209 .if !'\\$2'no' \&\\*(SN
210 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
211 \&\\$1
212 .br
213 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
214 .nr PS -2
215 .nr VS -2
216 .lg
217 .if !'\\$2'no' .T_ .3v 1 "\\*(SN\0\0\\$1 \" add to TOC
218 .RT
219 .nr PP 0
220 ..
222 . \" H2 - Subsection
223 .de H2
224 .br
225 .ne 4
226 .NH 3
227 \&\\*(SN \\$1
228 .T_ 0 2 "\\*(SN\0\0\\$1 \" add to TOC
229 .RT
230 .nr PP 0
231 ..
233 . \" U2 - Subsection unnumbered
234 .de U2
235 .br
236 .ne 4
237 .SH
238 \&\\$1
239 .RT
240 .nr PP 0
241 ..
243 . \" U3 - Subsubsection unnumbered
244 .de U3
245 .br
246 .ne 4
247 .RT
248 .sp
249 .I "\\$1
250 .RT
251 .nr PP 0
252 ..
254 . \" P - Paragraph (indented unless following a heading)
255 .de P
256 .ie \\n(PP .PP
257 .el .LP
258 .nr PP 1
259 ..
261 . \" IP - Paragraph with hanging label
262 .am IP
263 .nr PP 0
264 ..
266 . \" BU - Bulleted paragraph
267 .de BU
268 .IP \(bu
269 ..
271 . \" QP - Block quote paragraph
272 .am QP
273 .ps -1
274 ..
276 . \" DS - Code display
277 .am DS
278 .ft CW
279 .ps -1
280 .ta T 8n
281 ..
283 . \" VS - verbatim text start (\\ -> ^G; ' -> disabled; . -> ^B)
284 .de VS
285 .br
286 .ne 4
287 .sp \n(DDu
288 .if t .in +.5i
289 .if n .in +8n
290 .nf
291 .ft CW
292 .\" ps -1
293 .ta T 8n
294 .\" set up verbatim environment
295 \.blm
296 \.ec
297 \.c2 ""
298 \.cc
299 ..
301 . \" VE - verbatim text end (NOTE: Needs to be called as ^BVE !)
302 .de VE
303 \" restore the special characters
304 cc
305 .c2
306 .ec
307 .blm __
308 .if t .in -.5i
309 .if n .in -8n
310 .sp \n(DDu
311 .ft P
312 .fi
313 .TA
314 ..
316 . \" FA - XXX somehow related to footnotes?
317 .am FA
318 .ps 8
319 .vs 9
320 ..
322 .de Fn \" file name
323 .CW "\\$1" "\\$2
324 ..
325 .de Pn \" program name
326 .CW "\\$1" "\\$2
327 ..
328 .de Fu \" function
329 .CW "\\$1" "\\$2
330 ..
331 .de Ev \" env variable
332 .CW "\\$1" "\\$2
333 ..
334 .de Cl \" command line
335 `\c
336 .CW "\\$1" "'\\$2
337 ..
338 .de Sw \" switch
339 .CW "\\$1" "\\$2
340 ..
341 .de Mp \" man page
342 .I "\\$1" "\\$2
343 ..
344 .de Pe \" profile entry
345 .CW "\\$1" "\\$2
346 ..
348 .de Ci \" commit hash ref
349 .ds _t \\$1
350 .substring _t 0 6
351 [\(rh
352 .CW "\\*(_t" "]\\$2
353 ..
355 .de Cf \" cf. (ref within document)
356 (\(-> \\$1)\\$2
357 ..