lzanini / mdbook-katex

A preprocessor for mdBook, rendering LaTex equations to HTML at build time.
MIT License
205 stars 34 forks source link

option for MathML output #86

Closed expikr closed 1 year ago

expikr commented 1 year ago

According to https://katex.org/docs/options.html KaTeX supports MathML outputs enabled by a flag.

Would be nice if a flag could be added that allows the display output to be in MathML, as it is now supported in Chrome since the beginning of this year: https://katex.org/docs/options.html

expikr commented 1 year ago

https://github.com/lzanini/mdbook-katex/blob/master/src/cfg.rs#L55

SichangHe commented 1 year ago

This may not be obvious, but it is one of the options we have under KaTeX options following what KaTeX offers.

You should be able to do this:

[preprocessor.katex]
after = ["links"]
output = "mathml"
expikr commented 1 year ago

Nice, it works. Would be a good idea to update documentation to point it out.