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