Highlighted

InDesign Table of Contents - Content to Appear on one line

Community Beginner ,
Apr 25, 2020

Copy link to clipboard

Copied

At the present, I have a TOC that looks like this:

Screen Shot 2020-04-26 at 1.37.31 pm.png

 

 

But I want all of the content on one line like this (meaning, each title and content has its own row)

 

Screen Shot 2020-04-26 at 1.43.01 pm.png

 

How do I acheieve this? I have created Paragraph Styles to pull the information through.

Thank you in advance for your help.

 

 

 

 

[Even without seeing the invisible chars and after having generated the TOC], it could just be a simplistic set of 3 regex! … No more.

 

Find:  ^\t(\t\d{4}\t\d+\r)(\t.+?)$\r?    Replace by:  $2$1

Find:  ^[^\t]+\K\r    Replace by:  nothing

Find:  \r\z    Replace by:  nothing

 

Capture d’écran 2020-05-14 à 22.30.55.png

 

(^/)  The Jedi

Topics

How to, Print, Scripting, Type

Views

598

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

InDesign Table of Contents - Content to Appear on one line

Community Beginner ,
Apr 25, 2020

Copy link to clipboard

Copied

At the present, I have a TOC that looks like this:

Screen Shot 2020-04-26 at 1.37.31 pm.png

 

 

But I want all of the content on one line like this (meaning, each title and content has its own row)

 

Screen Shot 2020-04-26 at 1.43.01 pm.png

 

How do I acheieve this? I have created Paragraph Styles to pull the information through.

Thank you in advance for your help.

 

 

 

 

[Even without seeing the invisible chars and after having generated the TOC], it could just be a simplistic set of 3 regex! … No more.

 

Find:  ^\t(\t\d{4}\t\d+\r)(\t.+?)$\r?    Replace by:  $2$1

Find:  ^[^\t]+\K\r    Replace by:  nothing

Find:  \r\z    Replace by:  nothing

 

Capture d’écran 2020-05-14 à 22.30.55.png

 

(^/)  The Jedi

Topics

How to, Print, Scripting, Type

Views

599

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
Apr 25, 2020 0
Adobe Community Professional ,
May 14, 2020

Copy link to clipboard

Copied

So you're saying that the year is a separate paragraph in the document, and the song title a different paragraph, and therefore when you pull them into the TOC they appear as 2 separate paragraphs?

That's just the way it works. You'll have to generate the TOC, and then manually remove and reformat the way it looks.

Of course, the bad news is that if you ever need to update the TOC, you'll lose that manual formatting and have to redo it.

If that's a problem, check out my (not free) script: https://www.id-extras.com/products/livetoc/

It will turn the page numbers into live cross-references, so they update completely automatically if anything move around in the document. So you would (1) generate the TOC, (2) run LiveTOC, (3) format the TOC manually however you like, and at this point the page numbers update automatically so you'd never need to manually format it again.

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...
May 14, 2020 0
Community Beginner ,
Aug 25, 2020

Copy link to clipboard

Copied

Thank you TAW. I will try the manual suggestion in the above, but if all else fails, I will buy your script and give it a go. Thank you for your help with this issue.

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...
Aug 25, 2020 0
Advocate ,
May 14, 2020

Copy link to clipboard

Copied

[Even without seeing the invisible chars and after having generated the TOC], it could just be a simplistic set of 3 regex! … No more.

 

Find:  ^\t(\t\d{4}\t\d+\r)(\t.+?)$\r?    Replace by:  $2$1

Find:  ^[^\t]+\K\r    Replace by:  nothing

Find:  \r\z    Replace by:  nothing

 

Capture d’écran 2020-05-14 à 22.30.55.png

 

(^/)  The Jedi

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...
May 14, 2020 0
Community Beginner ,
Aug 25, 2020

Copy link to clipboard

Copied

Such a rookie here! Sorry Mike, I am still stuck on this issue. Where will I find the 3 Regex you have mentioned? I have looked in my TOC Style, and in the individual paragraph styles for the characters you have typed, but can only see (tab) ^t regex on the Year Style. Here is a screen shot with hidden char values turned on.

 

Screen Shot 2020-08-26 at 9.40.45 am.png

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...
Aug 25, 2020 0
Community Beginner ,
Aug 25, 2020

Copy link to clipboard

Copied

Apologies for the delayed reply. Thank you so much for your information, I will give it a try.

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...
Aug 25, 2020 0