View Single Post
Old 06-20-2011, 02:32 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,419
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I *really* detest MOBI.

For the 300th time:

MOBI is based on HTML 3.2 and has no support for CSS.

In HTML 3.2 you can define table borders globally using a BORDER attribute. This border attribute allows setting only the thickness of the table borders. Different MOBI renderers interpret this attribute differently. If the input document defines any border/border-width css for a table, calibre will set the border attiribute to 1, otherwise it will do nothing.

The same is true for table backgrounds where HTML 3.2 uses a bgcolor attribute.

When you see a MOBI file "with proper formatting" it is not the result of a conversion from EPUB but instead an export from InDesign (or a result of hand coding HTML specifically for MOBI).

So in InDesign when you define a "colored paragraph" it is exported to MOBI using special markup. There is no such concept as a "colored block" in epub. Instead display attributes are defined using CSS in far more general ways. There is no way for a converter to convert the css used in the epub to define a colored block to highly limited MOBI markup in a consistent way.

Similarly, Dropcaps are created using css. There is no way to do that in MOBI. If you see a dropcaps in a MOBI file, then that file was not converted from an epub. Instead it uses some kind of table hackery or and image. This is only possible when generating the MOBI from a source that defines the dropcaps semantically as a dropcaps. In an epub, a dropcaps is created using instructions like "render this character at a larger font size and float it to the left". There is no way to translate that kind of instruction into a MOBI.

If you think there is a bug in the calibre MOBI converter, find an epub file that when converted using kindlegen preserves some feature that the calibre MOBI doesn't. If you can do that, feel free to open a bug. Otherwise, your bug report will be ignored.
kovidgoyal is offline   Reply With Quote