Skip to content

Commit

Permalink
Merge pull request #292 from metanorma/feature/xslt-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jun 24, 2024
2 parents b54545b + ba0548e commit a2e5049
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/isodoc/cc/cc.standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -7342,6 +7342,8 @@
</xsl:choose>
</xsl:variable>

<xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::*[local-name() = 'figure']/preceding-sibling::*[1][local-name() = 'title'] and 1 = 1)"/>

<xsl:choose>
<xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
<fo:block>
Expand Down Expand Up @@ -7488,7 +7490,14 @@
<xsl:variable name="scale_y">
<xsl:choose>
<xsl:when test="$svg_height * $scale_x &gt; $height_effective_px">
<xsl:value-of select="$height_effective_px div ($svg_height * $scale_x)"/>
<xsl:variable name="height_effective_px_">
<xsl:choose>
<!-- title is 'keep-with-next' with following figure -->
<xsl:when test="$isPrecedingTitle = 'true'"><xsl:value-of select="$height_effective_px - 80"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$height_effective_px"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="$height_effective_px_ div ($svg_height * $scale_x)"/>
</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
Expand Down

0 comments on commit a2e5049

Please sign in to comment.