Mathjax: \overbrace broken in SVG output

Created on 13 Apr 2020  路  3Comments  路  Source: mathjax/MathJax

Use of \overbrace causes an error (getVariant not defined). This is due to not passing the variant name to unicodeChars() in the placeChar() method.

See the MathJax User's Forum post.

Accepted Fixed Test Needed v3 v3.1

Most helpful comment

@dainiak, yes, it is the same issue. You can use

<script>
    MathJax = {
      startup: {
        ready() {
          if (MathJax.version === '3.0.5') {
            const SVGWrapper = MathJax._.output.svg.Wrapper.SVGWrapper;
            const CommonWrapper = SVGWrapper.prototype.__proto__;
            SVGWrapper.prototype.unicodeChars = function (text, variant) {
              if (!variant) variant = this.variant || 'normal';
              return CommonWrapper.unicodeChars.call(this, text, variant);
            }
          }
          MathJax.startup.defaultReady();
        }
      }
    };
</script>

as a work-around until the next release.

All 3 comments

"not\equiv" failed in SVG output in MJ 3.0.5
Is that the same issue there?

@dainiak, yes, it is the same issue. You can use

<script>
    MathJax = {
      startup: {
        ready() {
          if (MathJax.version === '3.0.5') {
            const SVGWrapper = MathJax._.output.svg.Wrapper.SVGWrapper;
            const CommonWrapper = SVGWrapper.prototype.__proto__;
            SVGWrapper.prototype.unicodeChars = function (text, variant) {
              if (!variant) variant = this.variant || 'normal';
              return CommonWrapper.unicodeChars.call(this, text, variant);
            }
          }
          MathJax.startup.defaultReady();
        }
      }
    };
</script>

as a work-around until the next release.

Fixed in v3.1 released today.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DibasDauliya picture DibasDauliya  路  6Comments

albertodiazdorado picture albertodiazdorado  路  6Comments

mt4c picture mt4c  路  3Comments

Esporia picture Esporia  路  4Comments

parhizkari picture parhizkari  路  6Comments