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 05-19-2015, 11:10 PM   #1
pwessel
Junior Member
pwessel began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2015
Device: iPad, iPhone
Conversion from xhtml to epub loose svg images

Thanks for making calibre available. Apologies if I am making a rookie error, but I have a Latex-driven workflow that produces a xhtml book with numerous svg illustrations. The xhtml file view fine in a browser. I then run

ebook-convert DA1_book.xhtml DA1_book.epub

but find that the hrefs to svg files in the various xhtml sections are gone, yet all the svg files are included in the epub file. E.g, the original lines like

<div id="Ch1.F1" class="ltx_figure"><object data="Fig1_dataclasses.svg" id="Ch1.F1.g1" class="ltx_graphics ltx_centering" width="470" height="133" alt=""/>

are not present in the epub archive but all the SVG files are there. When importing the epub (or xhtml) into calibre and trying to view it I get the error "No book with id 13 present". Opening the epub in iBooks also shows no figures. Am I missing an option?
pwessel is offline   Reply With Quote
Old 05-19-2015, 11:12 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,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Dont use <object> to include svg images, use <img> (but note that many viewers, including the calibre viewer, have problems with svg images included via <img> that themselves include other images. The best way to include svg images is to embed them directly in the html with <svg> tags.
kovidgoyal is online now   Reply With Quote
Advert
Old 05-24-2015, 09:04 PM   #3
pwessel
Junior Member
pwessel began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2015
Device: iPad, iPhone
Thanks for the tip. Turned out adding type="image/svg+xml" to the <object> tag worked wonders. I passed this to the developers of LatexML who have added this as well.

Trying to validate my EPUB with epubcheck revealed that while my Latexml-derived EPUB is v3.0, when using Calibre to make some edits it saves only (?) as EPUB v 2.0, which then fails the epubcheck since the file contains MathML and xml/svg. Can Calibre write EPUB3 files? Am I missing an options?
pwessel is offline   Reply With Quote
Old 05-24-2015, 11:29 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,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No calibre does not support epub 3.
kovidgoyal is online now   Reply With Quote
Reply

Tags
svg images


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Guide for converting Kindle Topaz (xhtml with svg) to PDF Fschumaur Workshop 5 03-27-2015 01:35 AM
MathJax and SVG conversion problems to epub or MOBI waiting90days Conversion 4 12-31-2013 10:15 PM
XHTML fallback for SVG Iznogood ePub 15 10-08-2012 07:52 PM
epub-kindle conversion blanks svg with text bobb40 Conversion 2 09-28-2012 08:05 AM
How can I convert topaz ebook from multiple xhtml's (SVG) to single pdf? rglk Workshop 3 11-28-2011 04:33 PM


All times are GMT -4. The time now is 02:41 AM.


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