MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

typo "normnal" in MathML attribute

Open hbghlyj opened this issue 3 years ago • 1 comments

Line 133 in MathJax-src/ts/core/MmlTree/OperatorDictionary.ts:

  [0x20000, 0x2FA1F, TEXCLASS.ORD, 'mi', 'normnal'], // CJK Unified Ideographs Ext. B (through) CJK Sompatibility Ideographs Supp.

'normnal' should be 'normal'.

Test code

console.log(String.fromCodePoint(0x20000,0x20001,0x20002));

Output: "𠀀𠀁𠀂"

Using these characters in MathJax causes error:

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mi mathvariant="normnal">&#x20000;</mi>
  <mi mathvariant="normnal">&#x20001;</mi>
  <mi mathvariant="normnal">&#x20002;</mi>
</math>
png

After manually correcting the typo, these characters can be displayed. image

hbghlyj avatar Jul 03 '22 22:07 hbghlyj

Thanks for the report. I will make a pull request to resolve the issue in the next release. For now, you can use

MathJax = {
  startup: {
    ready() {
      const {RANGES} = MathJax._.core.MmlTree.OperatorDictionary;
      RANGES[RANGES.length - 1][4] = 'normal';
      MathJax.startup.defaultReady();
    }
  }
};

as part of your MathJax configuration in order to work around the issue.

dpvc avatar Jul 05 '22 13:07 dpvc