Copy link to clipboard
Copied
This seems to be an apt place to ask a similar but slightly different question.
I am making an anthology, and each story has three items: StoryName, Author, and Translator.
Each of them has a different paragraph style.
I would like to generate a TOC with two of these items on the same line, optimally:
StoryName by Author
Translated by Translator
Any suggestions?
I've been using InD for maybe a decade now, but still run into things that leave me clueless.
Edward Lipsett
Kumamoto, Japan
Hi Edward:
I see three options to get where you want to go:
Copy link to clipboard
Copied
Hi Edward:
My first question is are those three elements each their own paragraph in the source files (before you get to the TOC)?
For example:
StoryName¶
by Author¶
Translated by Translator¶
Can you share a screen shot of the top of a story with those elements?
~Barb
Copy link to clipboard
Copied
Yes, each item has its own graf and style, for example:
Copy link to clipboard
Copied
You could probably build a Find and Replace with GREP and save it to reuse it. I'm not good enough with GREP to pop out the code—I'd have to work it out and it might take 5 to 15 minutes, depending on if I got it right the first time. Plus I'd have to be on my computer, not my iPad.
The theory is the you find the text in each of these styles and the Returns. You put them in parenthesis to become Found 1, Found 2, etc.
When you Replace, you put in $1 (or is it 1$) meaning the first found condition.
You skip Found 2, the first Return
You add the text "by "
You add the Found 3, the author and the return
You add the text "translated by "
Followed by Found 4, the translator and the return
Remember to use parenthesis to enclose each found condition and when you replace, you can drop out things you don't want like the Return after Story Name.
Copy link to clipboard
Copied
An interesting idea, thank you.
Given that there are only about a dozen entries in this TOC there isn't much point in investing the effort: it would be quicker to just revise the information in the TOC manually.
I was hoping there was a way to set things up so it could be handled automatically by InD in this and future books.
Getting a working script and modifying it as needed for future books is certainly a possibility for future use, though!
Copy link to clipboard
Copied
Hi Edward:
I see three options to get where you want to go:
~Barb
Copy link to clipboard
Copied
Thank you to everyone.
Unfortunately nobody had any amazing surprises for me, but some good ideas came up.
I'm used to managing things in FileMaker, where this sort of thing is trivial, and was really hoping InDesign might offer an elegant solution.
Edward
Copy link to clipboard
Copied
Hi Edward:
I'm sorry we didn't have a one-step answer for you.
~Barb
Copy link to clipboard
Copied
Edward, the only other idea I have is that you need to keep this on your radar at the end of the document.
It may only have a dozen entries, but in my experince, there will be a dozen updates in the day or two before it goes to the printer, and each time you will think that it's the last time.
That's why I always go for the solution that saves me time later instead of now.
Yes, in FileMaker, it would be easy. Also in Ventura Publisher, which allowed you to assign No Line Break and have the next paragraph start on the same line as the previous—either when the previous paragraph stopped or with a specified indent. It would work perfectly in your situation, and I miss that feature!
Copy link to clipboard
Copied
Ed,
Barb's solution to my issue worked for me, but in another book, I did have completely different worded entries in the ToC than what was on the page. In that case, I did use entries on another nonprinting layer with that info to pull into the ToC in the format I wanted. It worked perfectly. Then for the ebook I turned off those layers and use a different saved ToC setting for generating the ereader/device ToC. I didn't want a ToC in the text so I put that in a different layer too and turned it off. (With the ebook conversion set to eliminate blanks.
Works, not elegant, but no need to edit after an update.
Sue
Copy link to clipboard
Copied
Thank you, Sue.
A reasonable extension of her suggestion, which seems quite useful.
It is easy enough to define a procedure for making the print and ebook editions, bypassing all the downstream decision-making (and hopefully most of the errors!).
I'll give it a try.
Copy link to clipboard
Copied
I do cheats for ToCs when they become a little tricky, as I can't spend hours figuring out the best way, or when I can't figure it out.
I anchor a 'non-printing' text box to the headings with the correct text for the contents page, in a style sheet with (hidden) on it somewhere, so it's easier to sort the list out. Then you can put exactly what you want to appear for that page.
Only issue with this cheat is, if you have other text on that page in the text string that appears on the ToC, they all come before the anchored text. Has thrown the ordering out when subheading in the text appear before the main head in the ToC.
Seems to work pretty well once you've set up the correct styles for these non-printing headings and updated the Table of Contents panel. Not very elegant, work works, and have reused jobs successfully with updated page numbers.
Copy link to clipboard
Copied
Yes, I'd considered doing that, and have used in for an indexing issue in the past.
The problem is that these files will be used to make the ebook as well, and it would be nice to find a way to avoid introducing content that has to be scraped off again later.
Even if the generated TOC isn't used in the ebook, the hidden text will still be in the file unless I go back and manually delete them all.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now