OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Setting book toc.indent.width for sect1


In a book toc, I need to set the first-level sections listed under each chapter against the left margin of the toc.

The screenshot showing the sections listed under Chapter 2 is what I’m trying to achieve with a customization of toc.indent.width (I think that’s what I need anyway).

I used a single toc.indent.width value (29pt), and in the FO I changed the margin-left for the fo:block that has a chapter id number, to give it a negative value for toc.indent.width. The fo code is:

<fo:block id="toc.d0e1.chap2" margin-left="-29pt">
<fo:basic-link
internal-destination="sec2.1">
<fo:list-block

                provisional-label-separation="1mm" provisional-distance-between-starts="10mm" >
               
<fo:list-item>
                 
<fo:list-item-label end-indent="label-end()">
                   
<fo:block

Setting the value of -29pt once for each chapter will set the left margin correctly for all section entries listed in each chapter.

But how do I apply that margin-left value in the stylesheets? I tried modifying the relevant code in the  template <xsl:template match="d:book|d:setindex" mode="toc">.

The fo:block in that template seems obvious, but that oddly didn’t apply the left-margin to the FO:

<fo:block id="toc.{$cid}.{$id}" margin-left=”-29pt”>
       
<xsl:attribute name="margin-{$direction.align.start}">
         
<xsl:call-template name="set.toc.indent"/>
       
</xsl:attribute>

Thanks in advance!

--
Dave Gardiner



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]