docs/master

view style @ 213:de8172bcdc5e

Improvements and rework of various kind.
author markus schnalke <meillo@marmaro.de>
date Thu, 12 Jul 2012 22:53:50 +0200
parents aeb03a7aa834
children 8be9e84be526
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 .fp 0 U TerminusMedium-4.36 ttf
21 .ftr CW -\-`\`'\'
22 .ftr CI -\-`\`'\'
23 .ftr CB -\-`\`'\'
24 .ftr L -\-`\`'\'
25 .ftr U -\-`\`'\'
26 .fzoom U .9
27 .fp 0 SC LinLibertine_R otf
28 .feature SC +onum +smcp
29 .fp 0 IC LinLibertine_RI otf
30 .feature IC +onum +smcp
31 .fp 0 BC LinLibertine_RB otf
32 .feature BC +onum +smcp
34 .ig
35 . nr PS 11
36 . nr VS 13
37 . padj
38 ..
40 .ss 12 0 \" the second (non-portable) argument requests french spacing
42 .nr PI 4n
43 .nr PD .3v
44 .nr QI 2u*\n(PIu
45 .nr lu 0
46 .af PN i
48 .ds _E '\\\\n(PN''\f(SCMarkus Schnalke: The Modern Mail Handler\fP' \" left
49 .ds _a '\f(SCAppendix \\\\n(H1\ \ \\\\*(_C\fP''\\\\n(PN' \" right
50 .ds _O '\f(SCChapter \\\\n(H1\ \ \\\\*(_C\fP''\\\\n(PN' \" right
51 .ds _o '\f(SC\\\\*(_C\fP''\\\\n(PN' \" right
52 .ds CH "
54 .nr HM 3.3c
55 .nr FM 6.6c
56 .nr LL 13c
57 .ll 13c
58 .nr LT \n(LL
60 . \" _M - change margins for text block on next page
61 .de _M
62 .if t .if o .nr PO 5c
63 .if t .if e .nr PO 3c
64 .ds CF "
65 ..
66 .wh -1u _M
68 . \" Lp - enlarge the current page by one line to avoid widows
69 .de Lp
70 .ch FO -\n(FMu+1v
71 ..
73 . \" CW - Set text in CW font (similar to .B and .I)
74 .de CW
75 .nr PQ \\n(.f
76 .if t \{\
77 . ft CW
78 . if !^\\$1^^ \&\\$1\f\\n(PQ\\$2
79 .\}
80 .if n \{\
81 . ie ^\\$1^^ .ul 999
82 . el .ul 1
83 . if \\n(.$=1 \&\\$1
84 . if \\n(.$>1 \&\\$1\c
85 . if \\n(.$>1 \&\\$2
86 .\}
87 ..
89 . \" refer(1) stuff
90 .ds [. " [
91 .ds .] ]
92 .rm ]<
93 .de ]<
94 . de FP
95 . IP \\\\$1
96 \\..
97 . rm FS FE
98 ..
100 . \" PT - page top macro of ms
101 .am PT
102 . rs
103 ..
106 . \" RN - Reset PN and continue on an odd page ($1=number-format)
107 .de RN
108 .ie e .pn 1
109 .el \{
110 . pn 0
111 . bp
112 .\}
113 .ie \\n(.$=1 .af PN \\$1
114 .el .af PN 1
115 ..
118 . \" T_ - Add TOC entry ($1=pre-space $2=indent-level $3=text)
119 .de T_
120 .tm TOC____.sp \\$1
121 .tm TOC____\&\\h'\\$2u*2u*\\n(PIu'\\$3\0\0\a\t\\n(PN\fR
122 ..
124 . \" NH - redefine numbered heading
125 .de NH
126 .SH
127 .nr NS \\$1
128 .if !\\n(.$ .nr NS 1
129 .if !\\n(NS .nr NS 1
130 .nr H\\n(NS +1
131 .if \\n(NS<2 .nr H2 0
132 .if \\n(NS<3 .nr H3 0
133 .ds SN \\n(H1
134 .if \\n(NS>1 .as SN \&.\\n(H2
135 .if \\n(NS>2 .as SN \&.\\n(H3
136 ..
138 . \" H- - Chapter not numbered and not in TOC
139 .de H-
140 .EH "
141 .OH "
142 .bp
143 .if e .rs \" move to an odd page
144 .if e .bp
145 .lg 0
146 .nr PS +6
147 .nr VS +6
148 .SH
149 .ce 1
150 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
151 \&\\$1
152 .br
153 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
154 .nr PS -6
155 .nr VS -6
156 .lg
157 .EH "\\\\*(_E
158 .OH "\\\\*(_o
159 .ds CF \\n(PN
160 .RT
161 .sp 4
162 .nr PP 0
163 ..
165 . \" AP - Start the Appendix
166 .de AP
167 .nr _A 1
168 .nr H1 0
169 .af H1 A
170 ..
172 . \" H0 - Chapter ($2=="no" -> not numbered)
173 .de H0
174 .EH "
175 .OH "
176 .bp
177 .if e .rs \" begin chapter on an odd page
178 .if e .bp
179 .lg 0
180 .nr PS +6
181 .nr VS +6
182 .ie ,\\$2,no, .SH
183 .el \{\
184 . NH 1
185 . ce 1
186 .ie \\n(_A Appendix \\*(SN
187 .el Chapter \\*(SN
188 . sp .5
189 .\}
190 .ce 1
191 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
192 \&\\$1
193 .br
194 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
195 .nr PS -6
196 .nr VS -6
197 .lg
198 .\" add to TOC
199 .rm t_
200 .if !,\\$2,no, .ds t_ \\Z'\\*(SN'\\h'3n'
201 .T_ .5v 0 "\fB\\*(t_\\$1
202 .\" set page headers and footers
203 .EH "\\\\*(_E
204 .ds _C "\\$1
205 .ie ,\\$2,no, .OH "\\\\*(_o
206 .el .ie \\n(_A .OH "\\\\*(_a
207 .el .OH "\\\\*(_O
208 .ds CF \\n(PN
209 .RT
210 .sp 4
211 .nr PP 0
212 ..
215 . \" H1 - Section ($2=="no" -> not numbered)
216 .de H1
217 .br
218 .ne 7
219 .sp
220 .lg 0
221 .nr PS +2
222 .nr VS +2
223 .ie '\\$2'no' .SH
224 .el .NH 2
225 .if !'\\$2'no' \&\\*(SN
226 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
227 \&\\$1
228 .br
229 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
230 .nr PS -2
231 .nr VS -2
232 .lg
233 .if !'\\$2'no' .T_ .3v 1 "\\Z'\\*(SN'\\h'4n'\\$1 \" add to TOC
234 .RT
235 .nr PP 0
236 ..
238 . \" H2 - Subsection
239 .de H2
240 .br
241 .ne 4
242 .NH 3
243 \&\\*(SN \\$1
244 .T_ 0 2 "\\Z'\\*(SN'\\h'5.5n'\\$1 \" add to TOC
245 .RT
246 .nr PP 0
247 ..
249 . \" U2 - Subsection unnumbered
250 .de U2
251 .br
252 .ne 4
253 .SH
254 \&\\$1
255 .RT
256 .nr PP 0
257 ..
259 . \" U3 - Subsubsection unnumbered
260 .de U3
261 .br
262 .ne 4
263 .RT
264 .sp
265 .I "\\$1
266 .RT
267 .nr PP 0
268 ..
270 . \" P - Paragraph (indented unless following a heading)
271 .de P
272 .ie \\n(PP .PP
273 .el .LP
274 .nr PP 1
275 ..
277 .am LP
278 .nr PP 1
279 ..
282 . \" LI - Numbered paragraph ``list item'' ($1=label)
283 .de LI
284 .ie \\n(.$ .IP "\\h'\\n(PIu'\\$1." 2u*\\n(PIu
285 .el .IP "\\h'\\n(PIu'\\(bu" 2u*\\n(PIu
286 .nr PP 1
287 ..
288 .ig \" backup
289 .ie \\n(.$ .IP "\h'1n'\\$1"
290 .el .IP "\h'1.5n'\\(bu"
291 ..
293 . \" BU - Bulleted paragraph
294 .de BU
295 .LI
296 ..
298 . \" QS - Block quote start
299 .de QS
300 .ti \\n(.iu
301 .\"RT
302 .sp 2u*\\n(PDu
303 .ne 1.1
304 .ps -1
305 .vs -1
306 .in +\\n(QIu
307 .ll -\\n(QIu
308 .ti \\n(.iu
309 .\"if \\n(Qp .ti +\\n(PIu
310 .\"nr QP 1
311 .\"rr Qp
312 ..
314 . \" QP - Block quote paragraph
315 .de QP
316 .sp \n(PDu
317 .ne 1.1
318 .ti +\\n(PIu
319 ..
321 . \" QP - Block quote end
322 .de QE
323 .sp \\n(PDu
324 .in -\\n(QIu
325 .ll +\\n(QIu
326 .ti \\n(.iu
327 .ps +1
328 .vs +1
329 ..
331 . \" DS - Code display
332 .am DS
333 .ft CW
334 .ps -1
335 .ta T 8n
336 ..
338 . \" VS - verbatim text start (\\ -> ^G; ' -> disabled; . -> ^B)
339 .de VS
340 .br
341 .ne 3
342 .sp \n(DDu
343 .di _V
344 .nf
345 .ft CW
346 .ps -.5
347 .\" set up verbatim environment
348 \.blm
349 \.ec 
350 \.c2 ""
351 \.cc 
352 ..
354 . \" VE - verbatim text end (NOTE: Needs to be called as ^BVE !)
355 .de VE
356 \" restore the special characters
357 cc
358 .c2
359 .ec
360 .br
361 .di
362 .ne \\n(dnu+1v \" ensure enough space on the page
363 .in +2u*\\n(PIu
364 .ta T 8n
365 \.ec  \" set up verbatim environment, once again
366 \.c2 ""
367 \.cc 
368 _V \" output the verbatim content
369 \" restore the special characters
370 cc
371 .c2
372 .ec
373 .blm __
374 .in -2u*\\n(PIu
375 .sp \n(DDu
376 .ps +.5
377 .ft P
378 .fi
379 .TA
380 ..
382 . \" VF - verbatim text from file ($1=filename)
383 .de VF
384 .VS
385 so $1
386 VE
387 ..
389 . \" FA - XXX somehow related to footnotes?
390 .am FA
391 .ps 8
392 .vs 9
393 ..
395 .de Fn \" file name
396 .CW "\\$1" "\\$2
397 ..
398 .de Pn \" program name
399 .CW "\\$1" "\\$2
400 ..
401 .de Fu \" function
402 .CW "\\$1" "\\$2
403 ..
404 .de Ev \" env variable
405 .CW "\\$1" "\\$2
406 ..
407 .de Cl \" command line
408 `\c
409 .CW "\\$1" "'\\$2
410 ..
411 .de Sw \" switch
412 .CW "\\$1" "\\$2
413 ..
414 .de Ar \" argument
415 .CW "\f(CI\\$1" "\\$2
416 ..
417 .de Mp \" man page
418 .I "\\$1" "\\$2
419 ..
420 .de Pe \" profile entry
421 .CW "\\$1" "\\$2
422 ..
423 .de Hd \" mail header field
424 .CW "\\$1:\&" "\\$2
425 ..
427 .de Ci \" commit hash ref
428 .ds _t \\$1
429 .substring _t 0 6
430 [\(rh\|\fL\\*(_t\fP]\\$2
431 ..
433 . \" Cf - reference within the document ($1=name of ref file)
434 .de Cf
435 \.if !\\nZ .so refs/\\$1 \c
436 \\$2
437 ..
439 . \" Id - put a referenceable marker here ($1=identifier)
440 .de Id
441 .tm REF____\\$1\t\\*(SN\t\\n(PN
442 ..