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

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

New Here ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

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!

TOPICS
How to

Views

311

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

correct answers 1 Correct answer

Community Expert , Jul 17, 2024 Jul 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.

Votes

Translate

Translate
Community Expert ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

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.

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
New Here ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

Thanks so much for the tip, Peter!

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 ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

Hi Peter,

 

Placing manually a "non-joiner" char where you want (to have the right number of words from the beggining of the para) and making the end of the TOC para invisible using this simple Grep style:

 

Capture d’écran 2024-07-17 à 18.02.46.png

 

Result:

 

Capture d’écran 2024-07-17 à 17.57.05.png

 

Best,

(^/)  The Jedi

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 ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

I was going to suggest a slightly more complex method, but basically tagging the TOC target paragraph, with either "invisible" characters or Character Styles, and then modifying the TOC result using GREP styles, allows some fairly elaborate munging. Needs very careful setup and management, though. This is a good approach if the need in the TOC is simply a truncation of the heading/target.


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (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
New Here ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

I tried this, but it's not working. Is there something I need to do to the 'invisible' character 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
Community Expert ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

quote

I tried this, but it's not working. Is there something I need to do to the 'invisible' character style?


By @SP346346324

 

Set color to [None], Point size to 0.1, horizontal scale to 1%.

 

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 ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

@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?

 

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
New Here ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

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.

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 ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

LATEST

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!)

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