Support \arraystretch as a macro definition (#1381)

* Support \arraystretch as a macro definition

Also add `expandMacro` and `expandMacroAsText` helpers to `MacroExpander`.

* Remove excess defaulting

* Add test
This commit is contained in:
Erik Demaine
2018-06-03 18:19:23 -04:00
committed by Kevin Barabash
parent 563b0d5f8f
commit fcb32f058b
5 changed files with 212 additions and 6 deletions

View File

@@ -1173,6 +1173,12 @@ describe("A begin/end parser", function() {
const m3 = getParsed("\\begin{matrix}a&b\\\\ c&d \\\\ \\end{matrix}")[0];
expect(m3.value.body.length).toBe(2);
});
it("should grab \\arraystretch", function() {
const parse = getParsed("\\def\\arraystretch{1.5}" +
"\\begin{matrix}a&b\\\\c&d\\end{matrix}");
expect(parse).toMatchSnapshot();
});
});
describe("A sqrt parser", function() {