~ubuntu-branches/ubuntu/hardy/xubuntu-docs/hardy-updates

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jani Monoses
  • Date: 2006-05-14 17:24:07 UTC
  • Revision ID: james.westby@ubuntu.com-20060514172407-4rdhsmfkmk46bzg8
Tags: 6.05.1
* Update from docteam svn:
   - new about page (Luzi Thöny)
   - much more complete desktop guide (Luzi Thöny)
   - add POT file (Matthew East)

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-1.69.1/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="dingbat.font.family">
 
19
   <xsl:value-of select="$body.font.family"/>
 
20
</xsl:param>
 
21
<xsl:param name="title.font.family">
 
22
   <xsl:value-of select="$body.font.family"/>
 
23
</xsl:param>
 
24
<xsl:param name="body.font.master">11</xsl:param>
 
25
<xsl:param name="body.font.size">
 
26
 <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text>
 
27
</xsl:param>
 
28
 
 
29
<xsl:param name="monospace.font.family" select="'monospace'"></xsl:param>
 
30
 
 
31
<!-- Smaller monospace -->
 
32
<xsl:attribute-set name="monospace.properties">
 
33
  <xsl:attribute name="font-size">80%</xsl:attribute>
 
34
</xsl:attribute-set>
 
35
 
 
36
<xsl:param name="line-height" select="'1.5'"></xsl:param>
 
37
 
 
38
<!-- ***************  Page Format  *********************  -->
 
39
<!-- ***************************************************  -->
 
40
 
 
41
<!-- Define the page width/height -->
 
42
<xsl:param name="page.width">21cm</xsl:param>
 
43
<xsl:param name="page.height">29.7cm</xsl:param>
 
44
 
 
45
<!-- Give each section a number -->
 
46
<xsl:param name="section.autolabel" select="1"></xsl:param>
 
47
 
 
48
<!-- Turn on left justify. The default is full justify -->
 
49
<xsl:param name="alignment">left</xsl:param> 
 
50
 
 
51
<!-- Margins -->
 
52
<xsl:param name="page.margin.outer">
 
53
  <xsl:choose>
 
54
    <xsl:when test="$double.sided != 0">0.75in</xsl:when>
 
55
    <xsl:otherwise>1in</xsl:otherwise>
 
56
  </xsl:choose>
 
57
</xsl:param>
 
58
<xsl:param name="page.margin.inner">
 
59
  <xsl:choose>
 
60
    <xsl:when test="$double.sided != 0">1in</xsl:when>
 
61
    <xsl:otherwise>1in</xsl:otherwise>
 
62
  </xsl:choose>
 
63
</xsl:param>
 
64
 
 
65
<!-- Keep paragraphs flush with the left hand side -->
 
66
<xsl:param name="body.start.indent" select="'0pc'"/>
 
67
 
 
68
<!-- Put a rule above each footer and a rule below each header  -->
 
69
<xsl:param name="footer.rule" select="0"/>
 
70
<xsl:param name="header.rule" select="1"/>
 
71
 
 
72
<!-- Don't split words across lines (no end-of-line word breaks) -->
 
73
<xsl:param name="hyphenate">false</xsl:param>
 
74
 
 
75
<!-- '1 3 1' means the center header has three times the width of the left and 
 
76
     right headers. This is needed because the doc title is in the center header -->
 
77
<xsl:param name="header.column.widths" select="'1 3 1'"/>
 
78
 
 
79
<!-- ***************  Headers  *********************  -->
 
80
<!-- ***************************************************  -->
 
81
 
 
82
<xsl:attribute-set name="section.title.properties">
 
83
  <xsl:attribute name="font-family">
 
84
    <xsl:value-of select="$title.font.family"></xsl:value-of>
 
85
  </xsl:attribute>
 
86
  <xsl:attribute name="font-weight">normal</xsl:attribute>
 
87
  <!-- font size is calculated dynamically by section.heading template -->
 
88
  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
 
89
  <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
 
90
  <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
 
91
  <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
 
92
  <xsl:attribute name="text-align">left</xsl:attribute>
 
93
  <xsl:attribute name="start-indent"><xsl:value-of select="$title.margin.left"></xsl:value-of></xsl:attribute>
 
94
</xsl:attribute-set>
 
95
 
 
96
<xsl:attribute-set name="section.title.level1.properties">
 
97
  <xsl:attribute name="font-weight">bold</xsl:attribute>
 
98
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
 
99
  <xsl:attribute name="font-size">
 
100
    <xsl:value-of select="$body.font.master * 1.5"></xsl:value-of>
 
101
    <xsl:text>pt</xsl:text>
 
102
  </xsl:attribute>
 
103
  <xsl:attribute name="break-before">page</xsl:attribute>
 
104
</xsl:attribute-set>
 
