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.

 

Randy Hagan
Community Expert
Community Expert
November 16, 2022

That works too. A single text thread, in order, creates the simplest reading order: just one, with the total order in your preferred sequence from beginning to end.

James Gifford—NitroPress
Legend
November 16, 2022

I'm not sure there's any truly reliable alternative to a single (ID) text flow. I recall experimenting with article order and discarding it as a technique; I'd have to go tinker again to see why.

 

EPUB is like a web page: it all has to be one flow, in the desired order. Multiple chunks will not behave predictably. Even if there are multiple XHTML segments, they are controlled and ordered by the overall structural code, and that's created in a linear model.

 

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