Remix.run Logo
jillesvangurp 3 days ago

We have web assembly and the power to run whatever you can manage to compile with that. There's no real need for "native" support.

The key issue is that the latex stack wasn't really designed to be packaged up like this. It just has a lot of moving parts that are vaguely dependent on running in a full blown unix like shell environment. So the resulting code would be a rather big blob. Running that in a browser isn't that hard if you can live with that having a fair bit of overhead. This has been done. But it's a bit overkill for publishing content on the web.

Browsers don't have native support for MathML any more for a good reason. Mozilla did support this for a while but dropped it because of limited adoption and high maintenance burden. Rendering formulas is a bit of a niche problem and the intended audience is just kind of picky when it comes to technology and generally not that into doing more advanced things with web browsers. Also, most people writing scientific articles would be writing those for publication and probably use Latex any way. So translating all their formulas to MathML is an extra step that they don't need or want.

At least that's my analysis of this. I'm not really part of the target audience here and I'm sure there are plenty of MathML fans who disagree with this.

In any case Katex makes an acceptable (to some) compromise by packaging this stuff up in a form where it can be run server side and is easy to integrate on a simple web page. A proper solution with buy-in from the scientific community (for e.g. MathML) is a much bigger/harder thing to solve.

IMHO, a light weight solution based on web assembly could be the way to go. But of course the devil is in the details because if the requirements are "do whatever latex does" it gets quite hard. And anything else might be too limited.

KwanEsq 3 days ago | parent [-]

>Browsers don't have native support for MathML any more for a good reason. Mozilla did support this for a while but dropped it because of limited adoption and high maintenance burden.

This seems to just be entirely untrue? https://developer.mozilla.org/en-US/docs/Web/MathML shows wide support (For Chromium/Blink-based since version 109) and if I open the example https://developer.mozilla.org/en-US/docs/Web/MathML/Guides/P... in Firefox and Edge both seem to render it correctly.

detaro 3 days ago | parent [-]

I assume GP just totally missed that it was added to Chromium 2-3 years ago, thanks to Igalia contributing support for it.

jillesvangurp 3 days ago | parent [-]

Indeed completely missed that. Of course, the web needs to work on safari and firefox as well. So, it doesn't quite address the core issue here.

goranmoomin 3 days ago | parent | next [-]

AFAIK Safari was the first browser to support MathML fully, and FF also supports it. Chromium was the latest IIRC. MathML has been baseline-available since 2023 after Chromium got support.

The big issue is that MathML is designed as a target language, not something directly writable. So we still need a KaTeX equivalent, which compiles either LaTeX equations or other markup languages to MathML.

Regardless, the core issue that you have mentioned is now gone (or will be in a few years even if you want more availability).

detaro 3 days ago | parent | prev [-]

The core issue that Chromium was the one major browser not supporting it? Or what core issue?