105
 
 
106
<xsl:attribute-set name="section.title.level2.properties">
 
107
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
 
108
  <xsl:attribute name="font-size">
 
109
    <xsl:value-of select="$body.font.master * 1.3"></xsl:value-of>
 
110
    <xsl:text>pt</xsl:text>
 
111
  </xsl:attribute>
 
112
</xsl:attribute-set>
 
113
 
 
114
<xsl:attribute-set name="section.title.level3.properties">
 
115
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
 
116
  <xsl:attribute name="font-size">
 
117
    <xsl:value-of select="$body.font.master * 1"></xsl:value-of>
 
118
    <xsl:text>pt</xsl:text>
 
119
  </xsl:attribute>
 
120
</xsl:attribute-set>
 
121
 
 
122
<xsl:attribute-set name="section.title.level4.properties">
 
123
  <xsl:attribute name="font-style">italic</xsl:attribute>
 
124
  <xsl:attribute name="font-size">
 
125
    <xsl:value-of select="$body.font.master * 1"></xsl:value-of>
 
126
    <xsl:text>pt</xsl:text>
 
127
  </xsl:attribute>
 
128
</xsl:attribute-set>
 
129
 
 
130
<!-- ***************  Links  *********************  -->
 
131
<!-- ***************************************************  -->
 
132
 
 
133
<!-- urls in brackets for ulinks -->
 
134
<xsl:param name="ulink.show" select="1"></xsl:param>
 
135
 
 
136
<!-- page numbers included in xref cross references -->
 
137
<xsl:param name="insert.xref.page.number">no</xsl:param>
 
138
 
 
139
<!-- ulink formatting -->
 
140
<xsl:attribute-set name="xref.properties">
 
141
  <xsl:attribute name="font-style">italic</xsl:attribute>
 
142
</xsl:attribute-set>
 
143
 
 
144
<!-- footnotes -->
 
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
 
 
152
 
 
153
<!-- ***************  Admonitions  *********************  -->
 
154
<!-- ***************************************************  -->
 
155
 
 
156
<!-- If true (non-zero), admonitions are presented in an alternate style that uses a graphic. Default graphics are provided in the distribution. -->
 
157
<xsl:param name="admon.graphics" select="1"></xsl:param>
 
158
 
 
159
<!-- 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. -->
 
160
<xsl:param name="admon.textlabel" select="0"></xsl:param>
 
161
 
 
162
<xsl:param name="admon.graphics.path" select="'../../../../common/admon-lulu/'"/>
 
163
<xsl:param name="admon.graphics.extension" select="'.png'"/>
 
164
 
 
165
<!-- ***************  ToC/LoT/Index Generation  *********************  -->
 
166
<!-- ***************************************************  -->
 
167
 
 
168
<!-- Specifies the depth to which recursive sections should appear in the TOC -->
 
169
<xsl:param name="toc.section.depth" select="1" />
 
170
 
 
171
<!-- How maximaly deep should be each TOC? -->
 
172
<xsl:param name="toc.max.depth" select="2" />
 
173
 
 
174
<!-- **************** Miscellaneous Fixes ****************** -->
 
175
<!-- ***************************************************  -->
 
176
 
 
177
<!-- Some custom spacing for lists
 
178
 
 
179
<xsl:attribute-set name="list.block.spacing">
 
180
  <xsl:attribute name="space-before.optimum">0.3em</xsl:attribute>
 
181
  <xsl:attribute name="space-before.minimum">0.2em</xsl:attribute>
 
182
  <xsl:attribute name="space-before.maximum">0.5em</xsl:attribute>
 
183
  <xsl:attribute name="space-after.optimum">0.3em</xsl:attribute>
 
184
  <xsl:attribute name="space-after.minimum">0.2em</xsl:attribute>
 
185
  <xsl:attribute name="space-after.maximum">0.5em</xsl:attribute>
 
186
</xsl:attribute-set>
 
187
 
 
188
<xsl:attribute-set name="list.item.spacing">
 
189
  <xsl:attribute name="space-before.optimum">0.3em</xsl:attribute>
 
190
  <xsl:attribute name="space-before.minimum">0.2em</xsl:attribute>
 
191
  <xsl:attribute name="space-before.maximum">0.5em</xsl:attribute>
 
192
</xsl:attribute-set>
 
193
 
 
194
-->
 
195
 
 
196
<!-- Get rid of annoying white page after titlepage -->
 
197
<xsl:template name="book.titlepage.separator"/>
 
198
 
 
199
<!--
 
200
<xsl:param name="fop.extensions" select="1"/>
 
201
-->
 
202
 
 
203
<!-- select draft mode, either yes or no -->
 
204
<xsl:param name="draft.mode" select="'no'"/>
 
205
 
 
206
</xsl:stylesheet>
 
207