3 ms·
It isn't mentioned because because they aren't really the same thing. MathML is a web native math markup language and being XML is meant to be written by machin
by forgotpwd16 4y ago
It isn't mentioned because because they aren't really the same thing. MathML is a web native math markup language and being XML is meant to be written by machines rather humans[^0]. TeX is a markup language that MathJax and KaTeX render to a web suitable format but meant to be written by humans[^0]. Both MathJax and KaTeX have support for rendering TeX to MathML.
[^0]: Compare Pythagorean theorem written in MathML and TeX.
MathML:
<math>
<mrow><msup><mi> a </mi><mn>2</mn>
</msup><mo>+ </mo><msup><mi>b </mi><mn>2</mn>
</msup><mo>= </mo><msup><mi>c </mi><mn>2</mn>
</msup></mrow></math>.
TeX:
$$
a^2 + b^2 = c^2
$$
I'll be surprised if someone preferred to write the first rather the second.
- runarberg 4y agoNobody writes the first example by hand[^1]. They write it in TeX (or some other easy to write dialect, or use a graphic WYSIWYG editor) and then use a tool to translate it to MathML. What I’m advocating here is that GitHub translates TeX to MathML on their servers and serve us the MathML, as opposed to leaving the TeX as is and ship a JavaScript library to render it after it reaches our browsers. Chrome users won’t see a difference as they don’t support MathML, so they need MathJax as a polyfill. But there is a world of difference for us Firefox and Safari users. Another benefit is that you could allow us to include the pure MathML (by hand or authored by some other tool) if we preferred that. ^1: and if they did write it by hand it would be written as <math display="block"> <msup> <mi>a</mi> <mn>2</mn> </msup> <mo>+</mo> <msup> <mi>b</mi> <mn>2</mn> </msup> <mo>=</mo> <msup> <mi>c</mi> <mn>2</mn> </msup> </math>
- forgotpwd16 4y ago>What I’m advocating here is that GitHub translates TeX to MathML on their servers and serve us the MathML I see. What confused me was the "options aren’t just MathJax and KaTeX, but also raw MathML" since those tools can be used server-side and they output some HTML or MathML or images. MathJax moreover besides TeX also takes MathML and AsciiMath input. >Another benefit is that you could allow us to include the pure MathML I guess they went with what most people work with since rendering TeX in Markdown complements their Jupyter notebook rendering. >and if they did write it by hand it would be written as Maybe. I copied my example from MDN docs git repo.