2

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?

1

IMHO, you're mixing up the functions of the navMap and pageList sections. The navMap section is used for the TOC display and the pageList section is theoretically used for the display of the page numbers from the printed edition.

I'm saying theoretically, because I don't know of a single ePub2 app that actually uses this information.

I.e., you might as well omit the pageList section, unless you plan to convert your ePub2 books to ePub3 books with the optional Sigil ePub3 output plugin, which uses the pageList information for the generation of the ePub3 page-list nav section.

  • I'd never considered it before as I hadn't come across it but I've just been sent a book with just that. The navMap contains the preamble for the book from the site that hosts the book. Title page, blurb about the author, the book company etc. It stops right where the actual book starts. The actual book is all listed in the pageList and not at all in the navMap. 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 7 '16 at 8:18
  • The navMap contains the preamble [...]. The 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 [...]. The pageList information is not used for printing and moreover largely unsupported by apps. – Nemo XXX Apr 7 '16 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.