Skip to main content
Participating Frequently
April 1, 2024
Question

Highligting certain items in Table of Contents

  • April 1, 2024
  • 7 replies
  • 1179 views

Let's say I'm building a Table of Contents in the usual way, i.e. based on specific paragraph style.

 

Is there a way to go one step further and highlight specific ToC items, so for example if I had a generated ToC that looked like this:

 

Contents

0. Something

1. Something Important

2. Something Else

 

Is there a way I could highlight "1. Something Else".

 

For clarity: When I mean "highlight", I mean as in what you would do with a highlighter pen. 

This topic has been closed for replies.

7 replies

Barb Binder
Community Expert
Community Expert
April 1, 2024

Is the TOC in the same file as the source paragraphs or in its own InDesign file (and pulled into a book)?

 

If the latter, it's worth noting that InDesign will pull in the character styles from the source paragraphs. If they're in the same file, there's not much you can do, but if they happen to be in separate files and pulled together via a book, you can add a character style to the source paragraphs that doesn't change the formatting, and then define the same character style in the TOC chapter to be yellow highlighting. This way, it's completely automatic and a TOC update doesn't throw you off your game.

 

~Barb

~Barb at Rocky Mountain Training
James Gifford—NitroPress
Legend
April 1, 2024

The really short answer is that you can edit a TOC in almost any way you like after it's generated or updated. At that point, it's just a text list with some hyperlinks embedded. So highlight away, using a Character Style.

 

Doing so automatically would require, as noted, some kind of key or hook on which to hang a GREP or line style for those entries.

Lukas Engqvist
Community Expert
Community Expert
April 1, 2024

If you want things to be different in TOC they should be different in the Content. You normally want TOC to be able to be updated without any changes, else you will hesitate to update the TOC. I'm a bit confused by the numbers, are they the levels of the TOC or are they "chapter numbers". TOC is a little complex and so the question of what you are trying to do needs to be clear.

You can have several different Level headers in a TOC, you can also have several different Paragraph styles that generate the same level entry. Always show the advanced options or you are crippled with the TOC. (so much more difficult to learn when half the interface is hidden) Working with TOC you will normally need to make a style for each level/kind of entry in the TOC. I name mine "H1 in TOC", "H2 in TOC" or even more explicit. In this case they could be a "H1 type A" and "H1 type B"… but with accessibility think through that you are not giving mixed signals. 

Tim5FA0Author
Participating Frequently
April 1, 2024

@Lukas Engqvist 

quote

 I'm a bit confused by the numbers, are they the levels of the TOC or are they 

 

The numbers are part of the document. Its is a semi-formal document and so the sections are manually numbered.

So for the sake of this question, you can ignore the numbers.

Mike Witherell
Community Expert
Community Expert
April 1, 2024

If you want this live in the PDF, it would be edited in the Acrobat Pro > Bookmarks panel, where you can select text color and bold, italic, etc...

However, the background color appears to be only a gray highlight.

Mike Witherell
Tim5FA0Author
Participating Frequently
April 1, 2024
quote

If you want this live in the PDF, it would be edited in the Acrobat Pro

 

Well, yeah sure, that's the obvious answer, trouble is its a maintenance nightmare if someone hits "Update table of contents" in the source document.  😛

Robert at ID-Tasker
Legend
April 1, 2024

@Tim5FA0 

 

What are the rules/conditions for highlighting?

 

Legend
April 1, 2024

Create a Highlight character style that contains only the underline options, and apply that to the text you want to highlight

Tim5FA0Author
Participating Frequently
April 1, 2024

This sounds interesting. I will test.

Tim5FA0Author
Participating Frequently
April 1, 2024

Can't see an edit button, so to clarify, of course I meant highlight "Something Important", not "Something Else".   🙂