Add \gt and \lt

This commit is contained in:
Marco Neumann
2015-09-28 16:52:41 +02:00
parent fdbdb28617
commit 95e568ed6b
4 changed files with 19 additions and 8 deletions

View File

@@ -1248,7 +1248,7 @@ describe("A font parser", function () {
it("should not parse a series of font commands", function () {
expect("\\mathbb \\mathrm R").toNotParse();
});
it("should nest fonts correctly", function () {
var bf = getParsed("\\mathbf{a\\mathrm{b}c}")[0];
expect(bf.value.type).toMatch("font");
@@ -1259,7 +1259,7 @@ describe("A font parser", function () {
expect(bf.value.body.value[1].value.font).toMatch("mathrm");
expect(bf.value.body.value[2].value).toMatch("c");
});
it("should have the correct greediness", function() {
expect("e^\\mathbf{x}").toParse();
});
@@ -1752,3 +1752,12 @@ describe("A parser that does not throw on unsupported commands", function() {
expect(parsedInput[0].value.color).toBe(errorColor);
});
});
describe("The symbol table integraty", function() {
it("should treat certain symbols as synonyms", function() {
expect(getBuilt("<")).toEqual(getBuilt("\\lt"));
expect(getBuilt(">")).toEqual(getBuilt("\\gt"));
expect(getBuilt("\\left<\\frac{1}{x}\\right>"))
.toEqual(getBuilt("\\left\\lt\\frac{1}{x}\\right\\gt"));
});
});