OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Customizing Figure Titles (now page number prefixes)

Hi David,
The DocBook stylesheets don't have an built-in option to do chapter-page
numbering style, so you must be using a customization to achieve it.  You'll
have to do more customization it seems.  8^)

Antenna House's XSL Formatter has an extension axf:page-number-prefix that
helps if you are using that formatter.  Otherwise you have to handle all
page numbers and references with the customization.

This wiki page is a good start:


but it is a bit out of date.  The parts about customizing elements to
restart the page numbering are no longer needed.  Later versions of the
stylesheet have a template named 'initial.page.number' in fo/pagesetup.xsl
that is called at the beginning of each page sequence.  That will let you
restart page numbering as needed, but it won't add the prefix.  To add the
prefix, you have to customize the footer/header content that displays the
page number.  Then you have customize each use of fo:page-citation to add
the prefix.  That would include TOCs, index, and xrefs.

For xrefs, you need to customize the template named page.citation in
fo/xref.xsl.  That is where the prefix would be added for references.

BTW, for future reference, if you ask a new question, it helps readers of
the list archives if you start a new thread with a new subject line.  8^)

Bob Stayton
Sagehill Enterprises
DocBook Consulting

----- Original Message ----- 
From: "David White" <davidw@kencook.com>
To: "'Bob Stayton'" <bobs@sagehill.net>; <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, February 07, 2006 7:23 AM
Subject: RE: [docbook-apps] Customizing Figure Titles

> Thanks Bob,
> That worked perfectly,  I have one last xref issue remaining.
> I have a xref that looks like this:
> <emphasis role="italic">See <xref xrefstyle="select: title"
> linkend="i557602"/> on page <xref xrefstyle="select:  pagenumber"
> linkend="i557602"/></emphasis>
> Its supposed to output like this: See Alternator on page 4-1  (note the
> chapter - pagenumber format).
> But it outputs like: See Alternator on page 38
> Any suggestions?
> David White
> -----Original Message-----
> From: Bob Stayton [mailto:bobs@sagehill.net]
> Sent: Wednesday, February 01, 2006 11:05 AM
> To: David White; docbook-apps@lists.oasis-open.org
> Subject: Re: [docbook-apps] Customizing Figure Titles
> Hi David,
> Actually, the form "Figure 4.1" is the default for the DocBook XSL
> stylesheets when chapter.autolabel is not zero.  If you have numbered
> chapters, it is possible that your customization is changing the default
> figure label.
> You can swap a dash for the period by customizing the template in
> mode="intralabel.punctuation" in common/labels.xsl.
> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobs@sagehill.net
> ----- Original Message ----- 
> From: David White
> To: docbook-apps@lists.oasis-open.org
> Sent: Monday, January 30, 2006 3:12 PM
> Subject: [docbook-apps] Customizing Figure Titles
> Hello all,
> Any suggestions on how to go about customizing the standard <figure>
> titles in XSLT?
> Current when you render docbook with <figure> you get formatting that
> like: Figure 1
> I'm looking to bring in the <xsl:number from="book" count="chapter"
> format="1"/> tag so that it outputs like this: Figure 4-1
> The 4 being the chapter number.
> Any suggestions on what template needs the modification?
> Thanks
> David White

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]