jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.58k stars 3.38k forks source link

pandoc does not render greek symbols in ePub? #3231

Closed suknat closed 7 years ago

suknat commented 7 years ago

I'm writing in pandoc markdown with the intent to convert to ePub. I've been using standard HTML/MD to render greek symbols, like so: α. I believe pandoc supported exporting this to ePub a few months ago, but it seems broken now? I might be imagining this, but I have an entry in my diary suggesting it was working at some point! Things like ° are definitely working, so it would seem odd that the greek letters are not! Everything works fine when exporting to HTML / PDF.

I can get around this by using $\alpha$ in the text and --webtex at compile but am trying to avoid this as the rendered images seem very low res, and it affects readability.

Is there a way to improve the resolution of the webtex images and/or write in html syntax?

Improving the resolution of the webtex images would be particularly useful as I have math formulae written in LaTeX that are not very legible due to pixelation.

I'm using iBooks to preview my ePub output, so happy to be corrected re webtex if this is an iBooks fault.

Thanks

jkr commented 7 years ago

Just doing a simple echo 'α' | pandoc -o out.epub, it seems to convert fine. What version of pandoc are you using? (You can unzip the epub and look at the html pages to see if it's a conversion problem or an iBooks problem.)

jgm commented 7 years ago

This could be a font issue -- maybe the font you're using lacks a glyph for that Greek letter?

Re webtex: I don't know if there are ways to increase pixelization. However, there's a very slick method using MathJax-node, which could allow all the math to be replaced by SVG: https://github.com/jgm/pandoc/issues/3153

Currently it would require a bit of postprocessing, but we're thinking of making it easier to integrate with pandoc.

By the way, if you're targeting iBooks specifically, I believe it supports epub3 with mathml. So you could try using pandoc to generate epub3 (it should automatically use mathml for the math, I think, but it wouldn't hurt to add --mathml).

+++ suknat [Nov 14 16 08:18 ]:

I'm writing in pandoc markdown with the intent to convert to ePub. I've been using standard HTML/MD to render greek symbols, like so: α. I believe pandoc supported exporting this to ePub a few months ago, but it seems broken now? I might be imagining this, but I have an entry in my diary suggesting it was working at some point! Things like ° are definitely working, so it would seem odd that the greek letters are not!

I can get around this by using --webtex but am trying to avoid this as the rendered images seem very low res.

Is there a way to improve the resolution of the webtex images and/or write in html syntax?

Improving the resolution of the webtex images would be particularly useful as I have math formulae written in LaTeX that are not very legible due to pixelation.

I'm using iBooks to preview my ePub output, so happy to be corrected re webtex if this is an iBooks fault.

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, [1]view it on GitHub, or [2]mute the thread.

References

  1. https://github.com/jgm/pandoc/issues/3231
  2. https://github.com/notifications/unsubscribe-auth/AAAL5HlfrYGL3Q8oW963aSjvU19ss7GXks5q-InvgaJpZM4KxgVV
suknat commented 7 years ago

Thanks for both your comments and suggestions.

I checked pmd version and it was 1.16 which I have now moved to 1.18. I can now report that the glyphs are being produced. Yay!

Re +jgm's suggestions:

Thanks!