?
=?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=
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
age-number-citation
ref-id="first-sheet{@figureno}" line-height="0" /> OF
<xsl:variable
name="figure_first_page_var"><fo
age-number-citation
ref-id="first-sheet{@figureno}"/></xsl:variable>
<xsl:variable
name="figure_last_page_var"><fo
age-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
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
ref-id="first-sheet{@figureno}" line-height="0" /> OF
<xsl:variable
name="figure_first_page_var"><fo
ref-id="first-sheet{@figureno}"/></xsl:variable>
<xsl:variable
name="figure_last_page_var"><fo
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