View Single Post
Old 09-04-2010, 06:38 AM   #21
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 74,015
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
Quote:
Originally Posted by pdurrant View Post
Well, this works really well on the Kindle, and on the Kindle Previewer. Hanging Indents don't seem to work at all on Kindle for Mac. Sigh...
Further investigation, after realising the Kindle for Mac and Kindle for PC have been created from the old Mobipocket Reader for Windows code, shows that they do support hanging indents, but not when specified in ems!

Hanging Indents are only supported for pixels, points and percentage. And the support for percentage is new in K4Mac/K4PC - the last Mobipocket Reader for Windows did not do a hanging indent with w negative percentage.

This is good news and bad news.

It's good news in that at least hanging indents can be done. It's bad news in that they can't be specified in a way that will scale with the text.

It also shows that the Kindle firmware isn't based on the old Mobipocket software at all. As far as I can see, they must have written the Kindle code from scratch, based on a specification derived from the Mobipocket software in some way. And they did it better in some areas (negative indents) and worse in others (relative font sizes, poetry alignment).

So to make a kindle ebook that makes use of indents, hanging indents and font sizes, it's going to be necessary to severaly restrict what's used just to make sure it renders correctly on all the Kindle renderers from Amazon that are out there. Let alone trying to make the source work with ePub as well.

I am beginning to think that it might be best to have a base source text of XHTML that's marked up with semantic styles, and then have some scripts that hack that into source suitable for Kindle and for ePub. But I'd really hoped to be able to avoid that — I'd rather hoped Kindlegen was going to do the hard work for me. Not so, I think.
pdurrant is offline   Reply With Quote