View Full Version : TOC best practices (InDesign to ePUb)


virtual_ink
07-03-2011, 03:38 AM
What is the best way to create the ePub TOC when exporting from InDesign CS5.5?

Elements to consider:

Cover (image only)
Title page
Copyright
Dedication (no title on page)
Contents
Epigraph (no title on page)
Section Title
Chapter Title
... and so on.

Ideally section titles will be TOC parent items, chapter titles as their children.

I want each of these elements to start on a new page. Am I right in saying page-breaks won't work and each element will need to be a separate document? How can I best achieve this?

charleski
07-03-2011, 09:14 AM
I assume this (http://indesignsecrets.com/forum/general-indesign-topics/indesign-cs5-5-to-epub-kindle-and-ipad-by-ann-marie-concepcion#6386) gives a bit more info on what you're trying to do.

Firstly, do you really want to burden down your ToC with all those entries? Cover, title, copyright and dedication are pages that the reader will pass through as they open the book and page to the text. Entries for those just get in the way of the entries that serve the reader's purpose. Furthermore, since they're clustered at the start of the book they're easy to find is a reader should want to look at the dedication again.

I see you include an entry for 'Contents'. Do you plan to include an xhtml page laying out the contents as well? Remember that ePub does not require this. A contents page is largely irrelevant for ePubs unless you lay it out well, adding some stylistic flourish or extra information to complement the chapter headings. A simple list of chapters is wasted space.

InDesign is still a bit poor as an ePub generator for many reasons, even in CS5.5 (I used to be a fan, but then became thoroughly disillusioned). You can, at least, now force page-breaks on an arbitrary paragraph style, but you can only chose one. It's possible to hack this by defining a style that will only be used to signal page-breaks, then insert an empty paragraph with this style just before your Section and Chapter headings. I've attached some files that show this in practice.

This produces what you want, but frankly I do NOT regard it as good practice - you're having to insert empty paragraphs which serve no purpose other than to get around the restrictions of InDesign. But right now this is the only way to achieve what you want without post-processing the epub file.

If you really want the best results, there's still no alternative to learning xhtml and css (which is incredibly easy and you can do in a day), then modifying the exported ePub in Sigil. This would also allow you to fix some other undesirable aspects, such as the way InDesign specifies paragraph margins and text indents in pixels.

virtual_ink
07-03-2011, 10:38 AM
Charleski, thanks very much for the detailed reply! Yes, my post in the other thread was the long-winded version of what I have reposted (I feared I was waffling, as I'm prone to do).

1. Do you really want to burden down your ToC with all those entries?
I was basing the idea on a few things, lack of knowledge being one. Firstly I'm using the ToC in Liz Castro's 'EPUB Straight to the Point' as a guide. But as this is an instructional manual, perhaps its not the right model for a novel?

Secondly, iBookstore were rejecting some books I submitted as they did not include 'all subsections' in the ToC. However, iBookstore may have been looking at content, not front-matter. It's hard to know, as I haven't been able to set up the reporting ticket system to get their rejection notifications, I'm trying to decipher the very minimal rejection notices I can obtain.

2. Do you plan to include an xhtml page laying out the contents as well?
Yes. I am under the impression that some readers may have their ToC display switched off, and/or some devices don't show them by default. I thought it might be best to include a page for the table of contents (with active links) to cover both bases.

3. It's possible to hack this by defining a style that will only be used to signal page-breaks
I had experimented with a similar idea, yours is much cleaner - thanks for the tip! I realise this isn't best practice, but I'll keep it in mind as a fall back. I'm suddenly in the deep end with deadlines mounting. That said, I'm happy to do some post-processing. I could easily delete the empty "break" line from each file with a find and replace.

I've been using TextWrangler (and Notepad++ on the PC) and becoming somewhat familar with some of the code. I haven't had much luck with Sigil yet, as I've been importing InDesign generated ePubs, and it seems to delete the toc.ncx, and not let me build a new one. I'm not sure what the deal is there.

4. there's still no alternative to learning xhtml and css (which is incredibly easy and you can do in a day)
Sounds like something I want to do. I'm trying to throw myself right into this. Any recommended learning resources?

Out of interest, would you care to elaborate on your disillusionment with InDesign (I mean - I think its way behind where it should be, and I'm a newbie, so I'd love to hear an experienced person's PoV - perhaps this is something you've elaborated on elsewhere?)?

And lastly, thanks once again for the reply, I really appreciate making contact with people via these forums.

charleski
07-03-2011, 02:50 PM
Well, take a look at any printed book - they don't include ToC entries for purely functional front matter elements like the title and copyright pages, and there's no reason for ebooks to be different. An introduction, foreword or author's note (i.e. something the reader might actually want to read) is different. Also, remember that people might chose to read this on their phone, and it's annoying to have to scroll past irrelevant fluff in the ToC in order to find the entries linking to the text you want.

All ePub readers can generate a ToC from the structure defined in the ePub, and it's usually far easier to access this (generally 1 or 2 clicks) than find an xhtml version at the front of the book. The only real reason to lay out a separate ToC is if you want one in which the chapters have substantial subtitles or additional text that wouldn't be appropriate for the generated ToC. Otherwise it's really just an unnecessary hold-over from print (in most cases they're included simply because the inferior Kindle format requires one).

Editing the file and removing the needless <p class="break" /> lines would certainly be a good idea in the long-run.

I learnt the basics of CSS from some web tutorials (http://www.w3schools.com/css/default.asp), and got the rest from playing around and reading posts here. I've looked at several books, but most are too long-winded and prone to pad things out in order to make themselves look more impressive. It's all really very simple, especially as there's no need to do anything really complex with the css selectors.

InDesign has been promising it would be useful for ePub creation since CS3. I could forgive the earlier attempts since it was still new to the process, but this is now the fourth version that claims to produce epubs and it still fails at certain basic elements. Text indents should always be specified in em, yet InDesign insists on using an absolute measure (pixels). The same goes for paragraph margins. Anyone who knows the basics about typography as applied to reflowable formats knows this, yet the engineers at Adobe can't be bothered to make the core changes that would be needed to allow InDesign to work properly for reflowable rather than fixed formats. On the other hand, they now allow you to specify the page margin in ems, which means the area devoted to text on the screen shrinks as you enlarge the font - this is just insane! (At least you're allowed to change this to use an absolute measure.) It all just gives the feeling that it's been designed by people who've never really sat down and thought through the things needed to produce a decent ebook, instead we get fluff like the ability to add <video> tags. For a program that's marketed and priced as a professional tool this is no longer satisfactory.