Comment

Comment by bentley

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, <mrow><mi>x</mi><mi>=</mi><mfrac><mrow><mi>βˆ’</mi><mi>b</mi><mi>Β±</mi><msqrt><mrow><msup><mi>b</mi><mi>2</mi></msup><mi>βˆ’</mi><mi>4ac</mi></mrow></msqrt></mrow><mi>2a</mi></mfrac></mrow>

MathML is simply unreasonable to write by hand. Most of the time it’s only ever used as an interchange format, automatically generated by tools.

Indeed, the only time I ever use it is with mandoc(1), the default manpage formatter on BSD, Illumos, and some Linuxes, which converts equations to MathML when converting manpages to HTML.

parent bentley 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News Β· SvelteKit + Skeleton