docs/master

diff style @ 81:5fb821ed6f3c

style: Refactoring and more comments
author markus schnalke <meillo@marmaro.de>
date Wed, 06 Jun 2012 14:53:16 +0200
parents f3c95ee96cc4
children ff4537327162
line diff
     1.1 --- a/style	Wed Jun 06 11:27:25 2012 +0200
     1.2 +++ b/style	Wed Jun 06 14:53:16 2012 +0200
     1.3 @@ -51,13 +51,15 @@
     1.4  .nr LT \n(LL
     1.5  .if t .nr PO 3.3c
     1.6  
     1.7 -.de _M  \" change margins for text block on next page
     1.8 +.	\" _M - change margins for text block on next page
     1.9 +.de _M
    1.10  .if t .if o .nr PO +(21c-\n(.lu-(2u*3.3c))c
    1.11  .if t .if e .nr PO -(21c-\n(.lu-(2u*3.3c))c
    1.12  .ds CF "
    1.13  ..
    1.14  .wh -1u _M
    1.15  
    1.16 +.	\" CW - Set text in CW font (similar to .B and .I)
    1.17  .de CW
    1.18  .nr PQ \\n(.f
    1.19  .if t \{\
    1.20 @@ -73,6 +75,7 @@
    1.21  .\}
    1.22  ..
    1.23  
    1.24 +.	\" refer(1) stuff
    1.25  .ds [. " [
    1.26  .ds .] ]
    1.27  .rm ]<
    1.28 @@ -84,16 +87,31 @@
    1.29  .	rm FS FE
    1.30  ..
    1.31  
    1.32 +.	\" PT - page top macro of ms
    1.33  .am PT
    1.34  .	rs
    1.35  ..
    1.36  
    1.37 -.de T_  \" add entry to TOC: .T_ pre-space indent-level text
    1.38 +
    1.39 +.	\" RN - Reset PN and continue on an odd page ($1=number-format)
    1.40 +.de RN
    1.41 +.ie e .pn 1
    1.42 +.el \{
    1.43 +.       pn 0
    1.44 +.       bp
    1.45 +.\}
    1.46 +.ie \\n(.$=1 .af PN \\$1
    1.47 +.el .af PN 1
    1.48 +..
    1.49 +
    1.50 +
    1.51 +.	\" T_ - Add TOC entry ($1=pre-space $2=indent-level $3=text)
    1.52 +.de T_
    1.53  .tm TOC____.sp \\$1
    1.54  .tm TOC____\&\\h'\\$2u*2u*\\n(PIu'\\$3\0\0\a\t\\n(PN\fR
    1.55  ..
    1.56  
    1.57 -.rm NH
    1.58 +.	\" NH - redefine numbered heading
    1.59  .de NH
    1.60  .SH
    1.61  .nr NS \\$1
    1.62 @@ -107,11 +125,12 @@
    1.63  .if \\n(NS>2 .as SN \&.\\n(H3
    1.64  ..
    1.65  
    1.66 +.	\" H- - Chapter unnumbered and not in TOC ($2=="no" -> no page hdrs)
    1.67  .de H-
    1.68  .EH "
    1.69  .OH "
    1.70  .bp
    1.71 -.rs
    1.72 +.if e .rs  \" move to an odd page
    1.73  .if e .bp
    1.74  .lg 0
    1.75  .nr PS +6
    1.76 @@ -125,113 +144,103 @@
    1.77  .nr PS -6
    1.78  .nr VS -6
    1.79  .lg
    1.80 -.RT
    1.81  .if !,\\$2,no, \{
    1.82  .	EH "\\\\*(_E
    1.83  .	ie \\n(H1 .OH "\\\\*(_O
    1.84  .	el .OH "\\\\*(_o
    1.85  .	ds CF \\n(PN
    1.86  .\}
    1.87 +.RT
    1.88  .sp 4
    1.89  .nr PP 0
    1.90  ..
    1.91  
    1.92 +.	\" H0 - Chapter ($2=="no" -> not numbered)
    1.93  .de H0
    1.94  .EH "
    1.95  .OH "
    1.96  .bp
    1.97 -.rs
    1.98 +.if e .rs  \" begin chapter on an odd page
    1.99  .if e .bp
   1.100 -.	lg 0
   1.101 -.	nr PS +6
   1.102 -.	nr VS +6
   1.103 -.ie \\n(.$=1 \{\
   1.104 +.lg 0
   1.105 +.nr PS +6
   1.106 +.nr VS +6
   1.107 +.ie ,\\$2,no, .SH
   1.108 +.el \{\
   1.109  .	NH 1
   1.110  .	ce 1
   1.111  Chapter \\*(SN
   1.112  .	sp .5
   1.113  .\}
   1.114 -.el .if ,\\$2,no, .SH
   1.115 -.	ce 1
   1.116 -.	tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
   1.117 +.ce 1
   1.118 +.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
   1.119  \&\\$1
   1.120 -.	br
   1.121 -.	tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
   1.122 -.	nr PS -6
   1.123 -.	nr VS -6
   1.124 -.	lg
   1.125 -.ds _C "\\$1
   1.126 -.	RT
   1.127 +.br
   1.128 +.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
   1.129 +.nr PS -6
   1.130 +.nr VS -6
   1.131 +.lg
   1.132 +.\" add to TOC
   1.133  .rm t_
   1.134  .if !,\\$2,no, .ds t_ \\*(SN\0\0
   1.135  .T_ .5v 0 "\fB\\*(t_\\$1
   1.136 +.\" set page headers and footers
   1.137  .EH "\\\\*(_E
   1.138 +.ds _C "\\$1
   1.139  .ie \\n(H1 .OH "\\\\*(_O
   1.140  .el .OH "\\\\*(_o
   1.141  .ds CF \\n(PN
   1.142 +.RT
   1.143  .sp 4
   1.144  .nr PP 0
   1.145  ..
   1.146  
   1.147  
   1.148 -.\" Reset page Numbers, set page number format ($1) and move to a right page.
   1.149 -.de RN
   1.150 -.ie e .pn 1
   1.151 -.el \{
   1.152 -.       pn 0
   1.153 -.       bp
   1.154 -.\}
   1.155 -.ie \\n(.$=1 .af PN \\$1
   1.156 -.el .af PN 1
   1.157 -..
   1.158 -
   1.159 -
   1.160 +.	\" H1 - Section ($2=="no" -> not numbered)
   1.161  .de H1
   1.162  .br
   1.163  .ne 7
   1.164  .sp
   1.165 -.	nr PS +2
   1.166 -.	nr VS +2
   1.167 -.if '\\$2'no' .SH
   1.168 -.if \\n(.$=1 .NH 2
   1.169 -.	lg 0
   1.170 -.	tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
   1.171 +.lg 0
   1.172 +.nr PS +2
   1.173 +.nr VS +2
   1.174 +.ie '\\$2'no' .SH
   1.175 +.el .NH 2
   1.176  .if !'\\$2'no' \&\\*(SN
   1.177 -\\$1
   1.178 -.	br
   1.179 -.	tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
   1.180 -.	nr PS -2
   1.181 -.	nr VS -2
   1.182 -.	lg
   1.183 -.	RT
   1.184 -.if !'\\$2'no' \{\
   1.185 -.	ds _S "\\$1
   1.186 -.	T_ .3v 1 "\\*(SN\0\0\\$1
   1.187 -.\}
   1.188 +.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
   1.189 +\&\\$1
   1.190 +.br
   1.191 +.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
   1.192 +.nr PS -2
   1.193 +.nr VS -2
   1.194 +.lg
   1.195 +.if !'\\$2'no' .T_ .3v 1 "\\*(SN\0\0\\$1  \" add to TOC
   1.196 +.RT
   1.197  .nr PP 0
   1.198  ..
   1.199  
   1.200 +.	\" H2 - Subsection
   1.201  .de H2
   1.202  .br
   1.203  .ne 4
   1.204  .NH 3
   1.205 -\&\\*(SN
   1.206 -\\$1
   1.207 +\&\\*(SN \\$1
   1.208 +.T_ 0 2 "\\*(SN\0\0\\$1  \" add to TOC
   1.209  .RT
   1.210 -.ds _S "\\$1
   1.211 -.T_ 0 2 "\\*(SN\0\0\\$1
   1.212  .nr PP 0
   1.213  ..
   1.214  
   1.215 +.	\" U2 - Subsection unnumbered
   1.216  .de U2
   1.217  .br
   1.218  .ne 4
   1.219  .SH
   1.220 -\\$1
   1.221 +\&\\$1
   1.222  .RT
   1.223  .nr PP 0
   1.224  ..
   1.225  
   1.226 +.	\" U3 - Subsubsection unnumbered
   1.227  .de U3
   1.228  .br
   1.229  .ne 4
   1.230 @@ -242,30 +251,36 @@
   1.231  .nr PP 0
   1.232  ..
   1.233  
   1.234 +.	\" P - Paragraph (indented unless following a heading)
   1.235  .de P
   1.236  .ie \\n(PP .PP
   1.237  .el .LP
   1.238  .nr PP 1
   1.239  ..
   1.240  
   1.241 +.	\" IP - Paragraph with hanging label
   1.242  .am IP
   1.243  .nr PP 0
   1.244  ..
   1.245  
   1.246 +.	\" BU - Bulleted paragraph
   1.247  .de BU
   1.248  .IP \(bu
   1.249  ..
   1.250  
   1.251 +.	\" QP - Block quote paragraph
   1.252  .am QP
   1.253  .ps -1
   1.254  ..
   1.255  
   1.256 +.	\" DS - Code display
   1.257  .am DS
   1.258  .ft CW
   1.259  .ps -1
   1.260  .ta T 8n
   1.261  ..
   1.262  
   1.263 +.	\" FA - XXX somehow related to footnotes?
   1.264  .am FA
   1.265  .ps 8
   1.266  .vs 9
   1.267 @@ -297,7 +312,7 @@
   1.268  .CW "\\$1" "\\$2
   1.269  ..
   1.270  
   1.271 -.de Ci  \" commit ref
   1.272 +.de Ci  \" commit hash ref
   1.273  .ds _t \\$1
   1.274  .substring _t 0 6
   1.275  [\(rh