MathML Progress
igalia.com
igalia.com
> The initial vision of MathML was that people would write it in a WYSIWYG editor (since it’s far too verbose to write by hand), but that grossly misjudged users’ preferences
To be honest, it probably depends heavily on a particular audience. I know people who barely wraps their heads around the concept of BBCode, and those (although a much smaller group) who would probably advocate for exchanging Microsoft Word for a LaTeX editor. Most people out here are probably completely content with a WYSIWYG editor and don’t care about the inner mechanism of its implementation as long as it gives an expected effect for them.
MathML is the equivalent of having to compile CSS/JavaScript into an XML-based “bytecode,” which then gets parsed and executed by the browser.
The idea of having native support for describing mathematics that the browser can render is not so crazy. On the other hand, MathML is sadly based on XML, which is an abomination that can't "decide" whether it should be human- or computer-readable, so it ends up being none, as opposed to S-expression-like formats which are both. But, at the end, SVG and HTML are already in the same (SGML?) family, so it might not be so bad that MathML belongs there, too.
It’s possible to define useful subsets of LaTeX (e.g. math markup only) for which this is not the case. MathJax does just that, in fact.
But the fact that nobody had bothered probably tells us it's not all that useful.
LaTeX support was a really long shot to be standardized and implemented consistently across browsers. It's just too powerful. For LaTeX users, the only thing that MathML standardization changes is that MathML is now part of the target language that a LaTeX implementation compiles to. Maybe that will be useful; maybe not.
Supporting MathML instead of LaTeX makes sense, because it's machine-readable language which is easy to generate and parse. HTML uses XML-like notation, SVG uses XML notation, so it only makes sense for equations to use XML notation instead of completely different language.
It is eloquent and can be picked up in an hour or two by end users.
One of the sadder ignored standard, right up their with Bluetooth media control which is also super simple and easy to understand, and only ever partially implemented. (Seriously, go through both specs!)
I hope not. The key gain here is that the syntax used for mathematics in HTML needs to be easy to integrate in the web platform of 2021. Can you still use the DOM with MathML? Yes. Can you naturally interleave it with other HTML elements to create multi-modal constructions? Yes. With diagrams? SVG+MathML is possible, yes.
Indeed it is designed for technologists, solving a problem on the world wide web, as well as in other structured formats. And no, no one is asking mathematicians to type XML or HTML by hand in 2021.
An author can keep using latex, asciimath, Word or OpenOffice, MathType, MathQuill, or even Mathematica/Matlab/scipy syntax, as they've done until now. And then have their toolchain of choice prepare MathML to be served on the web, (or epub ebooks, etc), in a uniform manner understood by all vendors. Mere mortals can then finally create web apps that can natively access the math, without writing half-baked tex parsers that have hundreds of awkward and undocumented special cases.
TeX syntax has no path to richer integrations into the web platform and keeps mathematics out of reach for all modern ecosystem trends. I certainly think MathML can still be improved quite a bit - mostly by making it smaller and simpler, so that anyone can pick it up in an hour and write a new app in a day.
Edit: Actually, when I select any font other than "Default fonts (local only)", the stretchy characters' heights change in response to content they embrace (though still not correct -- they tend to be taller than they should be), unlike with "Default fonts (local only)" where the characters won't stretch at all. I wonder why this is the case.
Finally! The lack of MathML support in Chromium based browsers was quite frustrating to me. Though, it will be probably still quite a lot of time before the libraries like MathJax and KaTeX became redundant for basic use cases.
I think that libraries like MathJax and Katex will always be used for translating TeX notation to MathML. Stil, I look forward to day when will have native rendering on all browsers.
And the people who really, really, want something other than MathML are free to start (or finish?) writing code, raising money to have other people write code, etc., and work with Google, Mozilla, et al, and get their system integrated into browsers. I'd just be surprised if this effort yields any meaningful results in less than 20 years.
So at least now we'll have native MathML rendering to tide us over until the New Math Browser Thing becomes reality.
I'm talking about people who want "native in-browser" rendering for something other than MathML. If they want their favorite approach implemented in the browser, they're welcome to make it happen. My point is that MathML native-in-browser rending is basically already here.
Of course you can use Javascript libraries like MathJax or something similar to implement whatever you want. But for people who care about native rendering, that's neither here nor there.
As it stands, every approach that we have for putting math on the web has short-comings - including MathML. Nonetheless, I think having a well known, widely supported, standardized way of natively rendering math in the browser - without needing extra Javascript libraries or extra server-side processing, is a Good Thing. Note what I'm very explicitly not saying: "MathML is the be all end all" or "MathML is the very best way to put math on the web now and forever", or "MathML is better than TeX / LaTex", etc.
I just think this is Good News, and I'm excited to see tis move forward. I also hope MathJax continues to develop (there was some noise at one time about MathJax interoperating with native browser MathML rendering, but I'm not sure where that stands), as well as whatever other ideas people find appealing. More clean/elegant ways to put math content on the web is always good, IMO.
This difference in opinion (on a subjective topic) is causing a rift between MathMl's goal of a universal math-language for browsers are more, with a large chunk of the potential users who hate the syntax.
There's (in a way) a false dilemma at play here. MathML is unreadable because it's XML, but it is also possible to describe trees in more readable languages like S-expressions.
Either way, it would be absurd to add TeX into a Web browser ...
I agree. Nobody is seriously proposing adding a full LaTeX implementation to a browser, but rather a parseable subset of TeX strictly for math markup, à la MathJax, which incidentally has become the de facto standard for embedding math in webpages.
If we implement a subset of TeX in a browser, there are two options: 1. If we only include the most used commands, such technology will be useless for professional mathematicians and probably be obsolete in future (when some new useful notation appears). 2. On the other hand, if we keep adding new commands for every type of mathematical notation, then we will need longer names for commands (or maybe namespaces) and notation will not be readable anymore. Not to mention that browsers maintainers will need a lot of work to implement all that (How long will that take?)
Also, if we implement only a subset of TeX, users will not be able to easily (or anyhow) create new notation. On the other hand, MathML is very flexible in that regard and allows users to be creative.
And, contrary to some other comments in this discussion, I don't think that code for mathematical notation must be human readable before all. Whatever approach you take (tex, XML, S-expressions), you will quickly find some examples that are horrendous for coding (integral inequalties, steps in PDE solution, commutative diagram, proof tree...)
It's semi-respectable for a computer analysis, but notice that the creator of this video is using TeX to enter the math. You now don't have to write a caption when you paste some math, automated a11y semi-compliance, but does this mean you stop vetting your site with a screen reader? The answer should be no, but I get a feeling that many developers will check the box and move on (see also: "accessibility overlays").
Now, let's turn the situation around, you are blind, you have heard and understood a complex equation, you must respond by writing a response to that equation. How do you do it? Does MathML help you? The markup, generated from TeX, that can be read aloud by a computer, is still fundamentally read only. The most tech savvy of the visually impaired I've met learned to program and use python or something to do their math. It beats the hell out of handwriting xml or using a very restrictive mathML wysiwyg editor with a screen reader.
Do I think MathML is a pure negative? No, but it's not even close to a silver bullet, and using potential a11y benefits to shield its flaws doesn't sit right with me.
I'm wondering who is sponsoring this work. Igalia is still a company and I don't think they are afford to do this as a hobby... But maybe they do this anyway?
> Latex packaging is nightmare.
and
> Verbosity will be solved by tones of JS and python packages.
seem at odds to me.
Tools like KaTeX output both HTML and MathML simultaneously (HTML for rendering, MathML for screen readers), leading to massive page bloat. MathJax requires client-side JS to look good, which is a big 'no' for me.
Right now, there is no way to display math on the web that: (1) is accessible, (2) works across all modern browsers, (3) is not slow or bloated in some way. MathML in Chrome fixes basically all these problems.
This sort of dictating opinions via tech seems common in the browser world, and it honestly makes me thankful we primarily target pdfs and not the web.
Why I think LaTeX "won out":
1) Chrome dropped MathML 10ish years ago
2) MathJax got LaTeX support
3) People don't care about accessibility/ambiguity enough to bother with anything else
4) There aren't good, mainstream frontends for MathML other than MathType, making LaTeX more convenient to learn and use
Latex is basically the mathematical (computer) lingua franca right now. Theres an entire cultural and technological ecosystem around latex thats been built up for many years. We even message each in latex notation when rendering isn't available! Theres decades of documentation online. Most important of all, its dead easy to use for most use cases!
Perhaps MathML is technically superior in some ways, but none that the people typesetting math are concerned with. That this is browser oriented tech in particular is already a disadvantage, as the browser is not a priority to us. In this way mathjax feels like the superior tool for users. It attempts to work with users rather than dictating to them.
XML apologists generally propose special editors to make the experience less unpleasant, but that's not what working users of mathematics want.
TeX notation provides a way for us to type formulae in plain text form, anywhere that ascii is accepted, as fast as we can type normal text. That's the bare minimum required for any representation to be relevant to mathematicians and physicists.
I don't know what a more 'web flavoured' notation satisfying this constraint would look like. (Are web standards people even capable of brevity?)
You can try it with chrome://flags/#enable-experimental-web-platform-features enabled here https://fred-wang.github.io/MathFonts/mozilla_mathml_test/
Hopefully MathML will help with that. The most important thing is that MathML is limited enough in power that gmail et al. can support it without worrying about security / privacy. (Unlike, say, .svg images now.)
A way of displaying math is needed on browsers. So is a better way of citation, and how about a video standard.
Are we at an inflection point? Traditional math symbols will just be replaced by a computer language like Python? And we end up with 2 languages for doing math; the old paper way and the news computer programming language way?