Automatic numbering in <equation-block/>
Posted: Tue Mar 30, 2021 9:25 am
I use:
oXygen XML Editor 22.1, build 2020100710
transformation scenario - DITA Map PDF - based on XSL-FO
customization directory - according to oXygen's instructions
I want to get an automatic numbering in <equation-block/> and right alignmet too, so I use the tempalate:
<xsl:template match="*[contains(@class, ' equation-d/equation-block ')]">
<fo:table text-align="right" border = "0pt" margin-top="5mm">
<fo:table-column column-width="87.5mm"/>
<fo:table-column column-width="87.5mm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border = "0pt" height="10.0mm">
<fo:block><xsl:apply-templates select="*[contains(@class,' topic/image ')]"/></fo:block>
</fo:table-cell>
<fo:table-cell border = "0pt">
<fo:block>
<xsl:text>(</xsl:text>
<xsl:value-of select="count(preceding::equation-block[not(descendant::equation-block)])+1" />
<xsl:text>)</xsl:text>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
It's working template, but I have lost working formulas references:
for example <xref href="#topicID/equation-blockID" format="dita">see formula</xref> - it's just blue text.
I want working formulas reference and an automatic numbering in <equation-block/>.
Moreover, I want the links to be displayed as formula numbers that appear in the text.
Thanks in advance!
oXygen XML Editor 22.1, build 2020100710
transformation scenario - DITA Map PDF - based on XSL-FO
customization directory - according to oXygen's instructions
I want to get an automatic numbering in <equation-block/> and right alignmet too, so I use the tempalate:
<xsl:template match="*[contains(@class, ' equation-d/equation-block ')]">
<fo:table text-align="right" border = "0pt" margin-top="5mm">
<fo:table-column column-width="87.5mm"/>
<fo:table-column column-width="87.5mm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border = "0pt" height="10.0mm">
<fo:block><xsl:apply-templates select="*[contains(@class,' topic/image ')]"/></fo:block>
</fo:table-cell>
<fo:table-cell border = "0pt">
<fo:block>
<xsl:text>(</xsl:text>
<xsl:value-of select="count(preceding::equation-block[not(descendant::equation-block)])+1" />
<xsl:text>)</xsl:text>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
It's working template, but I have lost working formulas references:
for example <xref href="#topicID/equation-blockID" format="dita">see formula</xref> - it's just blue text.
I want working formulas reference and an automatic numbering in <equation-block/>.
Moreover, I want the links to be displayed as formula numbers that appear in the text.
Thanks in advance!