substracting two page number citations?

Joined
Feb 1, 2006
Messages
50
Reaction score
0
Hello all,

I need to generate (SHEET X of Y) in titles for figures contained in a section (I already generate page A of B at the bottom right of every page in the document).

Is there a way for example to substract 2 page number citations? That would solve part of my problem. Or is there any other way of doing this?

Here is an snippet of the XSLT I'm working with:

<fo:block start-indent="0pt">
<fo:table table-layout="fixed"
keep-together.within-page="always">
<fo:table-column column-width="proportional-column-width(1)"/>

<fo:table-body>
<fo:table-row>
<fo:table-cell border-color="black" border-style="solid" border-width="0.4pt" height="0.5in"> <fo:block keep-with-next="always" font-weight="bold"> <xsl:text>FIGURE </xsl:text><xsl:value-of select="@figureno" /> <xsl:text>: </xsl:text><xsl:apply-templates select="./Heading" mode="Bold-Inline"/> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell display-align="center" border-color="black" border-style="solid" border-width="0.4pt" height="8.0in"> <fo:block> <fo:block id="first-sheet{@figureno}" line-height="0"></fo:block> <xsl:apply-templates /> <xsl:if test="following::node!='GRAPHIC' or following::node!='Description'"> <fo:block id="last-sheet{@figureno}" line-height="0"></fo:block> </xsl:if> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell display-align="after" border-color="black" border-style="solid" border-width="0.4pt" height="0.45in"> <fo:block keep-with-next="always" font-weight="bold" text-align="center"> <xsl:text>FIGURE </xsl:text><xsl:value-of select="@figureno" /> <xsl:text>: </xsl:text><xsl:apply-templates select="./Heading" mode="Bold-Inline"/> </fo:block> <fo:block font-weight="bold" text-align="center"> <xsl:text>(SHEET </xsl:text><fo:page-number-citation ref-id="first-sheet{@figureno}" line-height="0" /> OF <xsl:variable name="figure_first_page_var"><fo:page-number-citation ref-id="first-sheet{@figureno}"/></xsl:variable> <xsl:variable name="figure_last_page_var"><fo:page-number-citation ref-id="last-sheet{@figureno}"/></xsl:variable> <xsl:variable name="last_sheet_var" select="$figure_last_page_var - $figure_first_page_var"/> <xsl:value-of select="$last_sheet_var"/> <xsl:text>)</xsl:text> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block>

Regards
Jean-Francois Michaud
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
548,050
Messages
3,104,249
Members
248,133
Latest member
DujonT

Latest Threads

Top