annotate stylesheets/fo.xsl @ 768:a79fb712fe20

Set hyphenate.verbatim=0
author Dongsheng Song <songdongsheng@live.cn>
date Tue, 07 Apr 2009 11:04:18 +0800
parents 4e8f302ae313
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
723
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
1 <?xml version="1.0"?>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
3
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
4 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
5
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
6 <xsl:param name="draft.mode" select="no"/>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
7
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
8 <!-- These extensions are required for table printing and other stuff -->
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
9 <xsl:param name="use.extensions">1</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
10 <xsl:param name="callouts.extension">1</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
11 <xsl:param name="linenumbering.extension">1</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
12 <xsl:param name="tablecolumns.extension">1</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
13 <xsl:param name="textinsert.extension">1</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
14
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
15 <xsl:param name="admon.graphics" select="1" />
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
16 <xsl:param name="admon.graphics.extension">.png</xsl:param>
755
4e8f302ae313 According to en, images -> figs
Dongsheng Song <dongsheng.song@gmail.com>
parents: 728
diff changeset
17 <xsl:param name="admon.graphics.path">figs/</xsl:param>
723
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
18 <xsl:param name="callout.graphics" select="1" />
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
19 <xsl:param name="callout.graphics.extension">.png</xsl:param>
755
4e8f302ae313 According to en, images -> figs
Dongsheng Song <dongsheng.song@gmail.com>
parents: 728
diff changeset
20 <xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
723
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
21
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
22 <xsl:param name="section.autolabel" select="1" />
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
23 <xsl:param name="section.label.includes.component.label">1</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
24
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
25 <xsl:param name="variablelist.as.blocks" select="1" /> <!-- fo only -->
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
26 <xsl:param name="hyphenate">false</xsl:param> <!-- fo only -->
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
27 <xsl:param name="paper.type" select="'A4'"></xsl:param> <!-- fo only -->
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
28
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
29 <!-- Default font settings -->
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
30 <!--
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
31 <xsl:param name="title.font.family">sans-serif</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
32 <xsl:param name="body.font.family">serif</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
33 <xsl:param name="sans.font.family">sans-serif</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
34 <xsl:param name="dingbat.font.family">serif</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
35 <xsl:param name="monospace.font.family">monospace</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
36 <xsl:param name="symbol.font.family">Symbol,ZapfDingbats</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
37 -->
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
38
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
39 <!-- Custom font settings - preferred truetype font -->
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
40 <xsl:param name="title.font.family">Calibri,sans-serif,SimHei</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
41 <xsl:param name="body.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
42 <xsl:param name="sans.font.family">Calibri,sans-serif,SimHei</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
43 <xsl:param name="dingbat.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
44 <xsl:param name="monospace.font.family">Courier New,monospace,FangSong</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
45
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
46 <!-- Page related Settings -->
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
47 <xsl:param name="page.margin.inner">1.5cm</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
48 <xsl:param name="page.margin.outer">1.5cm</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
49 <xsl:param name="title.margin.left">0pt</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
50 <xsl:param name="body.start.indent">24pt</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
51 <xsl:param name="body.end.indent">0pt</xsl:param>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
52
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
53 <!-- Breaking long lines -->
768
a79fb712fe20 Set hyphenate.verbatim=0
Dongsheng Song <songdongsheng@live.cn>
parents: 755
diff changeset
54 <xsl:param name="hyphenate.verbatim">0</xsl:param>
723
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
55 <xsl:attribute-set name="monospace.verbatim.properties"
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
56 use-attribute-sets="verbatim.properties monospace.properties">
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
57 <xsl:attribute name="wrap-option">wrap</xsl:attribute>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
58 <xsl:attribute name="hyphenation-character">&#x25BA;</xsl:attribute>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
59 </xsl:attribute-set>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
60
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
61 <!-- Prevent blank pages in output -->
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
62 <xsl:template name="book.titlepage.before.verso">
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
63 </xsl:template>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
64 <xsl:template name="book.titlepage.verso">
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
65 </xsl:template>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
66 <xsl:template name="book.titlepage.separator">
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
67 </xsl:template>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
68
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
69 <!-- Colourize links in output -->
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
70 <xsl:attribute-set name="xref.properties">
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
71 <xsl:attribute name="color">
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
72 <xsl:choose>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
73 <xsl:when test="self::ulink">blue</xsl:when>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
74 <xsl:when test="self::xref">blue</xsl:when>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
75 <xsl:when test="self::uri">blue</xsl:when>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
76 <xsl:otherwise>red</xsl:otherwise>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
77 </xsl:choose>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
78 </xsl:attribute>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
79 </xsl:attribute-set>
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
80
3c5e1c03cc3e Add XSL stylesheets for DocBook
Dongsheng Song <dongsheng.song@gmail.com>
parents:
diff changeset
81 </xsl:stylesheet>