I am generating an epub file using InDesign CS5.5.
I have set up a TOC and selected it during the epub export. It has one level based on my paragraph style “Caption” and works perfectly when I test the ePub file on iBooks.
Most chapters start with an image, followed by a caption (in paragraph style “Caption”, the same as I’m using to generate the TOC) underneath.
Images are anchored (using the blue box) to this caption in the Indesign file.
I have forced a page break before the image in the export to epub to ensure the image comes at the top of the page.
So far so good. All looks great and everything, including TOC, works perfectly in iBooks on my iPad and in Adobe Digital Editions.
However, my file will not validate because the TOC markers in the chapters which begin with the anchored image are missing – even though the TOC works perfectly as I’ve mentioned earlier.
As far as I can make out from the HTML, the anchored image is overriding the TOC marker, hence the error.
I’ve manually edited the chapter files concerned for now as I’m under time pressure to finish the job, but I’d really appreciate any advice on how to set up my InDesign file to avoid this error in the first place for future books.
(I’ve tried anchoring the image to a space before the caption text, and anchoring it to a soft and hard return but no joy. I could start the page with the caption followed by the image and force the break after the image instead of before it to solve the problem but my client wants the image at the start of the chapter and I agree it looks much better that way round…….)
Any suggestions much appreciated.
I can post the HTML code the Indesign export is generating and the edited code if that helps at all.
Hi Steve,
Thanks for your quick response.
I have Version 7.5 of InDesign CS5.5. Not sure if that includes the patch? If not, where would I get the patch from?
On the error, here are a couple of examples from the first 2 chapters - it occurs in every chapter that begins with an image:
ERROR OEBPS/toc.ncx 23 62 'toc_marker-2': fragment identifier is not defined in 'OEBPS/Inspirational_Love_V1-1.html'
ERROR OEBPS/toc.ncx 29 62 'toc_marker-3': fragment identifier is not defined in 'OEBPS/Inspirational_Love_V1-2.html'
Also, here's an example of the original HTML generated by the export which is missing the TOC marker:
<div class="Basic-Text-Frame">
<p class="para-style-override-1"> <img
src="images/VX61_Fogra_USM_fmt.jpeg" alt="VX61_Fogra_USM.jpg"
height="467" width="1400" /> </p>
<p class="Caption">Refuge Cove, Wilson's Promontory, Vic</p>
And here's the corrected code which validates:
<div class="Basic-Text-Frame">
<p class="para-style-override-1"> <img
src="images/VX61_Fogra_USM_opt.jpeg" alt="VX61_Fogra_USM.jpg"
height="467" width="1400" /> </p>
<p id="toc_marker-4" class="Caption">Refuge Cove, Wilson’s
Promontory, Vic</p>
Thanks for your help.
The current version of InDesign CS5.5 is 7.5.2. To see your version on a Mac, choose InDesign > About InDesign. Not sure where that is in Windows.
There are two ways to keep InDesign up-to-date. (1) In InDesign, choose Help > Updates, and look for InDesign updates. (2) Or, go to the Adobe website and download the latest update.
There are two more things you could check. These are general troubleshooting steps but they could be causing the problem.
The first step is to reset your InDesign preferences. Keep in mind that this will throw away all the custom settings you have made in InDesign. Here's how to do that:
Do that, then test the validation again.
If that doesn't work, you could have a corrupted InDesign document. You might just try this on a small subset of your chapters. Here's how to do that:
Again, test the validation.
If neither of those work, then you may be encountering an InDesign CS5.5 bug. You can report the bug. But then you need to fix the XHTML just as you have figured out.
Best of luck!
North America
Europe, Middle East and Africa
Asia Pacific