docs/master

view style @ 91:87bc954b9e6a

style: Let's have an own version of the QP macro. It indents paragraphs.
author markus schnalke <meillo@marmaro.de>
date Fri, 15 Jun 2012 17:14:06 +0200
parents 106fd9f80dd8
children d894191d7a33
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
53 .if t .nr PO 3.3c
55 . \" _M - change margins for text block on next page
56 .de _M
57 .if t .if o .nr PO +(21c-\n(.lu-(2u*3.3c))c
58 .if t .if e .nr PO -(21c-\n(.lu-(2u*3.3c))c
59 .ds CF "
60 ..
61 .wh -1u _M
63 . \" Lp - enlarge the current page by one line to avoid widows
64 .de Lp
65 .ch FO -\n(FMu+1v
66 ..
68 . \" CW - Set text in CW font (similar to .B and .I)
69 .de CW
70 .nr PQ \\n(.f
71 .if t \{\
72 . ft CW
73 . if !^\\$1^^ \&\\$1\f\\n(PQ\\$2
74 .\}
75 .if n \{\
76 . ie ^\\$1^^ .ul 999
77 . el .ul 1
78 . if \\n(.$=1 \&\\$1
79 . if \\n(.$>1 \&\\$1\c
80 . if \\n(.$>1 \&\\$2
81 .\}
82 ..
84 . \" refer(1) stuff
85 .ds [. " [
86 .ds .] ]
87 .rm ]<
88 .de ]<
89 . LP
90 . de FP
91 . IP \\\\$1.
92 \\..
93 . rm FS FE
94 ..
96 . \" PT - page top macro of ms
97 .am PT
98 . rs
99 ..
102 . \" RN - Reset PN and continue on an odd page ($1=number-format)
103 .de RN
104 .ie e .pn 1
105 .el \{
106 . pn 0
107 . bp
108 .\}
109 .ie \\n(.$=1 .af PN \\$1
110 .el .af PN 1
111 ..
114 . \" T_ - Add TOC entry ($1=pre-space $2=indent-level $3=text)
115 .de T_
116 .tm TOC____.sp \\$1
117 .tm TOC____\&\\h'\\$2u*2u*\\n(PIu'\\$3\0\0\a\t\\n(PN\fR
118 ..
120 . \" NH - redefine numbered heading
121 .de NH
122 .SH
123 .nr NS \\$1
124 .if !\\n(.$ .nr NS 1
125 .if !\\n(NS .nr NS 1
126 .nr H\\n(NS +1
127 .if \\n(NS<2 .nr H2 0
128 .if \\n(NS<3 .nr H3 0
129 .ds SN \\n(H1
130 .if \\n(NS>1 .as SN \&.\\n(H2
131 .if \\n(NS>2 .as SN \&.\\n(H3
132 ..
134 . \" H- - Chapter unnumbered and not in TOC ($2=="no" -> no page hdrs)
135 .de H-
136 .EH "
137 .OH "
138 .bp
139 .if e .rs \" move to an odd page
140 .if e .bp
141 .lg 0
142 .nr PS +6
143 .nr VS +6
144 .SH
145 .ce 1
146 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
147 \&\\$1
148 .br
149 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
150 .nr PS -6
151 .nr VS -6
152 .lg
153 .if !,\\$2,no, \{
154 . EH "\\\\*(_E
155 . ie \\n(H1 .OH "\\\\*(_O
156 . el .OH "\\\\*(_o
157 . ds CF \\n(PN
158 .\}
159 .RT
160 .sp 4
161 .nr PP 0
162 ..
164 . \" H0 - Chapter ($2=="no" -> not numbered)
165 .de H0
166 .EH "
167 .OH "
168 .bp
169 .if e .rs \" begin chapter on an odd page
170 .if e .bp
171 .lg 0
172 .nr PS +6
173 .nr VS +6
174 .ie ,\\$2,no, .SH
175 .el \{\
176 . NH 1
177 . ce 1
178 Chapter \\*(SN
179 . sp .5
180 .\}
181 .ce 1
182 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
183 \&\\$1
184 .br
185 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
186 .nr PS -6
187 .nr VS -6
188 .lg
189 .\" add to TOC
190 .rm t_
191 .if !,\\$2,no, .ds t_ \\*(SN\0\0
192 .T_ .5v 0 "\fB\\*(t_\\$1
193 .\" set page headers and footers
194 .EH "\\\\*(_E
195 .ds _C "\\$1
196 .ie \\n(H1 .OH "\\\\*(_O
197 .el .OH "\\\\*(_o
198 .ds CF \\n(PN
199 .RT
200 .sp 4
201 .nr PP 0
202 ..
205 . \" H1 - Section ($2=="no" -> not numbered)
206 .de H1
207 .br
208 .ne 7
209 .sp
210 .lg 0
211 .nr PS +2
212 .nr VS +2
213 .ie '\\$2'no' .SH
214 .el .NH 2
215 .if !'\\$2'no' \&\\*(SN
216 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
217 \&\\$1
218 .br
219 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
220 .nr PS -2
221 .nr VS -2
222 .lg
223 .if !'\\$2'no' .T_ .3v 1 "\\*(SN\0\0\\$1 \" add to TOC
224 .RT
225 .nr PP 0
226 ..
228 . \" H2 - Subsection
229 .de H2
230 .br
231 .ne 4
232 .NH 3
233 \&\\*(SN \\$1
234 .T_ 0 2 "\\*(SN\0\0\\$1 \" add to TOC
235 .RT
236 .nr PP 0
237 ..
239 . \" U2 - Subsection unnumbered
240 .de U2
241 .br
242 .ne 4
243 .SH
244 \&\\$1
245 .RT
246 .nr PP 0
247 ..
249 . \" U3 - Subsubsection unnumbered
250 .de U3
251 .br
252 .ne 4
253 .RT
254 .sp
255 .I "\\$1
256 .RT
257 .nr PP 0
258 ..
260 . \" P - Paragraph (indented unless following a heading)
261 .de P
262 .ie \\n(PP .PP
263 .el .LP
264 .nr PP 1
265 ..
267 . \" IP - Paragraph with hanging label
268 .am IP
269 .nr PP 0
270 ..
272 . \" BU - Bulleted paragraph
273 .de BU
274 .IP \(bu
275 ..
277 . \" QP - Block quote paragraph
278 .de QP
279 .ti \\n(.iu
280 .if \\n(QP .nr Qp 1
281 .RT
282 .sp \\n(PDu
283 .ne 1.1
284 .ps -1
285 .in +\\n(QIu
286 .ll -\\n(QIu
287 .ti \\n(.iu
288 .if \\n(Qp .ti +\\n(PIu
289 .if \\n(TM .ls 1
290 .nr QP 1
291 .rr Qp
292 ..
294 . \" DS - Code display
295 .am DS
296 .ft CW
297 .ps -1
298 .ta T 8n
299 ..
301 . \" VS - verbatim text start (\\ -> ^G; ' -> disabled; . -> ^B)
302 .de VS
303 .br
304 .ne 4
305 .sp \n(DDu
306 .if t .in +.5i
307 .if n .in +8n
308 .nf
309 .ft CW
310 .\" ps -1
311 .ta T 8n
312 .\" set up verbatim environment
313 \.blm
314 \.ec 
315 \.c2 ""
316 \.cc 
317 ..
319 . \" VE - verbatim text end (NOTE: Needs to be called as ^BVE !)
320 .de VE
321 \" restore the special characters
322 cc
323 .c2
324 .ec
325 .blm __
326 .if t .in -.5i
327 .if n .in -8n
328 .sp \n(DDu
329 .ft P
330 .fi
331 .TA
332 ..
334 . \" VF - verbatim text from file ($1=filename)
335 .de VF
336 .VS
337 so $1
338 VE
339 ..
341 . \" FA - XXX somehow related to footnotes?
342 .am FA
343 .ps 8
344 .vs 9
345 ..
347 .de Fn \" file name
348 .CW "\\$1" "\\$2
349 ..
350 .de Pn \" program name
351 .CW "\\$1" "\\$2
352 ..
353 .de Fu \" function
354 .CW "\\$1" "\\$2
355 ..
356 .de Ev \" env variable
357 .CW "\\$1" "\\$2
358 ..
359 .de Cl \" command line
360 `\c
361 .CW "\\$1" "'\\$2
362 ..
363 .de Sw \" switch
364 .CW "\\$1" "\\$2
365 ..
366 .de Ar \" argument
367 .CW "\f(CI\\$1" "\\$2
368 ..
369 .de Mp \" man page
370 .I "\\$1" "\\$2
371 ..
372 .de Pe \" profile entry
373 .CW "\\$1" "\\$2
374 ..
375 .de Hd \" mail header field
376 .CW "\\$1:\&" "\\$2
377 ..
379 .de Ci \" commit hash ref
380 .ds _t \\$1
381 .substring _t 0 6
382 [\(rh
383 .CW "\\*(_t" "]\\$2
384 ..
386 .de Cf \" cf. (ref within document)
387 (\(-> \\$1)\\$2
388 ..