mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-08 20:48:41 +00:00
Add the \KaTeX command
Summary: Add a command to print out a TeX-style logo for KaTeX. I think the code is okay, but suggestions for the design of the logo are most welcome (I'll post screenshots soon). Test Plan: Make sure \KaTeX renders, and the tests still succeed. Reviewers: alpert Reviewed By: alpert Differential Revision: http://phabricator.khanacademy.org/D3443
This commit is contained in:
@@ -383,6 +383,11 @@ Parser.prototype.parseNucleus = function(pos) {
|
||||
throw new ParseError("Parse error: Expected numerator after '" +
|
||||
nucleus.type + "'");
|
||||
}
|
||||
} else if (nucleus.type === "\\KaTeX") {
|
||||
return new ParseResult(
|
||||
new ParseNode("katex", null),
|
||||
nucleus.position
|
||||
);
|
||||
} else if (funcToType[nucleus.type]) {
|
||||
// Otherwise if this is a no-argument function, find the type it
|
||||
// corresponds to in the map and return
|
||||
|
Reference in New Issue
Block a user