The learning curve is worth it imo (if you often work on documents and publications).
After trying many Pandoc options [1] I ended up selecting a very small implementation by Preet [2] which was some ~70kB [3] compared to other implementations at about 10x (i.e. MathJax [4]). I use it with the Polyfill to check if it is already supported. If you checkout the torture test, it really performs quite well [5].
In the future I still want to convert to SVG vectors (with bitmap backups) and include those instead, but I'm not yet pleased with the offerings. My concern with JS is that it seems to be on the way out, I think it will eventually go the way of Flash in favour of something else.
With the current solutions for rendering equations you either have this ridiculous wrapper around LaTeX or similar, or some other weirdness. If I get bored for a few days I might end up writing a parser to convert MathML to such outputs. It shouldn't take insane efforts to pass some torture tests.
[1] https://coffeespace.org.uk/projects/mathml-render.html
I have written an AutoHotkey script for my own use that does something similar, but for converting Markdown to HTML — so that I can write in Markdown, but fall back to embedded HTML easily if Markdown is not enough. Maybe I shall replace its pulldown_cmark backend with pandoc to get support for MathML.
If you write a limit as \lim_{n \to \infty} etc etc then LaTex gets to decide whether to write your limit in inline style (next to the limit) or below. If you want it always to be below then you need to write
\lim\limits_{n \to \infty}
It’s the same deal with summations and integrals.
ayhanfuat•9h ago
esafak•7h ago