Heading VS ToC numbering in PDF with Dita/Markdown
Posted: Fri May 10, 2024 12:23 pm
Hello!
My doc team is using a Dita/Markdown setup to publish HTML+PDF, and it was recently brought to our attention that the numbering of heading sections is different VS the ToC:

How it looks in the ditamap:
In which:
The H1 .md file "prerequisites_installing_nf.md" has 9 subsections as level "##" labeled as 4.1, [...], 4.9
While the H2 .md file "installation.md" is 4.10
But in the ToC, 4.10 becomes 4.1, as it doesn't take into consideration the ## subsections from H1, while interestingly, the PDF sidebar does.
Required solution:
For us, it's irrelevent whether it's the ToC that takes the numbering of the subsections from the H1 .md file, or the subsections in there don't get heading numbers at all, we would just like the ToC to reflect the numbering of the actual heading numbers.
Can you help us point out where (in the CSS?) we can either remove the ## (level 2) heading numbering from the .MD files, or make them appear in the ToC? Either of this would be OK for us.
Background info:
This was tested both on the client-side CI/CD using Oxygen Publishing Engine on version 24.1, and our ofline Oxygen Author 26.1 setup. We are using CSS-based PDF publishing.
In the PDF template properties we are using:
Please let us know if you can help, or need more info.
edit: redacted client propriatary info from screenshot
My doc team is using a Dita/Markdown setup to publish HTML+PDF, and it was recently brought to our attention that the numbering of heading sections is different VS the ToC:

How it looks in the ditamap:
Code: Select all
<topicref href="_install_ad_op/prerequisites_installing_nf.md" format="markdown" keys="prerequisites_deploying">
<topicref href="solution-prereq/_install/installation.md" format="markdown" keys="solution_prereq_helm"/>
The H1 .md file "prerequisites_installing_nf.md" has 9 subsections as level "##" labeled as 4.1, [...], 4.9
While the H2 .md file "installation.md" is 4.10
But in the ToC, 4.10 becomes 4.1, as it doesn't take into consideration the ## subsections from H1, while interestingly, the PDF sidebar does.
Required solution:
For us, it's irrelevent whether it's the ToC that takes the numbering of the subsections from the H1 .md file, or the subsections in there don't get heading numbers at all, we would just like the ToC to reflect the numbering of the actual heading numbers.
Can you help us point out where (in the CSS?) we can either remove the ## (level 2) heading numbering from the .MD files, or make them appear in the ToC? Either of this would be OK for us.
Background info:
This was tested both on the client-side CI/CD using Oxygen Publishing Engine on version 24.1, and our ofline Oxygen Author 26.1 setup. We are using CSS-based PDF publishing.
In the PDF template properties we are using:
Code: Select all
#enable topic numbering
args.css.param.numbering = deep-chapter-scope-no-page-reset
edit: redacted client propriatary info from screenshot