I'm making books for print and epub use (using CS6, Windows, latest update), and to avoid duplicating work I make the file for pdf and then create a new version to be the epub (mostly to add the TOC). I don't use separate files and the book function if I can help it, because it's a pain in the *** when you have 50+ separate chapters, and until recently this gave me no problems.
The first couple of times I did this it worked perfectly, but now I keep getting an infuriating problem: when I generate the table of contents, Indesign always generates a new text frame and places it on top of the existing frame (see picture). Nothing I've done can make it slot into the frame of the story, and no matter where I try to insert it, it comes up in the epub at the end (usually without formatting or break from previous text). I've tried different TOC styles, playing with the TOC options, and copying the whole text into a new document, to no avail.
It might be relevant that when I create new blank pages (e.g. add a spread between pages 1 and 2 to try fitting the TOC there), whether using a master or not, they don't fit into the frame of the story either - the threads completely ignore them and their contents still appear at the end. And it doesn't make any different whether smart text reflow is on or not. Again, this wasn't a problem I had in the first couple books, but I haven't found an option which turns this off.
Can anyone tell me why this might be happening (e.g. an option or a function of Indesign I haven't understood, though if so I don't understand why it worked the first couple times) and how to stop it? I'd just like to be able to make a TOC and add pages within the story, without all this overwriting!
A TOC is NEVER part of the text flow (or at least it isn't unless you paste it in manually, and you should never do that). If it were part of the same story you would lose your whole book when you update the TOC bucause that will replace the TOC story in its entirety.
Leave a blank page, or pages, to hold the TOC story.
That explains part of it, plus one of the further problems I had while trying to fix this - thank you!
But in a previous one (below), while the TOC text doesn't belong to the flow of the document, I was able to insert it with no problems (next picture)
whereas when I try to insert to TOC now, I get both a page which doesn't belong to the text flow, and a new TOC frame which superimposes itself over whatever is there I've deliberately shrunk it so you can see). And no matter what I do, I can't get the TOC to appear anywhere other than at the back of the document.
Hope you can help - thanks for taking the time to answer!
Definitely the TOC model, unless Indesign has taken on a life of its own - I've actually never used the cross-reference feature, because all the books are fiction and don't need anything that complicated. It's just the 'Table of Contents Styles' and 'Table of Contents options' involved. It doesn't seem to make any difference whether I create a new TOC style or import one which worked in a previous document.
Then the only other thing I can think of is you manually threaded the frames after adding the TOC. As I said earlier, this would be a very bad idea. In your shots above I think you would be far better off to split out the tiltle page and the TOC each into their own unthreaded stories, and my personal prefernce is that each chapter is an independent story, but that's more a matter of personal choice and how you have your styles and master pages set up. I find chapter starts are easier to control with a special master page if the chapters are not threaded together.
I tried manually threading on a copy of another document in an attempt to fix this problem (also didn't work) but not on this one. So a bit stumped how it happened here and keeps happening on all my new books.
I'll try what you suggest, though I haven't used stories thus far - could you point me to a good explanation of how to use them, or even (if such a thing exists) of how to set ta long document up the way you suggest? I'll certainly have a go if it makes managing book-length things easier.
Not sure if I'm following you completely but...
Don't try to thread a generated ToC into an existing text frame. Allow it to be separate, perhaps by adding a page or two in front and pouring forth the ToC text there.
When you need to update the Table of Contents, click on Update Table of Contents; not Table of Contents. No doubling up of frames; rather it updates the existing ToC frame.
For ePub, you don't have to actually generate a ToC; merely set it up and SAVE A STYLE. Once exported to ePub, there will be a navigational Table of Contents in the ePub. If you also want an internal HTML ToC on the pages of your ePub, then, yes, go ahead and generate and place your ToC on a page by itself. Upon exporting to ePub, you will have both a navigational ToC, and a more convenient hypertext ToC on a page.
Don't forget to order your pages by means of the Articles panel; rather than trying to flow all your textframes together.
"Story" is the term used in ID to describe a continuous block of text, either contained in a single frame, or threaded through multiple frames, so any text frame that is not threaded to others contains a single story. A group of frames that is threaded together also contains a single story, so if you break the threads between chapters, for example, you will wind up with separate stories.