Next in thread → Next in month →

Re: [docbook-apps] how to increase indenting on lists?

From
Bob Stayton <>
Date
2013-09-19T18:23:49+00:00
ID
128458A7A010495183EA2349E4777CE0@totoro
Thread
Re: [docbook-apps] how to increase indenting on lists?
You could try this:

 

<xsl:attribute-set 
name="list.block.properties">
  <xsl:attribute 
name="margin-left">
    
<xsl:choose>
      <xsl:when 
test="count(ancestor::listitem)">inherit</xsl:when>
      
<xsl:otherwise>1in</xsl:otherwise>
    
</xsl:choose>
  
</xsl:attribute>
</xsl:attribute-set>

It uses "margin-left", which is a relative indent, instead of 
start-indent, which is absolute.  It also refrains from adding the margin 
when the list is nested inside another listitem.

 

Bob Stayton
Sagehill Enterprises


From: Robert Nagle 

Sent: Thursday, September 19, 2013 4:23 AM

To: apps docbook 

Subject: [docbook-apps] how to increase indenting on 
lists?

I am trying to increase the amount of indent on my itemizedlists 
and orderedlists for my print output. Lists on my PDF show up at the same indent 
as my paragraphs. This looks particularly bad on my itemizedlists. 

I had 
some ideas about how to accomplish this using attributesets, but I'm beginning 
to suspect that I actually don't have a clue. 

Here is what I tried 
without success: 

 <xsl:attribute-set 
name="list.block.properties">
<xsl:attribute 
name="start-indent">5em</xsl:attribute>
 </xsl:attribute-set>

I 
have also tried: 

<xsl:attribute-set name="itemizedlist.properties" 
use-attribute-sets="list.block.properties">
<xsl:attribute 
name="start-indent">5em</xsl:attribute>
</xsl:attribute-set>

As 
a shot in the dark, I tried to do a template match: 

<xsl:template 
match="d:itemizedlist">
  <fo:list-block start-indent="5em" 
>
            

            
<xsl:apply-templates/>
        
</fo:list-block>
    </xsl:template>

But 
that gave me error messages 
(validate 
    [error] Element 
'fo:wrapper' cannot be a child of 'fo:list-block'. Only 'list-item', 'marker' 
and change bar elements are permitted in this context.
    
[validation total: 1 error]

    I'm not sure how to 
interpret this error message....other than "You don't know how to do 
it".

    I also tried: 

        <xsl:template 
match="d:listitem/para">
    <fo:block 
start-indent="5em" 
>
                
<xsl:apply-templates/>
    
</fo:block>
    
</xsl:template>

    No validation message, but the 
output looked exactly the same. 

    Can anyone help? 
Thanks. 

-- 
Robert Nagle
6121 Winsome Ln #56C, 
Houston TX 77057-5581
(H) 713 893 3424/ (W) 832-251-7522 Carbon Neutral Since 
Jan 2010
http://www.robertnagle.info
Next in thread → Next in month →