Automatic mrel/mbin spacing for \boldsymbol (#1388)

* Automatic mrel/mbin spacing for \boldsymbol

Fix #1154

* Add test

* Add missing mode

* Separate out \boldsymbol support to correct flow types

* Fix ternaries thanks to @ronkok's comment

* Revert package-lock.json

* Add screenshot test
This commit is contained in:
Erik Demaine
2018-06-11 08:19:50 -04:00
committed by GitHub
parent 954ddf4172
commit 4a2903148e
8 changed files with 505 additions and 36 deletions

View File

@@ -1459,6 +1459,12 @@ describe("A font parser", function() {
it("should have the correct greediness", function() {
expect("e^\\mathbf{x}").toParse();
});
it("\\boldsymbol should inherit mbin/mrel from argument", () => {
const built = _getBuilt("a\\boldsymbol{}b\\boldsymbol{=}c" +
"\\boldsymbol{+}d\\boldsymbol{++}e\\boldsymbol{xyz}f");
expect(built).toMatchSnapshot();
});
});
describe("A comment parser", function() {