Next in thread → Next in month →

Re: [docbook-apps] numbering parts and articles

From
robert <>
Date
2012-12-21T19:06:42+00:00
ID
CAMCKLuE2Odmu=WRpvJ722EEF=
Thread
Re: [docbook-apps] numbering parts and articles
Thanks Bob.

Unfortunately, I can't change articles to chapters. We have a huge repository of help topics, each topic corresponds to an xml file, and each file starts with article. Articles are grouped into manuals in many different ways, for different outputs, ect.

I'm willing to try customizing my transformations. Is there a way to identify the templates that need to be modified?

Thanks,

Robert

On Fri, Dec 21, 2012 at 5:45 PM, Bob Stayton <> wrote:

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


From: robert 

Sent: Friday, December 21, 2012 7:46 AM

To:  

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
Next in thread → Next in month →