Page 1 of 1

TOC depth level issue

Posted: Wed Jan 04, 2017 3:54 am
by Iziris
Hi everyone, i'm a new MadCapFlare user. :)
I've been looking around the forum but couldn't find any solution.

I have created a project where several H1,H2,H3 and H4 are contained.
I have also inserted a TOC proxy.
That is what my Master TOC looks like :

Title
TOC proxy
Chapter 1 H1
Part 1 H2
intro 1 H3
text 1 H4

Unfortunately I can only see up to 2 heading levels in my PDF print based output. Beyond the level 2 I can't see any title.
Generate Toc proxy is selected
Use TOc depth for heading levels is selected

I don'tt know what to do, please can somebody help me ?

Re: TOC depth level issue

Posted: Wed Jan 04, 2017 8:09 am
by ajturnersurrey
I am guessing your TOC tree looks something like:

Title (h1)
-TOC proxy (h2)
-Chapter 1 (h2)
-Part 1 (h2)
-Intro 1 (h2)
-Text 1 (h2)

Getting only h1 and h2 there would be consistent with choosing to 'use TOC depth for heading levels'. This setting will disregard that you might have started the Text 1 topic with H4 and and choose the right level for to fit the place it is used in your TOC structure.

If you want to see all those levels, but still choose 'use TOC depth for heading levels' your TOC tree would need to look like:

Title (h1)
TOC proxy (h1)
Chapter 1 (h1)
-Part 1 (h2)
--Intro 1 (h3)
---Text 1 (h4)

Alternatively turn off 'use TOC depth for heading levels' and the document will follow the heading levels you put in your topics.

Re: TOC depth level issue

Posted: Thu Jan 05, 2017 12:12 am
by Iziris
Thank you for the reply :)
My toc tree looks exactly like that :
Title (h1)
TOC proxy (h1)
Chapter 1 (h1)
-Part 1 (h2)
--Intro 1 (h3)
---Text 1 (h4)

i tried to turn off 'use TOC depth for heading levels'
But my TOC tree in the output still looks like that :

TITLE (h1)
chapter 1 (h1)
-Part 1 (h2)

all title that contains a h3 or more are still ignored ....
Is that clear ?
thanks again for your patience .

Re: TOC depth level issue

Posted: Thu Jan 05, 2017 6:10 am
by devjoe
To clarify:
Does the content of Intro 1 (h3) and Text 1 (h4) appear in the body of the PDF?
Do these headings appear in the printable table of contents in the PDF?
Do these headings appear in the bookmarks of the PDF?

Re: TOC depth level issue

Posted: Thu Jan 05, 2017 6:45 am
by Iziris
yes, the text appears in body of the PDF
these two headings do not appear in the pdf's TOC
And they do not appear in the bookmark either

Re: TOC depth level issue

Posted: Thu Jan 05, 2017 3:47 pm
by mpaquette
Hi Iziris,

Does your stylesheet specify the mc-heading-level attribute for the h1, h2, ..., or h6 elements?

From your description, I'm guessing that mc-heading-level is set to 0 (zero) for h3 and h4 in your stylesheet. A value of 0 means that the element will be excluded from the toc-proxy in the final output.

Note that the mc-heading-level attribute applies to the heading level in the final output, not the heading level in your source.

Side note: on our team, we consider it bad form to hard-code the heading level in a topic; all our topics start with an h1 element. To specify heading levels in the final output, we choose to use the Flare TOC and the Flare target's Use TOC Depth for Heading Levels option. Our rationale: easier maintenance, and content is clearly separated from hierarchy. We can quickly and safely shuffle topics around in the Flare TOC without also editing topic content.

Marc.

Re: TOC depth level issue

Posted: Fri Jan 06, 2017 12:56 am
by Iziris
WAAAAA thank you Marc
that was exactly that, h3 and h4 mc heading levels were set to 0
now it works just fine !

MadCapFlare is so complex, thank you all for your answers.

Re: TOC depth level issue

Posted: Fri Mar 10, 2017 3:24 am
by Paul_N
Iziris wrote:WAAAAA thank you Marc
that was exactly that, h3 and h4 mc heading levels were set to 0
now it works just fine !

MadCapFlare is so complex, thank you all for your answers.
I'll second the above thanks to Marc: I had the same problem with PDF ToC levels being too deep, and it was fixed by setting mc-heading-level = 0 for h3 and h4.

Re: TOC depth level issue

Posted: Mon Sep 18, 2017 3:32 pm
by seropes
Yep, this fixed worked for me too. Marc rocks!

Re: TOC depth level issue

Posted: Thu Jul 08, 2021 2:44 pm
by DavidJGross
I know I'm waking up a very old thread, but this is a problem. What if I want to use the same topic on different outputs, and in one topic I want to have my TOC show four levels and on the other I want it to show two levels. I could create a new medium I guess, but do I really want to create a whole new medium for a single output? Why in the world can't I just define in the target how many levels deep I want the TOC to show?

I will probably cross-post something similar to this comment as a standalone thread.

Re: TOC depth level issue

Posted: Thu Oct 20, 2022 3:13 am
by EileenP
DavidJGross wrote:I know I'm waking up a very old thread, but this is a problem. What if I want to use the same topic on different outputs, and in one topic I want to have my TOC show four levels and on the other I want it to show two levels. I could create a new medium I guess, but do I really want to create a whole new medium for a single output? Why in the world can't I just define in the target how many levels deep I want the TOC to show?

I will probably cross-post something similar to this comment as a standalone thread.
This is my issue, as well. Did you resolve this? Is there another way besides creating a new medium??
Thank you.

Re: TOC depth level issue

Posted: Thu Oct 20, 2022 5:33 am
by NorthEast
There's not a neat way to have different styles per target - the options are to use mediums or different stylesheets.

I use mediums to define styles used in types of targets (help, PDF, etc.), but not for individual targets - as that isn't going to work well in most cases.

Anyway, you could handle it using different stylesheets like this:

(1) Keep your regular styles together in one stylesheet, e.g. Styles.css.

(2) Create a new stylesheet for each target that require some specific styles, e.g. Target_A.css.
This would contain something like this:

Code: Select all

@import url('Styles.css');

/* styles for target A - overrides what's in styles.css */

h3, h4 
{ 
  mc-heading-level: 0; 
}
This imports everything in styles.css, and you just add what's different for that target.

(3) Set Target A to use Target_A.css, rather than Styles.css.