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

MasaYan24 picture MasaYan24  路  4Comments

henok-tesfaye picture henok-tesfaye  路  6Comments

parhizkari picture parhizkari  路  5Comments

geajack picture geajack  路  6Comments

lk-geimfari picture lk-geimfari  路  5Comments