[docbook-apps] Issue with page number format, when toc is relocated
I've positioned the toc of a book after the preface (through processing of an empty toc element in the xml source). That works, except that the page number sequence is as follows: (i, ii,) iii, iv, 5, 1, 2, 3, etc ... ^ where: - pages i and ii are suppressed in the output, as expected. - page iii is the preface - page iv is blank (double sided document) - page 5 is the toc - content follows after page 5 (numbering restarted as expected) The unexpected behaviour is that the switch from roman to arabic numerals has started too early, at the toc on page 5. Attached you find an xml source and corresponding customization which exercise this behaviour (using xsltproc and fop1.1 to produce PDF). I'd like to prevent this behaviour but am clueless about where to attack this phenomenon. Any pointers/direction are greatly appreciated. Erik Leunissen. ?xml version=1.0 encoding=UTF-8? book version=5.0 xmlns=http://docbook.org/ns/docbook; xmlns:xlink=http://www.w3.org/1999/xlink; xmlns:xi=http://www.w3.org/2001/XInclude; xmlns:svg=http://www.w3.org/2000/svg; xmlns:m=http://www.w3.org/1998/Math/MathML; xmlns:html=http://www.w3.org/1999/xhtml; xmlns:db=http://docbook.org/ns/docbook; info titleSome book/title author personnamefirstnameErik/firstnamesurnameLeunissen/surname/personname affiliation orgname/ /affiliation /author pubdatetoday/pubdate releaseinfo/ /info preface titlePreface/title parapreface body/para /preface toc/ chapter titleIntroduction/title section titleProblem description/title parasome para./para /section /chapter /book user-toc.xsl Description: application/xslt - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] Issue with page number format, when toc is relocated
Hi Erik, You'll need to customize the template named 'page.number.format' from fo/pagesetup.xsl. It has an xsl:choose with a case for the TOC when the context element is a book (so the TOC is generated without a toc element), so you need to add a case for a toc element when present: xsl:when test=self::d:toci/xsl:when Bob Stayton Sagehill Enterprises b...@sagehill.net -- From: Erik Leunissen e.leunis...@hccnet.nl Sent: Thursday, October 31, 2013 11:27 AM To: docbook-apps@lists.oasis-open.org Subject: [docbook-apps] Issue with page number format, when toc is relocated I've positioned the toc of a book after the preface (through processing of an empty toc element in the xml source). That works, except that the page number sequence is as follows: (i, ii,) iii, iv, 5, 1, 2, 3, etc ... ^ where: - pages i and ii are suppressed in the output, as expected. - page iii is the preface - page iv is blank (double sided document) - page 5 is the toc - content follows after page 5 (numbering restarted as expected) The unexpected behaviour is that the switch from roman to arabic numerals has started too early, at the toc on page 5. Attached you find an xml source and corresponding customization which exercise this behaviour (using xsltproc and fop1.1 to produce PDF). I'd like to prevent this behaviour but am clueless about where to attack this phenomenon. Any pointers/direction are greatly appreciated. Erik Leunissen. - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] Issue with page number format, when toc is relocated
On 31/10/13 19:54, Bob Stayton wrote: Hi Erik, You'll need to customize the template named 'page.number.format' from fo/pagesetup.xsl. It has an xsl:choose with a case for the TOC when the context element is a book (so the TOC is generated without a toc element), so you need to add a case for a toc element when present: xsl:when test=self::d:toci/xsl:when And once more, this resolved the issue. What also worked in my case, but may blow up other documents, is simply replacing the existing: xsl:when test=$element = 'toc' and self::d:booki/xsl:when with: xsl:when test=$element = 'toc'i/xsl:when Thanks again, Erik. - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org