mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-07 04:08:43 +00:00
Add support for \cal (#2116)
Fix #2115 by adding \cal to list of old-style font commands. (Surprisingly tiny change!) Add tests for all old-style font commands.
This commit is contained in:
@@ -1601,6 +1601,15 @@ describe("A font parser", function() {
|
||||
const built = getBuilt`a\boldsymbol{}b\boldsymbol{=}c\boldsymbol{+}d\boldsymbol{++}e\boldsymbol{xyz}f`;
|
||||
expect(built).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("old-style fonts work like new-style fonts", () => {
|
||||
expect`\rm xyz`.toParseLike`\mathrm{xyz}`;
|
||||
expect`\sf xyz`.toParseLike`\mathsf{xyz}`;
|
||||
expect`\tt xyz`.toParseLike`\mathtt{xyz}`;
|
||||
expect`\bf xyz`.toParseLike`\mathbf{xyz}`;
|
||||
expect`\it xyz`.toParseLike`\mathit{xyz}`;
|
||||
expect`\cal xyz`.toParseLike`\mathcal{xyz}`;
|
||||
});
|
||||
});
|
||||
|
||||
describe("A \\pmb builder", function() {
|
||||
|
Reference in New Issue
Block a user