Support Unicode ° (#1203)

Oddly, `unicode-math-table.txt` does not contain an entry for U+00B0. But `\degree` is surely the correct mapping.
This commit is contained in:
Ron Kok
2018-03-10 10:19:13 -08:00
committed by Erik Demaine
parent abfb641d7a
commit b148d5da71
2 changed files with 5 additions and 2 deletions

View File

@@ -696,8 +696,11 @@ defineSymbol(text, main, textord, "\u201c", "``");
defineSymbol(text, main, textord, "\u201c", "\\textquotedblleft");
defineSymbol(text, main, textord, "\u201d", "''");
defineSymbol(text, main, textord, "\u201d", "\\textquotedblright");
defineSymbol(math, main, textord, "\u00b0", "\\degree");
// \degree from gensymb package
defineSymbol(math, main, textord, "\u00b0", "\\degree", true);
defineSymbol(text, main, textord, "\u00b0", "\\degree");
// \textdegree from inputenc package
defineSymbol(text, main, textord, "\u00b0", "\\textdegree", true);
// TODO: In LaTeX, \pounds can generate a different character in text and math
// mode, but among our fonts, only Main-Italic defines this character "163".
defineSymbol(math, main, mathord, "\u00a3", "\\pounds");

View File

@@ -2936,7 +2936,7 @@ describe("Unicode", function() {
});
it("should parse symbols", function() {
expect("£¥ðℂℍℑℓℕ℘ℙℚℜℝℤℲℵℶℷℸ⅁∀∁∂∃∇∞∠∡∢♠♡♢♣♭♮♯✓\u00b7").toParse();
expect("£¥ðℂℍℑℓℕ℘ℙℚℜℝℤℲℵℶℷℸ⅁∀∁∂∃∇∞∠∡∢♠♡♢♣♭♮♯✓°\u00b7").toParse();
});
it("should parse arrows", function() {