jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.4k stars 3.37k forks source link

Make it possible to switch EPUB3 writer to plain math mode #5254

Open link2xt opened 5 years ago

link2xt commented 5 years ago

EPUB writer uses MathML for inline math unconditionally: https://github.com/jgm/pandoc/blob/2932ac8574e79d5d5b3b65ed81b0125d4d146f12/src/Text/Pandoc/Writers/EPUB.hs#L460-L462

As a result, options such as --webtex, are not honored. It may be desirable, because according to https://docs.mathjax.org/en/latest/misc/epub.html not all EPUB3 readers support MathML.

Also, there is no option to revert back to PlainMath.

If agreed, I think I am going to add DefaultMath method to HTMLMathMethod type and a --plainmath option which sets the method to PlainMath explicitly.

@jgm do you agree?

jgm commented 5 years ago

EPUB writer uses MathML for inline math unconditionally

The reason we do this is that it is part of the epub3 spec to support mathml. So any reader that conforms to the spec should be able to handle it.

My thought was that if you want to target readers that do not fully support epub3, you can just use epub2...