MathJax 3 has the ability to convert TeX directly to SVG. This is handy when embedding embedding typescript expressions into SVG, as you can simply insert the output from MathJax.tex2svg
directly into your larger SVG document. As a result, if you use Observable’s “Download SVG” facility or SVG Crowbar on an HTML page, the typeset mathematics should be included correctly. Here’s an example:
Note that MathJax was long by far the best option to place typeset mathematics in web pages but has recently been challenged by KaTeX - largely due to the speed difference. I also like KaTeX’s API compared to MathJax 2. MathJax 3 is a big step forward on both those issues and still maintain’s a strong lead in feature implementation. One major issue with MathJax 3 is that the documentation is currently way behind the capabilities.