Changeset 6f090ad


Ignore:
Timestamp:
10/18/2023 09:54:57 PM (7 months ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
12.1, 12.1-rc1, multilib, trunk, xry111/arm64, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.1, xry111/mips64el, xry111/update-glibc
Children:
7f36b16, cbe26ed
Parents:
2c3487d
Message:

pdf book: fix page numbering in part III

By default page numbering in <preface> is in roman numeral. This
is ok for the book preface, but not for the part III preface.
So copy the page.number.format template from docbook stylesheets
to stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl, and modify it.

Reported by: Vladimir Pertsev on lfs-dev list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl

    r2c3487d r6f090ad  
    242242  </xsl:template>
    243243
     244  <!-- page.number.format
     245       We want roman numerals only in book's preface, not parts prefaces
     246       (if any). The original template is in {docbook-xsl}/fo/pagesetup.xsl -->
     247  <xsl:template name="page.number.format">
     248    <xsl:param name="element" select="local-name(.)"/>
     249    <xsl:param name="master-reference" select="''"/>
     250
     251    <xsl:choose>
     252      <xsl:when test="$element = 'toc' and self::book">i</xsl:when>
     253      <xsl:when test="$element = 'set'">i</xsl:when>
     254      <xsl:when test="$element = 'book'">i</xsl:when>
     255      <xsl:when test="$element = 'preface' and not(ancestor::part)">i</xsl:when>
     256      <xsl:when test="$element = 'dedication'">i</xsl:when>
     257      <xsl:when test="$element = 'acknowledgements'">i</xsl:when>
     258      <xsl:otherwise>1</xsl:otherwise>
     259    </xsl:choose>
     260  </xsl:template>
     261
    244262</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.