Re: [xep-support] Customized Page Numbering

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Fri Jan 22 2010 - 16:04:41 PST

At 2010-01-22 15:38 -0500, Harvey, Paul wrote:
>We need to have a page numbering scheme, something like
>
>Section 1-1...Section 1-5
>Section 2-1...Section 2-3
>Etc...
>
>Pages numbers in the body and TOC need to be formatted this way.
>
>I know I can use initial-page-number in fo:page-sequence, to restart the
>page numbering for each section.

There are two ways, illustrated assuming your current node is a
section element that is creating the page-sequence:

(1) - just format the page number in the static content block itself,
though you have to repeat this logic in any page number citations:

<fo:block text-align='center'>Section
<xsl:number/>-<fo:page-number/></fo:block>

(2) - define a folio prefix, which is better because this is
reflected in any page number citations into the page-sequence:

<fo:folio-prefix>Section <xsl:number/>-</fo:folio-prefix>

>Is there anything built-in to allow me
>to customize the format as I need to, or do I need to take care of that
>myself?

You need to take care of that yourself by formatting the appearance
of text before and after the page number, either in each case or
using the built-in folio-prefix facility.

Note that the page number itself can be formatted using format
tokens, but you cannot do arithmetic with or manipulate the page
number in any way.

I hope this helps.

. . . . . . . . . . . . Ken

--
UBL and Code List training:      Copenhagen, Denmark 2010-02-08/10
XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19
XSLT/XQuery/XPath training:   San Carlos, California 2010-04-26/30
Vote for your XML training:   http://www.CraneSoftwrights.com/f/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/f/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Fri Jan 22 16:18:14 2010

This archive was generated by hypermail 2.1.8 : Fri Jan 22 2010 - 16:18:21 PST