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] | [Elist Home]


Subject: RE: DOCBOOK-APPS: Losing header rule when section titles are too long


Going in and adding <titleabbrev/>s to my sections wasn't an option for me,
so I customized the table itself.  In our page headers, the section title is
on the outside edge of odd numbered pages, with the chapter title on the
outside edge of even numbered pages.  So instead of having three columns
each with 1/3 of the space on the page, I have two columns, one with 80% of
the space, the other with 20% of the space.

I had to copy-and-modify the template named "header.table" to do this.  Just
copy it and replace the column specifications with:
      <xsl:choose>
        <xsl:when test="$sequence='odd'">
          <fo:table-column column-number="1" column-width="20%"/>
          <fo:table-column column-number="2" column-width="80%"/>
        </xsl:when>
        <xsl:when test="$sequence='even'">
          <fo:table-column column-number="1" column-width="80%"/>
          <fo:table-column column-number="2" column-width="20%"/>
        </xsl:when>
      </xsl:choose>

Jeff Beal

-----Original Message-----
From: Bob Stayton [mailto:bobs@caldera.com]
Sent: Sunday, January 19, 2003 3:52 AM
To: Paul A. Hoadley
Cc: Bob Stayton; docbook-apps@lists.oasis-open.org
Subject: Re: DOCBOOK-APPS: Losing header rule when section titles are
too long


On Sun, Jan 19, 2003 at 05:42:30PM +1030, Paul A. Hoadley wrote:
> On Sat, Jan 18, 2003 at 11:01:52PM -0800, Bob Stayton wrote:
> 
> > The XSL stylesheets should be using titleabbrev for running headers
> > and footers by default, I think.  But they are not.  If you read the
> > description and processing expectations of titleabbrev in DocBook
> > the Definitive Guide, it basically says that is exactly what
> > titleabbrev was meant for.
> > 
> > I'd file a Feature Request for this on the DocBook SourceForge site
> > (or I will if you can't).
> 
> Thanks, Bob -- will do.  It's not something I can fix with a simple
> template override, then?

Well, in the simple case, you could change the
'section.heading' named template to output titleabbrev
instead of $title in the fo:marker content. The current
section element is the context node, so you could change
these three lines:

    <fo:marker marker-class-name="section.head.marker">
      <xsl:value-of select="$title"/>
    </fo:marker>

to:

    <fo:marker marker-class-name="section.head.marker">
      <xsl:choose>
        <xsl:when test="titleabbrev">
          <xsl:value-of select="titleabbrev"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="$title"/>
        </xsl:otherwise>
      </xsl:choose>
    </fo:marker>

But this is too simple for the general case.  It only
selects the titleabbrev text and doesn't process any child
elements as elements.  Also if sections are numbered, then
the running head won't have the section number with the
titleabbrev, but it will if only title is present.  
There is a titleabbrev.markup mode, but it isn't equivalent
to object.title.markup mode that is used for the title
with section number.

-- 

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] | [Elist Home]


Powered by eList eXpress LLC