View Single Post
Old 12-07-2021, 01:30 PM   #1
kensmosis
Junior Member
kensmosis began at the beginning.
 
Posts: 9
Karma: 22
Join Date: Sep 2015
Device: none
EPub -> Mobi seems to drop style file from manifest

Hi,

I'm using Calibre (ebook-convert) version 5.17.0. I have an epub generated by pandoc/sigil. During conversion by ebook-convert from epub to mobi, it gives an error:

"Stylesheet 'EPUB/styles/stylesheet1.css' referenced by file 'EPUB/nav.xhtml' not in manifest"

I unzipped the epub, and the relevant file is indeed present both as an entry in the content.opf file (in the <manifest> section):

<item id="stylesheet1" href="styles/stylesheet1.css" media-type="text/css"/>

and as an actual file in the specified location.

My only guess is that ebook-convert must be dropping it from the manifest prior to reaching that point. It emitted a message "Trimming unused files from manifest..." earlier in the process.

Is it possible it somehow is dropping the style/stylesheet1.css entry from the manifest because it thinks it is unused? That file is referenced in every html file in the epub via an entry like <link rel="stylesheet" type="text/css" href="../styles/stylesheet1.css" />
in the <head> section, so this would surprise me --- but it seems like the most sensible explanation.

Needless to say, much of the resulting mobi is mangled without the appropriate styles (in particular, the style ensures proper sizing and placement of images).

Any help would be appreciated.

Cheers,
Ken
kensmosis is offline   Reply With Quote