Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
1

Prevent TOC bringing in headings with character styles?

Contributor ,
May 12, 2023 May 12, 2023

Hello,

 

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?

 

Thanks,

Will

TOPICS
Feature request , How to , Type
804
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 12, 2023 May 12, 2023

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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 12, 2023 May 12, 2023

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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
May 12, 2023 May 12, 2023

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 12, 2023 May 12, 2023

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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
May 12, 2023 May 12, 2023

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. 👍

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 12, 2023 May 12, 2023
LATEST

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. 😛

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines