OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] suddenly, strange behaviour with "header.content" in PDF file

On Thu, May 29, 2003 at 10:57:48AM -0400, Robert P. J. Day wrote:
>   (i'm not sure this started immediately after i upgraded to 1.61.1
> stylesheets, but i just moved up to 1.61.2 to play it safe and the
> problem is still there.)
>   until now, when i generated my final PDF, i've had, at the top
> of each page, the chapter name in small (10pt) type, and so far,
> it's worked fine.  suddenly, it's not working so fine anymore.
>   the ToC is still fine -- the top of each page has a 10pt
> "Fundamentals of Red Hat Linux", as it's supposed to.  but
> starting with the first chapter, the header is now just that
> page's section name in full 16pt bold (matching exactly the
> section name on that page, which is kind of redundant, if you
> catch my drift).
>   i haven't changed my stylesheet entry for header.content,
> the important part is still
> <xsl:attribute-set name="header.content.properties">
>  <xsl:attribute name="font-size">10pt</xsl:attribute>
> </xsl:attribute-set>
> and it's what i've been using for quite some time.  as i mentioned,
> this works fine for generating the header in the ToC, but once
> the chapters start, it's back to 16pt bold.
>   i grabbed the first example out of the FO file, which is
>       <fo:block break-after="page">&#xA0;</fo:block>
>       <fo:block id="id2596104">
>         <fo:block>
>           <fo:block>
>             <fo:block keep-together="always" margin-left="0pc" font-family="sans-serif">
>               <fo:block keep-with-next.within-column="always">
>                 <fo:block font-family="sans-serif" font-weight="bold" keep-with-next.within-column="always" space-before.minimum="0.8em" space-before.optimum="1.0em" space-before.maximum="1.2em">
>                   <fo:marker marker-class-name="section.head.marker">The components of a computer system</fo:marker>
>                   <fo:block font-size="16pt">1.1.&#xA0;The components of a computer system</fo:block>
>                 </fo:block>
>               </fo:block>
>             </fo:block>
>           </fo:block>
>           <fo:block/>
>         </fo:block>
> notice that the "section.head.marker" is just the name of that section --
> "The components of a computer system", and not the name of the chapter,
> which is "Getting started" (if i'm reading this correctly).
>   should i have expected this?  do i have to explicitly set a stylesheet
> parameter to get the earlier behaviour?  that being, the chapter name as
> the centered, 10pt header content on each page in that chapter.

The large bold font size is not correct.  Sounds like a bug
in FOP.

The section title content is the expected behavior when
the double.sided parameter is set.  You get the chapter
title for single sided output.

You can put whatever you like in the headers by customizing
the 'header.content' template.  Here is the relevant code
from the standard version:

  <xsl:when test="($sequence='odd' or $sequence='even') and $position='center'">
    <xsl:if test="$pageclass != 'titlepage'">
        <xsl:when test="ancestor::book and ($double.sided != 0)">
          <fo:retrieve-marker retrieve-class-name="section.head.marker"
          <xsl:apply-templates select="." mode="titleabbrev.markup"/>

In words, this is setting the header content for both odd
and even numbered pages in the center position.  It does
not apply to titlepages, which don't get a header at all.

In the choose statement, when double.sided is turned on for
a book, the code outputs the fo:retrieve-marker element
for the section title.  That gets the current section title.
Otherwise it applies templates to the current element
using the 'titleabbrev.markup' mode.  The current element
at this point is the element starting the page-sequence,
which will be the chapter, appendix, preface, index, etc.

You just need to make the first 'when' test false or
eliminate it completely to get back to chapter titles
in your header.


Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]