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…
MathML is a failed web standard
111–120 of 177 posts
Re: MathML is a failed web standard
#112It’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 y…
Re: MathML is a failed web standard
#113I 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…
Sadly that's not true for SVG. SVG has many parts that are only there to make writing/editing SVGs by hand easier. Circle, rectangle elements, the commas in the path strings (which follow relatively insane rules. Almost all implementations already had bugs in the correct parsing behaviour regarding commas/whitespace)
Re: MathML is a failed web standard
#114I 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…
The author here is saying we want a spec and support for properly displaying math content in the browser, so let's make a sane spec that works with the way the web works, not as if it's in an embedded foreign object viewer.
SVG is actually a great parallel In many instances it is easy to write by hand, until you go to any level of moderate complexity and hit the brick wall of SVG's usability. And that's when you wish it had a sane design, because there are a few aspects that are quite close.
Re: MathML is a failed web standard
#115Blargh. 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
#116It’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…
Re: MathML is a failed web standard
#117Earlier 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" } } }
Re: MathML is a failed web standard
#118Earlier 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…
"What is XML good at?" (For the purposes of this post, I'm including HTML in the XML family.) XML/HTML is good when: 1. You have two dimensions of markup you want to do. That is, you have a clear distinction between what is a new "tag" and what is an attribute on that tag. If you can't almost instantly decide whether some feature you want to add works as an attribute or a tag, you probably shouldn't be in XML. 2. Alm…
I generally don't just comment "attaboy" but there you go.
Re: MathML is a failed web standard
#119Earlier quoted context omitted.
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.
Currently, high schools students taking the PARCC, SmarterBalanced, and other web-based standardized tests.
And whoa man is it terrible to watch them struggle with it.
Re: MathML is a failed web standard
#120It’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…