[ded6ddd] | 1 | <?xml version='1.0' encoding='ISO-8859-1'?>
|
---|
| 2 |
|
---|
| 3 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 4 | xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
---|
| 5 | version="1.0">
|
---|
| 6 |
|
---|
[a9e89d0] | 7 | <!-- Force section1's onto a new page -->
|
---|
[ded6ddd] | 8 | <xsl:attribute-set name="section.level1.properties">
|
---|
[a9e89d0] | 9 | <xsl:attribute name="break-after">
|
---|
| 10 | <xsl:choose>
|
---|
| 11 | <xsl:when test="not(position()=last())">
|
---|
| 12 | <xsl:text>page</xsl:text>
|
---|
| 13 | </xsl:when>
|
---|
[ded6ddd] | 14 | <xsl:otherwise>
|
---|
[a9e89d0] | 15 | <xsl:text>auto</xsl:text>
|
---|
[ded6ddd] | 16 | </xsl:otherwise>
|
---|
| 17 | </xsl:choose>
|
---|
| 18 | </xsl:attribute>
|
---|
| 19 | </xsl:attribute-set>
|
---|
| 20 |
|
---|
[a9e89d0] | 21 | <!-- Header -->
|
---|
[ded6ddd] | 22 | <xsl:template name="header.content">
|
---|
[a9e89d0] | 23 | <xsl:param name="sequence" select="''"/>
|
---|
| 24 | <fo:block>
|
---|
[ded6ddd] | 25 | <xsl:attribute name="text-align">
|
---|
| 26 | <xsl:choose>
|
---|
| 27 | <xsl:when test="$sequence = 'first' or $sequence = 'odd'">right</xsl:when>
|
---|
| 28 | <xsl:otherwise>left</xsl:otherwise>
|
---|
| 29 | </xsl:choose>
|
---|
| 30 | </xsl:attribute>
|
---|
| 31 | <xsl:value-of select="/book/bookinfo/title"/>
|
---|
| 32 | <xsl:text> - </xsl:text>
|
---|
| 33 | <xsl:value-of select="/book/bookinfo/subtitle"/>
|
---|
| 34 | </fo:block>
|
---|
| 35 | </xsl:template>
|
---|
| 36 |
|
---|
| 37 | <xsl:template name="header.table">
|
---|
[a9e89d0] | 38 | <xsl:param name="sequence" select="''"/>
|
---|
[ded6ddd] | 39 | <xsl:param name="gentext-key" select="''"/>
|
---|
| 40 | <xsl:choose>
|
---|
| 41 | <xsl:when test="$gentext-key = 'book' or $sequence = 'blank'"/>
|
---|
| 42 | <xsl:otherwise>
|
---|
[a9e89d0] | 43 | <xsl:call-template name="header.content">
|
---|
| 44 | <xsl:with-param name="sequence" select="$sequence"/>
|
---|
| 45 | </xsl:call-template>
|
---|
[ded6ddd] | 46 | </xsl:otherwise>
|
---|
| 47 | </xsl:choose>
|
---|
| 48 | </xsl:template>
|
---|
| 49 |
|
---|
[a9e89d0] | 50 | <!-- Centered titles for book and part -->
|
---|
[ded6ddd] | 51 | <xsl:template name="book.titlepage">
|
---|
| 52 | <fo:block space-before="2in">
|
---|
| 53 | <fo:block>
|
---|
| 54 | <xsl:call-template name="book.titlepage.before.recto"/>
|
---|
| 55 | <xsl:call-template name="book.titlepage.recto"/>
|
---|
| 56 | </fo:block>
|
---|
| 57 | <fo:block>
|
---|
| 58 | <xsl:call-template name="book.titlepage.before.verso"/>
|
---|
| 59 | <xsl:call-template name="book.titlepage.verso"/>
|
---|
| 60 | </fo:block>
|
---|
| 61 | <xsl:call-template name="book.titlepage.separator"/>
|
---|
| 62 | </fo:block>
|
---|
| 63 | </xsl:template>
|
---|
| 64 |
|
---|
| 65 | <xsl:template name="part.titlepage">
|
---|
| 66 | <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
---|
| 67 | <fo:block space-before="2.5in">
|
---|
| 68 | <xsl:call-template name="part.titlepage.before.recto"/>
|
---|
| 69 | <xsl:call-template name="part.titlepage.recto"/>
|
---|
| 70 | </fo:block>
|
---|
| 71 | <fo:block>
|
---|
| 72 | <xsl:call-template name="part.titlepage.before.verso"/>
|
---|
| 73 | <xsl:call-template name="part.titlepage.verso"/>
|
---|
| 74 | </fo:block>
|
---|
| 75 | <xsl:call-template name="part.titlepage.separator"/>
|
---|
| 76 | </fo:block>
|
---|
| 77 | </xsl:template>
|
---|
| 78 |
|
---|
[a9e89d0] | 79 | <!-- Margins -->
|
---|
[132af6e] | 80 | <xsl:param name="page.margin.inner">0.5in</xsl:param>
|
---|
| 81 | <xsl:param name="page.margin.outer">0.375in</xsl:param>
|
---|
[ded6ddd] | 82 | <xsl:param name="title.margin.left">-1pc</xsl:param>
|
---|
| 83 | <xsl:attribute-set name="normal.para.spacing">
|
---|
| 84 | <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
|
---|
| 85 | <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
|
---|
| 86 | <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
|
---|
| 87 | </xsl:attribute-set>
|
---|
| 88 | <xsl:attribute-set name="list.block.spacing">
|
---|
| 89 | <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
|
---|
| 90 | <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
|
---|
| 91 | <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
|
---|
| 92 | <xsl:attribute name="space-after.optimum">0.8em</xsl:attribute>
|
---|
| 93 | <xsl:attribute name="space-after.minimum">0.6em</xsl:attribute>
|
---|
| 94 | <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
|
---|
| 95 | </xsl:attribute-set>
|
---|
| 96 | <xsl:attribute-set name="list.item.spacing">
|
---|
| 97 | <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
|
---|
| 98 | <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
|
---|
| 99 | <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
|
---|
| 100 | </xsl:attribute-set>
|
---|
| 101 | <xsl:attribute-set name="verbatim.properties">
|
---|
| 102 | <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
|
---|
| 103 | <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
|
---|
| 104 | <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
|
---|
| 105 | <xsl:attribute name="space-after.minimum">0.6em</xsl:attribute>
|
---|
| 106 | <xsl:attribute name="space-after.optimum">0.8em</xsl:attribute>
|
---|
| 107 | <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
|
---|
| 108 | </xsl:attribute-set>
|
---|
| 109 |
|
---|
[a9e89d0] | 110 | <!-- Others-->
|
---|
[ded6ddd] | 111 | <xsl:param name="header.rule" select="0"></xsl:param>
|
---|
| 112 | <xsl:param name="footer.rule" select="0"></xsl:param>
|
---|
[a9e89d0] | 113 | <xsl:param name="marker.section.level" select="-1"></xsl:param>
|
---|
[ded6ddd] | 114 |
|
---|
[a9e89d0] | 115 | <!-- Dropping a blank page -->
|
---|
| 116 | <xsl:template name="book.titlepage.separator"/>
|
---|
[ded6ddd] | 117 |
|
---|
[a9e89d0] | 118 | <!-- How render a variablelist -->
|
---|
| 119 | <xsl:param name="variablelist.as.blocks" select="1"/>
|
---|
[4da2304] | 120 |
|
---|
[ded6ddd] | 121 | </xsl:stylesheet>
|
---|