Page 1 of 1

Numbering plugin for PDF output

Posted: Fri Oct 13, 2017 2:00 pm
by susannecm
I've been testing the numbering plugin com.oxygenxml.pdf2.topic.numbering-master.
It almost does what I need :wink:
However, there is one problem: the numbers are also added to elements that are already numbered by default. For example, chapters are then numbered twice, like so:

Chapter 1: 1 Introduction................................................................................
1.1 What are standard images?.........................................................................
1.2 System requirements................................................................................

Any chance that this will be fixed? And will the plugin be included in the oXygen in future?

Kind regards,
Susanne Muris

Re: Numbering plugin for PDF output

Posted: Fri Oct 13, 2017 4:55 pm
by radu_pisoi
Hi,

The com.oxygenxml.pdf2.topic.numbering plugin was developed as a sample DITA-OT PDF2 customization plugin. The main goal was to help people that want to learn how to create a PDF customization plugin.

I have fixed the reported problems for bookmap's chapters and appendices.

Thank you for your feedback.

Re: Numbering plugin for PDF output

Posted: Mon Oct 16, 2017 1:02 pm
by susannecm
Thank you for the quick fix!

Re: Numbering plugin for PDF output

Posted: Fri Oct 20, 2017 4:44 pm
by susannecm
Hi,
I added one more condition to the xsl:choose:

<xsl:when test="self::*[contains(@class, ' bookmap/part ')]"/>
<!-- Do not add numbers for parts -->

Maybe other DITA users want numbered headings too.

Kind regards
Susanne Muris

Re: Numbering plugin for PDF output

Posted: Tue Oct 24, 2017 8:47 am
by radu_pisoi
Hi,

Good observation.

I added the 'bookmap/part' to the list of elements that should be skipped from numbering, they are already numbered by the default processing.

Re: Numbering plugin for PDF output

Posted: Tue Oct 24, 2017 1:06 pm
by susannecm
Hi Radu,
thanks - unfortunately, there are more adjustments required.
In documents without parts, the numbering is fine.
However, in documents with parts, the numbering is like this:
Part II
Chapter 5
Topic 2.1.1
Topic 2.1.2
I believe it should be like this:
Part II
Chapter 5
Topic 5.1
Topic 5.2
I'm still working on this.
Kind regards
Susanne