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

Branched: TOC question

Explorer ,
Jan 09, 2018 Jan 09, 2018

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

838
Translate
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 , Jan 10, 2018 Jan 10, 2018

Hi Edward:

I see three options to get where you want to go:

  • The first is to update the generated TOC (either with Find/Change queries as Jane-e suggested or manually as you suggested) but when you edit the book and update the TOC you have to re-edit it.
  • You could create a run-in TOC with the title and author on the same line and the translator on its own line, but both title and author have to have the same tag name. You could make that happen if you formatted the bylines with overrides. But since
...
Translate
Community Expert ,
Jan 10, 2018 Jan 10, 2018

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

Translate
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
Explorer ,
Jan 10, 2018 Jan 10, 2018

Yes, each item has its own graf and style, for example:

title.png

Translate
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 ,
Jan 10, 2018 Jan 10, 2018

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.

Translate
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
Explorer ,
Jan 10, 2018 Jan 10, 2018

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!

Translate
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 ,
Jan 10, 2018 Jan 10, 2018

Hi Edward:

I see three options to get where you want to go:

  • The first is to update the generated TOC (either with Find/Change queries as Jane-e suggested or manually as you suggested) but when you edit the book and update the TOC you have to re-edit it.
  • You could create a run-in TOC with the title and author on the same line and the translator on its own line, but both title and author have to have the same tag name. You could make that happen if you formatted the bylines with overrides. But since the word "by" doesn't appear on the page, you still have to add it to the TOC, or make it white on the page but show it on the TOC.
  • Or finally, inquire over at the InDesign Scripting forum: InDesign Scripting.

~Barb

Translate
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
Explorer ,
Jan 10, 2018 Jan 10, 2018

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

Translate
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 ,
Jan 10, 2018 Jan 10, 2018

Hi Edward:

I'm sorry we didn't have a one-step answer for you.

~Barb

Translate
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 ,
Jan 11, 2018 Jan 11, 2018

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!

Translate
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
Guest
Jan 11, 2018 Jan 11, 2018

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

Translate
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
Explorer ,
Jan 11, 2018 Jan 11, 2018
LATEST

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. 

Translate
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 Beginner ,
Jan 10, 2018 Jan 10, 2018

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.

Translate
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
Explorer ,
Jan 10, 2018 Jan 10, 2018

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.

Translate
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