docbook-apps message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: Re: [docbook-apps] page headers for <article><section>
- From: Ron Catterall <ron@catterall.net>
- To: "Bob Stayton" <bobs@sagehill.net>, docbook-apps@lists.oasis-open.org
- Date: Wed, 5 Sep 2007 09:08:31 -0500
Title: Re: [docbook-apps] page headers for
<article><section>
Hi Bob
Many thanks, that sorts out my present article problem, but it
now raises a further question about headers for book/chapter/section
with appendices.
<book>
<chapter>...
<section>...</section>
</chapter>
<appendix>
<section>...</section>
</appendix>
</book>
If I use:
<xsl:when test="$double.sided != 0
and $sequence = 'odd' and $position = 'center'">
<fo:retrieve-marker
retrieve-class-name="section.head.marker"
retrieve-position="first-including-carryover"
retrieve-boundary="page-sequence"/>
<xsl:apply-templates select="."
mode="title.markup"/>
</xsl:when>
for a book with sections in chapters and appendices, I get the
odd page header title as a concatenation of <title of chapter 1
section 1> and <title of chapter 1> OR
<title of section 1 in appendix A> and <title of appendix A>
with no separator between them (I can make these look presentable by
adding
     to the end of section
titles, but that's cheating)
If I use
<xsl:when test="$double.sided != 0
and $sequence = 'odd' and $position = 'center'">
<fo:retrieve-marker
retrieve-class-name="section.head.marker"
retrieve-position="first-including-carryover"
retrieve-boundary="page-sequence"/>
</xsl:when>
then I get the section title alone on the odd pages BUT I lose
the Appendix title and get a blank header on odd pages of an
appendix. For a section in an appendix I get the section title
alone on odd page headers.
It would be nice to get <book title> on even page headers,
with something like '<section title> in <chapter
title>' or '<section title> in <appendix title>' on odd
page headers. (If I put 'in' in place of the  's that
ruins the display of section titles of course.) Or possibly
better: '<chapter title> : <section title>'.
At the moment I can't see the need for sect2 level titles in
headers, but you never know!
I've attached my test files and pdf output for the book case.
All help much appreciated.
Ron
Hi Ron,
The problem seems to be the last line of this:
<fo:retrieve-marker
retrieve-class-name="section.head.marker"
retrieve-position="first-including-carryover"
retrieve-boundary="page-sequence"/>
<xsl:apply-templates select="."
mode="title.markup"/>
The header.content template is processed in the context of the element
generating the page sequence. In this case, the article is the
context element. So select="." means selecting the
article and generating its title. If you delete that line, then
the retrieve-marker is left to produce the section title.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
--
Ron Catterall, Phd, DSc
email: ron@catterall.net
Prolongacion de Hidalgo 140
http://catterall.net/
San Felipe del Agua
tel:
+52 951 520 1821
Oaxaca 68020
Mexico
fax:
+1 530 348 8309
testbook.xml
testbook.xsl
testbook.pdf
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]