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:iftest="$nodes">
<fo:blockid="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:
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
[email protected] <mailto:[email protected]>

    ----- Original Message -----
    *From:* redlettucemail <mailto:[email protected]>
    *To:* [email protected]
    <mailto:[email protected]>
    *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:templatematch="d:preface|d:chapter|d:appendix|d:article"
    mode="toc"> and <xsl:templatename="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: [email protected]
    For additional commands, e-mail:
    [email protected]



Reply via email to