Mismatch Appendix titles vs ToC
Post here questions and problems related to editing and publishing DITA content.
Mismatch Appendix titles vs ToC
Hello everyone,
I'm on charge of the technical documentation in my department, which includes:
However, I'm facing an issue with the Appendix numbering and the TOC that I'm totally unable to fix.
The appendix chapters and sections numbering are ok, as well for the PDF bookmarks.
But in the table of contents, the 4th level is still 0.
I customized the ToC definition for the appendix in a CSS file.
Do you have any clue on what I've done wrong ? Thanks
Best regards
Silvio
OxygenXML 26.1 - macOS Sonoma
I'm on charge of the technical documentation in my department, which includes:
- user manuals,
- service manuals,
- spare parts book.
However, I'm facing an issue with the Appendix numbering and the TOC that I'm totally unable to fix.
The appendix chapters and sections numbering are ok, as well for the PDF bookmarks.
- Capture d’écran 2024-05-17 à 09.45.56.png (33.53 KiB) Viewed 562 times
- Capture d’écran 2024-05-17 à 09.46.05.png (28.9 KiB) Viewed 562 times
I customized the ToC definition for the appendix in a CSS file.
Code: Select all
/* For appendix - TOC - reset - reset counter section1 */
*[class ~= "map/map"][numbering ^= 'deep'] *[class ~= "bookmap/chapter"] + *[class ~= "bookmap/appendix"] {
counter-reset: toc-chapter 0 /*toc-section1 0 toc-section2 0 toc-section3 0*/ /*toc-chapter-and-sections 0 !important*/;
}
/* For appendix - TOC */
*[class ~= "map/map"][numbering ^= 'deep'] *[class ~= "map/topicref"][class ~= "bookmap/appendix"][is-chapter]:not([is-part]) > *[class ~= "map/topicmeta"]:before {
content: "Appendix " counter(toc-chapter, upper-latin) " ";
}
/* For appendix - TOC - level 2 numbering definition */
*[class ~= "map/map"][numbering ^= 'deep'] *[class ~= "map/topicref"][class ~= "bookmap/appendix"][is-chapter]:not([is-part]) > *[class ~= "map/topicref"] > *[class ~= "map/topicmeta"]:before {
content: counter(toc-chapter, upper-latin) "." counter(toc-section1) " ";
}
/* For appendix - TOC - level 3 numbering definition */
*[class ~= "map/map"][numbering ^= 'deep'] *[class ~= "map/topicref"][class ~= "bookmap/appendix"][is-chapter]:not([is-part]) > *[class ~= "map/topicref"] > *[class ~= "map/topicref"] > *[class ~= "map/topicmeta"]:before {
content: counter(toc-chapter, upper-latin) "." counter(toc-section1) "." counter(toc-section2) " ";
}
/* For appendix - TOC - level 4 numbering definition */
*[class ~= "map/map"][numbering ^= 'deep'] *[class ~= "map/topicref"][class ~= "bookmap/appendix"][is-chapter]:not([is-part]) > *[class ~= "map/topicref"] > *[class ~= "map/topicref"] > *[class ~= "map/topicref"] > *[class ~= "map/topicmeta"]:before {
content: counter(toc-chapter, upper-latin) "." counter(toc-section1) "." counter(toc-section2) "." counter(toc-section3) " ";
}
Best regards
Silvio
OxygenXML 26.1 - macOS Sonoma
-
- Posts: 571
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Mismatch Appendix titles vs ToC
Post by julien_lacour »
Hello Silvio,
The default stylesheet does not increment any counter below level 3, you need to add it in your stylesheet:
Regards,
Julien
The default stylesheet does not increment any counter below level 3, you need to add it in your stylesheet:
Code: Select all
*[class ~= "map/map"][numbering ^= 'deep'] *[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicref"] > *[class ~= "map/topicref"] > *[class ~= "map/topicref"] {
counter-increment: toc-section3 toc-chapter-and-sections;
}
Julien
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service