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!
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.
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.
Copy link to clipboard
Copied
Thanks so much for the tip, Peter!
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:
Result:
Best,
(^/) The Jedi
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.
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?
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?
By @SP346346324
Set color to [None], Point size to 0.1, horizontal scale to 1%.
Copy link to clipboard
Copied
"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?
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.
Copy link to clipboard
Copied
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!)