Page 1 of 1

Mismatch Appendix titles vs ToC

Posted: Fri May 17, 2024 11:16 am
by Silvio
Hello everyone,
I'm on charge of the technical documentation in my department, which includes:
  • user manuals,
  • service manuals,
  • spare parts book.
We recently migrated from un-structured system (with Adobe FrameMaker) into DITA with OxygenXML. I'm quite a newbie on this software.

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
But in the table of contents, the 4th level is still 0.
Capture d’écran 2024-05-17 à 09.46.05.png

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) " ";
}
Do you have any clue on what I've done wrong ? Thanks

Best regards
Silvio

OxygenXML 26.1 - macOS Sonoma

Re: Mismatch Appendix titles vs ToC

Posted: Fri May 17, 2024 1:24 pm
by julien_lacour
Hello Silvio,

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;
}
Regards,
Julien

Re: Mismatch Appendix titles vs ToC

Posted: Fri Jun 07, 2024 5:30 pm
by Silvio
Hi Julien,
Problem fixed ! :D
Great ! Thanks a lot !