How do you stop a generated TOC from using character styles applied to paragraph styles?
I have a character style (underline) applied on the first letter of every H1, but I don't want it in the TOC.
I can't see any option to specify this.
Is it possible?
Copy link to clipboard
The short answer is that you can't.
There are various approaches and workarounds, but the fundamental fix is not to use character styles and overrides in TOC elements.
Try to work with GREP and Nested Styles in the Headline Paragraph Styles. Those are ignored in the TOC paragraph styles. If not possible remove them at the end.
Or make the toc in a different document, bundled in an INDB book file. In that document define the character styles without properties.
Yikes, what a palaver. More hassle than it's worth.
I think I'll generate the TOC, copy it into a new text frame and re-style it manually each time.
I'll look into GERP and Nested Styles when I have the time. Thanks for the info.
Back up on your layout and use heading styles without any overrides, at least ones you don't want in the TOC.
That's often the best approach in many ways, and it rarely takes more than slight simplification of the overall look. It's just easy to make the mistake of using too much styling in the headings without realizing the consequences.
This brand has an underline under the first letter of every H1. Character styling felt like the best option.
Adding a line under each H1 would be more tedious than re-doing the TOC each time. (I will look info GERP and Nested Styles).
I think the TOC should have an override to choose whether character styles are imported. It seems pretty rudimentary.
I'll make a feature request. 👍
I think there are several already in. This is a very longstanding issue, which is why the short, solid answer is to be aware of it and design around it whenever possible. 😛