forked from okfn/ddjbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlanacion-customization.xsl
69 lines (60 loc) · 2.25 KB
/
lanacion-customization.xsl
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
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:import href="/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl"/>
<xsl:param name="generate.toc" select="'book toc'"/>
<xsl:param name="paper.type" select="'A4'"/>
<xsl:template name="book.titlepage.recto">
<fo:block>
<fo:external-graphic content-width="scale-to-fit"
content-height="100%"
width="100%" height="100%"
scaling="uniform"
src="url(figs/incoming/book_cover.png)" />
</fo:block>
</xsl:template>
<xsl:template name="footer.content">
<xsl:param name="pageclass" select="''"/>
<xsl:param name="sequence" select="''"/>
<xsl:param name="position" select="''"/>
<xsl:param name="gentext-key" select="''"/>
<fo:block>
<!-- pageclass can be front, body, back -->
<!-- sequence can be odd, even, first, blank -->
<!-- position can be left, center, right -->
<xsl:choose>
<xsl:when test="$pageclass = 'titlepage'">
<!-- nop; no footer on title pages -->
</xsl:when>
<xsl:when test="$double.sided != 0 and $sequence = 'even'
and $position='left'">
<fo:page-number/>
</xsl:when>
<xsl:when test="$double.sided != 0 and ($sequence = 'odd' or $sequence = 'first')
and $position='right'">
<fo:page-number/>
</xsl:when>
<xsl:when test="$double.sided = 0 and $position='center'">
<fo:page-number/>
</xsl:when>
<xsl:when test="$sequence='blank'">
<xsl:choose>
<xsl:when test="$double.sided != 0 and $position = 'left'">
<fo:page-number/>
</xsl:when>
<xsl:when test="$double.sided = 0 and $position = 'center'">
<fo:page-number/>
</xsl:when>
<xsl:otherwise>
<!-- nop -->
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<!-- nop -->
</xsl:otherwise>
</xsl:choose>
</fo:block>
</xsl:template>
</xsl:stylesheet>