Re: [docbook-apps] Removing blank space in chapter TOC

From
Bob Stayton <>
Date
2011-10-22T20:35:21+00:00
ID
011701cc90fa$1afaf5a0$6600a8c0@pazu
Thread
Re: [docbook-apps] Removing blank space in chapter TOC


  X-NONE
  X-NONE
  
   
   
   
   
   
   
   
   
   
   
   
  
  MicrosoftInternetExplorer4
  
   
   
   
   
   
   
   
   
   
   
   
  

Hi Dave,

The template with match="d:chapter" in 
fo/comonent.xsl calls the template named 'component.toc', which resides in 
fo/autotoc.xsl. In the component.toc template, the main fo:block has 
xsl:use-attribute-sets="toc.margin.properties".  That attribute-set is in 
fo/param.xsl and includes space-before properties.

 

I see that you also include a toc title, so the 
component.toc template also calls the template named 
'table.of.contents.titlepage'. That template is part of the titlepage spec 
system based on processing the titlepage.templates.xml specification file into a 
customized titlepage module titlepage.templates.xsl.  If you look in 
titlepage.templates.xml,  you will find:

 

  <t:titlepage 
t:element="table.of.contents" ...>

 

Even though 'table.of.contents' is not an element, 
is it treated as a fake element in the titlepage system.  In that 
specification, the <title> element has 
space-before properties. That would be a second source of space above your 
toc.

 

Bob Stayton
Sagehill Enterprises


 

 

  
----- Original Message ----- 

  
From: 
  redlettucemail 

  
To:  
  

  
Sent: Friday, October 21, 2011 7:13 
  PM

  
Subject: [docbook-apps] Removing blank 
  space in chapter TOC

  

  

  
I am generating chapter tocs with a two-column layout, 
  and the toc generates with a space before the toc title (attached screenshot). 
  I have tried to modify both <xsl:template match= 
  "d:preface|d:chapter|d:appendix|d:article"
    
  mode="toc" > and <xsl:template 
  name="division.toc"> 
  by applying margin-top to the relevant blocks (e.g. <fo:block id = "toc.{$cid}.{$id}"> 
  ), and even trying to use fo:inline instead of fo:block (based on the 
  assumption that fo:block generates a one-line space). I thought the fo:block 
  that contains the toc is somehow adding something like a ‘space-before’ 
  property (or to that effect) before the first content (which is the title). 
  I’ve experimented by applying negative margin-top and padding-top attributes 
  to no avail. I’d like some guidance please on what I need to modify.

  
 

  
Thanks,
Dave Gardiner

  

  

  

---------------------------------------------------------------------
To 
  unsubscribe, e-mail: 
For 
  additional commands, e-mail: