InDesign to ePUB Problems: Some symptoms and their remedies
Getting InDesign (CS5) to produce a decent ePUB format ebook is so problematic, that I sometimes wonder why we are bothering to use it at all! We could after all, use tools to build the components of the ePUB package by hand coding. Dreamweaver is a possibility and Sigil may also be a way to go.
However, one strategy may be to use InDesign as a starting point and then accept that we need to edit the resultant XHTML and CSS. This is the method that I am using, and I am promoting this method with my students.
After a few frustrating sessions recently, I thought I would note down a list of problems that can be solved. This may not be a comprehensive list...
InDesign has a reasonably understandable way of building hyperlinks.
- First, you create the destination, by selecting the text on the page where you are hoping to take the user after they click the hyperlink.
- Show the appropriate tools here: Window > Interactive > Hyperlinks.
- Select a word and then create a new hyperlink destination. The name will be the selected word.
- Once done, go to the page location in the InDesign document, where you want a hyperlink.
- Select the word, and then 'Create New Hyperlink'.
This will result in an interactive hyperlink. But:
In the ePUB, you are very likely to have more than one XHTML file in the package. The hyperlink will probably be written like this in the earlier file:
It will need to be amended to take account of the XHTML file in which the destination anchor is located; thus:
Headings at the top of the Page
InDesign has a paragraph style feature that can force text of a certain style to 'Start paragraph on new page'. Yes, all very well, but when exporting to ePUB, this will be ignored unless you create a table of contents (on the paste board and not actually on the page), and set those heading to level 1. Then, when using export for ePUB ... > turn on 'Use First Level Entries as chapter breaks'. This will create separate XHTML files inside the ePUB package. However:
If you want to make sub-headings or full page illustrations also to start at the top of a page then you need to edit the CSS inside the ePUB package:
Locate the div or heading class for that style in one of the XHTML documents and then in the template.css file add the following rule:
Table of Contents does not create TOC in the ePUB
This is a recently discovered issue; don't put styles (paragraph or character) inside groups. InDesign, does not seem to be able to construct the TOC for the ePUB properly when encountering groups of styles.
This is really part of a common complaint by designers about the positioning of images in relation to text. When designers use InDesign to build page layout, then they are free to move graphics on to the page and make the text wrap around or stop above and start again below. Yes, it looks great and exports beautifully to PDF. But, the ePUB will probably look dreadful, the images will all be at the back of the book.
So, the first rule is that the images need to be anchored in the paragraph, where you want the image to appear. The truth is, though, that getting the images to be centered, or floating left or right, is something best left until to you can edit the files inside the ePUB package.
Even so, the usual method to centre a block that contains the image and its caption ie:
Does not work, So you will need:
Of course, I have written here, pictureblock, as the class name of the div. But, you will be dissapointed if you believe that this is the result of naming the object style in the InDesign document. Sorry, but InDesign, seems to name this block group, so you will need to rename this to something more appropriate like pictureblock.
Then add the element style definitions for pictureblock in the CSS file.
You will notice that we won't need all those extra divs (generated style etc) that InDesign produces.
Posted on 07 Apr around 8am