Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing diagrams and theorems in epub and html #12

Open
3 tasks
jwbuurlage opened this issue Jul 28, 2017 · 2 comments
Open
3 tasks

Missing diagrams and theorems in epub and html #12

jwbuurlage opened this issue Jul 28, 2017 · 2 comments

Comments

@jwbuurlage
Copy link
Owner

jwbuurlage commented Jul 28, 2017

Using these filters:

it may be possible to add diagrams and amsthm environments to all document types.

TODO:

  • Use common math fonts for MathML output (in particular for \mathcal)
  • Convert TikZ figures to raw images embedded in the epub
  • Use portable theorem environments
@delta4d
Copy link
Contributor

delta4d commented Jul 31, 2017

Hi jwbuurlage, I checked pandoc documents. and http://pandoc.org/epub.html#math says

Pandoc has an EPUB3 writer. It renders LaTeX math into MathML, which EPUB3 readers are supposed to support (but unfortunately few do). Use pandoc -t epub3 to force EPUB3 output, as opposed to EPUB2 which is the default.

Of course, this isn’t much help if you want EPUB2 output or target readers that don’t support MathML. Then you should try using the --webtex option, which will use a web service to convert the TeX to an image.

Calibre could render mathml successfully. But kindle does not.

I have tried --webtex option, but it takes time, and could not find some resources on web.

I have tried iBooks on my iphone, it supports mathml, and can render the epub3 file correctly. But in order to make epub work on other devices, it may need to convert tex to images, which may break some inline equations.

If only to make it work on Kindle. I think there's a workaround. Send the generated pdf to Kindle email with title convert, Kindle will do the converting work to fit the device.


  1. Kindle mathml. https://github.com/michal-h21/tex4ebook
  2. Pandoc scripting. http://pandoc.org/scripting.html

@jwbuurlage
Copy link
Owner Author

I see, thanks for taking the time to do some research into this.

I think for the epub in the repository I will opt for MathML to keep it manageable. Still, some of the fonts are missing in my reader, even though MathML is supported (Google Books). These problems are orthogonal to the diagrams/theorem environments however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants