Live data from Hacker News

MathML is a failed web standard

peterkrautzberger.org

61–70 of 177 posts

Re: MathML is a failed web standard

#61

I am not sure if the verbosity of XML brings anything to the table here. Why not just implement a TeX based extension?

Because requiring an extension defeats the purpose of being able to run across all browsers.

Sorry I was thinking about something like MathML but more like TeXML without an extension that you need to install. Might not be feasible to implement though.

Re: MathML is a failed web standard

#62

Blargh. It annoys me that MathML was even a thing. We've already had a perfectly-fine and widely-used markup language for mathematical formulae; it's called TeX. Ideally, I'd prefer that HTML5 include a tag, or something similar, that takes TeX as input and produces formatted output. A side benefit would mean that every browser, and every system, in the world would have TeX installed! At least MathJax can take TeX as…

> A side benefit would mean that every browser, and every system, in the world would have TeX installed! TeX doesn't have dynamic reflow, is defined by a macro system that involves essentially monkey patching the parser as it goes, lacks anything resembling a DOM, wasn't designed with Unicode or internationalization in mind, is completely unparallelizable, doesn't interoperate with CSS, has its own concept of block a…

Yeah. The main thing people probably want is "TeX quality" typesetting of mathematical formulas inside web pages. Bundling the entirety of TeX inside a browser for this purpose would be kind of a hack, and suboptimal in many ways. I think that instead of just using TeX as a black box, it would be more interesting to actually learn what makes its formulas look good, and apply these lessons in modern software.

There's a related article called A Functional Description of TeX's Formula Layout [1] that describes a more modern reimplementation of a part of TeX.

[1] http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.39....

Re: MathML is a failed web standard

#63
post #29

MathJax looks excellent.

MathJax works reasonably well, but I can almost read the TeX source out loud faster than the browser renders it (together with PDF.js, this has been my go-to counterexample whenever someone claims that JavaScript is performant). With formula-heavy text, I'm forced to split documents artificially into multiple short pages to make rendering reasonably fast. KaTeX looks quite promising, but it was missing support for qu…

Is there a way to pre-render MathJax, say, for static blogs?

Re: MathML is a failed web standard

#64
Since we're discussing various math rendering technologies for the web, I'd like to plug MathQuill [1]. The big advantage MathQuill has over other solutions is that the math is live editable in the browser in typeset form. We use it for input on the Desmos graphing calculator [2], and MathQuill is definitely the best WYSIWYG math editor that I have used anywhere, on the web or elsewhere.

[1] http://mathquill.com/

[2] https://www.desmos.com/calculator

Re: MathML is a failed web standard

#65
post #22

It’s instructive to see how different MathML is from other math markup languages. Here’s the quadratic formula: In troff, x = {-b +- sqrt { b sup 2 - 4ac}} over 2a In TeX, x = {-b \pm \sqrt{b^2-4ac}} \over {2a} In plain Unicode, 𝑥 = (−𝑏 ± √(𝑏² − 4𝑎𝑐))⁄2𝑎 In MathML, x = − b ± b 2 − 4ac 2a MathML is simply unreasonable to write by hand. Most of the time it’s only ever used as an interchange format, automatically…

I've found XML is more suited for proper indentation formatting and reading top to bottom not left to right. When it is in up to down and indented it is VERY readable and can be even more understandable as the elements are well implied.

Re: MathML is a failed web standard

#66
post #51
post #23

Earlier quoted context omitted.

Yeah. I think that's inevitable with an XML syntax. XML is good at some things, but representing math expressions clearly is not one of them.

> Yeah. I think that's inevitable with an XML syntax. XML is good at some things, but representing math expressions clearly is not one of them. What is XML good at? (by good I mean better than alternatives like JSON, YAML, HAML, etc) The only thing I that might qualify is a long term/archival quality document format like ODF/OOXML. The inherently embeddedable nature of XML does seem like a nice fit but it gets very b…

