jelovirt / dita-generator

DITA Generator is a Python program that generates DITA shell DTDs, DITA topic specialization stubs, and DITA-OT plug-in stubs.
http://dita-generator-hrd.appspot.com/
Apache License 2.0
18 stars 1 forks source link

Add option for chapter-based numbering #9

Open infotexture opened 12 years ago

infotexture commented 12 years ago

Please consider extending the PDF style plug-in generator to include an option for chapter-based numbering of pages, figures & tables, etc.

All page numbers, figure numbers, etc. should be prefixed with the number of the current chapter in the bookmap. This numbering scheme is frequently required for publication of long documents in loose-leaf binders, where individual chapters may need to be exchanged without affecting the numbering of items in the remainder of the document.

Cross-references should honor this numbering scheme as well, so instead of "See Figure 88 on page 99", the reference would appear as "See Figure 4-8 on page 4-19".

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/970153-add-option-for-chapter-based-numbering?utm_campaign=plugin&utm_content=tracker%2F180251&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F180251&utm_medium=issues&utm_source=github).
jelovirt commented 12 years ago

For this kind of numbering, it would make sense that that frontmatter used either roman numbering or chapter 0 (zero). For appendices a letter starting from 'A' would make sense. For backmatter I can't come up with a nice numbering scheme.

jelovirt commented 12 years ago

CMOS edition 15, 1.106, says when front matter is in roman numerals, back matter will continue the numbering from front matter. For example, if front matter ends with page number xii, back matter should start with xiii. The problem is that XSL doesn't support this, there is no function for retrieving the last page number of a given page sequence; there is fo:page-number-citation-last but it cannot be used in this context.

jelovirt commented 8 years ago

AHF outpu already has support for page numbers with chapter prefix.