summaryrefslogtreecommitdiff
path: root/fo/pagesetup.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'fo/pagesetup.xsl')
-rw-r--r--fo/pagesetup.xsl107
1 files changed, 73 insertions, 34 deletions
diff --git a/fo/pagesetup.xsl b/fo/pagesetup.xsl
index 2fd7a82..88c22d7 100644
--- a/fo/pagesetup.xsl
+++ b/fo/pagesetup.xsl
@@ -4,7 +4,7 @@
version="1.0">
<!-- ********************************************************************
- $Id: pagesetup.xsl 9157 2011-11-23 22:29:23Z bobstayton $
+ $Id: pagesetup.xsl 9720 2013-01-31 18:24:47Z bobstayton $
********************************************************************
This file is part of the DocBook XSL Stylesheet distribution.
@@ -19,14 +19,21 @@
<xsl:value-of select="$body.font.family"/>
<xsl:if test="$body.font.family != ''
and $symbol.font.family != ''">,</xsl:if>
- <xsl:value-of select="$symbol.font.family"/>
+ <xsl:value-of select="$symbol.font.family"/>
</xsl:param>
<xsl:param name="title.fontset">
<xsl:value-of select="$title.font.family"/>
<xsl:if test="$title.font.family != ''
and $symbol.font.family != ''">,</xsl:if>
- <xsl:value-of select="$symbol.font.family"/>
+ <xsl:value-of select="$symbol.font.family"/>
+</xsl:param>
+
+<xsl:param name="dingbat.fontset">
+ <xsl:value-of select="$dingbat.font.family"/>
+ <xsl:if test="$dingbat.font.family != ''
+ and $symbol.font.family != ''">,</xsl:if>
+ <xsl:value-of select="$symbol.font.family"/>
</xsl:param>
<!-- These are internal parameters are for the individual precedence attributes -->
@@ -2117,8 +2124,10 @@
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="blank"
blank-or-not-blank="blank"/>
- <fo:conditional-page-master-reference master-reference="titlepage-first"
- page-position="first"/>
+ <xsl:if test="$force.blank.pages != 0">
+ <fo:conditional-page-master-reference master-reference="titlepage-first"
+ page-position="first"/>
+ </xsl:if>
<fo:conditional-page-master-reference master-reference="titlepage-odd"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
@@ -2138,8 +2147,10 @@
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="blank"
blank-or-not-blank="blank"/>
- <fo:conditional-page-master-reference master-reference="lot-first"
- page-position="first"/>
+ <xsl:if test="$force.blank.pages != 0">
+ <fo:conditional-page-master-reference master-reference="lot-first"
+ page-position="first"/>
+ </xsl:if>
<fo:conditional-page-master-reference master-reference="lot-odd"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
@@ -2159,8 +2170,10 @@
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="blank"
blank-or-not-blank="blank"/>
- <fo:conditional-page-master-reference master-reference="front-first"
- page-position="first"/>
+ <xsl:if test="$force.blank.pages != 0">
+ <fo:conditional-page-master-reference master-reference="front-first"
+ page-position="first"/>
+ </xsl:if>
<fo:conditional-page-master-reference master-reference="front-odd"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
@@ -2180,8 +2193,10 @@
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="blank"
blank-or-not-blank="blank"/>
- <fo:conditional-page-master-reference master-reference="body-first"
- page-position="first"/>
+ <xsl:if test="$force.blank.pages != 0">
+ <fo:conditional-page-master-reference master-reference="body-first"
+ page-position="first"/>
+ </xsl:if>
<fo:conditional-page-master-reference master-reference="body-odd"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
@@ -2201,8 +2216,10 @@
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="blank"
blank-or-not-blank="blank"/>
- <fo:conditional-page-master-reference master-reference="back-first"
- page-position="first"/>
+ <xsl:if test="$force.blank.pages != 0">
+ <fo:conditional-page-master-reference master-reference="back-first"
+ page-position="first"/>
+ </xsl:if>
<fo:conditional-page-master-reference master-reference="back-odd"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
@@ -2222,8 +2239,10 @@
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="blank"
blank-or-not-blank="blank"/>
- <fo:conditional-page-master-reference master-reference="index-first"
- page-position="first"/>
+ <xsl:if test="$force.blank.pages != 0">
+ <fo:conditional-page-master-reference master-reference="index-first"
+ page-position="first"/>
+ </xsl:if>
<fo:conditional-page-master-reference master-reference="index-odd"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
@@ -2244,8 +2263,10 @@
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="blank-draft"
blank-or-not-blank="blank"/>
- <fo:conditional-page-master-reference master-reference="titlepage-first-draft"
- page-position="first"/>
+ <xsl:if test="$force.blank.pages != 0">
+ <fo:conditional-page-master-reference master-reference="titlepage-first-draft"
+ page-position="first"/>
+ </xsl:if>
<fo:conditional-page-master-reference master-reference="titlepage-odd-draft"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
@@ -2265,8 +2286,10 @@
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="blank-draft"
blank-or-not-blank="blank"/>
- <fo:conditional-page-master-reference master-reference="lot-first-draft"
- page-position="first"/>
+ <xsl:if test="$force.blank.pages != 0">
+ <fo:conditional-page-master-reference master-reference="lot-first-draft"
+ page-position="first"/>
+ </xsl:if>
<fo:conditional-page-master-reference master-reference="lot-odd-draft"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
@@ -2286,8 +2309,10 @@
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="blank-draft"
blank-or-not-blank="blank"/>
- <fo:conditional-page-master-reference master-reference="front-first-draft"
- page-position="first"/>
+ <xsl:if test="$force.blank.pages != 0">
+ <fo:conditional-page-master-reference master-reference="front-first-draft"
+ page-position="first"/>
+ </xsl:if>
<fo:conditional-page-master-reference master-reference="front-odd-draft"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
@@ -2307,8 +2332,10 @@
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="blank-draft"
blank-or-not-blank="blank"/>
- <fo:conditional-page-master-reference master-reference="body-first-draft"
- page-position="first"/>
+ <xsl:if test="$force.blank.pages != 0">
+ <fo:conditional-page-master-reference master-reference="body-first-draft"
+ page-position="first"/>
+ </xsl:if>
<fo:conditional-page-master-reference master-reference="body-odd-draft"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
@@ -2328,8 +2355,10 @@
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="blank-draft"
blank-or-not-blank="blank"/>
- <fo:conditional-page-master-reference master-reference="back-first-draft"
- page-position="first"/>
+ <xsl:if test="$force.blank.pages != 0">
+ <fo:conditional-page-master-reference master-reference="back-first-draft"
+ page-position="first"/>
+ </xsl:if>
<fo:conditional-page-master-reference master-reference="back-odd-draft"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
@@ -2349,8 +2378,10 @@
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="blank-draft"
blank-or-not-blank="blank"/>
- <fo:conditional-page-master-reference master-reference="index-first-draft"
- page-position="first"/>
+ <xsl:if test="$force.blank.pages != 0">
+ <fo:conditional-page-master-reference master-reference="index-first-draft"
+ page-position="first"/>
+ </xsl:if>
<fo:conditional-page-master-reference master-reference="index-odd-draft"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
@@ -3258,6 +3289,12 @@
<xsl:param name="element" select="local-name(.)"/>
<xsl:param name="master-reference" select="''"/>
+ <xsl:variable name="first">
+ <xsl:choose>
+ <xsl:when test="$force.blank.pages = 0">auto</xsl:when>
+ <xsl:otherwise>auto-odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<!-- Select the first content that the stylesheet places
after the TOC -->
<xsl:variable name="first.book.content"
@@ -3276,11 +3313,11 @@
<!-- double-sided output -->
<xsl:when test="$double.sided != 0">
<xsl:choose>
- <xsl:when test="$element = 'toc'">auto-odd</xsl:when>
- <xsl:when test="$element = 'book'">1</xsl:when>
+ <xsl:when test="$element = 'toc'"><xsl:value-of select="$first"/></xsl:when>
+ <xsl:when test="$element = 'book'"><xsl:value-of select="$first"/></xsl:when>
<!-- preface typically continues TOC roman numerals -->
- <!-- Change page.number.format if not -->
- <xsl:when test="$element = 'preface'">auto-odd</xsl:when>
+ <!-- If changed to 1 here, then change page.number.format too -->
+ <xsl:when test="$element = 'preface'"><xsl:value-of select="$first"/></xsl:when>
<xsl:when test="($element = 'dedication' or $element = 'article')
and not(preceding::chapter
or preceding::preface
@@ -3291,7 +3328,7 @@
or parent::reference)">1</xsl:when>
<xsl:when test="generate-id($first.book.content) =
generate-id(.)">1</xsl:when>
- <xsl:otherwise>auto-odd</xsl:otherwise>
+ <xsl:otherwise><xsl:value-of select="$first"/></xsl:otherwise>
</xsl:choose>
</xsl:when>
@@ -3299,7 +3336,7 @@
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$element = 'toc'">auto</xsl:when>
- <xsl:when test="$element = 'book'">1</xsl:when>
+ <xsl:when test="$element = 'book'">auto</xsl:when>
<xsl:when test="$element = 'preface'">auto</xsl:when>
<xsl:when test="($element = 'dedication' or $element = 'article') and
not(preceding::chapter
@@ -3322,6 +3359,8 @@
<xsl:param name="master-reference" select="''"/>
<xsl:choose>
+ <!-- no automatic even blank pages at end of chapters -->
+ <xsl:when test="$force.blank.pages = 0">no-force</xsl:when>
<!-- double-sided output -->
<xsl:when test="$double.sided != 0">end-on-even</xsl:when>
<!-- single-sided output -->
@@ -3349,7 +3388,7 @@
</xsl:variable>
<xsl:choose>
- <xsl:when test="$fop.extensions != 0 or $passivetex.extensions != 0">
+ <xsl:when test="$fop.extensions != 0">
<!-- body.start.indent does not work well with these processors -->
</xsl:when>
<xsl:when test="starts-with($pageclass, 'body') or