Moved to InDesign EPUB forum.
What version of InDesign?
Try cc2015. I just did a job like that and it was fine.
I had the same issue and found this old thread with no answer yet,
After some examination, I noticed that the front matter for the book was part of a continuous thread with the book content.
I had added the additional pages needed for the TOC after the front matter and before the book content.
So when I exported the epub, the linked front matter and book content came first followed by the TOC.
I just needed to split the front matter into a separate thread (using Story Editor) before the TOC and have the book content in its own thread after the TOC.
The TOC then shows up in the proper place.
Hope this helps
I tried doing this and my TOC is still going to the end, even when I try to manually format it using hyperlinks...
I found a bit of a workaround. You can copy and paste the TOC text into the main text flow of your document. The drawback is that you lose the option to automatically update the TOC.
- Create a TOC and place it in a box off to the side.
- Select all the text in the TOC box.
- Click inside your main doc and paste.
I'm not sure if this will mess up links in long reflowable epubs. It worked for me.
If you need to update the TOC then generate a new one and paste it over the old text.
This video explains how to do it. But, I skipped the RTF workflow and just copy-pasted it.