Skip to main content
Known Participant
November 16, 2022
Question

TOC - Ebook

  • November 16, 2022
  • 2 replies
  • 1125 views

Hi, I'm having difficult with the TOC in my ebook. The book is all one document and I've created the TOC within it, checked the 'make text anchor in source paragraph' etc. I've now watched a ton of videos and read loads of articles on how to do it, but the problem I'm having is that the TOC always appears at the end of the document, not the beginning, when I export it as Epub. I've tried everything to get it to stay at the front, but no luck! (Also, the copyright page is repeating at the end of the document when exported, again no idea why!)

This topic has been closed for replies.

2 replies

James Gifford—NitroPress
Legend
November 16, 2022

Your TOC must have its frame anchored to the paragraph you wish it to follow. Just placing it on a page, as you do for print, will mean it's a separate object/text flow, and will follow the primary flow in the exported EPUB.

 

Using ID's article order does not always control this behavior. An EPUB must be a single text flow, and any additional blocks/flows will follow the primary one.

 

Known Participant
November 16, 2022

Thanks all for your help. I've tried ordering the book through the articles and that doesn't work. There is no anchor sign on the text box around the automatically generated TOC, so I don't know how to anchor it .... I've attached the opening pages, including the TOC. Sorry, I'm totally new to learning InDesign. Done the paperback version, but really struglling with exporting to Epub!

James Gifford—NitroPress
Legend
November 16, 2022

Place your TOC frame where you want it in the text flow.

 

With frames showing (work view, not preview), drag the blue box at upper right on the TOC frame to an anchor point at the end of the immediately preceding paragraph.

 

The whole TOC will be inserted at that point. Pro tip: the TOC box does NOT have to be large enough to show all of a long TOC, and you can't anchor multiple frames anyway. The only aspects of the TOC frame that matter are its width (it should be full margin width unless you want it narrower), and that it's anchored where you want it to appear.

 

ETA: Additionally, you don't necessarily need an in-flow TOC on an EPUB. Both EPUB and Kindle are built to use the dynamic, reader-managed TOC. You can have two different TOCs as well, one placed in the text and one optimized (perhaps with more levels of entry) for the dynamic TOC.

 

Randy Hagan
Community Expert
Community Expert
November 16, 2022

Your issue stems from the reading order (more specifically, the text placement order) of your document flow.

 

When creating reflowable epubs, the file placement sequence drives what's placed in the epub from first to last. Of course natural workflows dictate that navigation tools like the Index and Table of Contents are the last items created, to be inclusive of all the rest of the finalized content. That stands in contrast to epub structure, where it might be nice to place the Index last, but defeats the purpose of having a ToC in the first place.

 

You need to set the structure of your epub by ordering the articles/text blocks the way you'd like them tio bve, rather than the sequence InDesign creates. You do that through the Articles panel, and you can get more information on how to do that through this link.

 

Hope this helps,

 

Randy