View Single Post
Old 08-12-2018, 06:33 PM   #10
ozh
Junior Member
ozh began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2018
Device: Kindle Paperwhite
Quote:
Originally Posted by Hitch View Post
See, here's the thing, which nobody wants to admit. NOBODY can tell you which of those was made with an NCX, or an HTML TOC. Seriously. Sometimes, the GoTo seems to be (correctly, IMHO) the NCX; sometimes, it's apparently made from the toc.html. I have found little or no rhyme or reason, as to which displays, from the GoTo, on a given book. I know that Notjohn frequently claims that his Fire displays the NCX--but I cannot say that with surety, at all. It seems just as likely to display the GoTo from a rendered (renderized! I actually like that word, and may steal it) toc.html as an NCX. The "old days" when you could be sure of such a thing--those are gone. Now, Amazon sort of "helps" everyone (god help me), by doing whatever they damn well please.

Your English is fine. NJ thought he was being funny. Don't apologize. While "renderize" is a bit of a stretch for English, we all knew what you meant, and it was fine.

Ah, (Your next post) about HTML5. Just to sate my curiosity, do you mind sharing what HTML5 and advanced selectors you're using? We tend at my shop to stick largely with 2, for distribution purposes, of course, but I'm always interested in what 3 is being used for, AND how it translates, so to speak, to the Kindleverse.

Yes, you should be able to use the NAV, but you may not find that it works better than the Guide with the issues you're having now. I'd certainly try it, though.

Hitch

Hey Hitch. On my epub, I have the toc.xhtml AND the toc.ncx (using the <spine toc="ncx">) as a fallback. They are identical, except for the html/xml markup, of course. But I was in doubt which one was being used too, so I did the following, as a test:

- Instead of "Chapter 1", I wrote "Chapter 1 HTML" in the toc.xhtml
- Instead of "Chapter 1", I wrote "Chapter 1 NCX" in the toc.ncx

, zipped as epub and converted it to mobi using kindlegen. So, in the end, the file rendered was the HTML one in all devices I tested (paperwhite and kindle app for android).

But I think this happens because I'm using epub 3 with the "nav epub:type" markup. This makes the same file (toc.xhtml) to work as the "in book" toc and as the logical (Go To) one. I think the ncx file would be used if the epub 2 were used instead.

From the book ePub3 Best Practices, from Matt Garrish and Markus Gylling (O'Reilly):
Quote:
"The NCX is how EPUB 2 specified navigation; it is superseded in EPUB 3 by the Navigation Document (nav, an XHTML document, as described in Chapter 2). In order to enable an EPUB 3 to be rendered by an EPUB 2 reading system, it has to include an NCX even though it also has to have a nav to conform to EPUB 3. Until EPUB 2 reading systems have become obsolete (no sign of that in the near future), publishers generally need to include both. The collision is prevented by the fact that the nav is pointed to by the manifest's nav property and the NCX is pointed to by the spine's toc attribute."
And YES!, Amazon is a weirdo. All the "Navigation Guidelines" section in the Kindle Publishing Guidelines is really frustrating.

About the HTML/CSS I'm using, to be honest, it's not really a big deal. I'm just more comfortable using the HTML5 markup, like section and nav, and I really like the additional structural semantics, so I'm using it from the beginning. All my content.opf file, too, is structured based in the epub 3 spec (no opf: namespace, no opf:scheme attribute, no opf:event, etc). Also, I think it's more well documented too, and I really like the already mentioned book ePub3 Best Practices.

I like to have some CSS3 features available to use if necessary too, like media queries, support to multi-column layout, the nth-child(odd) or nth-child(even) to select alternated elements, and even border-radius. In the end, CSS3 is a great way to reduce the file size by reducing the amount of HTML code necessary.

I know maybe it's not worth it, but this is the way I learned since the beginning and I'm worried I need to change a lot of stuff to go back to epub 2 now. But, well, maybe it's the right thing to do, so...

Thank you very much for your reply!
ozh is offline   Reply With Quote