Next in thread → Next in month →

RE: [docbook-apps] Force TOC and Chapter 1 on odd pages with $double.sided=0

From
Jerry Janofsky <>
Date
2006-10-03T17:55:18+00:00
ID
008701c6e715$12681ba0$652aa8c0@Jerry
Thread
RE: [docbook-apps] Force TOC and Chapter 1 on odd pages with $double.sided=0
Keith,

That's it!  That works. I was just looking at that template when I received
your email. Thank You.

Jerry Janofsky

-----Original Message-----
From: Keith Fahlgren [mailto:] 
Sent: Tuesday, October 03, 2006 1:42 PM
To: Jerry Janofsky
Cc: 
Subject: Re: [docbook-apps] Force TOC and Chapter 1 on odd pages with
$double.sided=0

On 10/3/06, Jerry Janofsky <> wrote:
> Thanks for this information, however, doesn't the "initial.page.number"
> template just affect the actual page numbers but not the placement of the
> pages themselves?

Oops.. yes.

> Another way to word my issue is this:
>
> I know it is sounds rather non-standard, but many of my "Chapter" elements
> only contain "mediaobjects". When the document is printed, I need the
> resulting mediaobjects to just run consecutively. Without any chapter
> interruptions.

No, this is exactly the same thing I do, which is why I grabbed the
first template that matched what I was expecting. How about this one:

  <xsl:template name="force.page.count">
    <xsl:param name="element" select="local-name(.)"/>
    <xsl:param name="master-reference" select="''"/>
    <xsl:choose>
      <xsl:when test="$double.sided != 0">
        <xsl:choose>
          <xsl:when test="$element = 'toc'">end-on-even</xsl:when>
          <xsl:when test="$element = 'book'">end-on-even</xsl:when>
          <xsl:when test="$element = 'preface'">end-on-even</xsl:when>
          <xsl:when test="$element = 'part'">end-on-even</xsl:when>
          <xsl:when test="($element = 'chapter') and
not(following::chapter)">end-on-even</xsl:when>
          <xsl:when test="($element = 'appendix') and
not(following::appendix)">end-on-even</xsl:when>
          <!-- Otherwise, always start on right, not what you want... -->
          <!-- so comment it out
          <xsl:otherwise>end-on-even</xsl:otherwise>
          -->
          <!-- Or, allow left starts, what you want-->
          <xsl:otherwise>no-force</xsl:otherwise>
        </xsl:choose>
      </xsl:when>
      <!-- single-sided output -->
      <xsl:otherwise>no-force</xsl:otherwise>
    </xsl:choose>
  </xsl:template>

HTH,
Keith

---------------------------------------------------------------------
To unsubscribe, e-mail: 
For additional commands, e-mail: 
Next in thread → Next in month →