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