This is what I’m talking about:

The TOC and List of Figures is appearing in my TOC! I don’t know about you but this is not ok.

But how do you make it an H1 not show in the TOC when you’ve created your TOC to show them all? Easy peasy!

Open your stylesheet and find the H1. But wait – make sure you’re in the print medium!

Create a new class called h1.TOC or h1.frontmatter or something that will indicate that this is an H1 specifically for use in your TOC and Lists.

You’ll only need to change two properties to make this work. So, as shown in the screenshot above, open the Print Support section of the class.

Now change mc-heading-level to 0 and page-break-before to avoid.

The first setting you changed, mc-heading-level, will result in any H1 with this class to NOT appear in the TOC.

The second property is to make sure that when you assign this class to the h1 that is your Table of Contents heading, it won’t break a page before it. This will only apply if you assigned your main H1 page-break-before property to always.

Now that you’ve created this new class and applied the correct properties – all that’s left is to assign this class to the H1 that contains your TOC and any Lists of.

    <body>
        <h1 class="no_toc">Table of Contents</h1>
        <MadCap:tocProxy />
        <h1 class="no_toc">List of Figures</h1>
        <MadCap:listOfProxy style="mc-list-of-tag: p;mc-list-of-class: caption;mc-list-of-paragraph-class: TOCHeading;" />
    </body>

Now, just build your target and entries for your TOC and Lists of should be out of your TOC.

Notice a distinct lack of entries for the TOC and List of Figures. Success!

Try it and let me know how it goes for you.

Share

One Respons to “Suppressing the TOC in the Printed TOC”

  1. Avril Sheffield January 28, 2014

    Thanks for this! I have just used it to fix my Contents page.

    However, I notice that by changing the heading level to 0 I lose it as one of my ‘bookmark’ items on the left-hand side in the PDF navigation. I.e., the PDF navigation starts at Chapter 1. I’d really like it to be shown in the navigation because I often want to refer to it to find a new ‘spot’ in the manual. Is there a way to have that in the navigation but not listed on the Contents page?

    Thanks,
    Avril

Leave a Reply?

Recent Posts

%d bloggers like this: