9 ms·
MathML is a failed web standard (2016)
- mindcrime 9y agoSay what you want about MathML but as of now it's the best standard we have for putting math on the web. And there seems to finally be a little bit of traction developing w/r/t getting MathML support into Chromium (and Chrome). Consider that, as of Feb 14 2017, the "MathML support" issue was the #8 top starred issue for Blink, Google finally seem to be paying a little bit of attention to this. https://bugs.chromium.org/p/chromium/issues/detail?id=6606 https://bugs.chromium.org/p/chromium/issues/detail?id=6606 We (layout team and igalia) have a tentative plan to build a MathML implementation on top of LayoutNG and Custom Layout. I've marked this as blocked on CSS Custom Layout and LayoutNG.
- corndoge 9y agoCould you explain what makes in-browser MathML support better than rudimentary support of LaTeX's math mode?
- mindcrime 9y agoIf you could get in-browser support for LaTeX, that would be great. It might arguably be better than MathML. But do any browsers support that today, and is there any initiative underway to get such support? If so, I'm not aware of it. MathML, OTOH, is supported by Firefox, and I think by Safari, and it there's at least some reason to think Chrome may eventually add MathML support. Not sure where Edge stands on this. But in either case, from a pragmatic standpoint, I believe MathML is close to giving us quality "math on the web" than anything else. That said, I'd be happy to be proven wrong if something else is truly better positioned to do that.
- adrianratnapala 9y agoSince the advent of MathJax, the best bet for anyone wanting to present maths on the web has been to write the text in LaTeX and then render with MathJax. The result is that there is a large set of existing web-sites around that have LaTeX source and not MathML source. No I am no JavaScript fan, and would be very glad if mathse were supported natively in web rendering toolkits. But at least mathjax does gives some sort of workable solution: wehere "workable" means "users can read it" and "authors can write it". MathML, being unsupported by Chrome fails first thing, and MathML fails the second thing by design, because it was never really meant to be human editable.
- whorleater 9y agoWhat's wrong with mathjax?
- goatlover 9y agoThe fact that you have to load a large javascript library to faithfully render math equations. I ended up disabling it on my Jupyter notebook server because of it's load time.
- wenc 9y agoMathML rendering is unlikely to be significantly better in many use cases. Besides, once MathJax is cached, it loads pretty fast.
- Dylan16807 9y agoLoad time, not rendering time. Code in the browser won't need to be compiled over and over at runtime.
- wenc 9y agoThe render time is fairly fast on most modern browsers on desktop machines (though there's much more variance on mobile devices for some reason). For the most part, it's good enough for the professional mathematicians on mathoverflow.net, where the math can get quite hairy. (I was active there many years ago, and even then the render speed was better than acceptable)
- corndoge 9y agoSo just current state of adoption? Kinda lame but such is progress I suppose
- kevin_thibedeau 9y agoTeX is a macro language which makes it non trivial to debug. The output is generated in a non-obvious way from loosely structured input. That being said, TeX math markup is a superior, human friendly format suitable for input to a translator that outputs MathML just as most people aren't writing web page content directly in HTML.
- snakeanus 9y ago> Say what you want about MathML but as of now it's the best standard we have for putting math on the web I would argue that this holds true for (La)TeX, most sites use JS implementations of it and show the raw (La)TeX code as a fallback (or in an image form) if the user has JS disabled.
- sulizilxia 9y agoThat approach works well in terms of compatibility, but my sense is that it's usually much slower than MathML, and with equation-heavy documents can be extremely slow. I might be unaware of something, though. MathML isn't perfect, but I much prefer it to anything else on the web at the moment. I'd almost rather see an updated MathML spec than something new, especially one js-based.
- dunham 9y agoMathJaX is sluggish because it's translating stuff after the page loads (and it takes the target browser + window size into account, so it's hard to move it out of the browser). KaTeX can work as a preprocessor (but has less coverage of special environments and macros), and looks very promising to me. (And as long as you keep the original text in an attribute or hidden element, you can always migrate to something else later.) The fidelity of MathML that I've seen has been terrible. The only people I've seen make it work is Apple, and there it's only working for their proprietary iBooks files. They render parts of the equation in SVG on top of the MathML, and they've got a special XML file that's tweaking a bunch of MathML layout parameters. I've tried copy/pasting the MathML into an epub, and it looks completely different, even when viewed in the iBooks app.
- dang 9y agoDiscussed at the time: https://news.ycombinator.com/item?id=11444830 https://news.ycombinator.com/item?id=11444830.
- ungzd 9y agoIt's very frustrating every time I'm trying to read some webpage via Pocket app and it has formulas rendered with Mathjax (which is very popular because MathML is failed and pre-rendering formulas as images requires complicated tooling) and they don't work in Pocket.
- agumonkey 9y agoWhat about VRML ? SMIL ?
- ausjke 9y agotrue but we have a better alternative from Khan Academy: https://khan.github.io/KaTeX/ https://khan.github.io/KaTeX/
- fantispug 9y agoKaTeX suffers the same issues as MathJax; it has to render some subset of Math LaTeX to something web browsers can render. We now have two standards. All the CSS issues in the article apply as much to KaTeX as anything else.
- devereaux 9y agoYes, we need something better. The correct solution is to have Unicode combining characters, as anything else will require a lot of separate work to be properly supported. To think about how Unicode combining characters could work, just look at what Mathematica can do with just a few shotkeys: like ctrl-2, ctrl-- (ctrl-5), ctrl-6, ctrl-7 etc. The matching Unicode combination characters would respectively be: place under a square root, put a something to the right below (and above), put an exponent, put something over. With these 6 combining characters, you could already solve a large part of the problem and write 90% of the equations: for ex, if you want to type the sum of i=1 to 10 of the square root of alpha to the k bar power: Type: 𝚺 (ctrl--) i=1 (ctrl-5) 10 (ctrl-2) α (ctrl-6) k (ctrl-7) _ With a proper keymap or shortcuts support, you could write (and render) equations just as fast as you write them by hand. I know, because I take all my notes with Mathematica and the only "magic" I use beside Mathematica combining shortkeys is a third level Unicode mapping for greek letters and some mathematical symbol like infinity, so that AltGr a gives me alpha, AltGr 0 gives me infinity etc. Also, unlike what you read above, where only sigma and alpha stand out, it would show up in your browser, and you could copy-paste that in any email or text forum -- like HN or reddit!! No need for MathML support, that would be implemented straight in the Unicode rendering engine with the next batch of Unicode changes. I have been trying to get some people involved, to try to submit a Unicode Math proposal. Nobody seems interested. Maybe with MathML dead, proper Unicode math combining characters will have a better chance. (NB: in the above, I do not use a combining over bar for k, even if that is possible at the moment with what I think is called a macron. The idea is more general - what if you want to write a letter instead of just a bar over k? we have a few exponents like numbers and latin letters, but what if you want to write greek letters to the top right corner?)
- jean- 9y agoIt's a neat idea, but I'm not entirely sold. How would you implement, amongst others: vectors and matrices, matched auto-sizing delimiters (\left and \right) \operatorname, \limits, \displaystyle, \textstyle? In my line of work, every other line of maths I write requires at least one of these LaTeX features. Also: \underset / \overset, \underbracket / \overbracket
- 9y ago
- thanatropism 9y agoI don't understand what is wrong with TeX. - As a syntax/language for mathematics, it's the actual standard. Do you think Terry Tao will bother learning some other language for his blog? You might as well argue that English is poorly-specified and the web should switch to Lojban. - As a layout engine, it encodes all the damn typographical conventions that are in every single research article, academic journal and textbook. In the world. Trying to replace TeX is so quixotic it makes Urbit sound pragmatic and down-to-earth. It's this whole scorched earth tradition. There just isn't any mathematics out there that uses anything but TeX.
- unkown-unknowns 9y agoThe problem with LaTeX is that it still mixes content and styling. For example, when I've got a final answer I have a macro that I've named "fa", which will insert double underline. This is an attempt on my part to give semantic meaning to the final answer. However, since that macro is mine and not standard it doesn't help much in the grander scheme of things. LaTeX should have had an absolute separation of style and content.
- revelation 9y agoYes, this worked so great on the web /s I read this complaint on the old thread and I think we had 3.. 4 of those "semantic web" standards by now? But here we are, everything is a bunch of divs and extracting meaning from web sites is a task for deep learning neural networks.
- lomnakkus 9y agoWell, at least in math there's a somewhat formal notation for most things at this point? Obviously, mathematicians don't all agree on the precise notation, but there's generalizable ideas like "grouping symbols" (parens, brackets) and "left-grouping symbols" (upper-sigma, upper-pi), etc. etc. that inform the layout? Am I hopelessly misinformed on this? This kind of thing should suffice for 95%+ of things, and if you are an exception then you get to play in "lay it out yourself" land. One issue that I had with LaTeX formulas was exactly the thing that parent poster was pointing out: You really had to describe the layout of the formula; not just its expression ("... and have at it, layout engine"). It is/was really just a kludge around the box model of TeX in the worst possible way. Yes, you could produce the most beautiful formulas of them all, but that's just because you spent a huge amount of time learning (La)TeX and tweaking the exact expression of each individual formula[1]. Don't get me wrong, it's was still miles better than the competition at the time if you cared about the quality of the output -- not to mention the severe resource constrains -- but surely we can do better these days? Surely?!? Btw, I don't think parent poster was talking "semantic web" at all, as I read it at least. [1] Same deal with pseudocode. Oh god, the amount of time I spent tweaking pseodocode in my university years.
- tomtimtall 9y agoWeren't all of these issues solved with latex? Why do we need to start over all for the purpose of making everything xml?