Support Unicode ≘≙≚≛≝≞≟ (#1274)

* Support Unicode stackrel

Supports Unicode characters ≘ ≙ ≚ ≛ ≝ ≞ ≟

* Fix lint error

* Delete unnecessary braces
This commit is contained in:
Ron Kok
2018-05-03 13:58:04 -07:00
committed by Erik Demaine
parent 7fec5ae5dc
commit f25e08d618
2 changed files with 11 additions and 1 deletions

View File

@@ -151,6 +151,16 @@ defineMacro("\\llap", "\\mathllap{\\textrm{#1}}");
defineMacro("\\rlap", "\\mathrlap{\\textrm{#1}}");
defineMacro("\\clap", "\\mathclap{\\textrm{#1}}");
// Unicode stacked relations
defineMacro("\u2258",
"\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}");
defineMacro("\u2259", "\\stackrel{\\tiny\\wedge}{=}");
defineMacro("\u225A", "\\stackrel{\\tiny\\vee}{=}");
defineMacro("\u225B", "\\stackrel{\\scriptsize\\star}{=}");
defineMacro("\u225D", "\\stackrel{\\tiny\\mathrm{def}}{=}");
defineMacro("\u225E", "\\stackrel{\\tiny\\mathrm{m}}{=}");
defineMacro("\u225F", "\\stackrel{\\tiny?}{=}");
//////////////////////////////////////////////////////////////////////
// amsmath.sty
// http://mirrors.concertpass.com/tex-archive/macros/latex/required/amsmath/amsmath.pdf

View File

@@ -2982,7 +2982,7 @@ describe("Unicode", function() {
});
it("should parse more relations", function() {
expect("⊂⊃⊆⊇⊏⊐⊑⊒⊢⊣⊩⊪⊸⋈⋍⋐⋑⋔⋛⋞⋟⌢⌣⩾⪆⪌⪕⪖⪯⪰⪷⪸⫅⫆").toParse();
expect("⊂⊃⊆⊇⊏⊐⊑⊒⊢⊣⊩⊪⊸⋈⋍⋐⋑⋔⋛⋞⋟⌢⌣⩾⪆⪌⪕⪖⪯⪰⪷⪸⫅⫆≘≙≚≛≝≞≟").toBuild();
});
it("should parse symbols", function() {