Live data from Hacker News

MathML is a failed web standard

peterkrautzberger.org

131–140 of 177 posts

Re: MathML is a failed web standard

#131
post #123
post #116

Earlier quoted context omitted.

Does anyone else prefer writing troff/tbl/pic/eqn? I always felt that the language of TeX/LaTex was a step backward in user-friendliness.

I’m also one of those who prefers troff. I read all five volumes of Knuth’s Computers and Typesetting cover to cover, and TeX is a beautiful piece of work. But in my preferred alternate universe, two things would be different: Joe Ossanna would not have died young, and AT&T would have been more open with licensing in time for Knuth to use troff as a base for his improvements to the world of typesetting.

He tried, but the syntax was ill-defined, and the typography was poor.

Re: MathML is a failed web standard

#132

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…

OMG. If your equations require concurrency to render, you're either a genius or insane. Or both.

It's not that we need parallelism for layout to work. Rather it's that, in 2016 with Moore's Law over, new standards for performance-critical things ought to consider parallelism so they can continue to scale in the future.

Re: MathML is a failed web standard

#133

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…

> TeX doesn't have... Is that due to implementation or the specification? I used TeX a few times back in the mid-90's and something about it really clicked with me. The documents I made with it are easily the most attractive documents I've made. Since then, I've wondered why TeX isn't used for ebooks and thanks to your comment, now I know.

There is no spec for TeX as far as I know: it's defined by its (effectively frozen) implementation.

Re: MathML is a failed web standard

#134
post #116

Earlier quoted context omitted.

Does anyone else prefer writing troff/tbl/pic/eqn? I always felt that the language of TeX/LaTex was a step backward in user-friendliness.

I usually use OpenOffice / LibreOffice Equation Editor which is based on eqn. Ironically the on disk format it uses is MathML.

Yes. I would use OOo if the equation typesetting wasn't awful. They don't seem to have put any effort into improving it over the years. MS Word typesetting has become quite good, though not up to the best you can get with LaTeX.

Re: MathML is a failed web standard

#135
post #90

Earlier quoted context omitted.

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

> Writing the above equation in JSON would be just as terrible Not quite as bad as XML.. I think the problem is more the verbose, overly-nested format that was chosen for MathML than XML itself though. { "mrow": { "mi": [ "x", "=" ], "mfrac": { "mrow": { "mi": [ "−", "b", "±" ], "msqrt": { "mrow": { "msup": { "mi": [ "b", "2" ] }, "mi": [ "−", "4ac" ] } } }, "mi": "2a" } } }

S-expressions are the better alternative to XML.

Re: MathML is a failed web standard

#136
post #90

Earlier quoted context omitted.

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

> Writing the above equation in JSON would be just as terrible Not quite as bad as XML.. I think the problem is more the verbose, overly-nested format that was chosen for MathML than XML itself though. { "mrow": { "mi": [ "x", "=" ], "mfrac": { "mrow": { "mi": [ "−", "b", "±" ], "msqrt": { "mrow": { "msup": { "mi": [ "b", "2" ] }, "mi": [ "−", "4ac" ] } } }, "mi": "2a" } } }

That's as bad as the XML. Actually it's worse, because your ordering is undefined which breaks everything. They are both nearly unusable by humans.

Basically the problem is this: Either you explicitly represent the grouping in a general scheme capable of it, then you get the disaster (from the point of view of human readable and manipulable) that is XML or JSON. Or you use a domain specific language like LaTeX or whatever, with the attended parsing issues,etc.

If you want people to edit it by hand, the latter option is much better - but it has it's pain points. You don't get to use a broad range of robust tools to manipulate them, for one thing.

Re: MathML is a failed web standard

#137

Earlier quoted context omitted.

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.

I know what you're referring to, but then again, that's a matter of formatting, not encoding.

Re: MathML is a failed web standard

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

  MathML as a spec is akin to SVG, it's meant for the browser/machine first, and not for direct human consumption. You don't read/write SVG by hand, and neither you should MathML.
That's true, but the problem is that MathML is fairly useless without a robust set of tools to manipulate it and some way to do efficient manipulation by hand. These tools didn't develop in any meaningful way and so people haven't adopted it.

MathML by itself is only half an answer without a way to easily convert a more human friendly format bidirectionally without loss of detail.

Re: MathML is a failed web standard

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

Compared to the amazing complexity of OpenType layout for complex scripts, mathematical typesetting is pretty simple. It's just not been a priority for the browser vendors, in the same way that we now have amazing technologies like WebRTC and WebGL but managing bookmarks still sucks.

It might "simply be" the case (well, in fact it is) that TeX is simply really old and doesn't lend itself well to concepts it predates such as dynamic reflow, etc...

Re: MathML is a failed web standard

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

MathML was never intended to be written by hand any more than SVG was. It was designed to provide a standard output format for equation editors. Wolfram created MathML explicitly to prevent TeX from being adopted as a defacto standard on the web because TeX, being concerned only with visual appearance, does not do a good job of describing the structure or semantics of equations. MathML excels in both these areas, providing a fairly simple and standardised visual model which fits well with web browsers, and a rich semantic model.

In other words, MathML is great and it's a much better fit for web browsers than anything else on offer. Just don't write it by hand!

Post reply on HN