Next / Previous / Contents / NM Tech homepage

13.3. Title page for an article

This t:titlepage element that specifies the title page layout for the DocBook article element.

t:element="article"

Specifies the DocBook element to which this format applies.

t:wrapper="fo:block"

The content of this title page will be wrapped in a FO block element.

font-family="{$title.fontset}"

Specifies a set of font attributes to be used to display the title. Defined in fo/pagesetup.xsl in the DocBook-XSL Stylesheets.

fo-titlepage.xml
<!--Specify the title font-->
<t:titlepage t:element="article" t:wrapper="fo:block"
             font-family="{$title.fontset}">

The t:titlepage-content element specifies what to put on the right-hand (recto) page, and also specifies centering for the titles.

fo-titlepage.xml
  <t:titlepage-content t:side="recto"
             text-align="center">

Next is the title element, which describes how to format the DocBook title element.

t:named-template="article.title"

This attribute tells the XSL processor to use the template named article.title to format the title. This is a local customization; see Section 11.2, “Templates for title elements”. The stock template calls the uncustomized article.title here.

param:node="ancestor-or-self::article[1]"

The created template will match the first (and typically the only) article element in the DocBook source.

keep-with-next="always"

This XSL-FO attribute specifies that there should be no page break after the title.

font-size="&hsize5;"

Set the title in the largest-size font.

font-weight="bold"

Set the title in boldface font.

fo-titlepage.xml
    <title t:named-template="article.title"
        param:node="ancestor-or-self::article[1]"
        keep-with-next="always"
        font-size="&hsize5;"
        font-weight="bold"/>

The remainder of this file is exactly as it looks in the stock fo/titlepage.templates.xml file.

fo-titlepage.xml
    <subtitle/>

    <corpauthor space-before="0.5em"
                font-size="&hsize2;"/>
    <authorgroup space-before="0.5em"
                 font-size="&hsize2;"/>
    <author space-before="0.5em"
            font-size="&hsize2;"/>

    <othercredit space-before="0.5em"/>
    <releaseinfo space-before="0.5em"/>
    <copyright space-before="0.5em"/>
    <legalnotice text-align="start"
                 margin-left="0.5in"
                 margin-right="0.5in"
                 font-family="{$body.fontset}"/>
    <pubdate space-before="0.5em"/>
    <revhistory space-before="0.5em"/>
    <revision space-before="0.5em"/>
    <abstract space-before="0.5em"
        text-align="start"
        margin-left="0.5in"
        margin-right="0.5in"
        font-family="{$body.fontset}"/>
  </t:titlepage-content>

  <t:titlepage-content t:side="verso">
  </t:titlepage-content>

  <t:titlepage-separator>
  </t:titlepage-separator>

  <t:titlepage-before t:side="recto">
  </t:titlepage-before>

  <t:titlepage-before t:side="verso">
  </t:titlepage-before>
</t:titlepage>