Hi,
There are two things going on here.
The DocBook titlepage specs include a separator item after the title pages:
<t:titlepage-separator>
<fo:block break-after="page"/>
</t:titlepage-separator>
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:
<t:titlepage-separator>
</t:titlepage-separator>
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"
select="title|subtitle|titleabbrev|bookinfo|info"/>
<xsl:if test="$preamble">
<xsl:call-template name="page.sequence">
<xsl:with-param name="master-reference"
select="$titlepage-master-reference"/>
<xsl:with-param name="content">
<fo:block id="{$id}">
<xsl:call-template name="book.titlepage"/>
</fo:block>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
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
[EMAIL PROTECTED]
----- Original Message -----
From: "Antti Karanta" <[EMAIL PROTECTED]>
To: <[email protected]>
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 <[EMAIL PROTECTED]> 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"?>
<book>
<title>My book</title>
<chapter>
<title>First chap</title>
<para> abc</para>
<section>
<title>Bar</title>
<para>blah blah</para>
</section>
</chapter>
</book>
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.
.::Antti::.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]