Page 1 of 1

Different Numbering for Equation-Figures and Figures

Posted: Mon Apr 24, 2017 7:25 pm
by dgallo
We have added styles to make <equation-figure> numbers appear as EQ. instead of Figure. So now they are different in the output.

By default, Oxygen is assigning sequential numbering to both equation-figures and figures.

For example, if there is an <equation-figure>, then a figure, and then another <equation-figure> in a topic, they are numbers as follows:

<equation-figure> = EQ. 1
<figure> = Figure 2
<equation-figure> = EQ. 3

Is there a way to make Oxygen assign different sets of numbers to <equation-figure> and <figure>? So it would appear as:
<equation-figure> = EQ. 1
<figure> = Figure 1
<equation-figure> = EQ. 2

Re: Different Numbering for Equation-Figures and Figures

Posted: Tue Apr 25, 2017 9:45 pm
by Radu

You will probably need extra XSLT customizations for this.
There should be an XSLT template which matches figure (and equation-figure) titles like:

Code: Select all

<xsl:template match="*[contains(@class,' topic/fig ')]/*[contains(@class,' topic/title ')]">

You can look at it and see that it uses an xsl:key to compute the current number of the figure. So you will probably need a separate xsl:key for counting the equation-figures.
The main problem is that equation-figure extends figure so you need to differentiate between these cases when computing the static text which appears before the title.