Quote:
Originally Posted by davidfor
Actually, there is https://github.com/kobolabs/epub-spec. It is as much a user guide for people submitting books as a spec, but it does have some details. The TOC section says that they will generate a TOC entry for any spine entry that is not in the TOC.ncx. As they do that, it doesn't surprise me that they would eliminate duplicate TOC entries.
I am with the others and feel it is an error in the book if there are two TOC entries pointing to the same place. I can't see the point. I do have books with multiple TOC entries pointing to the same page. These are for things like "Part I" followed immediately by "Chapter 1". They open the book to the same page, but are using different anchors.
|
OK, all of you have convinced me: redundant ToC entries are a bug (in fact when I discovered the "issue" it was a real bug in the ncx). It doesn't matter if a strict lecture of epub2 spec might allow it. With time and usage, the world, the community, whatever, have decided it must not be done. Using
different fragment links to consecutive anchors in the book, (as JSWolf posted), is the way to go if you want this apparent behaviour without risking incompatibilities...
But then,
KOBO HAS A BUG IN THE NAVIGATION BAR, (as I posted quite long ago because I suffered it in a real book).
If you have "Part I.html" which contains a lot of "Chapters" and the toc.ncx is perfectly built through fragment id links, we all agree that we have a perfect valid epub2 book, don't we? (I mean nothing in epub2 spec says that every toc entry
must be a different html file, "subdivisions" on each html file are perfectly valid).
And nothing in the link you've posted, davidfor, says anything against it. But in that case, if you sideload that perfectly valid epub as kepub you get:
- In the footer: Chapter 1 - Page xx of number of pages of the chapter. I mean between this fragment id link and the next. OK. no troubles here.
- In the navigation bar:
- It is scaled with that same number of pages. And it also shows Page xx of the Chapter. Till now, no problems, coherent design here.
- But instead of "Chapter whatever" it says "Part whatever"!!!, I mean the parent html link of the toc.ncx. And in fact the double arrows jump to "Part 2", "Part 3",... There's no way to just jump one chapter...