1. 10

  2. [Comment removed by author]

    1. 4

      Good Lord, MathML still exists?!

      I remember the feeling of bitter disappointment when I tried to mark up some mathematics a decade or more ago in MathML…… and the feeling of bitter rage.

      Why!? Why!? Why make it so hard!?

      1. 2

        I don’t really love MathML’s surface syntax, but I don’t think the verbosity is the root of the problem. If you look at what has succeeded in the browser instead of MathML, it’s not that different looking: an unreadable, verbose soup of nested spans and other CSS markup. It actually looks worse in a lot of ways. What’s different about it is that browser implementers didn’t have to implement anything special for math. But it’s still nothing you’d write directly; whether you use MathML or one of the alternatives, you’re going to be mechanically generating the output from something else (e.g. from TeX).

        1. 5

          Update: Looked at some output from MathJax, and when I said the current situation “actually looks worse in a lot of ways” than MathML, I underestimated just how much more verbose. It looks positively enjoyable to read and write MathML in comparison! I can’t even use your example for a side-by-side comparison, because this comment would end up being pages long. So here’s a simplified comparison instead.




          <math xmlns='http://www.w3.org/1998/Math/MathML'>


          <span aria-hidden="true" role="math" class="mjx-math" id="MJXc-Node-1">
              <span class="mjx-mrow" id="MJXc-Node-2">
                  <span class="mjx-mfrac" id="MJXc-Node-3">
                      <span style="width: 0.821em; padding: 0px 0.12em;" class="mjx-box MJXc-stacked">
                          <span style="font-size: 70.7%; width: 1.161em; top: -1.463em;" class="mjx-numerator">
                              <span style="" class="mjx-msubsup" id="MJXc-Node-4">
                                  <span class="mjx-base">
                                      <span class="mjx-mi" id="MJXc-Node-5">
                                          <span style="padding-top: 0.206em; padding-bottom: 0.307em;" class="mjx-char MJXc-TeX-math-I">x</span>
                                  <span style="font-size: 70.7%; vertical-align: 0.513em; padding-left: 0px; padding-right: 0.071em;" class="mjx-sup">
                                      <span style="" class="mjx-mn" id="MJXc-Node-6">
                                          <span style="padding-top: 0.358em; padding-bottom: 0.358em;" class="mjx-char MJXc-TeX-main-R">2</span>
                          <span style="font-size: 70.7%; width: 1.161em; bottom: -0.596em;" class="mjx-denominator">
                              <span style="" class="mjx-mn" id="MJXc-Node-7">
                                  <span style="padding-top: 0.409em; padding-bottom: 0.358em;" class="mjx-char MJXc-TeX-main-R">4</span>
                          <span class="mjx-line" style="border-bottom: 1.3px solid; top: -0.282em; width: 0.821em;"></span>
                      <span class="mjx-vsize" style="height: 1.456em; vertical-align: -0.421em;"></span>
          1. 3

            The fact that it puts aria-hidden on the whole thing is incredibly distressing - it asserts that, in effect, nobody using a screen reader could possibly want to know what’s in here, because a sighted user wouldn’t see it either.

            I’m sure the motivation vs. doing nothing was that it’s a lot of markup and winds up being verbose, but doing nothing would have been better.

            1. 1

              For screenreaders, MathJax includes a MathML representation of the formula too. Not sure if that produces useful results, but I suppose would if the user’s screenreader can handle MathML. I cut down what I pasted in to just the rendering spans to avoid making MathJax look even more verbose than it is by including all the boilerplate setup, but in doing so produced an incomplete picture. There’s a sibling element to the one I pasted that looks like,

              <span role="presentation" class="MJX_Assistive_MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><msup><mi>x</mi><mn>2</mn></msup><mn>4</mn></mfrac></math></span>
      2. 3

        Basically it’s impossible to get anything into the browsers that doesn’t serve the economic interests of the browser vendors. It’s always going to be more cost effective to just route around the problems using the existing technologies.