Highlighted

Character Styles in Table of Contents Entries

Explorer ,
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

594

Likes

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

Character Styles in Table of Contents Entries

Explorer ,
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

595

Likes

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
Adobe Community Professional ,
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?

Likes

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
Reply
Loading...
Adobe Community Professional ,
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 InDesign + PDFs | Books @ www.PubCom.com/books — NEW! Accessible InDesign + PDF

Likes

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
Reply
Loading...
Adobe Community Professional ,
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.

Likes

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
Reply
Loading...
Explorer ,
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.

Likes

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
Reply
Loading...
Guide ,
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

Likes

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
Reply
Loading...
Explorer ,
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.

Likes

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
Reply
Loading...
Adobe Community Professional ,
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.

Likes

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
Reply
Loading...