Update katex to v0.16.21

This commit is contained in:
Will Faught
2025-01-19 11:08:41 -08:00
parent d663b8aa90
commit 3ac8d7b9b8
36 changed files with 1044 additions and 409 deletions

View File

@@ -33,7 +33,7 @@ defineFunction({
type: "font",
names: [
// styles, except \boldsymbol defined below
"\\mathrm", "\\mathit", "\\mathbf", "\\mathnormal",
"\\mathrm", "\\mathit", "\\mathbf", "\\mathnormal", "\\mathsfit",
// families
"\\mathbb", "\\mathcal", "\\mathfrak", "\\mathscr", "\\mathsf",

View File

@@ -11,6 +11,8 @@ defineFunction({
props: {
numArgs: 2,
numOptionalArgs: 1,
allowedInText: true,
allowedInMath: true,
argTypes: ["size", "size", "size"],
},
handler({parser}, args, optArgs) {

View File

@@ -30,9 +30,13 @@ const optionsWithFont = (group, options) => {
return options.withTextFontFamily(textFontFamilies[font]);
} else if (textFontWeights[font]) {
return options.withTextFontWeight(textFontWeights[font]);
} else {
return options.withTextFontShape(textFontShapes[font]);
} else if (font === "\\emph") {
return options.fontShape === "textit" ?
options.withTextFontShape("textup") :
options.withTextFontShape("textit");
}
return options.withTextFontShape(textFontShapes[font]);
};
defineFunction({
@@ -43,7 +47,7 @@ defineFunction({
// Font weights
"\\textbf", "\\textmd",
// Font Shapes
"\\textit", "\\textup",
"\\textit", "\\textup", "\\emph",
],
props: {
numArgs: 1,