diff --git a/src/calibre/ebooks/mobi/mobiml.py b/src/calibre/ebooks/mobi/mobiml.py index 7dd2224bc3..73542da6c1 100644 --- a/src/calibre/ebooks/mobi/mobiml.py +++ b/src/calibre/ebooks/mobi/mobiml.py @@ -303,7 +303,7 @@ class MobiMLizer(object): else: istate.family = 'serif' valign = style['vertical-align'] - if valign in ('super', 'sup') or asfloat(valign) > 0: + if valign in ('super', 'text-top') or asfloat(valign) > 0: istate.valign = 'super' elif valign == 'sub' or asfloat(valign) < 0: istate.valign = 'sub' diff --git a/src/calibre/ebooks/mobi/writer.py b/src/calibre/ebooks/mobi/writer.py index baf4e11b2d..4e14c524cb 100644 --- a/src/calibre/ebooks/mobi/writer.py +++ b/src/calibre/ebooks/mobi/writer.py @@ -28,6 +28,7 @@ from calibre.ebooks.oeb.transforms.flatcss import CSSFlattener from calibre.ebooks.oeb.transforms.rasterize import SVGRasterizer from calibre.ebooks.oeb.transforms.trimmanifest import ManifestTrimmer from calibre.ebooks.oeb.transforms.htmltoc import HTMLTOCAdder +from calibre.ebooks.oeb.transforms.manglecase import CaseMangler from calibre.ebooks.mobi.palmdoc import compress_doc from calibre.ebooks.mobi.langcodes import iana2mobi from calibre.ebooks.mobi.mobiml import MBP_NS, MBP, MobiMLizer @@ -114,7 +115,8 @@ class Serializer(object): buffer.write('') for ref in self.oeb.guide.values(): path, frag = urldefrag(ref.href) - if hrefs[path].media_type not in OEB_DOCS: + if hrefs[path].media_type not in OEB_DOCS or + not ref.title: continue buffer.write('