Hi Robert,
The DocBook XSL stylesheets don't have an option to turn on numbering for 
articles within a part.  Have you considered using chapters instead?  Those are 
autonumbered.

It would be possible to number articles with a customization that copies all 
the templates that handle chapter titles and change the element name to 
article. But it would be quite a few because of details like tables of contents 
and cross references.  This would make a good feature request for a future 
release.

If you did change the elements to chapters and you don't want to see "Chapter" 
in the output, you can change the generated text for chapters to refer to 
articles or remove the word entirely.  That would be easier than getting 
numbering of articles to work.

Bob Stayton
Sagehill Enterprises
[email protected]


From: robert 
Sent: Friday, December 21, 2012 7:46 AM
To: [email protected] 
Subject: [docbook-apps] numbering parts and articles


Hi,

I need some help with part/article numbering. My book has the following 
structure:

<book>
  <part>
    <article/>
    <article/>
  </part>
  <part>
    <article/>
    <article/>
  </part>
</book>

I'm able control the numbering of part elements, but I cannot do it for article 
elements. I would like each article within a part element to contain the number 
of the current part and the number of the current article, separated by '.', 
i.e.

<book>        
  <part>            1. title
    <article/>        1.1 title
    <article/>        1.2 title
  </part>
  <part>            2. title
    <article/>        2.1 title
    <article/>        2.2 title
  </part>
</book>


Thanks for your help.
Robert 

Reply via email to