Quote:
Originally Posted by ozh
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).
|
YES--this is my experience, too, when using either ePUB3 or files that are not pristine. It uses and displays the toc.html file on the GoTo, not just an ncx-generated "toc."
Quote:
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.
|
Possibly. I'm not sure it's as regulated as we'd hope.
Quote:
From the book ePub3 Best Practices, from Matt Garrish and Markus Gylling (O'Reilly):
|
Yeah, I know, but the MOBI universe is not the same as the ePUB universe, not entirely.
Yeah, welcome to my world. :-)
Quote:
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!
|
Hmmm...well, the question is, tho, not whether CSS3 etc. is needed, it's how to address your desired Guide items. I have this sneaking hunch that you might need to try Doitsu's solution--have you? I mean, before we all dive into far more complex solutions? or, hoped-for solutions?
Hitch