12-09-2011, 04:51 AM | #1 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Mar 2009
Device: Kindle, iPhone, iPad
|
HTML containing mathjax to MOBI?
Calibre does such a good job converting HTML to MOBI that, I consider the conversion done when I have obtained HTML files. However, I was wrong when I tried to convert HTML containing mathjax code. MathJax (http://www.mathjax.org/) is a popular solution for websites to display high quality math equations. Many math forums use it to display math equations. Also, LyX (a popular latex WYSIWYG editor) supports exporting to HTML containing mathjax (http://elyxer.nongnu.org/userguide.h...Subsection-2.8). The resulting HTML looks beautiful in firefox and chrome browsers on PC. However, when I tried to convert such HTML files into MOBI ebook using Calibre, all the math equations are gone. I understand this is probably due to the fact that those math equations are dynamically generated from online. I'm just thinking if only Calibre could somehow (magically) make those documents offline viewable, that would be great.
|
12-09-2011, 11:05 AM | #2 |
Evangelist
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
|
It's more to do with the mathjax using features of html+css which are not supported by mobi/kindle. You could embed the html+css or MathML in epubs, however then you will run into compatibility issues with the various epub renders. The safest would be to use MathML and a fallback rendered image. The image would be used on kindles/mobi, while if in the future some of the common epub renders start to support MathML, they would then display that.
At the moment there's no easy way of doing this. For a project I did a while back, I used a script to generate all of the MathML -> png's via a public interface on WolframAlpha, however I just checked and it seems to have been removed (it wasn't really documented anyway). |
Advert | |
|
12-10-2011, 05:13 AM | #3 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Mar 2009
Device: Kindle, iPhone, iPad
|
I think you are right. Ideally it should be the epub/mobi renderer that does the job. Hopefully that will become a reality in the future.
Googlecharts supports some preliminary conversion to png files, but it can only handle simple math equations. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with html -> Mobi conversion - html tags visible. | khromov | Calibre | 9 | 08-06-2011 11:25 AM |
Convert HTML to MOBI (HTML recognized as ZIP file) | pdubois | Conversion | 1 | 01-25-2011 12:55 PM |
mobi -> html | mor0o0o | Calibre | 13 | 12-05-2009 08:02 AM |
HTML to Mobi - quotes gone? | rjh4242 | Calibre | 6 | 10-07-2009 05:04 PM |
HTML to mobi How to | AlexBell | Calibre | 0 | 06-30-2009 01:17 AM |