View Single Post
Old 08-17-2012, 01:51 PM   #11
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: 45,414
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just for completeness attached is a basic mathjax plugin and a sample epub file it works on. I only tested it on my machine, so it may be that it needs more fonts in the bundle. Also in a production quality plugin you shoud scan for a

<meta name="calibre-enable-mathjax" value="input/TeX" />

tag and only load mathjax if it is present, with the correct input filter as per the value. Zipped up, the plugin is only 2.7MB, so if you can refine it a bit and test it on a few more machines, I might be willing to add it to calibre.

NOTE that you have to be running calibre from trunk for this plugin to work and you may have trouble with file paths on windows, I only tested it on linux.
Attached Files
File Type: zip MathJax Plugin.zip (2.67 MB, 566 views)
File Type: epub sample.epub (149.8 KB, 715 views)
kovidgoyal is online now   Reply With Quote