MathML still hasn't caught on after two decades, for three reasons: 1) not working in all browsers; 2) even when it worked, the rendering was often buggy or plain ugly; 3) no one wants to write MathML directly.
MathJax instantly solved all problems, which made it an overnight success. MathML might be able to overcome 1) and 2), but 3) should not be underestimated. MathJax will be around as long as it is the most convenient solution for showing equations in a browser (no user-side compilation required), and rendering times and network traffic will suffer accordingly.
https://en.wikipedia.org/wiki/MathML#Example_and_comparison_...
Comparison to LaTex is almost hilarious. Showing well how in the end XML managed to combine the properties of Binary and Text formats. It's slow to parse like text format and hard for humans to read, like binary formats.
Personally I'd also really love that they'd just standardize LaTex or something similar. Why invent some non human readable mess when there is already a perfectly functional and widely used notation available?
Using the same format for equations as for the rest of the document (i.e. HTML/XML) is advantageous (in addition to the parsing benefits). In particular, you can use the same mechanisms for styling and transforming elements, as you can for the whole document. For instance, you could easily style parts of an equation, provide pop-ups that explain what each symbol means, when you hover over it, or interactively change the equation. (Much of this hasn't actually been done, outside experiments, because only Firefox properly(-ish) supports MathML, so it would have been wasted effort.)
[0] https://gist.github.com/aplaice/266b092bc48afbbdd46cdbd0ca81...
[1] Presentation MathML is still obviously not semantic, but it can be better in this respect than default TeX — there have been proposals for semantic TeX, but none of them have really caught on.
It was specifically created to avoid TeX being used on the web, because TeX is ill-defined, loosely structured and lacks basic functionality such as Unicode support.
I'm excited by this because I hope that with a proper widely-supported system for math in HTML we can eventually write more papers to be digital-first. An HTML document is so much more accessible, searchable, semantically analysable and flexible than Latex and its PDF output. I dream of a world where the standard for papers is not Latex .pdf but .mhtml or .maff.
Encoding the aesthetics of good mathematical typesetting is not trivial, and Knuth and others have spent decades on it based on studying and absorbing all the tricks that hot-metal typesetters had come up with over centuries. It would be foolish to throw away all that hard-won knowledge and implement half-baked solutions from scratch: those working in the field understand this (though the original MathML proponents perhaps did not), which is why the linked post mentions “math rendering based on TeXbook’s appendix G”.
More generally, in this conversation (and in any discussion about MathML), several things get conflated:
1. What syntax the user types to get their mathematics. I think it's beyond dispute here that no one wants to type MathML by hand (and even the MathML advocates do not propose it AFAIK). Also, so many people are familiar with TeX/LaTeX syntax that it must be supported by any complete solution, though alternatives like AsciiMath or some interactive input are still worth exploring.
2. How the mathematics is actually encoded in the HTML file, or delivered to the browser. Frankly I don't think this one matters much because it's invisible to the user; any of raw TeX syntax, or MathML syntax, or fully-positioned HTML+CSS, or SVG, will probably do.
3. Who does the rendering and typesetting / layout. The promise/dream of MathML is that a standard will be specified and all browsers will implement it; though this is yet to become reality. Meanwhile, typesetting can already be done server-side (someone runs TeX/MathJax/KaTeX/etc before sending it to the browser) or client-side (MathJax/KaTeX running in the user's browser) instead of being done in the browser's native code.
4. The quality of the typesetting/the algorithms used. I already mentioned this in the second paragraph above so I won't reiterate it, but this has been mostly underestimated/ignored by those advocating MathML. The decisions made by TeX reflected the best journals of the early 20th century and have in turn become the shared aesthetics of the mathematical community; “so-so” typesetting will not do.
5. What the result/output of all this rendering/typesetting/layout will be, in the web page's DOM. This affects things like usability (being able to copy-paste), scaling/zooming, styling individual parts of formulas, etc. Again, already (La)TeX+dvisvgm supports SVG for this, and MathJax supports HTML+CSS, MathML or whatever. Anything other than raster (PNG etc) images is probably fine here.
The main new/useful thing I can see with MathML is with (3); the browser doing the typesetting. But that's hard, and it has a lot of other challenges to overcome too. And as MathJax/KaTeX/dvisvgm demonstrate, the facilities provided by the browser for layout (HTML+CSS for example) are already sufficient for print-quality typesetting.
Nobody wants to learn a new type setting language. Latex is much less hard to learn and use than you imply
I mean just look at MathML https://en.wikipedia.org/wiki/MathML#Example_and_comparison_...
Also, directly converting TeX to MathML, even client-side, is much easier and faster than MathJax's many-to-many approach (I'm not criticising MathJax — given the constraints, they're doing the best possible job).[0][1][2] (See also the Ascii to MathML converter[3] that has already been mentioned in another comment.)
[0] http://fred-wang.github.io/MathUI2014/demos/7-web-component....
[1] https://github.com/fred-wang/MathUI2014/blob/master/demos/7-...
Math typesetting is hard and stretchy characters in particular are not an easy fit into the browser layout model. It’s not been a priority for browser vendors. Hopefully that will change.
I could usually tell you what was being summed over by reading the _ subscripts and ^ superscripts. However the thing written under the sigma is not always formal, nor should it be: oftentimes it will be an abbreviation of a fairly elaborate conditional that is described elsewhere in the text. Please, don't treat typesetting languages like they're programming languages where the computer has to be able to execute the formulas you write, we want to keep our close interweaving with natural language.
Of course, writing a clean "standard" which covers most of what people expect when they say "TeX", and implementing that, would hopefully produce the best of both worlds.
Does TeX semantics have something that MathML does not yet have?
MathJax works with both MathML and TeX. Is there difference in the rendering when using different markup with MathJax?
It does not. In fact MathML captures much richer information than TeX.
> MathJax works with both MathML and TeX. Is there difference in the rendering when using different markup with MathJax?
There shouldn’t be. MathJax internally converts TeX input into an intermediate MathML AST before rendering.
Igalia had already been improving WebKit's [1] MathML renderer and they had a fundraiser for the Chromium MathML work for a long time. Now they seem to collected enough to start with it. It's one of the great advantages of open source that a small company like Igalia can just go and improve multiple rendering engines used by billions of people.
[1]: https://webkit.org/blog/6803/improvements-in-mathml-renderin...
"The NativeMML output processor uses the browser’s internal MathML support (if any) to render the mathematics. Currently, Firefox has native support for MathML, and IE has the MathPlayer plugin for rendering MathML. Safari has some support for MathML since version 5.1, but the quality is not as high as either Firefox’s implementation or IE with MathPlayer. Chrome, Konqueror, and most other browsers don’t support MathML natively, but this may change in the future, since MathML is part of the HTML5 specification."
"The advantage of the NativeMML output processor is its speed, since native MathML support is usually faster than converting to HTML-with-CSS and SVG. The disadvantage is that you are dependent on the browser’s MathML implementation for your rendering, and these vary in quality of output and completeness of implementation. MathJax relies on features that are not available in some renderers (for example, Firefox’s MathML support does not implement the features needed for labeled equations). While MathJax’s NativeMML output processor works around various limitations of Firefox/Gecko and Safari/WebKit, the results using the NativeMML output processor may have spacing, font, or other rendering problems that are outside of MathJax’s control."
https://standardebooks.org/ebooks/ludwig-wittgenstein/tracta...
Not exactly.
https://en.m.wikipedia.org/wiki/Help:Displaying_a_formula#Na...
wxMaxima is something like jupyter notebook but developed with wxWindows by a solo developer. ?? is help for command
I just copy pasted:
(%i2) ?? mathml; -- Function: mathml_display (<form>) Produces MathML output. (%i1) load("alt-display.mac")$ (%i2) set_alt_display(2,mathml_display); <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>mlabel</mi> <mfenced separators=""><msub><mi>%o</mi> <mn>2</mn></msub> <mo>,</mo><mi>done</mi> </mfenced> </math> (%o2) true
https://runarberg.github.io/ascii2mathml/
(it helps to have the LaTeX Computer Modern fonts installed locally, which for some reason aren't imported on this page)
ascii2mathml was the first compiler I ever wrote (and have written since). I wrote it because I wanted authors from a non math background to be able to write short expressions in forums or comment threads without having to know latex. I tried to make it as intuitive as possible. Even going as far as making `1+2 / 3+4` a different expression from `1 + 2/3 + 4`. But I know some people started integrate the library in their notebook apps, mainly used by math students taking notes in lectures in a markdown format (writing the expressions in ascii2mathml). Ascii2mathml might be a better fit then then the original asciimath for that purpose as the original is no expressive enough to capture advanced math expressions.
I bailed on it a couple of years ago because it looked like MathML was a dying. Chrome wasn’t going to implement it. Also I haven’t been using it for anything either. Perhaps it is now time I revisit it and give it some love.
With mathml supported by Chrome, you could instead of the whole Mathjax renderer use only a lightweight "latex/asciimath to mathml" translater and let the browser do the rendering job.
Why is it desirable to have "native" implementation? The usual answer is performance, but I am not aware of much performance complaint of MathJax. If not performance, how does it make sense to add more C++ code to browsers to be exploited, when memory safe JavaScript implementation is already available?
[0] https://www.mediawiki.org/wiki/Extension:Math/advancedSettin...
[1] not that "niche" websites like nLab[2] should be disregarded, since the web was originally designed to help scientists...
That's why we can't have nice things.
If MathJax or KaTeX is too slow for some purpose, someone should try to compile a more streamlined TeX renderer to wasm.
I am in favor of bundling MathJax's MathML implementation in browsers though.
Does anybody know if this will translate to chromium based web toolkits (eg QT), and MS Edge (soon to be based on chromium), and therefore, React-XP [1] ?