View Single Post
Old 05-01-2012, 05:39 PM   #19
jswinden
Nameless Being
 
Jon, here are a few differences in the ePub and KF8 content.opf files. The ePub content.opf was created by Sigil. I modified it to work with KF8.

One MAJOR difference between ePub and KF8 is that Amazon requires a linked TOC. The TOC must be referenced from a TOC guide item in the OPF file to enable the customer to jump to the TOC from the Kindle menu.

Another difference is that Amazon only supports three guide items, including cover, TOC, and the start reading location (”Go To Beginning”). EPub supports many more.

Here is the abbreviated manifest that Sigil created for the ePub:

Code:
<manifest>
    <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
    <item id="extra-exam.css" href="Styles/extra-exam.css" media-type="text/css"/>
    ...
    <item id="cover.jpg" href="Images/cover.jpg" media-type="image/jpeg"/>
</manifest>
Here is the abbreviated manifest I modified for the KF8:

Code:
<manifest>
    <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
    <item id="extra-exam.css" href="Styles/extra-exam.css" media-type="text/css"/>
    ...
    <item id="linked-toc.html" href="Text/linked-toc.html" media-type="application/xhtml+xml"/>
    <item id="my-cover-image" href="Images/cover.jpg" media-type="image/jpeg" />
</manifest>
The green line in the KF8 manifest is for the linked TOC. This doesn't exist in the ePub manifest.

Notice the difference for the ePub and KF8 cover ID shown in RED? The ePub version won't work with KF8 so it needs to be modified.

In order to get the TOC to work for the KF8 you must add the following line to the spine:

Code:
<spine toc="ncx">
    ...
    <itemref idref="linked-toc.html"/>
    ...
</spine>
You also need to add a reference to the guide for the TOC, as well as references for any other guide items. Here is my added guide. The ePub did not contain one.

Code:
<guide>
    <reference type="text" title="Beginning" href="Text/front-matter.html"></reference>
    <reference type="toc" title="Table Of Contents" href="Text/linked-toc.html"/>
</guide>
If you think your clean ePub will work correctly, you are barking up the wrong tree. You need to make these modifications as well as any others.

Last edited by jswinden; 05-01-2012 at 05:44 PM.
  Reply With Quote