doc: Finish converting docs to asciidoc format
[fw/altos] / doc / am-fo.xsl
1 <!--
2   Generates single FO document from DocBook XML source using DocBook XSL
3   stylesheets.
4
5   See xsl-stylesheets/fo/param.xsl for all parameters.
6
7   NOTE: The URL reference to the current DocBook XSL stylesheets is
8   rewritten to point to the copy on the local disk drive by the XML catalog
9   rewrite directives so it doesn't need to go out to the Internet for the
10   stylesheets. This means you don't need to edit the <xsl:import> elements on
11   a machine by machine basis.
12 -->
13 <xsl:stylesheet version="1.0"
14                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
15                 xmlns:fo="http://www.w3.org/1999/XSL/Format">
16 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
17 <xsl:import href="common.xsl"/>
18 <xsl:include href="titlepage.templates.xsl"/>
19 <xsl:include href="footer.templates.xsl"/>
20
21 <xsl:param name="ulink.show" select="0" />
22 <xsl:param name="ulink.footnotes" select="1"/>
23
24 <xsl:param name="fop1.extensions" select="1" />
25 <xsl:param name="variablelist.as.blocks" select="1" />
26
27 <xsl:param name="paper.type" select="'USletter'"/>
28
29 <xsl:param name="hyphenate">false</xsl:param>
30 <!-- justify, left or right -->
31 <xsl:param name="alignment">left</xsl:param>
32
33 <xsl:param name="body.font.family" select="'Frutiger LT Std,sans-serif'"/>
34 <xsl:param name="title.font.family" select="'Frutiger LT Std,sans-serif'"/>
35 <xsl:param name="monospace.font.family" select="'DejaVu Sans Mono,monospace'"/>
36 <xsl:param name="body.font.master">12</xsl:param>
37 <xsl:param name="body.font.size">
38  <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text>
39 </xsl:param>
40
41 <xsl:param name="body.margin.bottom" select="'0.5in'"/>
42 <xsl:param name="body.margin.top" select="'0.5in'"/>
43 <xsl:param name="bridgehead.in.toc" select="0"/>
44 <xsl:param name="footer.column.widths">10 1 1</xsl:param>
45
46 <!-- overide setting in common.xsl -->
47 <xsl:param name="table.frame.border.thickness" select="'2px'"/>
48
49 <!-- Default fetches image from Internet (long timeouts) -->
50 <xsl:param name="draft.watermark.image" select="''"/>
51
52 <!-- Line break -->
53 <xsl:template match="processing-instruction('asciidoc-br')">
54   <fo:block/>
55 </xsl:template>
56
57 <!-- Horizontal ruler -->
58 <xsl:template match="processing-instruction('asciidoc-hr')">
59   <fo:block space-after="1em">
60     <fo:leader leader-pattern="rule" rule-thickness="0.5pt"  rule-style="solid" leader-length.minimum="100%"/>
61   </fo:block>
62 </xsl:template>
63
64 <!-- Hard page break -->
65 <xsl:template match="processing-instruction('asciidoc-pagebreak')">
66    <fo:block break-after='page'/>
67 </xsl:template>
68
69 <!-- Sets title to body text indent -->
70 <xsl:param name="body.start.indent">
71   <xsl:choose>
72     <xsl:when test="$fop.extensions != 0">0pt</xsl:when>
73     <xsl:when test="$passivetex.extensions != 0">0pt</xsl:when>
74     <xsl:otherwise>1pc</xsl:otherwise>
75   </xsl:choose>
76 </xsl:param>
77 <xsl:param name="title.margin.left">
78   <xsl:choose>
79     <xsl:when test="$fop.extensions != 0">-1pc</xsl:when>
80     <xsl:when test="$passivetex.extensions != 0">0pt</xsl:when>
81     <xsl:otherwise>0pt</xsl:otherwise>
82   </xsl:choose>
83 </xsl:param>
84 <xsl:param name="page.margin.bottom" select="'0.25in'"/>
85 <xsl:param name="page.margin.inner">
86   <xsl:choose>
87     <xsl:when test="$double.sided != 0">0.75in</xsl:when>
88     <xsl:otherwise>0.75in</xsl:otherwise>
89   </xsl:choose>
90 </xsl:param>
91 <xsl:param name="page.margin.outer">
92   <xsl:choose>
93     <xsl:when test="$double.sided != 0">0.5in</xsl:when>
94     <xsl:otherwise>0.5in</xsl:otherwise>
95   </xsl:choose>
96 </xsl:param>
97
98 <xsl:param name="page.margin.top" select="'0.5in'"/>
99 <xsl:param name="page.orientation" select="'portrait'"/>
100 <xsl:param name="page.width">
101   <xsl:choose>
102     <xsl:when test="$page.orientation = 'portrait'">
103       <xsl:value-of select="$page.width.portrait"/>
104     </xsl:when>
105     <xsl:otherwise>
106       <xsl:value-of select="$page.height.portrait"/>
107     </xsl:otherwise>
108   </xsl:choose>
109 </xsl:param>
110
111
112 <xsl:attribute-set name="copyright.title.properties">
113   <xsl:attribute name="font-size">12pt</xsl:attribute>
114   <xsl:attribute name="font-weight">bold</xsl:attribute>
115   <xsl:attribute name="text-align">center</xsl:attribute>
116 </xsl:attribute-set>
117
118 <xsl:attribute-set name="revhistory.title.properties">
119   <xsl:attribute name="font-size">12pt</xsl:attribute>
120   <xsl:attribute name="font-weight">bold</xsl:attribute>
121   <xsl:attribute name="text-align">center</xsl:attribute>
122 </xsl:attribute-set>
123
124 <xsl:attribute-set name="revhistory.table.properties">
125   <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
126   <xsl:attribute name="background-color">#EEEEEE</xsl:attribute>
127   <xsl:attribute name="width">50%</xsl:attribute>
128 </xsl:attribute-set>
129
130 <xsl:attribute-set name="revhistory.table.cell.properties">
131   <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
132   <xsl:attribute name="font-size">12pt</xsl:attribute>
133   <xsl:attribute name="padding">4pt</xsl:attribute>
134 </xsl:attribute-set>
135
136 <xsl:attribute-set name="monospace.properties">
137   <xsl:attribute name="font-size">9pt</xsl:attribute>
138 </xsl:attribute-set>
139
140 <xsl:attribute-set name="component.title.properties">
141   <xsl:attribute name="font-weight">normal</xsl:attribute>
142   <xsl:attribute name="color">#0080ff</xsl:attribute>
143 </xsl:attribute-set>
144
145 <xsl:attribute-set name="section.title.properties">
146   <xsl:attribute name="font-weight">normal</xsl:attribute>
147   <xsl:attribute name="color">#0080ff</xsl:attribute>
148 </xsl:attribute-set>
149
150 <xsl:attribute-set name="admonition.title.properties">
151   <xsl:attribute name="font-weight">normal</xsl:attribute>
152   <xsl:attribute name="color">#ff4040</xsl:attribute>
153 </xsl:attribute-set>
154
155 <xsl:attribute-set name="formal.title.properties">
156   <xsl:attribute name="font-weight">normal</xsl:attribute>
157   <xsl:attribute name="color">#0080ff</xsl:attribute>
158 </xsl:attribute-set>
159
160 <xsl:attribute-set name="sidebar.properties" use-attribute-sets="formal.object.properties">
161   <xsl:attribute name="border-style">solid</xsl:attribute>
162   <xsl:attribute name="border-width">1pt</xsl:attribute>
163   <xsl:attribute name="border-color">silver</xsl:attribute>
164   <xsl:attribute name="background-color">#ffffee</xsl:attribute>
165   <xsl:attribute name="padding-left">12pt</xsl:attribute>
166   <xsl:attribute name="padding-right">12pt</xsl:attribute>
167   <xsl:attribute name="padding-top">6pt</xsl:attribute>
168   <xsl:attribute name="padding-bottom">6pt</xsl:attribute>
169   <xsl:attribute name="margin-left">0pt</xsl:attribute>
170   <xsl:attribute name="margin-right">12pt</xsl:attribute>
171   <xsl:attribute name="margin-top">6pt</xsl:attribute>
172   <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
173 </xsl:attribute-set>
174
175 <!-- Only shade programlisting and screen verbatim elements -->
176 <xsl:param name="shade.verbatim" select="1"/>
177 <xsl:attribute-set name="shade.verbatim.style">
178   <xsl:attribute name="background-color">
179     <xsl:choose>
180       <xsl:when test="self::programlisting|self::screen">#ffffff</xsl:when>
181       <xsl:otherwise>inherit</xsl:otherwise>
182     </xsl:choose>
183   </xsl:attribute>
184 </xsl:attribute-set>
185
186 <!--
187   Force XSL Stylesheets 1.72 default table breaks to be the same as the current
188   version (1.74) default which (for tables) is keep-together="auto".
189 -->
190 <xsl:attribute-set name="table.properties">
191   <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
192 </xsl:attribute-set>
193
194 </xsl:stylesheet>