This is why my nav.xhtml has two ToC - one that uses the 'nav' element with 'epub:type="toc"' - it has everything in spine order but has CSS property of display:none;
Then I have several (though one is enough for most use cases) 'section role="navigation"' where I have table of contents intended for the end user to see, and I don't have to worry about the ePub3 rules of them being in the spine order or what not.
Have to use 'section role="navigation"' rather than 'nav' because ePub3 expect all 'nav' nodes to specify an 'epub:type'
This gives me the visual ToC that I want for users while at same time providing a spine order ToC for eBook software to parse.
Works in every reader I tested (limited to calibre and android)
|