View Single Post
Old 05-22-2015, 01:36 PM   #1140
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,809
Karma: 6000000
Join Date: Nov 2009
Device: many
Hi elmimmo,

It seems that kindlegen strips out all manifest properties completely from valid epub3 input. At least kindlegen does put spine properties in the k8 RESC section so that they are not lost.

Therefore the only way to properly set any of the manifest properties for outputting an epub3 will be to literally parse every xhtml page looking for use of svg, math, and switch tags.

This will require adding an xhtml parser to KindleUnpack because trying this with just "re" (regular expressions) while doable may lead to mistakes when pre tags, scripts, and use any of these special terms.

So, if I have to parse and walk every xhtml file anyway, I should be able to detect if the original-resolution is present and if so add the meta viewport if not present.

Basically, I am thinking of using the Sigil python plugin ePub3-itizer code and incorporate parts of it into KindleUnpack to properly set the DOCTYPE in each file while harvesting the use of svg, mathml, and epub:switch tags for use in the opf manifest creation.

This will take some work but it should take care of your initial issue while fixing missing manifest properties in general for epub3. It is a shame that kindlegen does not keep them.

KevinH

Last edited by KevinH; 05-22-2015 at 01:45 PM.
KevinH is offline   Reply With Quote