Quote:
Originally Posted by kindleformatting
For the record, PRE tags do not work on the Kindle, at least not in any test I have run.
|
In my reverse-engineering of the Mobipocket formatting model, the Mobipocket renderer did not understand the <pre/> element or CSS 'white-space' property, but the most recent version of mobigen did understand <pre/> and transform it into <tt/> with all spaces replaced with non-breaking spaces and linebreaks replaced with <br/> elements.
I haven't looked at the book yet, but this plus even discussing CSS (which the Mobipocket renderer doesn't understand at all) makes me question the utility of this a bit. The various implementations of the Mobipocket renderer are so widely distributed that changes to basic behavior are probably not very likely. Changes to mobigen and whatever Kindle-focused tools Amazon provides are far more likely, which means that a new release could change many details.
In fact, I hope that Amazon does change details to make "official" Mobipocket generation more capable of dealing with standards-compliant content. In the meantime, calibre does a pretty good job of generating DRM-free Mobipocket books from markup which uses even fairly advanced CSS features.