Skip to main content
Participant
July 17, 2024
Answered

Is there a way to only include certain words in a table of contents entry?

  • July 17, 2024
  • 3 replies
  • 632 views

Hello everyone,

 

I am trying to create a table of contents for a report I am designing. I am using paragraph styles in order to do so, but I don't want to include the entire paragraph in the table of contents, maybe only 1-5 words. Is there a way to do this automatically? Or do I have to manually edit the table of contents?

Thanks in advance!

This topic has been closed for replies.
Correct answer Peter Kahrel

The standard classic trick is to add a text frame next to the paragraph and place he abbreviated toc text there, and use that for the toc. If the text can move you can place that frame in an anchored frame. To make sure that the text in that dummy frame isn't printed, add a text condition or place it on the pasteboard. The dummy frame must overlap the page a bit, a single point is enough.

3 replies

Community Expert
July 17, 2024

There are various ways to truncate titles, but what Michel and Robert propose works only if it's ok to cut off a title at a certain point. But when you need a recast version of the title, which often happens, you'll need a separate frame.

 

Another thing is that hiding text is a problem for accessibility and I think you'll need some post-processing in Epubs (James can tell us all about that one!)

Robert at ID-Tasker
Legend
July 17, 2024

@SP346346324

 

"How" do you want to decide if it will be 1 or 5 - or in between - number of words?

For each paragraph individually or the same number of words for all paragraphs? 

And always from tge start or sometimes from the middle? Or last 5?

 

Participant
July 17, 2024

It was just an example, it will vary between each subject. I just don't want to include the full paragraph, but that is the only option InDesign has.

Peter KahrelCommunity ExpertCorrect answer
Community Expert
July 17, 2024

The standard classic trick is to add a text frame next to the paragraph and place he abbreviated toc text there, and use that for the toc. If the text can move you can place that frame in an anchored frame. To make sure that the text in that dummy frame isn't printed, add a text condition or place it on the pasteboard. The dummy frame must overlap the page a bit, a single point is enough.

Participant
July 17, 2024

Thanks so much for the tip, Peter!