View Single Post
Old 12-08-2014, 05:53 AM   #8
SBT
Fanatic
SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.
 
SBT's Avatar
 
Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
To get a nice kindle ebook with a proper TOC and front page, have the following three elements in the <guide> section of the opf file:
Code:
<reference href="Text/Chapter-00001.html" title="Cover Page" type="cover"/>
<reference href="toc.html" title="Content" type="toc"/>
<reference href="Text/Section0004.html" title="Main Text" type="text"/>
To get the thumbnail cover to show properly, you apparently have to have in the metadata section:
Code:
<meta name="cover" content="cover-image.jpg"/>
My first attempt to make a nice-looking KF8 book is here. If I remember correctly, the files are identical for the epub and mobi versions, and I use @media tags to handle the differences between epub and mobi, and the differences between kf8 eink and kf8 fire (don't get me started on that issue...)
I prefer using
Code:
kgen content.opf
, but that's probably just because of a superstitious wish to operate as close to the source files as possible.

P.S. Don't trust the Kindle previewer too much. Though pretty good at recreating the device outputs, it doesn't recognize @media tags, and it does not permit the user to change line spacing and margins, changing which can have dramatic consequences for the more daring CSS expressions.

P.P.S: And remember: KF8 does not support page-break-inside:avoid, has a broken interpretation of relative widths, a broken implementation of float, no way of overriding user-set line-spacing. And in addition to different rendering for e-ink and Fire, there are also some subtle differences between Fire DX and Fire HDX.
SBT is offline   Reply With Quote