docs/master

view style @ 218:8be9e84be526

style: Replaced .Lp macro with .ZZ macro, including enhancements. This is to enlarge or shorten the text block on a page.
author markus schnalke <meillo@marmaro.de>
date Sat, 14 Jul 2012 18:05:19 +0200
parents ff303d854771
children 49d3aa0d128a
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 . \" ZZ - enlarge or shorten the text block on the current
69 . \" page to avoid widows
70 . \" .ZZ -> enlarge by one line
71 . \" .ZZ +3 -> enlarge by three lines
72 . \" .ZZ -2 -> shorten by two lines
73 . \" .ZZ +1c -> enlarge by one centimeter
74 . \" .ZZ "" -> reset to the default
75 .de ZZ
76 .ie \\n(.$=0 .ch FO -\\n(FMu+1v
77 .el .ch FO -\\n(FMu\\$1
78 ..
80 . \" CW - Set text in CW font (similar to .B and .I)
81 .de CW
82 .nr PQ \\n(.f
83 .if t \{\
84 . ft CW
85 . if !^\\$1^^ \&\\$1\f\\n(PQ\\$2
86 .\}
87 .if n \{\
88 . ie ^\\$1^^ .ul 999
89 . el .ul 1
90 . if \\n(.$=1 \&\\$1
91 . if \\n(.$>1 \&\\$1\c
92 . if \\n(.$>1 \&\\$2
93 .\}
94 ..
96 . \" refer(1) stuff
97 .ds [. " [
98 .ds .] ]
99 .rm ]<
100 .de ]<
101 . de FP
102 . IP \\\\$1
103 \\..
104 . rm FS FE
105 ..
107 . \" PT - page top macro of ms
108 .am PT
109 . rs
110 ..
113 . \" RN - Reset PN and continue on an odd page ($1=number-format)
114 .de RN
115 .ie e .pn 1
116 .el \{
117 . pn 0
118 . bp
119 .\}
120 .ie \\n(.$=1 .af PN \\$1
121 .el .af PN 1
122 ..
125 . \" T_ - Add TOC entry ($1=pre-space $2=indent-level $3=text)
126 .de T_
127 .tm TOC____.sp \\$1
128 .tm TOC____\&\\h'\\$2u*2u*\\n(PIu'\\$3\0\0\a\t\\n(PN\fR
129 ..
131 . \" NH - redefine numbered heading
132 .de NH
133 .SH
134 .nr NS \\$1
135 .if !\\n(.$ .nr NS 1
136 .if !\\n(NS .nr NS 1
137 .nr H\\n(NS +1
138 .if \\n(NS<2 .nr H2 0
139 .if \\n(NS<3 .nr H3 0
140 .ds SN \\n(H1
141 .if \\n(NS>1 .as SN \&.\\n(H2
142 .if \\n(NS>2 .as SN \&.\\n(H3
143 ..
145 . \" H- - Chapter not numbered and not in TOC
146 .de H-
147 .EH "
148 .OH "
149 .bp
150 .if e .rs \" move to an odd page
151 .if e .bp
152 .lg 0
153 .nr PS +6
154 .nr VS +6
155 .SH
156 .ce 1
157 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
158 \&\\$1
159 .br
160 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
161 .nr PS -6
162 .nr VS -6
163 .lg
164 .EH "\\\\*(_E
165 .OH "\\\\*(_o
166 .ds CF \\n(PN
167 .RT
168 .sp 4
169 .nr PP 0
170 ..
172 . \" AP - Start the Appendix
173 .de AP
174 .nr _A 1
175 .nr H1 0
176 .af H1 A
177 ..
179 . \" H0 - Chapter ($2=="no" -> not numbered)
180 .de H0
181 .EH "
182 .OH "
183 .bp
184 .if e .rs \" begin chapter on an odd page
185 .if e .bp
186 .lg 0
187 .nr PS +6
188 .nr VS +6
189 .ie ,\\$2,no, .SH
190 .el \{\
191 . NH 1
192 . ce 1
193 .ie \\n(_A Appendix \\*(SN
194 .el Chapter \\*(SN
195 . sp .5
196 .\}
197 .ce 1
198 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
199 \&\\$1
200 .br
201 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
202 .nr PS -6
203 .nr VS -6
204 .lg
205 .\" add to TOC
206 .rm t_
207 .if !,\\$2,no, .ds t_ \\Z'\\*(SN'\\h'3n'
208 .T_ .5v 0 "\fB\\*(t_\\$1
209 .\" set page headers and footers
210 .EH "\\\\*(_E
211 .ds _C "\\$1
212 .ie ,\\$2,no, .OH "\\\\*(_o
213 .el .ie \\n(_A .OH "\\\\*(_a
214 .el .OH "\\\\*(_O
215 .ds CF \\n(PN
216 .RT
217 .sp 4
218 .nr PP 0
219 ..
222 . \" H1 - Section ($2=="no" -> not numbered)
223 .de H1
224 .br
225 .ne 7
226 .sp
227 .lg 0
228 .nr PS +2
229 .nr VS +2
230 .ie '\\$2'no' .SH
231 .el .NH 2
232 .if !'\\$2'no' \&\\*(SN
233 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
234 \&\\$1
235 .br
236 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
237 .nr PS -2
238 .nr VS -2
239 .lg
240 .if !'\\$2'no' .T_ .3v 1 "\\Z'\\*(SN'\\h'4n'\\$1 \" add to TOC
241 .RT
242 .nr PP 0
243 ..
245 . \" H2 - Subsection
246 .de H2
247 .br
248 .ne 4
249 .NH 3
250 \&\\*(SN \\$1
251 .T_ 0 2 "\\Z'\\*(SN'\\h'5.5n'\\$1 \" add to TOC
252 .RT
253 .nr PP 0
254 ..
256 . \" U2 - Subsection unnumbered
257 .de U2
258 .br
259 .ne 4
260 .SH
261 \&\\$1
262 .RT
263 .nr PP 0
264 ..
266 . \" U3 - Subsubsection unnumbered
267 .de U3
268 .br
269 .ne 4
270 .RT
271 .sp
272 .I "\\$1
273 .RT
274 .nr PP 0
275 ..
277 . \" P - Paragraph (indented unless following a heading)
278 .de P
279 .ie \\n(PP .PP
280 .el .LP
281 .nr PP 1
282 ..
284 .am LP
285 .nr PP 1
286 ..
289 . \" LI - Numbered paragraph ``list item'' ($1=label)
290 .de LI
291 .ie \\n(.$ .IP "\\h'\\n(PIu'\\$1." 2u*\\n(PIu
292 .el .IP "\\h'\\n(PIu'\\(bu" 2u*\\n(PIu
293 .nr PP 1
294 ..
295 .ig \" backup
296 .ie \\n(.$ .IP "\h'1n'\\$1"
297 .el .IP "\h'1.5n'\\(bu"
298 ..
300 . \" BU - Bulleted paragraph
301 .de BU
302 .LI
303 ..
305 . \" QS - Block quote start
306 .de QS
307 .ti \\n(.iu
308 .\"RT
309 .sp 2u*\\n(PDu
310 .ne 1.1
311 .ps -1
312 .vs -1
313 .in +\\n(QIu
314 .ll -\\n(QIu
315 .ti \\n(.iu
316 .\"if \\n(Qp .ti +\\n(PIu
317 .\"nr QP 1
318 .\"rr Qp
319 ..
321 . \" QP - Block quote paragraph
322 .de QP
323 .sp \n(PDu
324 .ne 1.1
325 .ti +\\n(PIu
326 ..
328 . \" QP - Block quote end
329 .de QE
330 .sp \\n(PDu
331 .in -\\n(QIu
332 .ll +\\n(QIu
333 .ti \\n(.iu
334 .ps +1
335 .vs +1
336 ..
338 . \" DS - Code display
339 .am DS
340 .ft CW
341 .ps -1
342 .ta T 8n
343 ..
345 . \" VS - verbatim text start (\\ -> ^G; ' -> disabled; . -> ^B)
346 .de VS
347 .br
348 .ne 3
349 .sp \n(DDu
350 .di _V
351 .nf
352 .ft CW
353 .ps -.5
354 .\" set up verbatim environment
355 \.blm
356 \.ec 
357 \.c2 ""
358 \.cc 
359 ..
361 . \" VE - verbatim text end (NOTE: Needs to be called as ^BVE !)
362 .de VE
363 \" restore the special characters
364 cc
365 .c2
366 .ec
367 .br
368 .di
369 .ne \\n(dnu+1v \" ensure enough space on the page
370 .in +2u*\\n(PIu
371 .ta T 8n
372 \.ec  \" set up verbatim environment, once again
373 \.c2 ""
374 \.cc 
375 _V \" output the verbatim content
376 \" restore the special characters
377 cc
378 .c2
379 .ec
380 .blm __
381 .in -2u*\\n(PIu
382 .sp \n(DDu
383 .ps +.5
384 .ft P
385 .fi
386 .TA
387 ..
389 . \" VF - verbatim text from file ($1=filename)
390 .de VF
391 .VS
392 so $1
393 VE
394 ..
396 . \" FA - XXX somehow related to footnotes?
397 .am FA
398 .ps 8
399 .vs 9
400 ..
402 .de Fn \" file name
403 .CW "\\$1" "\\$2
404 ..
405 .de Pn \" program name
406 .CW "\\$1" "\\$2
407 ..
408 .de Fu \" function
409 .CW "\\$1" "\\$2
410 ..
411 .de Ev \" env variable
412 .CW "\\$1" "\\$2
413 ..
414 .de Cl \" command line
415 `\c
416 .CW "\\$1" "'\\$2
417 ..
418 .de Sw \" switch
419 .CW "\\$1" "\\$2
420 ..
421 .de Ar \" argument
422 .CW "\f(CI\\$1" "\\$2
423 ..
424 .de Mp \" man page
425 .I "\\$1" "\\$2
426 ..
427 .de Pe \" profile entry
428 .CW "\\$1" "\\$2
429 ..
430 .de Hd \" mail header field
431 .CW "\\$1:\&" "\\$2
432 ..
434 .de Ci \" commit hash ref
435 .ds _t \\$1
436 .substring _t 0 6
437 [\(rh\|\fL\\*(_t\fP]\\$2
438 ..
440 . \" Cf - reference within the document ($1=name of ref file)
441 .de Cf
442 \.if !\\nZ .so refs/\\$1 \c
443 \\$2
444 ..
446 . \" Id - put a referenceable marker here ($1=identifier)
447 .de Id
448 .tm REF____\\$1\t\\*(SN\t\\n(PN
449 ..