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] Fop customizations: bookmarks, toc, chapter titles

----- Original Message ----- 
From: "Michèle Garoche" <michele.garoche@easyconnect.fr>
To: <docbook-apps@lists.oasis-open.org>
Sent: Saturday, December 04, 2004 1:23 AM
Subject: [docbook-apps] Fop customizations: bookmarks, toc, chapter titles

> I'm completely new to docbook. Using latest dsssl 1.79, xsl 1.67.2, and
> fop 0.25, process with xsltproc. I've tried to make some customizations
> for pdf output from a book with several xml files, but there are some
> things that I did not find/understand in the documentation/faq.
> I wonder if I must really copy the whole titlepage.template.xml before
> customizing it, or if it is sufficient to copy the parts I've changed.
> Now I have those problems with the pdf:
> 1 - The first bookmark points to page 3 of the book, a blank page, not
> to the book cover. I'm unable to find what I've done wrong to get this
> behaviour.

The extra pages are a bug in FOP, and can be worked around by adding
these lines to your customization layer:

<xsl:template name="book.titlepage.separator">

The titlepage bookmark will still land on the verso title page, and that is
another bug in FOP.  I don't know of a workaround for that one.

> 2 - I would like to have the contents of the table of contents
> centered, i.e. not using the $title.margin.left. I've not found how to
> do it. That is at the moment the text is aligned left, which leaves a
> small right margin comparing to the title ruler. The goal would be to
> have this margin equally divided between left and right margins. Is
> there a way to do so?

There was a request awhile back to have a parameter to select which page
have the $title.margin.left indent.  I can't find the feature request on
SourceForge, though,
so if you want to file one, it will at least be in the queue.  In the mean
time, it
requires creating a new page master for the front matter.  This reference
describes how to do it.


> 3 - I would like to have the verso title pages for chapters to display:
>        Chapter x: Title of chapter x                           Title of
> current section
> and not only Title of current section as it is. The first one in the
> first cell of the table for title, the second one spanning over the
> second and third cells (as I'll guess some would be too long to fit
> into the second cell). I've not really grasped this part of
> customization yet. Could somebody point me to the right direction?

I'm not sure I understand.  Chapters don't usually have a verso title page.
Do you mean the running header on the pages after the first?
You can adjust the size of the page header cells with the


You could set this to "2 0 1" to get the inside cell to be twice that of
the outside cell, and the middle cell zero width.

The template named 'header.content' establishes what goes into each cell.
That template can
be a bit tricky, but there are examples in this section of my book:


> 4 - I have in the xml source some workaround to have a Tip or Note
> inside a variable list displayed as a tiny italic blue word.
>  <varlistentry>
>            <term><emphasis>Tip</emphasis></term>
>            <listitem>
>              <para>Blah blah blah.</para>
>              </listitem>
>       </varlistentry>
> For the html output, it is treated through css stylesheet, so that it
> appears in italic, blue color. For the pdf output, I have it in italic,
> but I don't find a way to color it. Is there a way other than using
> role, i.e. not touching the xml sources?

If you want all emphasis text inside a term element to be blue, you could
do this:

<xsl:template match="term/emphasis">
  <fo:wrapper color="blue">

I believe FOP supports fo:wrapper.  If not, you could try fo:inline.

Bob Stayton
Sagehill Enterprises
DocBook Consulting

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