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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jani Monoses
  • Date: 2006-05-24 17:36:32 UTC
  • Revision ID: james.westby@ubuntu.com-20060524173632-s7y9hmvzhyr3hr84
Tags: 6.05.5
* Link to the desktop guide from the browser start page
* Install the preliminary translated desktop guides

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8
8
xmlns:fo="http://www.w3.org/1999/XSL/Format">
9
9
 
10
 
<!-- Import the new xsl -->
11
 
<xsl:import href="/home/matt/tmp/docbook-xsl-1.69.1/fo/docbook.xsl"/>
 
10
<!-- Import our general pdf customisations -->
 
11
<xsl:import href="ubuntu-pdf.xsl"/>
12
12
 
13
 
<!-- ***************  Fonts  *********************  -->
 
13
<!-- ***************  Lulu tweaks  *********************  -->
14
14
<!-- ***************************************************  -->
15
15
 
16
 
<!-- Use a serif font -->
17
 
<xsl:param name="body.font.family" select="'serif'"/>
18
 
<xsl:param name="dingbat.font.family" select="'serif'"></xsl:param>
19
 
<xsl:param name="title.font.family" select="'serif'"></xsl:param>
 
16
<!-- Change the font, if you like, default is 11 -->
20
17
<xsl:param name="body.font.master">11</xsl:param>
21
 
<xsl:param name="body.font.size">
22
 
 <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text>
23
 
</xsl:param>
24
 
 
25
 
<xsl:param name="monospace.font.family" select="'monospace'"></xsl:param>
26
 
 
27
 
<!-- Smaller monospace -->
28
 
<xsl:attribute-set name="monospace.properties">
29
 
  <xsl:attribute name="font-size">80%</xsl:attribute>
30
 
</xsl:attribute-set>
31
 
 
32
 
<!-- ***************  Page Format  *********************  -->
33
 
<!-- ***************************************************  -->
34
18
 
35
19
<!-- Define the page width/height -->
36
20
<xsl:param name="page.width">18.9cm</xsl:param>
42
26
<!-- This causes some blank pages on the left hand side, so don't draw headers on those pages -->
43
27
<xsl:param name="headers.on.blank.pages" select="0"></xsl:param>
44
28
 
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>0.75in</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>0.75in</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) -->
 
29
<!-- Split words across lines -->
73
30
<xsl:param name="hyphenate">true</xsl:param>
74
31
 
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">yes</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
 
<!-- ***************  Admonitions  *********************  -->
145
 
<!-- ***************************************************  -->
146
 
 
147
 
<!-- If true (non-zero), admonitions are presented in an alternate style that uses a graphic. Default graphics are provided in the distribution. -->
148
 
<xsl:param name="admon.graphics" select="1"></xsl:param>
149
 
 
150
 
<!-- 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. -->
151
 
<xsl:param name="admon.textlabel" select="0"></xsl:param>
152
 
 
153
 
<xsl:param name="admon.graphics.path" select="'../../../../common/admon-lulu/'"/>
154
 
<xsl:param name="admon.graphics.extension" select="'.png'"/>
155
 
 
156
 
<!-- ***************  ToC/LoT/Index Generation  *********************  -->
157
 
<!-- ***************************************************  -->
158
 
 
159
 
<!-- This is an excellent reference:  http://www.sagehill.net/docbookxsl/TOCcontrol.html -->
160
 
 
161
 
<!-- Specifies the depth to which recursive sections should appear in the TOC -->
162
 
<xsl:param name="toc.section.depth" select="1" />
163
 
 
164
 
<!-- How maximaly deep should be each TOC? -->
165
 
<xsl:param name="toc.max.depth" select="2" />
166
 
 
167
 
<!-- **************** Miscellaneous Fixes ****************** -->
168
 
 
169
 
<!-- Some custom spacing for lists -->
170
 
 
171
 
<xsl:attribute-set name="list.block.spacing">
172
 
  <xsl:attribute name="space-before.optimum">0.3em</xsl:attribute>
173
 
  <xsl:attribute name="space-before.minimum">0.2em</xsl:attribute>
174
 
  <xsl:attribute name="space-before.maximum">0.5em</xsl:attribute>
175
 
  <xsl:attribute name="space-after.optimum">0.3em</xsl:attribute>
176
 
  <xsl:attribute name="space-after.minimum">0.2em</xsl:attribute>
177
 
  <xsl:attribute name="space-after.maximum">0.5em</xsl:attribute>
178
 
</xsl:attribute-set>
179
 
 
180
 
<xsl:attribute-set name="list.item.spacing">
181
 
  <xsl:attribute name="space-before.optimum">0.3em</xsl:attribute>
182
 
  <xsl:attribute name="space-before.minimum">0.2em</xsl:attribute>
183
 
  <xsl:attribute name="space-before.maximum">0.5em</xsl:attribute>
184
 
</xsl:attribute-set>
185
 
 
186
 
<!-- Get rid of annoying white page after titlepage -->
187
 
<xsl:template name="book.titlepage.separator"/>
188
 
 
189
 
<!-- select draft mode, either yes or no -->
190
 
<xsl:param name="draft.mode" select="'no'"/>
191
 
 
192
32
</xsl:stylesheet>
193
33