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

Character Styles in Table of Contents Entries

Engaged ,
Jun 08, 2019 Jun 08, 2019

Copy link to clipboard

Copied

I have found related discussions, but nothing quite like this.

It is a best practice, if you use running headers, to apply a character style to a selected subset of a heading, for example, HeadText1 for a first-level heading, and HeadText2 for a second-level heading, so that the header just shows basically a short title for the heading. You define the header to contain two text variables, first Heading1 that picks up, for example, the first instance of the text marked with HeadText1, and Heading2 that picks up the last instance of HeadText2. Works great, and I have a post at https://forums.adobe.com/thread/2602190 that shows how to do this. (HeadText1 and HeadText2 character styles apply nothing but the name, they don't change the text at all; they are just to tell the headers which subset of the Heading1 or Heading1 to put into the header at the top of the page.)

Contents-Headers.jpg

The problem is that when you generate a Table of Contents, the header will pick up HeadText2 and insert in the header, as the entries in the Table of Contents all have the HeadText1 and HeadText2 character styles. While keeping character styles is a good default… people might want to keep them in the Table of Contents… there should be a checkbox for "strip character styles" for documents where you are using this best practice for running headers.

The only workaround I've found is to make up a new Master Page just for the contents pages, without the headers.

If anyone can think of a better header… or if Adobe sees fit to add this feature to the Table of Contents generating function… please let me know!

Thank you.

Views

2.0K

Translate

Translate

Report

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 ,
Jun 09, 2019 Jun 09, 2019

Copy link to clipboard

Copied

Are you using a book file or is this an all-in-one document?

My front matter, and sometimes back matter, often uses unique master pages (and sometimes unique header paragraph styles).

That said, your feature suggest is useful for other reasons too--have you submitted it to Adobe yet?

David Creamer: Community Expert (ACI and ACE 1995-2023)

Votes

Translate

Translate

Report

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 ,
Jun 09, 2019 Jun 09, 2019

Copy link to clipboard

Copied

