Skip to main content
Edward Lipsett
Known Participant
January 10, 2018
Answered

Branched: TOC question

  • January 10, 2018
  • 2 replies
  • 939 views

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

    This topic has been closed for replies.
    Correct answer Barb Binder

    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!


    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

    2 replies

    REALkatolotus
    Participant
    January 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.

    Edward Lipsett
    Known Participant
    January 11, 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.

    Barb Binder
    Community Expert
    Community Expert
    January 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

    ~Barb at Rocky Mountain Training
    Edward Lipsett
    Known Participant
    January 11, 2018

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