Answers.Body: <p>I believe that <a href="https://github.com/michal-h21/tex4ebook" rel="nofollow">tex4ebook</a> auto-converts from LaTeX to ePub using SVG for math.  Looks a little complicated to set up, though. (I haven't tried it personally.)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-15T21:44:58.857Z
Answers.LastActivityDate: 2015-01-15T22:41:11.347Z
Answers.LastEditDate: 2015-01-15T22:41:11.347Z
Answers.UserDisplayName: Joseph Montanaro
Answers.Body: <p>For my ebook experiment, I use PNG, via <a href="http://formulasheet.com/#r|ed" rel="nofollow">Formula Sheet</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-15T08:09:45.613Z
Answers.Text: Yes, converting to bitmapped graphics is of course an option. I would just really like not to have to bitmap the maths, but if that is the only option it still looks much better than MathML.
Answers.UserDisplayName: Thomas Arildsen
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-15T08:56:50.080Z
Answers.Text: The downside to images, of course, is the total lack of any semantic information or support for the visually disabled. You can get around this to some extent with alt tags in your image, but that gets tedious to put in. Given that at present MathML support is not universal and MathJax requires JavaScript, which is also not universal, images might be your best bet.
Answers.UserDisplayName: Tom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-21T18:14:36.753Z
Answers.Text: This is a good idea. What if there is one ereader that supports math markup, but 50 ereaders that don't? Most ereaders support images.
Answers.UserDisplayName: Bulrush
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-15T07:49:21.280Z
Answers.LastActivityDate: 2015-01-15T07:49:21.280Z
Answers.UserDisplayName: Karsten W.
Body: <p>I have so far tried using Pandoc to convert Markdown text containing LaTeX math to ePub with MathML. This works, but the resulting math displays quite horribly compared to what the corresponding math looks like when generating PDF from LaTeX. For example, upper and lower limits of an integral do not align well. 
  I have tried using Calibre too and here it is actually possible to convert the math to MathJax-viewable format, but it seems I cannot rely on other ebook readers to be able to use MathJax. Besides, this only worked when converting from HTML, not Markdown.</p>
  
  <p><em>Update:</em> @karsten-w's <a href="https://ebooks.stackexchange.com/a/4691/4159">answer</a> made me think more about embedding the maths as graphics. I found out that ePub seems to support SVG, at least ePub from v. 3.0 according to what I stumbled across. So for example, I can generate the math SVG from LaTeX using <a href="http://www.tlhiv.org/ltxpreview/" rel="noreferrer">http://www.tlhiv.org/ltxpreview/</a> (see <a href="https://tex.stackexchange.com/questions/103282/convert-latex-to-svg-online">https://tex.stackexchange.com/questions/103282/convert-latex-to-svg-online</a>). I can then easily embed the SVG in Markdown and convert to ePub using Pandoc.</p>
  
  <p>Now I would just like a smoother workflow that can take me directly from LaTeX with maths or Markdown with LaTeX maths to ePub with embedded SVGs...</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-01-16T11:15:47.913Z
Comments.Text: You should only edit your question to improve clarity, not to change the goal as you did (from improving looks to getting a smoother workflow), Changing the question beyond improving clarity invalidates the existing answers, makes the question less useful. Just create a new question for the smoothness issue and refer to this question if it helps clarify that new question.
Comments.UserDisplayName: Anthon
Tags: <calibre><markdown>
Title: How can I make mathematics look good in ebooks?
UserDisplayName: Thomas Arildsen
ThreadText: # How can I make mathematics look good in ebooks?
  
  (Asked by: username_0 on 2015-01-14)
  
  I have so far tried using Pandoc to convert Markdown text containing LaTeX math to ePub with MathML. This works, but the resulting math displays quite horribly compared to what the corresponding math looks like when generating PDF from LaTeX. For example, upper and lower limits of an integral do not align well.
  I have tried using Calibre too and here it is actually possible to convert the math to MathJax-viewable format, but it seems I cannot rely on other ebook readers to be able to use MathJax. Besides, this only worked when converting from HTML, not Markdown.
  
  *Update:* @username_3-w's [answer](https://ebooks.stackexchange.com/a/4691/4159) made me think more about embedding the maths as graphics. I found out that ePub seems to support SVG, at least ePub from v. 3.0 according to what I stumbled across. So for example, I can generate the math SVG from LaTeX using <http://www.tlhiv.org/ltxpreview/> (see <https://tex.stackexchange.com/questions/103282/convert-latex-to-svg-online>). I can then easily embed the SVG in Markdown and convert to ePub using Pandoc.
  
  Now I would just like a smoother workflow that can take me directly from LaTeX with maths or Markdown with LaTeX maths to ePub with embedded SVGs...
  
  **Tags:** calibre, markdown
  
  > **Comments:**
  > **username_1**: You should only edit your question to improve clarity, not to change the goal as you did (from improving looks to getting a smoother workflow), Changing the question beyond improving clarity invalidates the existing answers, makes the question less useful. Just create a new question for the smoothness issue and refer to this question if it helps clarify that new question.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-01-15. Score: 4
  
  I believe that [tex4ebook](https://github.com/michal-h21/tex4ebook) auto-converts from LaTeX to ePub using SVG for math. Looks a little complicated to set up, though. (I haven't tried it personally.)
  
  
  ---
  
  ### Answer by username_3 on 2015-01-15. Score: 4
  
  For my ebook experiment, I use PNG, via [Formula Sheet](http://formulasheet.com/#r|ed).
  
  > **Comments:**
  > **username_0**: Yes, converting to bitmapped graphics is of course an option. I would just really like not to have to bitmap the maths, but if that is the only option it still looks much better than MathML.  
  > **username_4**: The downside to images, of course, is the total lack of any semantic information or support for the visually disabled. You can get around this to some extent with alt tags in your image, but that gets tedious to put in. Given that at present MathML support is not universal and MathJax requires JavaScript, which is also not universal, images might be your best bet.  
  > **username_5**: This is a good idea. What if there is one ereader that supports math markup, but 50 ereaders that don't? Most ereaders support images.  
  
  ---
  
  