XML grew out of SGML/HTML, and there's no denying that its age shows. It's kind of like going into a house built in the 90s and seeing all the little things that just scream "90s house - that looks so dated!"

Did you know that web browsers have native support for XML? Try fetching an xml resource and pulling the responseXML value off the XHR - you have another DOM object right in your hands, that you can treat just like a regular Node.

The reason that XML is better than the alternatives has nothing to do with the syntax itself, but the tooling around it. Browser support, XQuery, XPath, XSD/RelaxNG, XSLT - please tell me where I can find the equivalents for any other markup language. You don't have to use them, either - but if you need them, they are there in pretty much every framework. XML had the first to market advantage, and was picked up in enterprise systems and made powerful and ubiquitous. If you need batteries included, XML is right there, the others are not. There is really nothing wrong with it, the syntax is clunky for some applications but great for documents, whereas e.g. JSON would be horrible in that scenario.

Re: MathML is a failed web standard

#67
post #49

Many standards have failed for the web. Anybody remember VRML? Actually I like it that we have not a broad big big standard which includes MathML which only ~0,1% of people care about in the browser. MathML can stand on its own (encapsulated with JS like PDFs in Firefox) or you can abandon it entirely. You are free to choose. It's the best way for everybody.

Actually I like it that we have not a broad big big standard which includes MathML which only ~0,1% of people care about in the browser. Did you read the article? That's exactly what we have right now. The author's #1 complaint is that MathML is currently a part of HTML5. He would like it to be removed from the HTML standard so that MathML could evolve on its own, rather than being constrained by its status as a web…

Maybe in W3C specification MathML is a part of HTML5 and browsers will not crash when there is MathML inside (actually they also do not crash with custom tags) but many libs are not supporting the MathML tags or respecting them or working with them. Just one quick example... JQuery and open this in Chrome http://sdiehl.github.io/jquery-mathml/ So for the Chrome and Safari guys MathML is already dead and it even has flaws in Firefox. But what is written in W3C documents is not always the truth out there or common in the WWW ;) So yes I agree... rip MathML out of HTML5 specification.

Re: MathML is a failed web standard

#68
post #57
post #55

Earlier quoted context omitted.

Considering amount of expertise that went into making TeX and the fact that (in my experience at least) it far surpasses other solutions, it might simply be that mathematical notation typesetting doesn't lend itself to dynamic reflow, internationalization, parallelization, DOM representation, interoperability with CSS and its concept of blocks and inline layouts, wrapping around floats, single pass processing and int…

This is about how I feel. Can someone who’s actually competent explain why (La)TeX output looks so much better than what web browsers do? I’m not talking about childish colors, sticky headers, and all the other annoying “modern web features”, just the relevant content: some text and inline images.

Because TeX documents are usually made by people who have something valuable to say, and the tool reflects that. On the other hand most of the web is designed to sell you stuff, and the actual content is not important. The tool, again, reflects that.

Re: MathML is a failed web standard

#69
post #4

One big advantage of MathML is the ability to copy-paste from webpages directly into software like Mathematica. I don't think there is currently any alternative to MathML in that respect. The author argues (rightly) about styling and presentation of MathML, but doesn't propose an alternative to this copy-paste problem. May be TeX, when you're using MathJax at least ?

Wikipedia seems to be using a mechanism where TeX code is rendered into images, but on marking and copying into an editor becomes TeX again, wouldn't that be a sufficient solution for copying?

Isn't it the default behaviour when you put alt-text in the image tag?

Re: MathML is a failed web standard

#70
post #54

Earlier quoted context omitted.

> A side benefit would mean that every browser, and every system, in the world would have TeX installed! Is to run that giant heap of probably not sandboxed or security-audited code in every client actually a thing I would want to have? I mean people are paranoid about js doing unwanted things, but a large distribution of tex code running inside the browser, really?

TeX's bug bounty and the credentials of its author are good reasons why it's probably one of the most reliable pieces of such code that you might have.

Knuth has an older and more narrow concept of 'bug' than the current common definition.
Post reply on HN