Support Unicode relations (#933)

* Support Unicode relations

This is the first in a series of PRs to give KaTeX the ability to recognize Unicode character input. The code in this PR follows the style of PR #410.
All the characters in this PR will produce rel atoms. I’ll submit PRs for other atom types later.

* Fix lint error.

* Correct mapping errors

This commit fixes a brain cramp of mine.
This commit is contained in:
Ron Kok
2017-10-17 06:06:41 -07:00
committed by Kevin Barabash
parent 305a35c3a5
commit bd4e1464a0
2 changed files with 78 additions and 70 deletions

View File

@@ -2616,6 +2616,14 @@ describe("Unicode", function() {
it("should parse 'ΓΔΘΞΠΣΦΨΩ'", function() {
expect("ΓΔΘΞΠΣΦΨΩ").toParse();
});
it("should parse relations", function() {
expect("∈∋∝∼∽≂≃≅≈≊≍≎≏≐≑≒≓≖≗≜≡≤≥≦≧≫≬≳≷≺≻≼≽≾≿").toParse();
});
it("should parse more relations", function() {
expect("⊂⊃⊆⊇⊏⊐⊑⊒⊢⊣⊩⊪⊸⋈⋍⋐⋑⋔⋙⋛⋞⋟⌢⌣⩾⪆⪌⪕⪖⪯⪰⪷⪸⫅⫆").toParse();
});
});
describe("The maxSize setting", function() {