Stylesheet version number changed.
[exim.git] / doc / doc-docbook / MyStyle.xsl
1 <!-- $Cambridge: exim/doc/doc-docbook/MyStyle.xsl,v 1.1 2005/06/16 10:32:31 ph10 Exp $ -->
2
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
4
5 <!-- This file contains changes to the Docbook XML stylesheets that I want to
6 have happen in all forms of output. It is imported by all the drivers. -->
7
8
9 <!-- Set body font size -->
10
11 <xsl:param name="body.font.master">11</xsl:param>
12
13 <!-- Set no relative indent for titles and body -->
14
15 <xsl:param name="title.margin.left">0pt</xsl:param>
16
17
18 <!-- This removes the dot at the end of run-in titles, which we use
19 for formal paragraphs for command line options. -->
20
21 <xsl:param name="runinhead.default.title.end.punct" select="' '"></xsl:param>
22
23
24 <!-- Without this setting, variable lists get misformatted in the FO case,
25 causing overprinting. Maybe with a later release of fop the need to do this
26 might go away. -->
27
28 <xsl:param name="variablelist.as.blocks" select="1"></xsl:param>
29
30
31 <!--
32 Cause sections to be numbered, and to include the outer component number.
33 -->
34
35 <xsl:param name="section.autolabel">1</xsl:param>
36 <xsl:param name="section.label.includes.component.label">1</xsl:param>
37
38
39 <!--
40 Specify TOCs only for top-level things. No TOCs for components (e.g. chapters)
41 -->
42
43 <xsl:param name="generate.toc">
44 article toc,title
45 book toc,title
46 </xsl:param>
47
48
49 <!-- Turn off the poor hyphenation -->
50
51 <xsl:param name="hyphenate">false</xsl:param>
52
53
54 <!--
55 Generate only numbers, no titles, in cross references.
56 -->
57
58 <xsl:param name="xref.with.number.and.title">0</xsl:param>
59
60
61 <!-- Hopefully this might do something useful? It doesn't seem to. -->
62
63 <xsl:param name="fop.extensions" select="1"></xsl:param>
64
65
66 <!-- Output variable names in italic rather than the default monospace. -->
67
68 <xsl:template match="varname">
69 <xsl:call-template name="inline.italicseq"/>
70 </xsl:template>
71
72
73 <!-- Output file names in italic rather than the default monospace. -->
74
75 <xsl:template match="filename">
76 <xsl:call-template name="inline.italicseq"/>
77 </xsl:template>
78
79
80 <!-- Output options in bold rather than the default monospace. -->
81
82 <xsl:template match="option">
83 <xsl:call-template name="inline.boldseq"/>
84 </xsl:template>
85
86
87 <!--
88 Make a number of more detailed changes to the style that involve more than just
89 fiddling with a parameter.
90 -->
91
92 <xsl:param name="local.l10n.xml" select="document('')"/>
93 <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
94 <l:l10n language="en">
95
96 <!-- The default (as modified above) gives us "Chapter xxx" or "Section
97 xxx", with a capital letter at the start. So we have to make an more
98 complicated explicit change to give just the number. -->
99
100 <l:context name="xref-number">
101 <l:template name="chapter" text="%n"/>
102 <l:template name="sect1" text="%n"/>
103 <l:template name="sect2" text="%n"/>
104 <l:template name="section" text="%n"/>
105 </l:context>
106
107 <!-- I think that having a trailing dot after section numbers looks fussy,
108 whereas you need it after just the digits of a chapter number. In both
109 cases we want to get rid of the word "chapter" or "section". -->
110
111 <l:context name="title-numbered">
112 <l:template name="chapter" text="%n.&#160;%t"/>
113 <l:template name="sect1" text="%n&#160;%t"/>
114 <l:template name="sect2" text="%n&#160;%t"/>
115 <l:template name="section" text="%n&#160;%t"/>
116 </l:context>
117
118 </l:l10n>
119 </l:i18n>
120
121
122 <!-- The default has far too much space on either side of displays and lists -->
123
124 <xsl:attribute-set name="verbatim.properties">
125 <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
126 <xsl:attribute name="space-before.optimum">0em</xsl:attribute>
127 <xsl:attribute name="space-before.maximum">0em</xsl:attribute>
128 <xsl:attribute name="space-after.minimum">0em</xsl:attribute>
129 <xsl:attribute name="space-after.optimum">0em</xsl:attribute>
130 <xsl:attribute name="space-after.maximum">0em</xsl:attribute>
131 <xsl:attribute name="start-indent">0.3in</xsl:attribute>
132 </xsl:attribute-set>
133
134 <xsl:attribute-set name="list.block.spacing">
135 <xsl:attribute name="space-before.optimum">0em</xsl:attribute>
136 <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
137 <xsl:attribute name="space-before.maximum">0em</xsl:attribute>
138 <xsl:attribute name="space-after.optimum">0em</xsl:attribute>
139 <xsl:attribute name="space-after.minimum">0em</xsl:attribute>
140 <xsl:attribute name="space-after.maximum">0em</xsl:attribute>
141 </xsl:attribute-set>
142
143 <!-- List item spacing -->
144
145 <xsl:attribute-set name="list.item.spacing">
146 <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
147 <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
148 <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
149 </xsl:attribute-set>
150
151 <!-- Reduce the space after informal tables -->
152
153 <xsl:attribute-set name="informal.object.properties">
154 <xsl:attribute name="space-before.minimum">1em</xsl:attribute>
155 <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
156 <xsl:attribute name="space-before.maximum">2em</xsl:attribute>
157 <xsl:attribute name="space-after.minimum">0em</xsl:attribute>
158 <xsl:attribute name="space-after.optimum">0em</xsl:attribute>
159 <xsl:attribute name="space-after.maximum">0em</xsl:attribute>
160 </xsl:attribute-set>
161
162 <!-- Reduce the space after section titles. 0 is not small enough. -->
163
164 <xsl:attribute-set name="section.title.level1.properties">
165 <xsl:attribute name="space-after.minimum">-6pt</xsl:attribute>
166 <xsl:attribute name="space-after.optimum">-4pt</xsl:attribute>
167 <xsl:attribute name="space-after.maximum">0pt</xsl:attribute>
168 </xsl:attribute-set>
169
170 <!-- Slightly reduce the space before paragraphs -->
171
172 <xsl:attribute-set name="normal.para.spacing">
173 <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
174 <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
175 <xsl:attribute name="space-before.maximum">1.0em</xsl:attribute>
176 </xsl:attribute-set>
177
178
179 <xsl:attribute-set name="table.cell.padding">
180 <xsl:attribute name="padding-left">2pt</xsl:attribute>
181 <xsl:attribute name="padding-right">2pt</xsl:attribute>
182 <xsl:attribute name="padding-top">0pt</xsl:attribute>
183 <xsl:attribute name="padding-bottom">0pt</xsl:attribute>
184 </xsl:attribute-set>
185
186
187
188 <!-- Turn off page header rule -->
189 <xsl:param name="header.rule" select="0"></xsl:param>
190
191 <!-- Remove page header content -->
192 <xsl:template name="header.content"/>
193
194 <!-- Remove space for page header -->
195 <xsl:param name="body.margin.top" select="'0in'"></xsl:param>
196 <xsl:param name="region.before.extent" select="'0in'"></xsl:param>
197
198 <!-- Turn off page footer rule -->
199 <xsl:param name="footer.rule" select="0"></xsl:param>
200
201
202 </xsl:stylesheet>