docs/master

view style @ 122:c234656329e0

Wrote about modularization.
author markus schnalke <meillo@marmaro.de>
date Fri, 29 Jun 2012 22:51:25 +0200
parents da72a0720247
children 83681ad27ec8
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 QI 6n
40 .nr lu 0
41 .af PN i
43 .ds _E '\\\\n(PN''\f(SCMarkus Schnalke: The Modern Mail Handler\fP' \" left
44 .ds _O '\f(SCChapter \\\\n(H1\ \ \\\\*(_C\fP''\\\\n(PN' \" right
45 .ds _o '\f(SC\\\\*(_C\fP''\\\\n(PN' \" right
46 .ds CH "
48 .nr HM 3.3c
49 .nr FM 6.6c
50 .nr LL 13c
51 .ll 13c
52 .nr LT \n(LL
54 . \" _M - change margins for text block on next page
55 .de _M
56 .if t .if o .nr PO 5c
57 .if t .if e .nr PO 3c
58 .ds CF "
59 ..
60 .wh -1u _M
62 . \" Lp - enlarge the current page by one line to avoid widows
63 .de Lp
64 .ch FO -\n(FMu+1v
65 ..
67 . \" CW - Set text in CW font (similar to .B and .I)
68 .de CW
69 .nr PQ \\n(.f
70 .if t \{\
71 . ft CW
72 . if !^\\$1^^ \&\\$1\f\\n(PQ\\$2
73 .\}
74 .if n \{\
75 . ie ^\\$1^^ .ul 999
76 . el .ul 1
77 . if \\n(.$=1 \&\\$1
78 . if \\n(.$>1 \&\\$1\c
79 . if \\n(.$>1 \&\\$2
80 .\}
81 ..
83 . \" refer(1) stuff
84 .ds [. " [
85 .ds .] ]
86 .rm ]<
87 .de ]<
88 . LP
89 . de FP
90 . IP \\\\$1.
91 \\..
92 . rm FS FE
93 ..
95 . \" PT - page top macro of ms
96 .am PT
97 . rs
98 ..
101 . \" RN - Reset PN and continue on an odd page ($1=number-format)
102 .de RN
103 .ie e .pn 1
104 .el \{
105 . pn 0
106 . bp
107 .\}
108 .ie \\n(.$=1 .af PN \\$1
109 .el .af PN 1
110 ..
113 . \" T_ - Add TOC entry ($1=pre-space $2=indent-level $3=text)
114 .de T_
115 .tm TOC____.sp \\$1
116 .tm TOC____\&\\h'\\$2u*2u*\\n(PIu'\\$3\0\0\a\t\\n(PN\fR
117 ..
119 . \" NH - redefine numbered heading
120 .de NH
121 .SH
122 .nr NS \\$1
123 .if !\\n(.$ .nr NS 1
124 .if !\\n(NS .nr NS 1
125 .nr H\\n(NS +1
126 .if \\n(NS<2 .nr H2 0
127 .if \\n(NS<3 .nr H3 0
128 .ds SN \\n(H1
129 .if \\n(NS>1 .as SN \&.\\n(H2
130 .if \\n(NS>2 .as SN \&.\\n(H3
131 ..
133 . \" H- - Chapter unnumbered and not in TOC ($2=="no" -> no page hdrs)
134 .de H-
135 .EH "
136 .OH "
137 .bp
138 .if e .rs \" move to an odd page
139 .if e .bp
140 .lg 0
141 .nr PS +6
142 .nr VS +6
143 .SH
144 .ce 1
145 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
146 \&\\$1
147 .br
148 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
149 .nr PS -6
150 .nr VS -6
151 .lg
152 .if !,\\$2,no, \{
153 . EH "\\\\*(_E
154 . ie \\n(H1 .OH "\\\\*(_O
155 . el .OH "\\\\*(_o
156 . ds CF \\n(PN
157 .\}
158 .RT
159 .sp 4
160 .nr PP 0
161 ..
163 . \" H0 - Chapter ($2=="no" -> not numbered)
164 .de H0
165 .EH "
166 .OH "
167 .bp
168 .if e .rs \" begin chapter on an odd page
169 .if e .bp
170 .lg 0
171 .nr PS +6
172 .nr VS +6
173 .ie ,\\$2,no, .SH
174 .el \{\
175 . NH 1
176 . ce 1
177 Chapter \\*(SN
178 . sp .5
179 .\}
180 .ce 1
181 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
182 \&\\$1
183 .br
184 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
185 .nr PS -6
186 .nr VS -6
187 .lg
188 .\" add to TOC
189 .rm t_
190 .if !,\\$2,no, .ds t_ \\*(SN\0\0
191 .T_ .5v 0 "\fB\\*(t_\\$1
192 .\" set page headers and footers
193 .EH "\\\\*(_E
194 .ds _C "\\$1
195 .ie \\n(H1 .OH "\\\\*(_O
196 .el .OH "\\\\*(_o
197 .ds CF \\n(PN
198 .RT
199 .sp 4
200 .nr PP 0
201 ..
204 . \" H1 - Section ($2=="no" -> not numbered)
205 .de H1
206 .br
207 .ne 7
208 .sp
209 .lg 0
210 .nr PS +2
211 .nr VS +2
212 .ie '\\$2'no' .SH
213 .el .NH 2
214 .if !'\\$2'no' \&\\*(SN
215 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
216 \&\\$1
217 .br
218 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
219 .nr PS -2
220 .nr VS -2
221 .lg
222 .if !'\\$2'no' .T_ .3v 1 "\\*(SN\0\0\\$1 \" add to TOC
223 .RT
224 .nr PP 0
225 ..
227 . \" H2 - Subsection
228 .de H2
229 .br
230 .ne 4
231 .NH 3
232 \&\\*(SN \\$1
233 .T_ 0 2 "\\*(SN\0\0\\$1 \" add to TOC
234 .RT
235 .nr PP 0
236 ..
238 . \" U2 - Subsection unnumbered
239 .de U2
240 .br
241 .ne 4
242 .SH
243 \&\\$1
244 .RT
245 .nr PP 0
246 ..
248 . \" U3 - Subsubsection unnumbered
249 .de U3
250 .br
251 .ne 4
252 .RT
253 .sp
254 .I "\\$1
255 .RT
256 .nr PP 0
257 ..
259 . \" P - Paragraph (indented unless following a heading)
260 .de P
261 .ie \\n(PP .PP
262 .el .LP
263 .nr PP 1
264 ..
266 . \" IP - Paragraph with hanging label
267 .am IP
268 .nr PP 0
269 ..
271 . \" BU - Bulleted paragraph
272 .de BU
273 .IP \(bu
274 ..
276 . \" QS - Block quote start
277 .de QS
278 .ti \\n(.iu
279 .RT
280 .sp 2u*\\n(PDu
281 .ne 1.1
282 .ps -1
283 .vs -1
284 .in +\\n(QIu
285 .ll -\\n(QIu
286 .ti \\n(.iu
287 .\"if \\n(Qp .ti +\\n(PIu
288 .\"nr QP 1
289 .\"rr Qp
290 ..
292 . \" QP - Block quote paragraph
293 .de QP
294 .sp \n(PDu
295 .ne 1.1
296 .ti +\\n(PIu
297 ..
299 . \" QP - Block quote end
300 .de QE
301 .sp \\n(PDu
302 .in -\\n(QIu
303 .ll +\\n(QIu
304 .ti \\n(.iu
305 .ps +1
306 .vs +1
307 ..
309 . \" DS - Code display
310 .am DS
311 .ft CW
312 .ps -1
313 .ta T 8n
314 ..
316 . \" VS - verbatim text start (\\ -> ^G; ' -> disabled; . -> ^B)
317 .de VS
318 .br
319 .ne 3
320 .sp \n(DDu
321 .di _V
322 .nf
323 .ft CW
324 .ps -.5
325 .\" set up verbatim environment
326 \.blm
327 \.ec 
328 \.c2 ""
329 \.cc 
330 ..
332 . \" VE - verbatim text end (NOTE: Needs to be called as ^BVE !)
333 .de VE
334 \" restore the special characters
335 cc
336 .c2
337 .ec
338 .br
339 .di
340 .ne \\n(dnu+1v \" ensure enough space on the page
341 .if t .in +.5i
342 .if n .in +8n
343 .ta T 8n
344 \.ec  \" set up verbatim environment, once again
345 \.c2 ""
346 \.cc 
347 _V \" output the verbatim content
348 \" restore the special characters
349 cc
350 .c2
351 .ec
352 .blm __
353 .if t .in -.5i
354 .if n .in -8n
355 .sp \n(DDu
356 .ft P
357 .fi
358 .TA
359 ..
361 . \" VF - verbatim text from file ($1=filename)
362 .de VF
363 .VS
364 so $1
365 VE
366 ..
368 . \" FA - XXX somehow related to footnotes?
369 .am FA
370 .ps 8
371 .vs 9
372 ..
374 .de Fn \" file name
375 .CW "\\$1" "\\$2
376 ..
377 .de Pn \" program name
378 .CW "\\$1" "\\$2
379 ..
380 .de Fu \" function
381 .CW "\\$1" "\\$2
382 ..
383 .de Ev \" env variable
384 .CW "\\$1" "\\$2
385 ..
386 .de Cl \" command line
387 `\c
388 .CW "\\$1" "'\\$2
389 ..
390 .de Sw \" switch
391 .CW "\\$1" "\\$2
392 ..
393 .de Ar \" argument
394 .CW "\f(CI\\$1" "\\$2
395 ..
396 .de Mp \" man page
397 .I "\\$1" "\\$2
398 ..
399 .de Pe \" profile entry
400 .CW "\\$1" "\\$2
401 ..
402 .de Hd \" mail header field
403 .CW "\\$1:\&" "\\$2
404 ..
406 .de Ci \" commit hash ref
407 .ds _t \\$1
408 .substring _t 0 6
409 [\(rh
410 .CW "\\*(_t" "]\\$2
411 ..
413 .de Cf \" cf. (ref within document)
414 (\(-> \\$1)\\$2
415 ..