My viewer has support for a TOC populated from NCX navMap entries. However some books I have come across have some pages in the navMap section and some pages only in the pageList section. e.g.
<navMap>
<navPoint class="h1" id="ch1">
<navLabel>
<text>Title</text>
</navLabel>
<content src="title.html#ch_1"/>
<navPoint class="h2" id="ch_1_1">
<navLabel>
<text>Title</text>
</navLabel>
<content src="title.html#ch_1_1"/>
</navPoint>
</navPoint>
</navMap>
<pageList>
<pageTarget id="p1" type="normal" value="1">
<navLabel><text>1</text></navLabel>
<content src="pages.html#p1"/>
</pageTarget>
<pageTarget id="p2" type="normal" value="2">
<navLabel><text>2</text></navLabel>
<content src="pages.html#p2"/>
</pageTarget>
</pageList>
I could just add pages after the navMap contents but I'm concerned that it's perfectly valid to populate both navigation types from the same source xhtml and I don't want parts of the book effectively appearing twice, once for the navMap and once for the pageList. e.g.
<navMap>
<navPoint class="h1" id="ch1">
<navLabel>
<text>Chapter 1</text>
</navLabel>
<content src="book.html#ch_1"/>
<navPoint class="h2" id="ch_1_1">
<navLabel>
<text>Chapter 1</text>
</navLabel>
<content src="book.html#ch_1"/>
</navPoint>
</navPoint>
</navMap>
<pageList>
<pageTarget id="p1" type="normal" value="1">
<navLabel><text>1</text></navLabel>
<content src="book.html#p1"/>
</pageTarget>
<pageTarget id="p2" type="normal" value="2">
<navLabel><text>2</text></navLabel>
<content src="book.html#p2"/>
</pageTarget>
</pageList>
The specs seem vague on what to do. What is the recommended way to deal with this situation?
I'm loathed to "fix" it for this book in case it break all the other books that may use the pageList for printing.
– Matt King Apr 07 '16 at 08:18The navMap should contain entries for each TOC item.
If it doesn't, you could easily generate them from the chapter headings with Sigil. You also might want to double-check the rendering of the book with ADE and the book itself with epubcheck.
I'm loathed to "fix" it [...].
– Apr 07 '16 at 11:15The pageList information is not used for printing and moreover largely unsupported by apps.