docbook-apps

Expand all | Collapse all

Re: [docbook-apps] Suppressing blank pages between chapters with double.sided output

  • 1.  Re: [docbook-apps] Suppressing blank pages between chapters with double.sided output

    Posted 12-15-2006 17:41
    Hi,
    I just copied your code below into a customization layer containing a copy
    of the initial.page.number template from fo/pagesetup.xsl, and it works as
    expected (no generated blank pages), with both FOP and XEP. Can you
    provide more details about how you made the change.

    You can take a peek inside your generated fo file. Look for
    <fo:page-sequence> for a chapter, and see if it has an attribute
    initial-page-number="auto". If not, then your customization isn't getting
    into the output for some reason.

    Bob Stayton
    Sagehill Enterprises
    DocBook Consulting
    bobs@sagehill.net


    ----- Original Message -----
    From: "Tavmjong Bah" <tavmjong@free.fr>
    To: <docbook-apps@lists.oasis-open.org>
    Sent: Friday, December 15, 2006 3:27 AM
    Subject: [docbook-apps] Suppressing blank pages between chapters with
    double.sided output


    >
    > Hi,
    >
    > I am trying to suppress blank pages between chapters following the
    > advice given in the message:
    >
    > http://lists.ebxml.org/archives/docbook-apps/200604/msg00216.html
    >
    > It suggests:
    >
    > "If you just want to change the behavior for any chapters after the
    > first, then you just need to change the first xsl:otherwise clause:
    >
    > <xsl:otherwise>auto</xsl:otherwise>
    >
    > [in the file fo/pagesetup.xsl]."
    >
    > I've tried this but I can't get it to work:
    >
    >
    > <xsl:when test="$double.sided != 0">
    > <xsl:choose>
    > <xsl:when test="$element = 'toc'">auto-odd</xsl:when>
    > <xsl:when test="$element = 'book'">101</xsl:when>
    >
    >
    > <xsl:when test="$element = 'preface'">auto-odd</xsl:when>
    > <xsl:when test="($element = 'dedication' or $element = 'article')
    > and not(preceding::chapter
    > or preceding::preface
    > or preceding::appendix
    > or preceding::article
    > or preceding::dedication
    > or parent::part
    > or parent::reference)">1</xsl:when>
    > <xsl:when test="generate-id($first.book.content) =
    > generate-id(.)">301</xsl:when>
    > <xsl:otherwise>auto</xsl:otherwise>
    > </xsl:choose>
    > </xsl:when>
    >
    > (Note that page number changes of 1 to 101 and 301 are
    > to confirm that I am editing the right place.)
    >
    > I've tried this with docbook-xsl-1.70.1 and docbook-xsl-shapshot
    > from Dec 12th using libxml 20627, libxslt 10118 and libexslt 813.
    >
    > Any suggestions?
    >
    > Thanks, Tav
    >
    >
    >
    >
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >
    >





  • 2.  Re: [docbook-apps] Suppressing blank pages between chapters with double.sided output

    Posted 12-15-2006 20:39
    On Fri, 2006-12-15 at 09:40 -0800, Bob Stayton wrote:
    > Hi,
    > I just copied your code below into a customization layer containing a copy
    > of the initial.page.number template from fo/pagesetup.xsl, and it works as
    > expected (no generated blank pages), with both FOP and XEP. Can you
    > provide more details about how you made the change.
    >
    > You can take a peek inside your generated fo file. Look for
    > <fo:page-sequence> for a chapter, and see if it has an attribute
    > initial-page-number="auto". If not, then your customization isn't getting
    > into the output for some reason.

    Thanks for checking. Following your suggestion I've checked the fo file.
    The initial-page-number attribute is set correct. The problem seems to
    be with the svn version of fop. I just downloaded fop-0.90alpha1 and it
    handles the pages as desired.

    Tav