Unlinked TOC books only in generated TOC if on lvl 1

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
simona
Propeller Head
Posts: 56
Joined: Wed Feb 27, 2013 3:16 am
Location: Bremen, Germany

Unlinked TOC books only in generated TOC if on lvl 1

Post by simona »

Further to my issue from last week I now have a new problem: My automatically generated TOC (print/PDF) only shows unlinked books if they are on TOC level 1. Unlinked TOC books on levels 2 or deeper will appear in the pdf body itself as empty pages but not in the generated TOC. If I link these TOC books to a topic - just to test it - and build again they do appear in the TOC.

Here are my settings:
- "Inject headings for unlinked books in TOC" = active at the target
- "Use TOC depth for heading levels" = active at the target
- TOC has been used for web outputs previously, it is 4 levels deep but not for all nodes
- TOC entry properties for all concerned TOC books are identical (meaning: for those that do appear in the TOC and those that do not)

My css contains the following settings for the print medium:

Code: Select all

	h1
	{
		mc-heading-level: 1;
	}

	h2, h3, h4, h5, h6
	{
		mc-heading-level: 0;
	}

	h1.TOC2
	{
		mc-heading-level: 2;
	}

	h1.TOC3
	{
		mc-heading-level: 3;
	}

	h1.TOC4
	{
		mc-heading-level: 4;
	}

Is this a known bug for print outputs? I am new to print, we usually do web only.
Or is it something I don't see because I have been trying to get this print TOC to work for 4 days now and can't think straight anymore?

Since we have platinum support I sent a support request on Friday but - oddly enough - I have not even received the usual email confirming that it has been received (Update: found the mail, sending project now).

Please let me know what else I could try.
Flare 2023 r3, Capture 7
TechWriter with 10+ years Flare experience (software)
99% remote
simona
Propeller Head
Posts: 56
Joined: Wed Feb 27, 2013 3:16 am
Location: Bremen, Germany

Re: Unlinked TOC books only in generated TOC if on lvl 1

Post by simona »

Okay, the mighty MadCap Support Wizards have confirmed that we cannot do what we want to do - at least not without manually applying style classes to all heading levels we want to exclude from our print generated TOC.

I'll try to summarize it best I can, for the benefit of anyone who stumbles across a similar problem in the future:

Situation:
  • Our TOC file is 4 levels deep but not consistently for all nodes. We have been using it for years to build our web-based outputs, where it works really well.
  • Our TOC file contains empty books that are important to the structure (e.g. the unlinked book "User admin" at level 3 underneath the unlinked book "System config" at level 2 underneath the unlinked book "Tutorials" at TOC level 1)
  • All our topics start with an h1 heading and we only want h1 headings to appear in our TOC, not h2 or h3 headings from inside the topics. We hardly ever use h4-6.
  • We need a generated TOC for print output (PDF) for the first time. We wanted that TOC to have the exact same structure as the web TOC and had hoped to use our existing TOC for both outputs. Maintaining 2 separate TOCs is not an option for us.
Problem:
  • when we do use "Use TOC depth for heading levels" the print TOC will contain too many headings from inside our topics. There are nodes that are only 3 levels deep and consequently the sub-headings from inside these topics now also show up in my PDF contents as mc-heading-level 4. We do not want that (these sub-headings are, for instance: Context / Preconditions / Procedure / Result. For every tutorial topic).
  • when we don't use "Use TOC depth for heading levels" the TOC has no structure and lists all items on level 1, which does not work for us.
  • we have to use "Inject headings for unlinked books in TOC" to include the important unlinked books in the TOC structure.
  • when the option "Inject headings for unlinked books in TOC" is enabled, the heading style that's injected is based on its location in the TOC. Unlinked book at level 1 = h1, unlinked book at level 2 = h2, etc.

