[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Strange behaviour for nested, ordered lists?
----- Original Message ----- From: "Steve Whitlatch" <swhitlat@getnet.net> To: <docbook-apps@lists.oasis-open.org>; "Derek Hohls" <DHohls@csir.co.za> Sent: Friday, January 30, 2004 6:36 PM Subject: [docbook-apps] Strange behaviour for nested, ordered lists? [stuff deleted] > Anyone know how to cause lists to be indented from the column margin? > > That would be: > > text . . . > text . . . > text . . . > text . . . > text . . . > text . . . > listitem_text . . . > listitem_text . . . > nested_list_item_text . . . > nested_list_item_text . . . > nested_list_item_text . . . > listitem_text . . . . > listitem_text . . . . > text . . . . > text . . . . A customization such as the following would do it. It creates a wrapper fo:block with a margin-left property, and then uses apply-imports to use the regular templates for formatting the list inside the block. The test for an ancestor list is done to avoid applying the indent to nested lists, which are already indented by the containing list. Otherwise they would get both indents. <xsl:template match="orderedlist|itemizedlist"> <xsl:choose> <xsl:when test="not(ancestor::itemizedlist or ancestor::orderedlist)"> <fo:block margin-left="0.25in"> <xsl:apply-imports/> </fo:block> </xsl:when> <xsl:otherwise> <xsl:apply-imports/> </xsl:otherwise> </xsl:choose> </xsl:template> Bob Stayton Sagehill Enterprises bobs@sagehill.net
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]