~ubuntu-branches/ubuntu/maverick/kubuntu-docs/maverick

« back to all changes in this revision

Viewing changes to libs/pdf/ubuntu-pdf.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Richard A. Johnson
  • Date: 2008-08-18 10:49:14 UTC
  • Revision ID: james.westby@ubuntu.com-20080818104914-83r2er2hsmdp2o0l
Tags: 8.10-2
* Restructured kubuntu documentation package
  - Refer to the NEWS text located in the root directory of the package
* Removed the Firefox start page files
* debian/rules: updated to remove firefox files
* debian/control: removed perl deps due to removal of firefox files, bumped
  version to 3.8.0, updated kdelibs-data dep to kdelibs5-data

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="ISO-8859-1"?>
2
 
<!-- Customization layer for PDF output 
3
 
     License: CC-BY-SA. see http://creativecommons.org/licenses/by-sa/2.0/
4
 
-->
5
 
 
6
 
<xsl:stylesheet version="1.0"
7
 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8
 
xmlns:fo="http://www.w3.org/1999/XSL/Format">
9
 
 
10
 
<!-- Import the new xsl -->
11
 
<xsl:import href="/home/matt/tmp/docbook-xsl-snapshot/fo/docbook.xsl"/>
12
 
 
13
 
<!-- ***************  Fonts  *********************  -->
14
 
<!-- ***************************************************  -->
15
 
 
16
 
<!-- Use a serif font -->
17
 
<xsl:param name="body.font.family" select="'serif'"/>
18
 
<xsl:param name="symbol.font.family" select="'Symbol'"/>
19
 
<xsl:param name="dingbat.font.family">
20
 
   <xsl:value-of select="$body.font.family"/>
21
 
</xsl:param>
22
 
<xsl:param name="title.font.family">
23
 
   <xsl:value-of select="$body.font.family"/>
24
 
</xsl:param>
25
 
<xsl:param name="body.font.master">11</xsl:param>
26
 
<xsl:param name="body.font.size">
27
 
 <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text>
28
 
</xsl:param>
29
 
 
30
 
<xsl:param name="monospace.font.family" select="'monospace'"></xsl:param>
31
 
 
32
 
<!-- Smaller monospace -->
33
 
<xsl:attribute-set name="monospace.properties">
34
 
  <xsl:attribute name="font-size">80%</xsl:attribute>
35
 
</xsl:attribute-set>
36
 
 
37
 
<xsl:param name="line-height" select="'1.5'"></xsl:param>
38
 
 
39
 
<!-- ***************  Page Format  *********************  -->
40
 
<!-- ***************************************************  -->
41
 
 
42
 
<!-- Define the page width/height -->
43
 
<xsl:param name="page.width">21cm</xsl:param>
44
 
<xsl:param name="page.height">29.7cm</xsl:param>
45
 
 
46
 
<!-- Give each section a number -->
47
 
<xsl:param name="section.autolabel" select="1"></xsl:param>
48
 
 
49
 
<!-- Turn on left justify. The default is full justify -->
50
 
<xsl:param name="alignment">left</xsl:param> 
51
 
 
52
 
<!-- Margins -->
53
 
<xsl:param name="page.margin.outer">
54
 
  <xsl:choose>
55
 
    <xsl:when test="$double.sided != 0">0.75in</xsl:when>
56
 
    <xsl:otherwise>1in</xsl:otherwise>
57
 
  </xsl:choose>
58
 
</xsl:param>
59
 
<xsl:param name="page.margin.inner">
60
 
  <xsl:choose>
61
 
    <xsl:when test="$double.sided != 0">1in</xsl:when>
62
 
    <xsl:otherwise>1in</xsl:otherwise>
63
 
  </xsl:choose>
64
 
</xsl:param>
65
 
 
66
 
<!-- Keep paragraphs flush with the left hand side -->
67
 
<xsl:param name="body.start.indent" select="'0pc'"/>
68
 
<xsl:param name="title.margin.left" select="'0pc'"/>
69
 
 
70
 
<!-- Put a rule above each footer and a rule below each header  -->
71
 
<xsl:param name="footer.rule" select="0"/>
72
 
