[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] Force TOC and Chapter 1 on odd pages with $double.sided=0
Keith, 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? Another way to word my issue is this: My title page will always be the first "right side" page. My table of contents needs to begin on the next "right side page". If my title page is a single page, then a blank will need to be inserted after the title page to make this happen. The same is true for a single page table of contents so that the fist page of chapter 1 also begins on a "right side page". Beyond that, all the rest of the chapters should be should just come consecutively, without any blank pages, as if it was a single sided document. 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. Jerry Janofsky -----Original Message----- From: Keith Fahlgren [mailto:abdelazer@gmail.com] Sent: Tuesday, October 03, 2006 10:51 AM To: docbook-apps@lists.oasis-open.org Subject: Re: [docbook-apps] Force TOC and Chapter 1 on odd pages with $double.sided=0 [think I sent this from the wrong persona the first time.. sorry if it's a dup] On 10/2/06, Jerry Janofsky <JanofskyJ@comcast.net> wrote: > Right now I have a single page title page and a single page table of > contents. The TOC gets placed on the back of the title page. Is there a > template I can override to force the TOC and chapter 1 to begin on an odd > page? Here's how I do it, by rewriting the initial-page-number template: [look for the 'toc' line] <xsl:template name="initial.page.number"> <xsl:param name="element" select="local-name(.)"/> <xsl:param name="master-reference" select="''"/> <xsl:choose> <!-- double-sided output --> <xsl:when test="$double.sided != 0"> <xsl:choose> <xsl:when test="$element = 'toc'">5</xsl:when> <xsl:when test="$element = 'book'">1</xsl:when> <xsl:when test="$element = 'preface'">auto-odd</xsl:when> <xsl:when test="$element = 'part' and not(preceding::chapter) and not(preceding::part)">1</xsl:when> <xsl:when test="($element = 'dedication' or $element = 'article') and not(preceding::chapter or preceding::preface or preceding::appendix or preceding::article or preceding::dedication or parent::part or parent::reference)">1</xsl:when> <xsl:when test="($element = 'chapter' or $element = 'appendix') and not(preceding::chapter or preceding::appendix or preceding::article or preceding::dedication or parent::part or parent::reference)">1</xsl:when> <xsl:otherwise>auto</xsl:otherwise> </xsl:choose> </xsl:when> <!-- single-sided output --> <xsl:otherwise> <xsl:choose> <xsl:when test="$element = 'toc'">auto</xsl:when> <xsl:when test="$element = 'book'">1</xsl:when> <xsl:when test="$element = 'preface'">auto</xsl:when> <xsl:when test="$element = 'part' and not(preceding::chapter) and not(preceding::part)">1</xsl:when> <xsl:when test="($element = 'dedication' or $element = 'article') and not(preceding::chapter or preceding::preface or preceding::appendix or preceding::article or preceding::dedication or parent::part or parent::reference)">1</xsl:when> <xsl:when test="($element = 'chapter' or $element = 'appendix') and not(preceding::chapter or preceding::appendix or preceding::article or preceding::dedication or parent::part or parent::reference)">1</xsl:when> <xsl:otherwise>auto</xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> HTH, Keith --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]