It would be possible, but the book has to be set up the same way (with the Title and Author as a single paragraph), or you would have some workarounds that may be just as much trouble as doing it manually.
Have you tried setting up the TOC, so that you are aware of some of the problems you are going to run into?
I can give you something that will be a little less manual, although not completely automated. It might seem like a lot of work, but it only takes a bit of time in the setup, and after that, it's all copying and pasting. Have a look at this screenshot:
I put in some placeholder text, created a headline style, and another style (the 6pt magenta text) called For TOC. I put in the title and author placeholders, separated by a tab and set the width of the text frame to something just below the width of the text frame that holds the body text, and I collapsed the height to fit the text. I set the placeholder text frame to non-printing with Window>Output>Attributes, copied the frame, and pasted it just after the headline paragraph (with a space between the headline and the now-anchored placeholder frame).
I then set the inline object to a custom position so that no matter where the headline was on the page, the anchored frame would be at the top of the page away from the spine. And, because the inline frame is set to non-printing, it won't show up on printouts or when exported to PDF. Once that's all set up, just copy the anchor and the space (you can use the story editor to make sure you are selecting just those two things) and paste them next to any headlines (or titles, in your case). You then copy the titles from the main text and paste them over the Title in the placeholder (I used Edit>Paste Without Formatting so that the style of the headline would change to the style of the placeholder). You would also type in the name of the author when you are entering the title into the placeholder.
In the table of contents, you would select the For TOC style, instead of the headline style for inclusion into the TOC. Make a paragraph style for the actual TOC, and set the tab stops there, and you will have:
The placeholder will travel with the title, so as long as you remember to update any text in the placeholder if you choose to update the titles, you should be good to go.
1 person found this helpful
Your example points out your first problem: the title and author are not together in the contents of the book so that is what the TOC reflects. First you have to establish whether or not the content can be made TOC friendly. If it can't, then you have to decide whether a workaround is worth it. If you only have a few chapters and they aren't likely to change in wording or change pages drastically throughout the editing process, then something like Michael suggests just isn't worth the effort. Let's face it, some TOCs aren't even worth the effort spent automating them.
Can you change the content so that the title and author are in the same paragraph? Use a soft return and nested styles to maintain the look you have now -- just do so with one paragraph instead of two.
Thank you both for your help. I think it is probably easier to just do it manually as I have been doing.
First, a caveat. I'm new to the software and I'm using CS4.
I'm not sure if this would work but my last assignment in school was a menu so it had Item ..... Price1 .... Price2 and so forth. Some foods had small and large prices. Anyway, in a word doc, everything was typed out in this format:
and so on...
I grabbed the list and dropped it into a text box, then used the Indents and tabs settings with a leader of a '.' and used the little sliders to add tabs and move them until everything fit the space how I wanted it.
I know this will get the look you're trying to achieve. I've not worked with an actual table of contents that will cross-reference pages further in the document though. Nor do I know from whence you are gathering the data for your table.
Just thought I'd throw that in, though, in case it was only the look you were concerned with.
1 person found this helpful
Rayven: the issue here is strictly regarding Table of Contents. It is not about look or formatting, it is about structure and how InDesign builds a TOC.
The TOC is generated from the styles sheets in use and so is directly related to the paragraph structure of the document. That is the issue: Ian wants a single TOC entry, but from two separately defined paragraphs. That is just not how InDesign works, hence the discussion about the workarounds necessary to acheive the desired result.
Thanks Rayven for trying to help but it is as M Blackburn has said.