<xsl:param name="header.rule" select="1"/>
73
 
 
74
 
<!-- Don't split words across lines (no end-of-line word breaks) -->
75
 
<xsl:param name="hyphenate">false</xsl:param>
76
 
 
77
 
<!-- '1 3 1' means the center header has three times the width of the left and 
78
 
     right headers. This is needed because the doc title is in the center header -->
79
 
<xsl:param name="header.column.widths" select="'1 3 1'"/>
80
 
 
81
 
<!-- ***************  Headers  *********************  -->
82
 
<!-- ***************************************************  -->
83
 
 
84
 
<xsl:attribute-set name="section.title.properties">
85
 
  <xsl:attribute name="font-family">
86
 
    <xsl:value-of select="$title.font.family"></xsl:value-of>
87
 
  </xsl:attribute>
88
 
  <xsl:attribute name="font-weight">normal</xsl:attribute>
89
 
  <!-- font size is calculated dynamically by section.heading template -->
90
 
  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
91
 
  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
92
 
  <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
93
 
  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
94
 
  <xsl:attribute name="text-align">left</xsl:attribute>
95
 
  <xsl:attribute name="start-indent"><xsl:value-of select="$title.margin.left"></xsl:value-of></xsl:attribute>
96
 
</xsl:attribute-set>
97
 
 
98
 
<xsl:attribute-set name="section.title.level1.properties">
99
 
  <xsl:attribute name="font-weight">bold</xsl:attribute>
100
 
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
101
 
  <xsl:attribute name="font-size">
102
 
    <xsl:value-of select="$body.font.master * 1.5"></xsl:value-of>
103
 
    <xsl:text>pt</xsl:text>
104
 
  </xsl:attribute>
105
 
  <xsl:attribute name="break-before">page</xsl:attribute>
106
 
</xsl:attribute-set>
107
 
 
108
 
<xsl:attribute-set name="section.title.level2.properties">
109
 
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
110
 
  <xsl:attribute name="font-size">
111
 
    <xsl:value-of select="$body.font.master * 1.3"></xsl:value-of>
112
 
    <xsl:text>pt</xsl:text>
113
 
  </xsl:attribute>
114
 
</xsl:attribute-set>
115
 
 
116
 
<xsl:attribute-set name="section.title.level3.properties">
117
 
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
118
 
  <xsl:attribute name="font-size">
119
 
    <xsl:value-of select="$body.font.master * 1"></xsl:value-of>
120
 
    <xsl:text>pt</xsl:text>
121
 
  </xsl:attribute>
122
 
</xsl:attribute-set>
123
 
 
124
 
<xsl:attribute-set name="section.title.level4.properties">
125
 
  <xsl:attribute name="font-style">italic</xsl:attribute>
126
 
  <xsl:attribute name="font-size">
127
 
    <xsl:value-of select="$body.font.master * 1"></xsl:value-of>
128
 
    <xsl:text>pt</xsl:text>
129
 
  </xsl:attribute>
130
 
</xsl:attribute-set>
131
 
 
132
 
<!-- ***************  Links  *********************  -->
133
 
<!-- ***************************************************  -->
134
 
 
135
 
<!-- urls in brackets for ulinks -->
136
 
<xsl:param name="ulink.show" select="1"></xsl:param>
137
 
 
138
 
<!-- ulink formatting -->
139
 
<xsl:attribute-set name="xref.properties">
140
 
  <xsl:attribute name="font-style">italic</xsl:attribute>
141
 
</xsl:attribute-set>
142
 
 
143
 
<!-- footnotes (uncomment if they fix fop)
144
 
 
145
 
<xsl:param name="ulink.footnotes" select="'yes'"></xsl:param>
146
 
<xsl:attribute-set name="footnote.mark.properties">
147
 
  <xsl:attribute name="font-size">65%</xsl:attribute>
148
 
  <xsl:attribute name="font-weight">normal</xsl:attribute>
149
 
  <xsl:attribute name="font-style">normal</xsl:attribute>
150
 
</xsl:attribute-set>
151
 
<xsl:attribute-set name="footnote.properties">
152
 
  <xsl:attribute name="font-size">70%</xsl:attribute>
