7 ms·
MathML is technically human read/write-able, but not efficiently. Something like Mathjax (which targets mathml) is also necessary, to allow humans to read/writ
by harshreality 3y ago
MathML is technically human read/write-able, but not efficiently. Something like Mathjax (which targets mathml) is also necessary, to allow humans to read/write raw math expressions in a simpler format.
- invalidOrTaken 3y agoMathjax can output MathML, actually. It's as easy as linking to tex-mml.js
- mananaysiempre 3y agoA heavy, slow client-side script like MathJax seems like an unpleasant way to target MathML—why not precompile offline from something like AsciiMath?
- runarberg 3y agoMathML is as human readable and writable as SVG, and that is by design. Now that all browsers support MathML natively we no longer need MathJaX to read it (the browser does a much better job) however we still need to be able to write it. MathJaX can certainly help there, though I would argue there are better libraries then MathJaX for that purpose. MathJaX had a good run, they did a good job, I would say their job is done however.
- nine_k 3y agoIsn't it like saying that now when all browsers can natively render SVG, the job of Inkscape is done forever? I'd say the opposite: now we can safely use MathJAX to translate TeX syntax to an efficient rendering representation.
- runarberg 3y agoInkscape is purely an SVG editor, yes you can also view SVG images using inkscape but that is not its primary function. MathJaX’s primary function on the other hand is to find mathexpressions on a web page and then use javascript to turn them into HTML+CSS rendered equation. If you want to write LaTeX and include the equivalent MathML in your webpage, then something like Temml is a lot better choice, as that is it’s primary function. https://temml.org/ https://temml.org/
- tannhaeuser 3y ago> MathML is as human readable and writable as SVG, and that is by design. From what you're writing I'm not entirely sure you think MathML has good or bad readability then ;) But in case you don't find MathML's presentational syntax convincing for authoring, you can pickup SGML shortref syntax (a technique even older than MathML itself [1]) for at least eg. a highscool math subset in order to cut down on excessive <mo>, <mi> tags. [1]: https://www.w3.org/MarkUp/html3/maths.html https://www.w3.org/MarkUp/html3/maths.html
- runarberg 3y agoMathML was designed to be an easy target for other authoring tools. This includes graphical editor (just like inkscape is for SVG) or libraries (just like D3 is to SVG). I actually don’t like writing MathML, and I actually wrote a library my self that targets MathML.
- svat 3y agoThe point of MathJax is so that users can type math the way they are used to—typically TeX syntax, though MathJax also supports AsciiMath and MathML itself—and get nicely typeset output (MathJax has three output formats: MathML, SVG, and HTML+CSS). At most you could say that MathJax's MathML input and HTML+CSS output are no longer needed, but that's not the bulk of the need that MathJax serves. Also: 1. [Input] Even if only targeting MathML output, you still need some way to take the user's TeX input and generate MathML, which is what MathJax provides here. What are the alternatives to MathJax that you have in mind? The closest competitor I'm aware of is KaTeX, and while it is fast when it works, there are still some holes in its support (relative to MathJax). (Another comment in this discussion points out Temml, which indeed looks good: https://temml.org https://temml.org https://github.com/ronkok/Temml https://github.com/ronkok/Temml https://temml.org/docs/en/comparison.html https://temml.org/docs/en/comparison.html ) 2. [Output] The MathML output rendering in browsers is not yet 100% identical to TeX's typesetting (they're certainly aware of it / thinking of the right things, looking at the mentions of [TEXBOOK] at https://w3c.github.io/mathml-core https://w3c.github.io/mathml-core ), and this may even be intentional. In particular, looking at various MathML demo pages I found online (http://eyeasme.com/Joe/MathML/MathML_browser_test.html http://eyeasme.com/Joe/MathML/MathML_browser_test.html https://fred-wang.github.io/MathFonts/mozilla_mathml_test https://fred-wang.github.io/MathFonts/mozilla_mathml_test https://www-archive.mozilla.org/projects/mathml/demo/texvsmml.xhtml https://www-archive.mozilla.org/projects/mathml/demo/texvsmm... and Temml's useful demo pages: https://temml.org/tests/wiki-tests https://temml.org/tests/wiki-tests https://temml.org/tests/latexml-tests https://temml.org/tests/latexml-tests https://temml.org/tests/mozilla-tests https://temml.org/tests/mozilla-tests) it appears that in all three of Chrome/Firefox/Safari the rendering of nested square roots is a bit suboptimal, while Safari has some more serious issues (example 9 of the Mozilla MathML Test looks poor in Safari). But clearly the Igalia (for Chrome) and Mozilla folks have done great work, and it's pretty close, but in the meantime I imagine at least some authors would prefer the more deterministic (across browsers) output of SVG or HTML+CSS. (Also, on a lot of these MathML demo pages, selecting and copy-pasting the math produces junk, while with MathJax there's a right-click menu providing the TeX source and also some accessibility options… it seems that accessibility is actually higher with MathJax under certain circumstances at least.)
- 3y ago