rev |
line source |
dongsheng@624
|
1 <?xml version="1.0"?>
|
dongsheng@886
|
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
dongsheng@886
|
3 xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
dongsheng@886
|
4 version='1.0'>
|
dongsheng@624
|
5
|
dongsheng@624
|
6 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
|
dongsheng@624
|
7
|
dongsheng@886
|
8 <xsl:param name="l10n.gentext.language" select="'en'"/>
|
dongsheng@886
|
9 <xsl:param name="paper.type" select="'A4'"></xsl:param>
|
dongsheng@624
|
10 <xsl:param name="draft.mode" select="no"/>
|
dongsheng@624
|
11
|
dongsheng@624
|
12 <!-- These extensions are required for table printing and other stuff -->
|
dongsheng@624
|
13 <xsl:param name="use.extensions">1</xsl:param>
|
dongsheng@624
|
14 <xsl:param name="callouts.extension">1</xsl:param>
|
dongsheng@624
|
15 <xsl:param name="linenumbering.extension">1</xsl:param>
|
dongsheng@624
|
16 <xsl:param name="tablecolumns.extension">1</xsl:param>
|
dongsheng@624
|
17 <xsl:param name="textinsert.extension">1</xsl:param>
|
dongsheng@624
|
18
|
dongsheng@624
|
19 <xsl:param name="admon.graphics" select="1" />
|
dongsheng@624
|
20 <xsl:param name="admon.graphics.extension">.png</xsl:param>
|
dongsheng@656
|
21 <xsl:param name="admon.graphics.path">figs/</xsl:param>
|
dongsheng@624
|
22 <xsl:param name="callout.graphics" select="1" />
|
dongsheng@624
|
23 <xsl:param name="callout.graphics.extension">.png</xsl:param>
|
dongsheng@656
|
24 <xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
|
dongsheng@624
|
25
|
dongsheng@624
|
26 <xsl:param name="section.autolabel" select="1" />
|
dongsheng@624
|
27 <xsl:param name="section.label.includes.component.label">1</xsl:param>
|
dongsheng@624
|
28
|
dongsheng@886
|
29 <xsl:param name="variablelist.as.blocks" select="1" />
|
dongsheng@886
|
30 <xsl:param name="hyphenate">false</xsl:param>
|
dongsheng@624
|
31
|
dongsheng@886
|
32 <!-- Font settings, we use characters out of base14 even for english -->
|
dongsheng@886
|
33 <xsl:param name="title.font.family">sans-serif,Arial</xsl:param>
|
dongsheng@886
|
34 <xsl:param name="body.font.family">serif,Times New Roman</xsl:param>
|
dongsheng@886
|
35 <xsl:param name="sans.font.family">sans-serif,Arial</xsl:param>
|
dongsheng@886
|
36 <xsl:param name="dingbat.font.family">serif,Times New Roman</xsl:param>
|
dongsheng@886
|
37 <xsl:param name="monospace.font.family">monospace,Courier New</xsl:param>
|
dongsheng@624
|
38 <xsl:param name="symbol.font.family">Symbol,ZapfDingbats</xsl:param>
|
dongsheng@624
|
39
|
dongsheng@886
|
40 <!-- Page related settings -->
|
dongsheng@624
|
41 <xsl:param name="page.margin.inner">1.5cm</xsl:param>
|
dongsheng@624
|
42 <xsl:param name="page.margin.outer">1.5cm</xsl:param>
|
dongsheng@624
|
43 <xsl:param name="title.margin.left">0pt</xsl:param>
|
dongsheng@624
|
44 <xsl:param name="body.start.indent">24pt</xsl:param>
|
dongsheng@624
|
45 <xsl:param name="body.end.indent">0pt</xsl:param>
|
dongsheng@624
|
46
|
dongsheng@624
|
47 <!-- Prevent blank pages in output -->
|
dongsheng@624
|
48 <xsl:template name="book.titlepage.before.verso">
|
dongsheng@624
|
49 </xsl:template>
|
dongsheng@624
|
50 <xsl:template name="book.titlepage.verso">
|
dongsheng@624
|
51 </xsl:template>
|
dongsheng@624
|
52 <xsl:template name="book.titlepage.separator">
|
dongsheng@624
|
53 </xsl:template>
|
dongsheng@624
|
54
|
dongsheng@886
|
55 <!-- titlepage settings -->
|
dongsheng@886
|
56 <xsl:template name="book.titlepage">
|
dongsheng@886
|
57 <fo:block>
|
dongsheng@886
|
58 <fo:table table-layout="fixed" space-after.optimum="10pt" width="100%">
|
dongsheng@886
|
59 <fo:table-body>
|
dongsheng@886
|
60 <fo:table-row>
|
dongsheng@886
|
61 <fo:table-cell>
|
dongsheng@886
|
62 <fo:block text-align="center">
|
dongsheng@886
|
63 <!--fo:external-graphic src="url(figs/cover-logo.png)"
|
dongsheng@886
|
64 width="90%" height="auto" content-width="scale-to-fit" content-height="scale-to-fit" /-->
|
dongsheng@886
|
65 </fo:block>
|
dongsheng@886
|
66 </fo:table-cell>
|
dongsheng@886
|
67 </fo:table-row>
|
dongsheng@886
|
68 </fo:table-body>
|
dongsheng@886
|
69 </fo:table>
|
dongsheng@886
|
70 </fo:block>
|
dongsheng@886
|
71
|
dongsheng@886
|
72 <fo:block text-align="center" color="#000000" margin-left="1cm" margin-right="1cm"
|
dongsheng@886
|
73 space-before.optimum="3cm" space-after.optimum="5.0cm"
|
dongsheng@886
|
74 font-weight="900" font-size="32pt">
|
dongsheng@886
|
75 <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute>
|
dongsheng@886
|
76
|
dongsheng@886
|
77 <xsl:value-of select="/book/title"/>
|
dongsheng@886
|
78 </fo:block>
|
dongsheng@886
|
79
|
dongsheng@886
|
80 <fo:block text-align="center" color="#000080" margin-left="1cm" margin-right="1cm"
|
dongsheng@886
|
81 space-before.optimum="2cm" space-after.optimum="8.0cm"
|
dongsheng@886
|
82 font-weight="900" font-size="16pt">
|
dongsheng@886
|
83 <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute>
|
dongsheng@886
|
84
|
dongsheng@886
|
85 <xsl:value-of select="/book/subtitle"/>
|
dongsheng@886
|
86 </fo:block>
|
dongsheng@886
|
87
|
dongsheng@886
|
88 <fo:block text-align="center" color="#000000" margin-left="1cm" margin-right="1cm"
|
dongsheng@886
|
89 space-before.optimum="8cm" space-after.optimum="10cm"
|
dongsheng@886
|
90 font-weight="600" font-size="24pt">
|
dongsheng@886
|
91 <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute>
|
dongsheng@886
|
92
|
dongsheng@886
|
93 <xsl:call-template name="person.name.list">
|
dongsheng@886
|
94 <xsl:with-param name="person.list" select="bookinfo/authorgroup/author"/>
|
dongsheng@886
|
95 </xsl:call-template>
|
dongsheng@886
|
96 </fo:block>
|
dongsheng@886
|
97
|
dongsheng@886
|
98 <!--fo:block text-align="end" color="#666D70" margin-left="1cm" margin-right="1cm"
|
dongsheng@886
|
99 font-family="sans-serif" font-weight="normal" font-size="10pt" >
|
dongsheng@886
|
100 <xsl:value-of select="/book/subtitle"/>
|
dongsheng@886
|
101 </fo:block-->
|
dongsheng@886
|
102 </xsl:template>
|
dongsheng@886
|
103
|
dongsheng@886
|
104 <!-- title settings -->
|
dongsheng@886
|
105 <xsl:attribute-set name="preface.titlepage.recto.style">
|
dongsheng@886
|
106 <xsl:attribute name="color">#7C1C51</xsl:attribute>
|
dongsheng@886
|
107 </xsl:attribute-set>
|
dongsheng@886
|
108 <xsl:attribute-set name="chapter.titlepage.recto.style">
|
dongsheng@886
|
109 <xsl:attribute name="color">#7C1C51</xsl:attribute>
|
dongsheng@886
|
110 </xsl:attribute-set>
|
dongsheng@886
|
111 <xsl:attribute-set name="section.titlepage.recto.style">
|
dongsheng@886
|
112 <xsl:attribute name="color">#7C1C51</xsl:attribute>
|
dongsheng@886
|
113 </xsl:attribute-set>
|
dongsheng@886
|
114 <xsl:attribute-set name="appendix.titlepage.recto.style">
|
dongsheng@886
|
115 <xsl:attribute name="color">#7C1C51</xsl:attribute>
|
dongsheng@886
|
116 </xsl:attribute-set>
|
dongsheng@886
|
117
|
dongsheng@886
|
118 <!-- Verbatim related settings -->
|
dongsheng@886
|
119 <xsl:param name="hyphenate.verbatim">0</xsl:param>
|
dongsheng@886
|
120
|
dongsheng@886
|
121 <xsl:attribute-set name="monospace.properties">
|
dongsheng@886
|
122 <xsl:attribute name="font-family">
|
dongsheng@886
|
123 <xsl:value-of select="$monospace.font.family"/>
|
dongsheng@886
|
124 </xsl:attribute>
|
dongsheng@886
|
125 <xsl:attribute name="color">#000080</xsl:attribute>
|
dongsheng@886
|
126 </xsl:attribute-set>
|
dongsheng@886
|
127
|
dongsheng@886
|
128 <xsl:attribute-set name="monospace.verbatim.properties"
|
dongsheng@886
|
129 use-attribute-sets="verbatim.properties monospace.properties">
|
dongsheng@886
|
130 <xsl:attribute name="border-color">blue</xsl:attribute>
|
dongsheng@886
|
131 <xsl:attribute name="border-width">thin</xsl:attribute>
|
dongsheng@886
|
132 <xsl:attribute name="border-style">solid</xsl:attribute>
|
dongsheng@886
|
133 <xsl:attribute name="font-size">8pt</xsl:attribute>
|
dongsheng@886
|
134 <xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
dongsheng@886
|
135 <xsl:attribute name="hyphenation-character">►</xsl:attribute>
|
dongsheng@886
|
136 <!--xsl:attribute name="hyphenation-character">➤</xsl:attribute-->
|
dongsheng@886
|
137 </xsl:attribute-set>
|
dongsheng@886
|
138
|
dongsheng@886
|
139 <!-- emphasis settings -->
|
dongsheng@886
|
140 <xsl:template match="emphasis">
|
dongsheng@886
|
141 <xsl:param name="content">
|
dongsheng@886
|
142 <xsl:call-template name="simple.xlink">
|
dongsheng@886
|
143 <xsl:with-param name="content">
|
dongsheng@886
|
144 <xsl:apply-templates/>
|
dongsheng@886
|
145 </xsl:with-param>
|
dongsheng@886
|
146 </xsl:call-template>
|
dongsheng@886
|
147 </xsl:param>
|
dongsheng@886
|
148
|
dongsheng@886
|
149 <fo:inline color="#7C1C51" font-weight="bold">
|
dongsheng@886
|
150 <xsl:copy-of select="$content"/>
|
dongsheng@886
|
151 </fo:inline>
|
dongsheng@886
|
152 </xsl:template>
|
dongsheng@886
|
153
|
dongsheng@624
|
154 <!-- Colourize links in output -->
|
dongsheng@624
|
155 <xsl:attribute-set name="xref.properties">
|
dongsheng@624
|
156 <xsl:attribute name="color">
|
dongsheng@624
|
157 <xsl:choose>
|
dongsheng@624
|
158 <xsl:when test="self::ulink">blue</xsl:when>
|
dongsheng@624
|
159 <xsl:when test="self::xref">blue</xsl:when>
|
dongsheng@624
|
160 <xsl:when test="self::uri">blue</xsl:when>
|
dongsheng@624
|
161 <xsl:otherwise>red</xsl:otherwise>
|
dongsheng@624
|
162 </xsl:choose>
|
dongsheng@624
|
163 </xsl:attribute>
|
dongsheng@624
|
164 </xsl:attribute-set>
|
dongsheng@624
|
165
|
dongsheng@624
|
166 </xsl:stylesheet>
|