unicodeTextInMathMode setting (#1117)

* unicodeTextInMathMode setting

* When `unicodeTextInMathMode` is `true`, accented letters from
  `unicodeSymbols.js`, and CJK and other supported languages,
  get added support in math mode (as requested in #895).
* When `unicodeTextInMathMode` is `false, all of these stop working in
  math mode, and are only supported in text mode (matching XeTeX behavior).
  Note that this is a backwards incompatibility with some 0.9.0 alpha/betas.

* Fix handling of Unicode characters ð, Å, å

* Fix double handling of ð (math maps to \eth, not special Unicode character)
* Remove Åå special math handling, thanks to #1125

* Forbid extraLatin when unicodeTextInMathMode is false
This commit is contained in:
Erik Demaine
2018-02-19 21:25:20 -05:00
committed by Kevin Barabash
parent 7de91f73eb
commit aed1c1e564
7 changed files with 66 additions and 12 deletions

View File

@@ -95,6 +95,7 @@ describe("A MathML builder", function() {
});
it('accents turn into <mover accent="true"> in MathML', function() {
expect(getMathML("über fiancée")).toMatchSnapshot();
expect(getMathML("über fiancée", {unicodeTextInMathMode: true}))
.toMatchSnapshot();
});
});