docbook-apps

Re: [docbook-apps] generate-article-titlepage-on-separate-page

  • 1.  Re: [docbook-apps] generate-article-titlepage-on-separate-page

    Posted 10-04-2011 14:17
    Hi,
    I'm not quite clear which you are asking for, as the subject line says
    "titlepage-on-separate-page" and the body says TOC on its own page. I'm also not
    clear if you mean FO output and separate physical pages, or HTML output and separate
    chunk pages. In general, the more detail you put in requests, the easier they are to
    answer.

    In the case of FO output, you can do it with a couple of utility templates that the
    stylesheet provides. The first one creates a page break after the title page, and
    the second one creates a page break after the table of contents.

    <xsl:template name="article.titlepage.separator">
    <fo:block break-after="page"/>
    </xsl:template>

    <xsl:template name="component.toc.separator">
    <fo:block break-after="page"/>
    </xsl:template>

    An even simpler method uses the attribute-set named 'toc.margin.properties' as
    described here:

    http://www.sagehill.net/docbookxsl/PrintToc.html#PageMargins

    although its section title would probably not have led you there. These two
    attributes accomplish the same thing:

    <xsl:attribute-set name="toc.margin.properties">
    <xsl:attribute name="break-before">page</xsl:attribute>
    <xsl:attribute name="break-after">page</xsl:attribute>
    </xsl:attribute-set>

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net