Skip to content

Commit

Permalink
fix bug #145 to support @Numeration on orderedlist
Browse files Browse the repository at this point in the history
  • Loading branch information
bobstayton committed Oct 5, 2019
1 parent 37b0db3 commit 90bc2be
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions xsl/manpages/lists.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,18 @@
</xsl:template>

<xsl:template match="d:orderedlist/d:listitem|d:procedure/d:step">


<xsl:variable name="format">
<xsl:choose>
<xsl:when test="parent::d:orderedlist/@numeration != ''">
<xsl:value-of select="concat(parent::d:orderedlist/@numeration, '.')"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>1.</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:text>&#10;</xsl:text>
<xsl:text>.sp</xsl:text>
<xsl:text>&#10;</xsl:text>
Expand Down Expand Up @@ -226,7 +238,7 @@
<xsl:if test="count(preceding-sibling::d:listitem) &lt; 9">
<xsl:text> </xsl:text>
</xsl:if>
<xsl:number format="1."/>
<xsl:number format="{$format}"/>>
<xsl:text>\h'+</xsl:text>
<xsl:choose>
<xsl:when test="not($list-indent = '')">
Expand All @@ -249,7 +261,7 @@
<xsl:if test="count(preceding-sibling::d:listitem) &lt; 9">
<xsl:text> </xsl:text>
</xsl:if>
<xsl:number format="1."/>
<xsl:number format="{$format}"/>>
<xsl:text>" 4.2&#10;</xsl:text>
<!-- * The value 4.2 is the amount of indentation; we use 4.2 instead -->
<!-- * of 4 because when the font family is Bookman it seems to require -->
Expand Down

0 comments on commit 90bc2be

Please sign in to comment.