<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
<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
<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
<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
<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
<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
<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
<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
<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
<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
<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
<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
<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"
<!-- double-sided output -->
<xsl:when test="$double.sided != 0">
<xsl:choose>
- <xsl:when test="$element = 'toc'">auto-odd</xsl:when>
+ <xsl:when test="$element = 'toc'"><xsl:value-of select="$first"/></xsl:when>
<xsl:when test="$element = 'book'">1</xsl:when>
<!-- preface typically continues TOC roman numerals -->
<!-- Change page.number.format if not -->
- <xsl:when test="$element = 'preface'">auto-odd</xsl:when>
+ <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
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>
<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 -->