(Note: the original poster uses the phrase "headers" and I think he means "headings". To clarify, headers are items that repeat at the top of a page. Sometimes they're are called "running heads," and often have a mate named "footer." Repeating headers are also found in some tables that run on for 2 or more columns or pages.)

@ That's correct: when a TOC is made from a document's headings, any character styles applied to the document's headings will be carried into the TOC Entry when the TOC is generated.

TOC-Option_02.png

As David IDEAS-Training​ mentioned above, this would be a great feature request to post on InDesign User Voice  https://indesign.uservoice.com/

It would help if Adobe could add another option to the TOC Style definition dialogue, like this suggestion:

TOC-Option.png

Keith @

|    Bevi Chagnon   |  Designer & Technologist for Accessible Documents
|    Classes & Books for Accessible InDesign, PDFs & MS Office |

Votes

Translate

Translate

Report

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 ,
Jun 09, 2019 Jun 09, 2019

Copy link to clipboard

Copied

A better option would be the ability to map the character style to another style or to no style. This would help preserve styling like italics and bold that have different style names from font family to font family. This would be complicated because the interface would have to support multiple style replacements.

Votes

Translate

Translate

Report

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
Engaged ,
Jun 10, 2019 Jun 10, 2019

Copy link to clipboard

Copied

To IDEAS-Training, who said,

Are you using a book file or is this an all-in-one document?

Yes, I am using a book file and this is a chapter in this book file; but, I am self-publishing each chapter as a separate PDF, and want each chapter to have an independent contents.

My front matter, and sometimes back matter, often uses unique master pages (and sometimes unique header paragraph styles).

Mine, too; but I hate having to create a new Master Page to get around a problem. It's using a sledgehammer to kill a fly.

That said, your feature suggest is useful for other reasons too--have you submitted it to Adobe yet?

  Not yet, waiting to see all the great ideas yinz on this forum post before submitting a suggestion. *Yinz is Pittsburghese for the New York youse or the southern y'all or the deep southern all' y'all. See http://www.pittsburghese.com/

To Bevi Chagnon, who said,

the original poster uses the phrase "headers" and I think he means "headings". To clarify, headers are items that repeat at the top of a page. Sometimes they're are called "running heads," and often have a mate named "footer." Repeating headers are also found in some tables that run on for 2 or more columns or pages.)

I reviewed my post and, although it is confusing to talk about headings and headers at the same time, but I think my use of the terms is correct in the post. Towards the end, I ask for ideas for changing the header; I would like to have a master page with a header that works in the main body of the document as well as on the contents page. Did I mention how I hate having to create more master pages?

And to Scott Falkner, who said,

A better option would be the ability to map the character style to another style or to no style. This would help preserve styling like italics and bold that have different style names from font family to font family. This would be complicated because the interface would have to support multiple style replacements.

Yessss! That's why I posted here before submitting a formal suggestion for a change in InDesign! Thanks for the thought. It shouldn't be that hard to code, and while they're at it they can make the whole process of managing TOC styles more aligned with how we manage other InDesign styles! As a UX dweeb, I find TOC style management confusing, so I suspect others do as well. Will await other comments before posting a specific suggestion for people to up-vote.

Votes

Translate

Translate

Report

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
Guide ,
Jun 11, 2019 Jun 11, 2019

Copy link to clipboard

Copied

Hi

I would find it a better practice to use "End nested style characters" instead of manually applying a character style.

Don't forget that if manually applied character styles are carried over in the TOC, character styles applied using nested or grep styles are not.

So, what I would do is replacing the manually applied h1 and h2 char styles by [none] style and add an "End nested style character". Then add a nested style to apply char styles up to it.

You can use a Grep F/R to do it in one click (I assume your chunks are always placed at the start of the paragraph, maybe it's not always the case. If so, there are other solutions, but the general idea is still valid)

That's it... Your nested char styles will be carried over in the running headers but not in your TOC.

Of course, If you don't want Toc title to be displayed in the running header, just apply another para style to it in the TOC options.

Illustrated example: (char styles are colored for better understanding)

toc.gif

Votes

Translate

Translate

Report

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
Engaged ,
Jun 12, 2019 Jun 12, 2019

Copy link to clipboard

Copied

Vinny38, that's a brilliant use of nested styles, and the End Nested Styles character!

I looked at my document to see if I could do it. However, in many cases, the HeadText1 and HeadText2 character styles I've applied to a subset of the heading, although they usually start at the beginning of the heading's text, sometimes start in the middle as something in the middle of the heading makes a better short running header.

Votes

Translate

Translate

Report

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 ,
Jun 12, 2019 Jun 12, 2019

Copy link to clipboard

Copied

Use None up to fist ENSC. Insert an ENSC at the beginning or a heading when you want the heading to start with the style.

Votes

Translate

Translate

Report

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
Engaged ,
Feb 11, 2024 Feb 11, 2024

Copy link to clipboard

Copied

I finally decided it was simpler to just create a new Parent Page for the Table of Contents pages with "Table of Contents" hard-coded as a header.

Votes

Translate

Translate

Report

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 ,
Feb 12, 2024 Feb 12, 2024

Copy link to clipboard

Copied

LATEST

Sometimes the fancy automated stuff just isn't worth beating into submission when a simple approach does the job.

 

FWIW, I was updating an older book that has a number of examples of heading character styles pulled into the TOC entries. In the past, since this was a low-value project overall, I just fixed the four or five entries manually and let it go. This time, I spent a considerable amount of time trying to automate the process, so that each TOC update generates without flaws.

 

It is surprisingly difficult, and those character styles are surprisingly resilient. I was able to write a GREP style that patched one problem — keywords highlighted in the heading — but had to use roundabout methods to do it, text scaling instead of font size or weight. Another heading that simply had a highlight color applied resisted all efforts to override the color with applied character styles (using GREP, nested and line style methods).

 

ID's TOC feature drives me crazy, in that it has so many options and features (such as the granularity of being able to style both page numbers and the tab space in between)... but has these oddities of collecting garbage that can't be excised from the result with any reasonable process.


â•Ÿ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) â•¢

Votes

Translate

Translate

Report

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