Live data from Hacker News

MathML is a failed web standard

peterkrautzberger.org

101–110 of 177 posts

Re: MathML is a failed web standard

#101
post #83
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 audibly groaned at the XML version, but to be fair, it can be presented better: x = − b ± b 2 − 4ac 2a Again, I'm not saying this is good. Compared to the brevity of TeX or troff, it's difficult to accept. But XML is easier to read when you give in to its heavyweight structure and format it appropriately. By the way, on my system (OSX, Chrome), the unicode version is beautiful. I had not realized it was a good math…

The big downside with the Unicode option is the poor handling of fractions. It's not so apparent with the Quadratic Equation, but if your have a complex divisor the / notation starts to fall apart.

Even properly formatted that MathML version is just awful. You could help it a bit by combining some of those elements on a single line maybe, but it's way too much mental effort to parse that mess.

Re: MathML is a failed web standard

#102
post #57

Earlier quoted context omitted.

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.

A few things that make LaTeX docs look good: - quality justified paragraphs making use of inter-word spacing and hyphenation - font ligatures (tex uses quality fonts have special characters for sequences like fi fi fl ffi ffl ft etc) - good heuristics about where to cut pages (e.g. flexible spacing around heading)

Web browsers implement all of this nowadays. In fact, OpenType GSUB ligatures in particular go far beyond what TeX supports.

Re: MathML is a failed web standard

#103
post #55

Earlier quoted context omitted.

> 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…

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…

I don't see why, from a technical point of view. There's no reason we should throw out the benefits of the Web platform because TeX happens to do things a certain way. With MathJax and tools like it, we can bring the benefits of TeX to the Web platform in a way that actually meshes well with what the platform provides.

Re: MathML is a failed web standard

#104
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.

I don't think TeX output looks better than what Web browsers do if you enable all the high-quality text features like hyphenation and use modern OpenType fonts (in particular not the Core Fonts for the Web). The reason why the Web doesn't do this by default is backwards compatibility and performance: hyphenation is asymptotically more expensive.

Re: MathML is a failed web standard

#105
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…

Shouldn't the '=' and the minus and the other signs be inside , rather than , because they are binary operators, not identifiers? TeX for example, makes a clear distinction in terms of how much whitespace it would surround operators with, vs. identifiers.

In any case, I suspect MathML was intended as an intermediate computer-readable representation, not something that anyone would write by hand (MathJax can compile your LaTeX to MathML). I don't see what's wrong with an intermediate representation that's difficult to manipulate by hand. And unless I misunderstood the article, their point is that MathML is bad as an intermediate representation.

Re: MathML is a failed web standard

#106
post #83

Earlier quoted context omitted.

I audibly groaned at the XML version, but to be fair, it can be presented better: x = − b ± b 2 − 4ac 2a Again, I'm not saying this is good. Compared to the brevity of TeX or troff, it's difficult to accept. But XML is easier to read when you give in to its heavyweight structure and format it appropriately. By the way, on my system (OSX, Chrome), the unicode version is beautiful. I had not realized it was a good math…

The big downside with the Unicode option is the poor handling of fractions. It's not so apparent with the Quadratic Equation, but if your have a complex divisor the / notation starts to fall apart. Even properly formatted that MathML version is just awful. You could help it a bit by combining some of those elements on a single line maybe, but it's way too much mental effort to parse that mess.

Lack of proper subscript and superscript support is a killer for Unicode as well. Unicode is amazing for smaller, simple equations, but anything beyond that soon becomes extremely hard to process.

Re: MathML is a failed web standard

#107
post #51

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. 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…

Why does this have to turn into an XML bashing thread? Writing the above equation in JSON would be just as terrible.

Have a go at trying to convert a complex TEI or Docbook document to JSON; you will want to put a gun to your head before the day is out.

Re: MathML is a failed web standard

#108

One of my biggest complaints about Peter K's "MathML is a failed web standard" is that most people read that without taking note of "web" in the middle. MathML has been quite successful in publishing and as a computer representation. As far as whether or not MathML is a failed WEB standard, I have a lot more to say about that here: http://bit.ly/1ZLfCF8 .

Seeing WEB in a comment thread with extensive references to Knuth is amusing.

Re: MathML is a failed web standard

#109
post #85

I don't know how many of the people lamenting MathML ever came to exist are active math-on-the-web developers. I for one am dealing with third-party math equations on a daily basis and can only dream of the wonder of ubiquitous MathML support in all major browsers. The details as to why are here: http://prodg.org/blog/mathml_please/2015-09-16/MathML%20on%2... ! As things stand, math handling on the web is inconvenien…

I am with you. Some people write their math by hand in LaTeX or other formats, but many use visual tools and draw math similar to drawing diagrams. Then those tools generate whatever source code necessary. In those scenarios, MathML would be much easier to deal with than most other formats. Also, Presentation MathML support is much easier to implement than full-scale support of LaTeX or other more complete math solut…

> Some people write their math by hand in LaTeX or other formats, but many use visual tools and draw math similar to drawing diagrams.

Which people?

Everyone I know who uses equations in MS Word abandoned the clicky tools as soon as the pseudolatex entry language became available.

Re: MathML is a failed web standard

#110
post #51

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. 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 l…

[deleted]
Post reply on HN