Next in thread → Next in month →

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

From
Bob Stayton <>
Date
2011-04-12T15:58:53+00:00
ID
002f01cbf92a$7bc23960$6600a8c0@pazu
Thread
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


 

 

  
----- Original Message ----- 

  
From: 
  redlettucemail 

  
To:  
  

  
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
Next in thread → Next in month →