153
 
  <xsl:attribute name="font-weight">normal</xsl:attribute>
154
 
  <xsl:attribute name="font-style">normal</xsl:attribute>
155
 
</xsl:attribute-set>
156
 
 
157
 
-->
158
 
 
159
 
<!-- page numbers included in xref cross references -->
160
 
<xsl:param name="insert.xref.page.number">yes</xsl:param>
161
 
 
162
 
<!-- This customises the page number format -->
163
 
<xsl:param name="local.l10n.xml" select="document('')"/>
164
 
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
165
 
  <l:l10n language="en">
166
 
    <l:context name="xref">
167
 
      <l:template name="page.citation" text=" [p. %p]"/>
168
 
    </l:context>
169
 
  </l:l10n>
170
 
</l:i18n>
171
 
 
172
 
<!-- ***************  Admonitions  *********************  -->
173
 
<!-- ***************************************************  -->
174
 
 
175
 
<!-- If true (non-zero), admonitions are presented in an alternate style that uses a graphic. Default graphics are provided in the distribution. -->
176
 
<xsl:param name="admon.graphics" select="1"></xsl:param>
177
 
 
178
 
<!-- If true (non-zero), admonitions are presented with a generated text label such as Note or Warning in the appropriate language. If zero, such labels are turned off, but any title children of the admonition element are still output. The default value is 1. -->
179
 
<xsl:param name="admon.textlabel" select="0"></xsl:param>
180
 
 
181
 
<xsl:param name="admon.graphics.path" select="'../../../../common/admon-lulu/'"/>
182
 
<xsl:param name="admon.graphics.extension" select="'.png'"/>
183
 
 
184
 
<xsl:template match="*" mode="admon.graphic.width">
185
 
  <xsl:text>24pt</xsl:text>
186
 
</xsl:template>
187
 
 
188
 
<!-- ***************  ToC/LoT/Index Generation  *********************  -->
189
 
<!-- ***************************************************  -->
190
 
 
191
 
<!-- Specifies the depth to which recursive sections should appear in the TOC -->
192
 
<xsl:param name="toc.section.depth" select="1" />
193
 
 
194
 
<!-- How maximaly deep should be each TOC? -->
195
 
<xsl:param name="toc.max.depth" select="2" />
196
 
 
197
 
<!-- **************** Miscellaneous Fixes ****************** -->
198
 
<!-- ***************************************************  -->
199
 
 
200
 
<!-- Some custom spacing for lists -->
201
 
 
202
 
<xsl:attribute-set name="list.block.spacing">
203
 
  <xsl:attribute name="space-before.optimum">0.3em</xsl:attribute>
204
 
  <xsl:attribute name="space-before.minimum">0.2em</xsl:attribute>
205
 
  <xsl:attribute name="space-before.maximum">0.5em</xsl:attribute>
206
 
  <xsl:attribute name="space-after.optimum">0.3em</xsl:attribute>
207
 
  <xsl:attribute name="space-after.minimum">0.2em</xsl:attribute>
208
 
  <xsl:attribute name="space-after.maximum">0.5em</xsl:attribute>
209
 
</xsl:attribute-set>
210
 
 
211
 
<xsl:attribute-set name="list.item.spacing">
212
 
  <xsl:attribute name="space-before.optimum">0.3em</xsl:attribute>
213
 
  <xsl:attribute name="space-before.minimum">0.2em</xsl:attribute>
214
 
  <xsl:attribute name="space-before.maximum">0.5em</xsl:attribute>
215
 
</xsl:attribute-set>
216
 
 
217
 
<xsl:param name="variablelist.as.blocks" select="1"></xsl:param>
218
 
 
219
 
<!-- Get rid of annoying white page after titlepage -->
220
 
<xsl:template name="book.titlepage.separator"/>
221
 
 
222
 
<xsl:param name="fop1.extensions" select="'yes'"/>
223
 
<xsl:param name="fop.extensions" select="'yes'"/>
224
 
<xsl:template match="*" mode="fop.outline"/> 
225
 
 
226
 
<!-- select draft mode, either yes or no -->
227
 
<xsl:param name="draft.mode" select="'no'"/>
228
 
 
229
 
</xsl:stylesheet>
230