Live data from Hacker News

MathML is a failed web standard

peterkrautzberger.org

91–100 of 177 posts

Re: MathML is a failed web standard

#91

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…

I made a set of essentially web components that render with KaTeX: https://github.com/justinfagnani/katex-elements

You use them like so:

    c = \pm\sqrt{a^2 + b^2}

Re: MathML is a failed web standard

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

> What is XML good at? (by good I mean better than alternatives like JSON, YAML, HAML, etc)

It has a single standard way of doing schemata that all the tools support, which is great. The maven pom.xml format is a much clearer way to specify a dependency than most of the alternatives (which often use an excessively clever concise form), and has really good autocomplete when editing it in eclipse (because eclipse understands the schema and so can offer autocomplete based on the elements that make sense at that point in the document).

If XML had just not bothered with namespaces I think it would have worked really well.

Re: MathML is a failed web standard

#93
I think the way forward here with math and other niche document formats (like MusicXML) is to keep them out of the HTML standards and let people create web component libraries that handle rendering.

As a practical matter this will bring implementations to all browsers much faster than waiting for four large organizations to decide that a format is important and allocate resources. Even better is the real-world experience those libraries will gather so that maybe we get something better than what a committee would have designed in isolation.

For mat specifically, TeX really seems like a better way to go for now. I wrapped KaTeX in a web component so that it's easy to use in HTML: https://github.com/justinfagnani/katex-elements

You use it like:

    c = \pm\sqrt{a^2 + b^2}
I imagine the equivalent for music will be better than MusicXML

Re: MathML is a failed web standard

#94
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 HTML-typeset math has to look bad. e.g. http://www.deeplearningbook.org/contents/linear_algebra.html Well this particular example is auto-generated and the code looks terrible, but it's not hopeless to get nice math without TeX.

Re: MathML is a failed web standard

#95
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 solutions including Content MathML.

Re: MathML is a failed web standard

#96
post #74

Earlier quoted context omitted.

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)

But that begs the question why web browsers don’t implement this. Is there a technical reason or did at some point some people decided that decent text rendering is irrelevant one should focus on other gimmicks?

The Web started as a tool for rendering text and occasional images pretty much as soon as it comes out of the wire. TeX on the other hand, was meant to be a typesetting package which compiles textual description of the document into a beautiful printable form. That compilation takes noticeable time even today, I imagine it was unacceptably slow for the web back before. Also in TeX you deal with paper sizes, in browsers you deal with adjustable viewports of unpredictable size.

I guess that the Web just started simple and evolved from that, and then nobody bothered to remake it for prettier text.

Re: MathML is a failed web standard

#97
Most of you guys seem to be suffering under a big misconception. MathML was never intended to be typed by humans. Perhaps a few programmers might need to do it but not mathematicians, students, engineers, scientists, etc. Saying things like "I hate typing mathematics in MathML" is much like saying "I hate typing my word processing documents in RTF". Just say no. Like most XML languages, MathML is a computer representation meant to be read/written by software. If you want to enter math notation, use TeX or an interactive math editor like MathType (my company's product).

Re: MathML is a failed web standard

#98

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…

Good answer. TeX is an input language and is fairly good at what it does for mathematicians. From a programming language and systems point of view, it is an ancient, ad hoc mess. TeX could be used as a computer representation, but it fails for that purpose for lots of reasons, several of which you mention here.

Re: MathML is a failed web standard

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

Do you think other kinds of content should be included in the web spec too? So, special tags for musical notation, special tags for all forms of maps and geographic, geological features, tags to represent chemical structures, tags for all major forms of engineering notation, etc?

To me, it's not that I don't think there is a use case for MathML, it's that it's too content-specific to make sense at the browser level.

The only way it makes sense in my head is if I think of math as a language that browsers should support on the basis of internationalization. That makes some sense to me, but if that's the idea then OP is right they should use standard notation (as we do for every other language) and not XML, and it shouldn't be styleable by CSS at all.

Re: MathML is a failed web standard

#100
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.
Post reply on HN