View Single Post
Old 09-02-2019, 11:28 PM   #4
AliceWonder
Connoisseur
AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.
 
Posts: 97
Karma: 200000
Join Date: Aug 2019
Device: none
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)
AliceWonder is offline   Reply With Quote