[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] page numbering...
David, As pointed out by someone on this list I use the following :- Somewhere in the customization layer <!-- Define a processing instruction to reference the last page in a document. This is used in the footer to display the total number of pages. --> <xsl:template match="processing-instruction()[local-name()='lastpage']"> <fo:block id="lastpage"/> </xsl:template> and in the footer customization <xsl:when test="$double.sided = 0 and $position='center'"> <xsl:text>Page </xsl:text> <fo:page-number/> <xsl:text> of </xsl:text> <fo:page-number-citation ref-id="lastpage"/> </xsl:when> and just before the last element in the source enter the following processing instruction. <?lastpage?> I also have the following in my fo customization which you may find useful <!-- Define a processing instruction to force a new page --> <xsl:template match="processing-instruction()[local-name()='pagebreak']"> <fo:block break-before ='page'/> </xsl:template> <!-- Define a processing instruction to force a new line. --> <xsl:template match="processing-instruction()[local-name()='br']"> <fo:block/> </xsl:template> The last 2 I also use my xhtml customization to add an <hr/> and a <br/> respectively Hope this helps. Regards Simon Kennedy David White wrote: > Hello all! > > More beginner questions, I’m try to add page numbering to the bottom > of my book using XSLT. > > The format is “ xx of yy “ xx being the current page (which I have > working), yy being the total pages of the book (which isnt working). > > My current XSLT snippet is: > > <fo:inline> > > <fo:page-number/><xsl:call-template name="gentext.space"/> > > <xsl:text> / </xsl:text> > > <xsl:call-template name="gentext.space"/> > > <!—the below line was a test, it doesn’t produce the total book pages à > > <fo:page-number-citation ref-id="terminator"/> > > </fo:inline> > > Any suggestions? > > Thanks > ___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]