Solution 1:
  • Create a .NoToc generic style and apply that manually in all my topics to all our H2 (and below) headings.
  • I tested that and it works, but having to edit heading styles in all topics is not the most elegant or scalable solution. What if we do need a special kind of TOC or mini-TOC in the future where we want these headings to appear?
Solution 2:
  • Creating h1.TOC1 through h1.TOC4 styles with mc-heading-levels to be automatically applied (mc-heading-level to 1 only for h1, mc-heading-level 0 for h2-4).
  • Using this solution will prevent us from having to manually edit heading classes in topics.
  • However, this solution causes all unlinked books on levels 2 or below to be missing in the generated TOC because I set the mc-heading-level for these h2, h3 and h4 headings to 0.
  • The unlinked books will appear in the TOC, if we create linked topics for them. However, we do not want to do that.
MadCap Flare support said that solution 1 is the only way to achieve what we want to do. Disenchanting news. Until now I was thinking that I had simply overlooked something and not properly understood all the features available to us. We have to discuss this internally now and decide how to move forward.
Flare 2023 r3, Capture 7
TechWriter with 10+ years Flare experience (software)
99% remote
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Unlinked TOC books only in generated TOC if on lvl 1

Post by NorthEast »

simona wrote:However, this solution causes all unlinked books on levels 2 or below to be missing in the generated TOC because I set the mc-heading-level for these h2, h3 and h4 headings to 0.
Well, that's a bug- did MadCap acknowledge it's a bug?

If it inserts headings for unlinked TOC items, it shouldn't just insert h2, h3, h4, etc - it should insert headings using the styles that's you've set using mc-heading-level.
simona
Propeller Head
Posts: 56
Joined: Wed Feb 27, 2013 3:16 am
Location: Bremen, Germany

Re: Unlinked TOC books only in generated TOC if on lvl 1

Post by simona »

Dave Lee wrote:Well, that's a bug- did MadCap acknowledge it's a bug?

If it inserts headings for unlinked TOC items, it shouldn't just insert h2, h3, h4, etc - it should insert headings using the styles that's you've set using mc-heading-level.
No, they did not acknowledge that as a bug. And it does insert headings based on the styles and the location. MadCap say that
  • unlinked books are injected based on their location in the TOC (lvl 1 = h1, lvl 2 = h2) if "Inject headings for unlinked books in TOC" is active
  • if the mc-heading-levels of the corresponding heading styles (h1, h2...) are set to 0 in the stylesheet the unlinked books on that level will not be inserted
I did read somewhere that the generated TOC would automatically consider additional / generic styles (h1.TOC1, h1.TOC2...) but in our project that doesn't seem to happen (or I was not able to make it work). So it looks like we either have to manually edit our h2 styles, or manually create a second print TOC or accept that the generated print TOC doesn't contain what we want to have in it.

My co-workers don't quite understand this. "Isn't there a tool for that?" they have asked and I tried to explain to them that we are already using one of the leading single-sourcing tech comm tools out there. :lol:
Flare 2023 r3, Capture 7
TechWriter with 10+ years Flare experience (software)
99% remote
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Unlinked TOC books only in generated TOC if on lvl 1

Post by NorthEast »

I can't offer any other suggestions. I'd suggest putting in a bug report, or a suggestion to MadCap to fix this.

I've never understood why Flare's print contents in print have to be derived from headings, and cannot simply be based on the structure of the TOC file that you've created.
simona
Propeller Head
Posts: 56
Joined: Wed Feb 27, 2013 3:16 am
Location: Bremen, Germany

Re: Unlinked TOC books only in generated TOC if on lvl 1

Post by simona »

Dave Lee wrote:I'd suggest putting in a bug report, or a suggestion to MadCap to fix this.
Yes, thank you for your help with this complicated issue, that's what we ended up doing. There is an existing feature request that we are getting behind and hopefully that will - in time - provide a more elegant solution.
Flare 2023 r3, Capture 7
TechWriter with 10+ years Flare experience (software)
99% remote
Post Reply