by bArray · 4y ago · 0 comments
Equation:
$$x=\frac{1}{2}$$
Unfortunately there is no common in-browser Math rendering and as the referenced article points out, pictures of equations are not the solution [2]. A common mathematics rendering format is desperately needed but nobody really seems motivated to solve it.My approach is to use MathML that is rendered natively by Firefox and use JS to render in other browsers [3]. MathJax is way too heavy the last time I checked (growing towards 1MB) [4]. Instead I use math-ml, a JS library that is somewhat complete/abandoned but mostly works in about 80kB [5].
My rational for supporting Firefox's approach is that it's the browser I use, MathML is supported by W3C [6], MathML is supported by pandoc and there is a lightweight workaround for other browsers.
[2] https://danilafe.com/blog/math_rendering_is_wrong/
[3] https://coffeespace.org.uk/projects/mathml-render.html