better list nesting

This commit is contained in:
skyanth 2018-09-13 11:54:43 +02:00
parent f5483e57b0
commit 119e4f301c
2 changed files with 4 additions and 5 deletions

View File

@ -49,6 +49,7 @@
<xsl:template name="calculate_indent"> <xsl:template name="calculate_indent">
<xsl:attribute name="start-indent"> <xsl:attribute name="start-indent">
<xsl:variable name="base-indent">0.2</xsl:variable>
<xsl:variable name="ancestors"> <xsl:variable name="ancestors">
<xsl:choose> <xsl:choose>
<xsl:when test="count(ancestor::ol) or count(ancestor::ul)"> <xsl:when test="count(ancestor::ol) or count(ancestor::ul)">
@ -56,11 +57,11 @@
select=" select="
(count(ancestor::ol) + (count(ancestor::ol) +
count(ancestor::ul)) * count(ancestor::ul)) *
0.75" 0.75 + $base-indent"
/> />
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:text>0.2</xsl:text> <xsl:value-of select="$base-indent"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>

View File

@ -378,12 +378,10 @@
<xsl:attribute-set name="list"> <xsl:attribute-set name="list">
<xsl:attribute name="provisional-distance-between-starts">0.7cm</xsl:attribute> <xsl:attribute name="provisional-distance-between-starts">0.7cm</xsl:attribute>
<xsl:attribute name="provisional-label-separation">2mm</xsl:attribute> <xsl:attribute name="provisional-label-separation">2mm</xsl:attribute>
<xsl:attribute name="start-indent">2mm</xsl:attribute>
</xsl:attribute-set> </xsl:attribute-set>
<xsl:attribute-set name="li"> <xsl:attribute-set name="li">
<xsl:attribute name="line-height">5.5mm</xsl:attribute> <xsl:attribute name="line-height">6.5mm</xsl:attribute>
<xsl:attribute name="keep-together.within-page">always</xsl:attribute> <xsl:attribute name="keep-together.within-page">always</xsl:attribute>
<xsl:attribute name="margin-bottom" select="$small-space"/>
</xsl:attribute-set> </xsl:attribute-set>
<!-- ToC --> <!-- ToC -->