mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-13 06:58:40 +00:00
Support \textup and \textmd (#1921)
* Support \textup and \textmd This PR adds support for `\textup` and `\textmd`, which are the inverses of `\textit` and `\textbf`. Unlike bare `\text`, they result in `textup` and `textmd` classes being applied, but those have no CSS rules, so they act the same as bare `\text`. Fixes #1909. * Add documentation * Add unsupported font commands
This commit is contained in:
@@ -13,10 +13,12 @@ const textFontFamilies = {
|
||||
|
||||
const textFontWeights = {
|
||||
"\\textbf": "textbf",
|
||||
"\\textmd": "textmd",
|
||||
};
|
||||
|
||||
const textFontShapes = {
|
||||
"\\textit": "textit",
|
||||
"\\textup": "textup",
|
||||
};
|
||||
|
||||
const optionsWithFont = (group, options) => {
|
||||
@@ -39,9 +41,9 @@ defineFunction({
|
||||
// Font families
|
||||
"\\text", "\\textrm", "\\textsf", "\\texttt", "\\textnormal",
|
||||
// Font weights
|
||||
"\\textbf",
|
||||
"\\textbf", "\\textmd",
|
||||
// Font Shapes
|
||||
"\\textit",
|
||||
"\\textit", "\\textup",
|
||||
],
|
||||
props: {
|
||||
numArgs: 1,
|
||||
|
Reference in New Issue
Block a user