no more large whitespace after ol in recommendation table

This commit is contained in:
skyanth
2017-10-24 14:12:04 +02:00
parent d66215b978
commit 6ff14656e3

View File

@@ -72,36 +72,48 @@
<fo:list-block provisional-distance-between-starts="0.85cm" <fo:list-block provisional-distance-between-starts="0.85cm"
provisional-label-separation="2.5mm"> provisional-label-separation="2.5mm">
<xsl:call-template name="checkIfLast"/> <xsl:call-template name="checkIfLast"/>
<xsl:attribute name="space-after"> <xsl:call-template name="do_ol"/>
</fo:list-block>
</xsl:template>
<xsl:template match="ol" mode="summarytable">
<fo:list-block provisional-distance-between-starts="0.85cm"
provisional-label-separation="2.5mm">
<xsl:call-template name="do_ol"/>
</fo:list-block>
</xsl:template>
<xsl:template name="do_ol">
<xsl:attribute name="space-after">
<xsl:choose>
<xsl:when test="ancestor::ul or ancestor::ol">
<xsl:text>0pt</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>12pt</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="start-indent">
<xsl:variable name="ancestors">
<xsl:choose> <xsl:choose>
<xsl:when test="ancestor::ul or ancestor::ol"> <xsl:when test="count(ancestor::ol) or count(ancestor::ul)">
<xsl:text>0pt</xsl:text> <xsl:value-of
</xsl:when> select="
<xsl:otherwise> 1 +
<xsl:text>12pt</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="start-indent">
<xsl:variable name="ancestors">
<xsl:choose>
<xsl:when test="count(ancestor::ol) or count(ancestor::ul)">
<xsl:value-of
select="1 +
(count(ancestor::ol) + (count(ancestor::ol) +
count(ancestor::ul)) * count(ancestor::ul)) *
1.25" 1.25"
/> />
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:text>1</xsl:text> <xsl:text>1</xsl:text>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
<xsl:value-of select="concat($ancestors, 'cm')"/> <xsl:value-of select="concat($ancestors, 'cm')"/>
</xsl:attribute> </xsl:attribute>
<xsl:apply-templates select="*"/> <xsl:apply-templates select="*"/>
</fo:list-block>
</xsl:template> </xsl:template>
<xsl:template match="ol/li"> <xsl:template match="ol/li">