Page 1 of 1
mini-TOC levels are inconsistent
Posted: Wed Jan 29, 2025 5:39 am
by LisaLiel
When I insert a mini-TOC proxy, I set the TOC depth to one more than the header level of the topic (I only have one header level in each topic).
PDFMiniTOC.png
HTMLMiniTOC.png
In PDF targets, I get just the children of the given topic. In HTML targets, I get the children
and grandchildren.
Why the inconsistency, and can I fix it?
Re: mini-TOC levels are inconsistent
Posted: Wed Jan 29, 2025 3:50 pm
by Psider
This could be because the mini-toc proxy works differently between print and online outputs.
The lt;dr is that for print, the toc depth represents the number of heading levels from the heading immediately before the mini-toc proxy. For online the number represents the number of levels below the current topic in the toc structure.
The Creating a Mini-TOC topic explains it quite well, I think. Have a look at the "How It Works" section.
Re: mini-TOC levels are inconsistent
Posted: Thu Jan 30, 2025 3:52 am
by LisaLiel
So if we want the same behavior in print and web, we have to put in two mini-TOCs and condition them? Seems like a bug to me.
Re: mini-TOC levels are inconsistent
Posted: Thu Jan 30, 2025 5:57 am
by AlexFox
If you set
on a heading type in your Print CSS, then it shouldn't show up in any TOCs