Next in thread →
Next in month →
Re: [docbook-apps] blank pages between chapters in double sided output
Answering myself, it might help someone:
I found a workaround:
in template "user.pagemasters":
<fo:page-sequence-master master-name="body-custom">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference
master-reference="blank"
blank-or-not-blank="blank"/>
<fo:conditional-page-master-reference
master-reference="body-first"
page-position="first"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
master-reference="body-even"
page-position="first"
odd-or-even="even"/>
<fo:conditional-page-master-reference
master-reference="body-odd"
odd-or-even="odd"/>
<fo:conditional-page-master-reference
odd-or-even="even">
<xsl:attribute name="master-reference">
<xsl:choose>
<xsl:when test="$double.sided !=
0">body-even</xsl:when>
<xsl:otherwise>body-odd</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</fo:conditional-page-master-reference>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
then in template "select.user.pagemaster":
<xsl:template name="select.user.pagemaster">
<xsl:param name="element"/>
<xsl:param name="pageclass"/>
<xsl:param name="default-pagemaster"/>
<xsl:choose>
<xsl:when test="$default-pagemaster = 'body'">
<xsl:value-of select="'body-custom'" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$default-pagemaster"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
bye,
Maxime
Bégnis
Développeur
Tél: 09.54.96.99.55 - Fax:
09.59.96.99.55
http://www.neodoc.fr/
5, rue de la Touloubre
13770 Venelles
Le 18/05/2011 11:37, Maxime Bégnis a écrit :
Hello,
I am to format into PDF using FOP 1.0 a document containing many
short chapters(one page in output PDF). I'm using a double sided
output. To suppress the blank pages I use the following in my
XSL stylesheet :
<xsl:param name="double.sided" select="1" />
<xsl:template
name="initial.page.number">auto</xsl:template>
<xsl:template
name="page.number.format">1</xsl:template>
<xsl:template
name="force.page.count">no-force</xsl:template>
This way, the blank pages are removed, but if a chapter starts
on an even page the simple-page-master used is 'body-first'
which is an odd page layout.
I'm using docbook-xsl-ns-1.75.2
Is there a way around this?
--
Maxime
Bégnis
Développeur
Tél: 09.54.96.99.55 - Fax:
09.59.96.99.55
http://www.neodoc.fr/
5, rue de la Touloubre
13770 Venelles
Next in thread →
Next in month →