#1223 NCX navPoint hierarchy and Kindle progress bar

open
nobody
ePub (12)
5
2014-08-16
2012-02-04
No

The "progress bar" that is displayed on the bottom of Kindle hardware devices includes progress markers (usually intended for chapters) that are generated from the NCX TOC in the source EPUB processed by kindlegen. All top-level navPoint elements (direct children of navMap) get progress markers.

However, in the NCX TOCs generated by the EPUB stylesheets, there is only one top-level navPoint: the one that corresponds to the root-level element of the source XML (e.g., <book>), e.g.:

<docTitle>
<text>Microsoft® Exchange Server 2010: Best Practices</text>
</docTitle>
<navMap>
<navPoint id="id2844965" playOrder="1">
<navLabel>
<text>Microsoft® Exchange Server 2010: Best Practices</text>
</navLabel>
<content src="index.html"/>
<navPoint id="id3005791" playOrder="2">
<navLabel>
<text>A Note Regarding Supplemental Files</text>
</navLabel>
<content src="examples_page.html"/>
</navPoint>
...

For the sake of compatibility with kindlegen, it might be nice to modify NCX generation such that direct children of the root-level XML element were following-sibling navPoints in the NCX file, e.g.:

<docTitle>
<text>Microsoft® Exchange Server 2010: Best Practices</text>
</docTitle>
<navMap>
<navPoint id="id3631020" playOrder="1">
<navLabel>
<text>Microsoft® Exchange Server 2010: Best Practices</text>
</navLabel>
<content src="index.html"/>
</navPoint>
<navPoint id="id3243764" playOrder="2">
<navLabel>
<text>A Note Regarding Supplemental Files</text>
</navLabel>
<content src="examples_page.html"/>
</navPoint>
...

Please let me know if any of the above is unclear, or if you have any questions.

Thanks,
Sanders

Discussion

  • Actually, in taking a second look, I see that you can also address this Kindle progress bar issue by setting the $root.is.a.chunk param to 0 to suppress generation of a navPoint in the NCX. So the above-suggested change is really only needed if you don't want to suppress the root-level navPoint.

     
  • Robert Stayton
    Robert Stayton
    2012-11-03

    I agree the top level children should be at the top level of the navMap.
    I fixed this issue in the epub3 stylesheet. Can you try using the epub3 stylesheet instead of the epub stylesheet?