[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Titles in
Here you go. The first template fills in a
placeholder template in the stylesheet that is called at the start of the part
titlepage before any other content. It adds a marker for the part
title.
<xsl:template
name="part.titlepage.before.recto">
<fo:marker marker-class-name="part.head.marker"> <xsl:apply-templates select="d:title|d:info/d:title" mode="titlepage.mode"/> </fo:marker> </xsl:template> The second template is a customization of the
'header.content' template that is used to specify the content of the running
headers. It is documented in:
In this customization, I just changed the reference
in @retrieve-class-name from "section.head.marker" to "part.head.marker" to
refer to the new marker, and changed the @retrieve-boundary property to
"document".
<xsl:template
name="header.content">
<xsl:param name="pageclass" select="''"/> <xsl:param name="sequence" select="''"/> <xsl:param name="position" select="''"/> <xsl:param name="gentext-key" select="''"/> <!--
<fo:block> <xsl:value-of select="$pageclass"/> <xsl:text>, </xsl:text> <xsl:value-of select="$sequence"/> <xsl:text>, </xsl:text> <xsl:value-of select="$position"/> <xsl:text>, </xsl:text> <xsl:value-of select="$gentext-key"/> </fo:block> --> <fo:block>
<!-- sequence can be odd,
even, first, blank -->
<!-- position can be left, center, right --> <xsl:choose> <xsl:when test="$sequence = 'blank'"> <!-- nothing --> </xsl:when> <xsl:when
test="$position='left'">
<!-- Same for odd, even, empty, and blank sequences --> <xsl:call-template name="draft.text"/> </xsl:when> <xsl:when
test="($sequence='odd' or $sequence='even') and
$position='center'">
<xsl:if test="$pageclass != 'titlepage'"> <xsl:choose> <xsl:when test="ancestor::book and ($double.sided != 0)"> <fo:retrieve-marker retrieve-class-name="part.head.marker" retrieve-position="first-including-carryover" retrieve-boundary="document"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="." mode="titleabbrev.markup"/> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:when> <xsl:when
test="$position='center'">
<!-- nothing for empty and blank sequences --> </xsl:when> <xsl:when
test="$position='right'">
<!-- Same for odd, even, empty, and blank sequences --> <xsl:call-template name="draft.text"/> </xsl:when> <xsl:when
test="$sequence = 'first'">
<!-- nothing for first pages --> </xsl:when> <xsl:when
test="$sequence = 'blank'">
<!-- nothing for blank pages --> </xsl:when> </xsl:choose> </fo:block> </xsl:template> </xsl:stylesheet>
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]