Merge pull request #361 from crepererum/feature/gt_lt

Add \gt and \lt
This commit is contained in:
Kevin Barabash
2015-10-05 16:32:49 +00:00
4 changed files with 19 additions and 8 deletions

View File

@@ -1253,7 +1253,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");
@@ -1264,7 +1264,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();
});
@@ -1757,3 +1757,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"));
});
});