<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<fo:page-sequence id="{$id}"
hyphenate="{$hyphenate}"
- format="i"
master-reference="{$master-reference}">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
- </xsl:if>
-
- <!-- if there is a preceding component or we're in a part, the -->
- <!-- page numbering will already be adjusted -->
- <xsl:if test="not(preceding::chapter
- or preceding::preface
- or preceding::appendix
- or preceding::article
- or preceding::dedication
- or parent::part
- or parent::reference)">
- <xsl:attribute name="initial-page-number">1</xsl:attribute>
- </xsl:if>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="not(preceding::chapter
+ or preceding::preface
+ or preceding::appendix
+ or preceding::article
+ or preceding::dedication
+ or parent::part
+ or parent::reference)">
+ <!-- if there is a preceding component or we're in a part, the -->
+ <!-- page numbering will already be adjusted -->
+ <xsl:attribute name="initial-page-number">1</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:with-param name="master-reference" select="$master-reference"/>
<fo:page-sequence id="{$id}"
hyphenate="{$hyphenate}"
- format="i"
master-reference="{$master-reference}">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
- </xsl:if>
-
- <!-- if there is a preceding component or we're in a part, the -->
- <!-- page numbering will already be adjusted -->
- <xsl:if test="not(preceding::chapter
- or preceding::preface
- or preceding::appendix
- or preceding::article
- or preceding::dedication
- or parent::part
- or parent::reference)">
- <xsl:attribute name="initial-page-number">1</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<fo:page-sequence id="{$id}"
hyphenate="{$hyphenate}"
- format="i"
master-reference="{$master-reference}">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
- </xsl:if>
-
- <!-- if there is a preceding component or we're in a part, the -->
- <!-- page numbering will already be adjusted -->
- <xsl:if test="not(preceding::chapter
- or preceding::preface
- or preceding::appendix
- or preceding::article
- or preceding::dedication
- or parent::part
- or parent::reference)">
- <xsl:attribute name="initial-page-number">1</xsl:attribute>
- </xsl:if>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="not(preceding::chapter
+ or preceding::preface
+ or preceding::appendix
+ or preceding::article
+ or preceding::dedication
+ or parent::part
+ or parent::reference)">
+ <!-- if there is a preceding component or we're in a part, the -->
+ <!-- page numbering will already be adjusted -->
+ <xsl:attribute name="initial-page-number">1</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:with-param name="master-reference" select="$master-reference"/>
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
- </xsl:if>
-
- <!-- if there is a preceding component or we're in a part, the -->
- <!-- page numbering will already be adjusted -->
- <xsl:if test="not(preceding::chapter
- or preceding::preface
- or preceding::appendix
- or preceding::article
- or preceding::dedication
- or parent::part
- or parent::reference)">
- <xsl:attribute name="initial-page-number">1</xsl:attribute>
- </xsl:if>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="not(preceding::chapter
+ or preceding::preface
+ or preceding::appendix
+ or preceding::article
+ or preceding::dedication
+ or parent::part
+ or parent::reference)">
+ <!-- if there is a preceding component or we're in a part, the -->
+ <!-- page numbering will already be adjusted -->
+ <xsl:attribute name="initial-page-number">1</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:with-param name="master-reference" select="$master-reference"/>
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
- </xsl:if>
-
- <!-- if there is a preceding component or we're in a part, the -->
- <!-- page numbering will already be adjusted -->
- <xsl:if test="not(preceding::chapter
- or preceding::preface
- or preceding::appendix
- or preceding::article
- or preceding::dedication
- or parent::part
- or parent::reference)">
- <xsl:attribute name="initial-page-number">1</xsl:attribute>
- </xsl:if>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="not(preceding::chapter
+ or preceding::preface
+ or preceding::appendix
+ or preceding::article
+ or preceding::dedication
+ or parent::part
+ or parent::reference)">
+ <!-- if there is a preceding component or we're in a part, the -->
+ <!-- page numbering will already be adjusted -->
+ <xsl:attribute name="initial-page-number">1</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:with-param name="master-reference" select="$master-reference"/>
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
- </xsl:if>
-
- <!-- if there is a preceding component or we're in a part, the -->
- <!-- page numbering will already be adjusted -->
- <xsl:if test="not(preceding::chapter
- or preceding::preface
- or preceding::appendix
- or preceding::article
- or preceding::dedication
- or parent::part
- or parent::reference)">
- <xsl:attribute name="initial-page-number">1</xsl:attribute>
- </xsl:if>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="not(preceding::chapter
+ or preceding::preface
+ or preceding::appendix
+ or preceding::article
+ or preceding::dedication
+ or parent::part
+ or parent::reference)">
+ <!-- if there is a preceding component or we're in a part, the -->
+ <!-- page numbering will already be adjusted -->
+ <xsl:attribute name="initial-page-number">1</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:with-param name="master-reference" select="$master-reference"/>
<fo:page-sequence id="{$id}"
hyphenate="{$hyphenate}"
master-reference="{$titlepage-master-reference}">
-
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format">
+ <xsl:with-param name="element" select="'toc'"/>
+ </xsl:call-template>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format">
+ <xsl:with-param name="element" select="'toc'"/>
+ </xsl:call-template>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format">
+ <xsl:with-param name="element" select="'toc'"/>
+ </xsl:call-template>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format">
+ <xsl:with-param name="element" select="'toc'"/>
+ </xsl:call-template>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format">
+ <xsl:with-param name="element" select="'toc'"/>
+ </xsl:call-template>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
-
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format">
+ <xsl:with-param name="element" select="'toc'"/>
+ </xsl:call-template>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
- <!-- if there is a preceding chapter or part, page numbering will already -->
- <!-- be adjusted, otherwise restart the page numbers -->
- <xsl:if test="not(preceding::chapter or preceding::preface)
- and not(preceding::part)">
- <xsl:attribute name="initial-page-number">1</xsl:attribute>
- </xsl:if>
-
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
- </xsl:if>
+ <xsl:choose>
+ <xsl:when test="not(preceding::chapter or preceding::preface)
+ and not(preceding::part)">
+ <!-- if there is a preceding chapter or part, page numbering will already -->
+ <!-- be adjusted, otherwise restart the page numbers -->
+ <xsl:attribute name="initial-page-number">1</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:with-param name="master-reference" select="$titlepage-master-reference"/>
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format"/>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format">
+ <xsl:with-param name="element" select="'toc'"/>
+ </xsl:call-template>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">
<xsl:attribute name="language">
<xsl:call-template name="l10n.language"/>
</xsl:attribute>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format">
+ <xsl:with-param name="element" select="'toc'"/>
+ </xsl:call-template>
+ </xsl:attribute>
<xsl:if test="$double.sided != 0">
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="running.head.mode">