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] Re: Suppressing book title page in fo output?

There are two things going on here.

The DocBook titlepage specs include a separator item after the title pages:

      <fo:block break-after="page"/>

This is supposed to just force a page break after the end of the verso 
titlepage content.  This works fine in XEP and Antenna House, but FOP 
creates an extra page with it.  This is a long standing bug in FOP's 
handling of breaks.   If you were retaining your title pages (recto and 
verso sides), then making this an empty element would eliminate the extra 
blank page before the TOC:


But you are trying to eliminate the title pages as well.  Creating an empty 
book.titlepage template seems like it should work, but it doesn't.  That's 
because the template with match="book" in fo/division.xsl creates a 
page-sequence if a book has any front matter elements (such as title):

  <xsl:variable name="preamble"

  <xsl:if test="$preamble">
    <xsl:call-template name="page.sequence">
      <xsl:with-param name="master-reference"
      <xsl:with-param name="content">
        <fo:block id="{$id}">
          <xsl:call-template name="book.titlepage"/>

So even if you make the book.titlepage empty, there is still a page sequence 
with an empty fo:block, so it will generate at least one page (two if you 
set double.sided = 1).

So to start a book with the table of contents, you will need to either 
remove the book's title and bookinfo (so this page-sequence is not 
triggered), or customize the template with match="book" to remove this 
page-sequence entirely.  I would recommend the latter.

If you are using stylesheets prior to 1.73.0, then you will find the book 
template is much bigger.  It was refactored in 1.73 to be more compact and 
easier to customize.  If you need to customize it, you might consider 
upgrading to 1.73.2 first.

Bob Stayton
Sagehill Enterprises

----- Original Message ----- 
From: "Antti Karanta" <antti.karanta@napa.fi>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, January 30, 2008 10:29 PM
Subject: [docbook-apps] Re: Suppressing book title page in fo output?

        Hi Warren!

   Thanks for the reply.

On Wed, 30 Jan 2008 17:40:04 +0200, Warren Young <warren@xxx> wrote:

> I don't know what this other blank page you're referring to is.  You 
> might need to post either a link to the generated PDF or the source that 
> created it.

   I provided a minimal example in my post. Here it is again:

<?xml version="1.0" encoding="UTF-8"?>
    <title>My book</title>

      <title>First chap</title>
         <para> abc</para>
   <para>blah blah</para>

   When rendered w/ docbook xsl fo stylesheets (and fo processor), there
are three pages before the TOC.

   I'm using docbook xsl 1.72.2, saxon 655, java 160_03 and fop 0.94.
Althought I'm pretty sure my toolchain has nothing to do with this.


To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

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