Next in thread → Next in month →

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

From
Xmplar <>
Date
2011-10-23T02:55:09+00:00
ID
Thread
Re: [docbook-apps] Removing blank space in chapter TOC
X-NONE
  X-NONE
  
   
   
   
   
   
   
   
   
   
   
   
  
  MicrosoftInternetExplorer4
  
   
   
   
   
   
   
   
   
   
   
   
  

    
    
Bob, 

    
Thanks so much for helping to follow the toc
      processing logic
      between stylesheets. I eventually solved the problem by looking at
      the fo:
      output and tracing back where a particular fo:block places the toc
      id number.
      It is in template ‘component.toc’, so I specified space-before…
      attributes:

    
…

    
<xsl:if test="$nodes">

              <fo:block id="toc...{$id}"

             
        space-before.minimum="0pt"

             
        space-before.optimum="0pt"

             
        space-before.maximum="0pt"

              xsl:use-attribute-sets="toc.margin.properties">

    
…

    Dave

    

    On 23-10-11 7:35 AM, Bob Stayton wrote:
    
      
  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:
        
Next in thread → Next in month →