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] Don't break chapter's to recto pages

I'm not clear what you mean by "half-double-sided".  Can you provide a short example that illustrates the problem, and complete examples of your two customized templates?
Bob Stayton
Sagehill Enterprises
----- Original Message -----
Sent: Monday, October 05, 2009 6:00 AM
Subject: [docbook-apps] Don't break chapter's to recto pages



I have a problem concerning the page breaks of <chapter> elements in double-sided PDF output!


The case is that I want <part>s, <toc>, <preface>, <index> and <colophon> to break to the next recto page, while chapters and appendices should only break to the next page (regardless if recto or verso).


First I tried to modify the “force.page.count”- and “initial.page.number”-templates as follows:


force.page.count(only changed content)::


   <xsl:when test="$element != 'chapter'">auto</xsl:when> 

   <xsl:when test="$double.sided != 0">end-on-even</xsl:when> 




initial.page.number(only changed content):

<xsl:when test="$double.sided != 0">


               <xsl:when test="$element = 'chapter'">auto</xsl:when>


Unfortunately this ended up in displaying me a “half-double-sided” and “half-single-sided” document. Furthermore, not every chapter wants to wrap to a verso page…


I also tried to add a custom user-pagemaster:


<xsl:template name="user.pagemasters">

    <fo:page-sequence-master master-name="body-chapter">


        <fo:conditional-page-master-reference master-reference="blank"



        <fo:conditional-page-master-reference master-reference="body-odd"



        <fo:conditional-page-master-reference odd-or-even="even">                                                                       

          <xsl:attribute name="master-reference">


              <xsl:when test="$double.sided != 0">body-even</xsl:when>









<xsl:template name="select.user.pagemaster">

  <xsl:param name="element"/>

  <xsl:param name="pageclass"/>

  <xsl:param name="default-pagemaster"/>



    <xsl:when test="$element = 'chapter'">

      <xsl:value-of select="'body-chapter'"/>



      <xsl:value-of select="$default-pagemaster"/>





After that it works almost perfect – almost. The double-sided output is fine but again not every chapter breaks to a verso page. I sometimes have one blank page in front of a chapter and sometimes not.


Can anyone help me?


Thanks in advance,


Mathias Schindler

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