Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
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
Old 12-07-2021, 09:21 PM   #2
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Convert to azw3 not mobi.
kovidgoyal is offline   Reply With Quote
Old 12-07-2021, 09:48 PM   #3
kensmosis
Junior Member
kensmosis began at the beginning.
 
Posts: 9
Karma: 22
Join Date: Sep 2015
Device: none
Thanks for the suggestion, but unfortunately that won't work for me. I'm submitting a book to a review service which requires mobi. I was under the impression that ebook-convert could in fact convert to mobi. Is this not the case? If it's legacy and unsupported, I can try to find some other way. I was hoping to manage everything via a Makefile toolchain, so ebook-convert is preferable if I can get it working.
kensmosis is offline   Reply With Quote
Old 12-07-2021, 10:08 PM   #4
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: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
mobi works fine, the mobi format however is HTML 3 and has no support for CSS. Some basic styling will get converted to HTML3 equivalents, but more advanced styling will not.
kovidgoyal is offline   Reply With Quote
Old 12-07-2021, 10:30 PM   #5
kensmosis
Junior Member
kensmosis began at the beginning.
 
Posts: 9
Karma: 22
Join Date: Sep 2015
Device: none
Ah, I see. Thanks for explaining! I'll ask them if they can handle azw3 or if I should remove all the style-sensitive components from the original and stick with mobi.

Cheers,
Ken
kensmosis is offline   Reply With Quote
Old 12-08-2021, 02:23 AM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by kensmosis View Post
Thanks for the suggestion, but unfortunately that won't work for me. I'm submitting a book to a review service which requires mobi. I was under the impression that ebook-convert could in fact convert to mobi. Is this not the case? If it's legacy and unsupported, I can try to find some other way. I was hoping to manage everything via a Makefile toolchain, so ebook-convert is preferable if I can get it working.
This book review service is lousy if they only accept Mobi. They should accept ePub and KF8. I don't understand why they only accept an obsolete format.
JSWolf is online now   Reply With Quote
Old 12-08-2021, 03:17 AM   #7
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,510
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by kensmosis View Post
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):
Quote:
Originally Posted by kovidgoyal View Post
mobi works fine, the mobi format however is HTML 3 and has no support for CSS. Some basic styling will get converted to HTML3 equivalents, but more advanced styling will not.
Quote:
Originally Posted by kensmosis View Post
Ah, I see. Thanks for explaining! I'll ask them if they can handle azw3 or if I should remove all the style-sensitive components from the original and stick with mobi.
You should not need to change a valid ePub before converting it to Mobi format. This does sound like a genuine bug.

Run the ePub (assuming it's copyright) through a scrambler, e.g. https://www.mobileread.com/forums/sh...d.php?t=267998 and post it either here or in a bug report.

I think Kovid has mis-read your report as a complaint that the CSS file isn't in the converted Mobi file.
pdurrant is offline   Reply With Quote
Old 12-08-2021, 10:14 AM   #8
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,497
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by kensmosis View Post
Thanks for the suggestion, but unfortunately that won't work for me. I'm submitting a book to a review service which requires mobi.
When a MOBI file is required for publishing that generally refers to a Master MOBI which is produced using Amazon's Kindle Previewer software. A Master MOBI contains multiple Kindle formats in a single file.

(Note that Amazon has moved on and no longer supports MOBI as a format for publishing reflowable books.)

Last edited by jhowell; 12-08-2021 at 10:17 AM.
jhowell is offline   Reply With Quote
Reply

Tags
css, epub, manifest, mobi, stylesheet


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop Caps epub->Mobi iancs Conversion 6 01-23-2021 12:12 AM
File 'META-INF/encryption.xml' in EPUB not listed in manifest! Bowcat ePub 2 10-14-2019 08:02 PM
Insert a cover in a MOBI file - Mobi or Epub as default file ? myki Library Management 12 06-27-2014 05:55 PM
EPUB -> MOBI: Can't style HR element? modified Conversion 4 03-21-2013 08:36 AM
Mobi TOC style vs ePub style? phearlez Kindle Formats 3 04-11-2010 06:35 AM


All times are GMT -4. The time now is 06:01 AM.


MobileRead.com is a privately owned, operated and funded community.