-
Notifications
You must be signed in to change notification settings - Fork 0
/
gnomeja-guide-param.xsl.in
85 lines (74 loc) · 2.97 KB
/
gnomeja-guide-param.xsl.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version='1.0' encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
<!-- Options used for documentclass -->
<xsl:param name="latex.style">docbook-gnomeja-guide</xsl:param>
<xsl:param name="latex.class.book">dbkgnomeja</xsl:param>
<xsl:param name="latex.class.options">@@PAPERSIZE@@,10pt</xsl:param><!-- a4paper b5paper -->
<!-- Requires Japanese fonts -->
<xsl:param name="xetex.font">
<xsl:text>\setjamainfont{@@JAMAINFONT@@} </xsl:text>
<xsl:text>\setjasansfont{@@JASANSFONT@@} </xsl:text>
<xsl:text>\setjamonofont{@@JAMONOFONT@@} </xsl:text>
</xsl:param>
<!-- Override encode.before.style in lang.xsl -->
<xsl:template name="encode.before.style">
<xsl:param name="lang"/>
<xsl:variable name="use-unicode">
<xsl:call-template name="lang-in-unicode">
<xsl:with-param name="lang" select="$lang"/>
</xsl:call-template>
</xsl:variable>
<!-- XeTeX preamble to handle fonts -->
<xsl:text>\usepackage{zxjatype} </xsl:text>
<xsl:text>\usepackage{xltxtra} </xsl:text>
<xsl:value-of select="$xetex.font"/>
</xsl:template>
<!-- Override figure.* in admon.xsl -->
<xsl:param name="figure.note">note</xsl:param>
<xsl:param name="figure.tip">tip</xsl:param>
<xsl:param name="figure.important">important</xsl:param>
<xsl:param name="figure.warning">warning</xsl:param>
<xsl:param name="figure.caution">caution</xsl:param>
<!-- Override procedure/title, step/title in procedure.xsl -->
<xsl:template match="procedure/title">
<!-- <xsl:text>{\jafamily{rm}\scshape </xsl:text> -->
<xsl:text>\paragraph*{</xsl:text>
<xsl:apply-templates/>
<xsl:text>} </xsl:text>
<xsl:call-template name="label.id">
<xsl:with-param name="object" select=".."/>
</xsl:call-template>
<!-- Ask to latex to let the title with its list -->
<xsl:text>\nopagebreak </xsl:text>
</xsl:template>
<xsl:template match="step/title">
<!-- <xsl:text>{\jafamily{rm}\scshape </xsl:text> -->
<xsl:text>\paragraph*{</xsl:text>
<xsl:apply-templates/>
<xsl:text>} </xsl:text>
</xsl:template>
<!-- Override appendix in appendix.xsl -->
<xsl:template match="appendix">
<xsl:if test="not (preceding-sibling::appendix)">
<xsl:text>% --------------------- </xsl:text>
<xsl:text>% Appendixes start here </xsl:text>
<xsl:text>% --------------------- </xsl:text>
<xsl:text>\appendix </xsl:text>
</xsl:if>
<xsl:call-template name="makeheading">
<!-- raise to the highest existing book section level (part or chapter) -->
<xsl:with-param name="level">
<xsl:choose>
<xsl:when test="preceding-sibling::part or
following-sibling::part">-1</xsl:when>
<xsl:when test="parent::book or parent::part">0</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
<xsl:apply-templates/>
<xsl:if test="not (following-sibling::appendix)">
<xsl:text> </xsl:text>
</xsl:if>
</xsl:template>
</xsl:stylesheet>