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] Incorrect page sequence for TOC/Lot andprefacepages withdouble-sided output


Bob,
In one of your posts dated Mar 26, 2009 (Re: [docbook-apps] how to omit blank pages in the front matter?) you stated:
The preface, toc, and each of the "List Of" are in their own page sequence
Does that mean for the LOTs, the page sequences for the list of figures, list of tables etc can be handled separately? Looking at my customised xsl:template name="force.page.count", I can only see that the LOT is handled as one master-reference:
<xsl:template name="force.page.count">
    <xsl:param name="element" select="local-name(.)"/>
    <xsl:param name="master-reference" select="''"/>
   
    <xsl:choose>
      <xsl:when
        test="starts-with($master-reference,'listoftitles')">no-force</xsl:when>
      <!-- no-force -->
      <xsl:when
        test="starts-with($master-reference,'front')">end-on-even</xsl:when> <!-- no-force -->
      <xsl:when test="$element = 'preface'">end-on-even</xsl:when>
      <!-- double-sided output -->
      <xsl:when test="$double.sided != 0">end-on-even</xsl:when> <!-- end-on-even -->
      <!-- single-sided output -->
      <xsl:otherwise>no-force</xsl:otherwise>
    </xsl:choose>
  </xsl:template>
 
So, if you delete blank pages in the LOTs by using “no-force”, does that delete all blank pages from each “List of” in the LOTs? And therefore you cannot force the last LOT to end on even? (because that’s what I need). How can I customise a different force.page.count for the last LOT to be end-on-even? I’ve attached the output to show that I need the Preface to start on an odd page.
Thanks,
Dave

 
Subject: Re: [docbook-apps] Incorrect page sequence for TOC/Lot and prefacepages withdouble-sided output

Hi Dave,
Now I'm a bit confused.  I thought the goal stated in your earlier mail was to eliminate any blank pages for those elements.  That's why you were changing 'force' to 'no-force'.  Can you clarify the sequence that you would like to see, and what you are actually getting?
 
Bob Stayton
Sagehill Enterprises
bobs@sagehill.net
 
 
----- Original Message -----
From: redlettucemail
To: docbook-apps@lists.oasis-open.org
Sent: Tuesday, April 12, 2011 8:06 AM
Subject: Re: [docbook-apps] Incorrect page sequence for TOC/Lot and prefacepages withdouble-sided output

Thanks Bob - the code worked. I still have a problem with needing to end the lot on an even page, and to also get the following preface to end on even.
Here is the relevant code:
 
<xsl:template name="user.pagemasters">
    <!-- Front and back covers. NOTE: may need to adjust margins
      to position image on page -->
    <fo:simple-page-master master-name="front-cover"
      page-width="{$page.width}"
      page-height="{$page.height}"
      margin-top="-10pt"
      margin-bottom="0pt"
      margin-left="0pt"
      margin-right="0pt">
      <fo:region-body
        margin-top="0pt"
        margin-bottom="0pt"
        margin-left="0pt"
        margin-right="0pt"/>
    </fo:simple-page-master>
   
    <fo:simple-page-master master-name="back-cover"
      page-width="{$page.width}"
      page-height="{$page.height}"
      margin-top="0pt"
      margin-bottom="0pt"
      margin-left="0pt"
      margin-right="0pt">
      <fo:region-body
        margin-top="-10pt"
        margin-bottom="0pt"
        margin-left="0pt"
        margin-right="0pt"/>
    </fo:simple-page-master>
   
    <!--3. set odd and even page masters for LOTs-->
    <!-- setup for lots -->
    <fo:page-sequence-master master-name="listoftitles">
      <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="lot-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">lot-even</xsl:when>
              <xsl:otherwise>lot-odd</xsl:otherwise>
            </xsl:choose>
          </xsl:attribute>
        </fo:conditional-page-master-reference>
      </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>
  </xsl:template>
 
  <!--4. select new pagemaster name for LOTs-->
  <xsl:template name="select.user.pagemaster">
    <xsl:param name="element"/>
    <xsl:param name="pageclass"/>
    <xsl:param name="default-pagemaster"/>
    <!-- Return my customized title page master name if for titlepage,
      otherwise return the default -->
    <xsl:choose>
      <xsl:when test="$default-pagemaster = 'lot'">
        <xsl:value-of select="'listoftitles'" />
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$default-pagemaster"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
 
Can I insert a blank page if the lot finishes on an odd page?
 
Thanks again,

Dave Gardiner


-----Original Message-----
From: "Bob Stayton" <bobs@sagehill.net>
To: "redlettucemail" <redlettucemail@mailscan.acenet.net.au>, <docbook-apps@lists.oasis-open.org>
Date: Tue, 12 Apr 2011 08:50:03 -0700
Subject: Re: [docbook-apps] Incorrect page sequence for TOC/Lot and prefacepages withdouble-sided output

Hi Dave,
Now I'm a bit confused.  I thought the goal stated in your earlier mail was to eliminate any blank pages for those elements.  That's why you were changing 'force' to 'no-force'.  Can you clarify the sequence that you would like to see, and what you are actually getting?
 
Bob Stayton
Sagehill Enterprises
bobs@sagehill.net
 
 
----- Original Message -----
From: redlettucemail
To: docbook-apps@lists.oasis-open.org
Sent: Tuesday, April 12, 2011 8:06 AM
Subject: Re: [docbook-apps] Incorrect page sequence for TOC/Lot and prefacepages withdouble-sided output

Thanks Bob - the code worked. I still have a problem with needing to end the lot on an even page, and to also get the following preface to end on even.
Here is the relevant code:
 
<xsl:template name="user.pagemasters">
    <!-- Front and back covers. NOTE: may need to adjust margins
      to position image on page -->
    <fo:simple-page-master master-name="front-cover"
      page-width="{$page.width}"
      page-height="{$page.height}"
      margin-top="-10pt"
      margin-bottom="0pt"
      margin-left="0pt"
      margin-right="0pt">
      <fo:region-body
        margin-top="0pt"
        margin-bottom="0pt"
        margin-left="0pt"
        margin-right="0pt"/>
    </fo:simple-page-master>
   
    <fo:simple-page-master master-name="back-cover"
      page-width="{$page.width}"
      page-height="{$page.height}"
      margin-top="0pt"
      margin-bottom="0pt"
      margin-left="0pt"
      margin-right="0pt">
      <fo:region-body
        margin-top="-10pt"
        margin-bottom="0pt"
        margin-left="0pt"
        margin-right="0pt"/>
    </fo:simple-page-master>
   
    <!--3. set odd and even page masters for LOTs-->
    <!-- setup for lots -->
    <fo:page-sequence-master master-name="listoftitles">
      <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="lot-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">lot-even</xsl:when>
              <xsl:otherwise>lot-odd</xsl:otherwise>
            </xsl:choose>
          </xsl:attribute>
        </fo:conditional-page-master-reference>
      </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>
  </xsl:template>
 
  <!--4. select new pagemaster name for LOTs-->
  <xsl:template name="select.user.pagemaster">
    <xsl:param name="element"/>
    <xsl:param name="pageclass"/>
    <xsl:param name="default-pagemaster"/>
    <!-- Return my customized title page master name if for titlepage,
      otherwise return the default -->
    <xsl:choose>
      <xsl:when test="$default-pagemaster = 'lot'">
        <xsl:value-of select="'listoftitles'" />
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$default-pagemaster"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
 
Can I insert a blank page if the lot finishes on an odd page?
 
Thanks again,

Dave Gardiner

LOTblankpages.pdf



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