jgm / djot.lua

Lua parser for the djot light markup language
MIT License
58 stars 9 forks source link

MathML support #18

Closed alterae closed 1 month ago

alterae commented 1 month ago

It appears that when generating HTML the inline and block equation syntaxes are outputting LaTeX-formatted text for use with MathJax, like so:

$$`e^{i \pi} - 1 = 0
<p><span class="math display">\[e^{i \pi} - 1 = 0\]</span></p>

However, this introduces an external dependency on a javascript library to the document, which is not idea.

MathML is supported in all major browsers according to MDN, and works in environments without javascript, allowing for smaller page sizes and better portability.

It would be nice to be able to output MathML in HTML documents.

jgm commented 1 month ago

pandoc -f djot -t html --mathml will do this. Implementing MathML conversion in Lua would be a huge job -- not one I'm planning to undertake.

alterae commented 1 month ago

ahhh okay, that works

understandable! sorry to trouble you