View Full Version : Generating TOC entries for prelims / end matter in InDesign


forlor
07-06-2010, 11:07 AM
Hello,

Wondering if anyone has insight / ideas on this...

I am converting a series of books to ePub in InDesign, which largely follow the same format (cover, title page, dedication, preface, chapter 1...etc.), though there is occasionally some variation between titles (some do not have a dedication, for instance). I am using the InDesign Table of Contents dialogue box to generate the TOC entries in ePub (mapped to the chapter heading style). However, we would also like to have TOC entries for the prelims (eg, title page, dedication) and end matter (eg, copyright page), which do not have headings associated with them.

The workaround that I've been using is to create text anchors on those pages. Though this does generate TOC entries, the problem is that it uses the text selected for the text anchor (as opposed to "Title Page" or "About the author" as we would like). I then need to go into the NCX file and manually edit the text for each of these entries.

Is there any way to get InDesign to generate the correct TOC entries the first time around?

Any ideas at all would be appreciated.

Thanks,
Joseph

Jellby
07-06-2010, 11:45 AM
Maybe you could write the title you want for the TOC entry, make it an anchor, and apply a "display: none" attribute. But I don't know how InDesign works.

forlor
07-06-2010, 12:56 PM
Yes, that will do it. It never occurred to us to use the display attribute.

Thanks for your help!

charleski
07-06-2010, 01:08 PM
It would be a lot easier if InDesign didn't include text on hidden layers in its epub output. But...

Chang
07-07-2010, 01:32 AM
Maybe you could write the title you want for the TOC entry, make it an anchor, and apply a "display: none" attribute. But I don't know how InDesign works.

Do you mean to apply "display: none" in CSS or..?

Jellby
07-07-2010, 06:18 AM
Yes, I mean in CSS, assuming InDesign lets you add CSS code (or something else that is turned into "display: none" upon conversion).

charleski
07-07-2010, 07:51 AM
InDesign lets you specify an external css file to use for the epub. You just need to make sure that the selectors in this file match the names of the styles that you've used in your InDesign document and that's what will appear in the epub.

If you're using this feature then you have to specify all the styling in the external css file, as InDesign won't generate any styles itself. So you can create a css file like

.normal {
...
}

.flush {
...
}

.head1 {
...
}

.hidden {
display: none
}

then create paragraph or character styles in InDesign named 'normal', 'flush', 'head1' and 'hidden'. Any text which has been given the style named 'hidden' will not appear in the epub, though it will still be present in the xhtml code.

Chang
07-07-2010, 08:26 AM
Thanks a lot for both of you (again)! :) I'm not so familiar with every CSS feature and didn't know that something like "display: none" exists. I have circled this same problem by deleting the unnecessary text after I have exported EPUB from InDesign. I have just moved the anchor to the next element in XHTML code. Good to know that there's this kind of option as well.