This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

xsl: page numbers in the toc


Hi,

I am using docbook-xsl stylesheets, v1.48, saxon and fop to render docbook
files to pdf.

I wish for each <section> to start on a new page, so I have put the following
template in my custom stylesheet (copying from section.xsl and modifying with
the break-before="page" attribute):

  <xsl:template match="section">
    <xsl:variable name="id">
      <xsl:call-template name="object.id"/>
    </xsl:variable>
  
    <fo:block break-before="page" id="{$id}">
      <xsl:call-template name="section.titlepage"/>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
   
Apparently this fools the page number calculating in the toc generation,
as now those numbers are drastically off [too small].

I'd appreciate any pointers on getting the toc to show the correct page
numbers.  This might be either by adjusting the method used to calculate
the page numbers, or by using a different method to force sections to
start on a new page; I don't know.

Thanks,
-Colin.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]