MCPcopy Create free account
hub / github.com/TruthHun/BookStack / mathdefault

Function mathdefault

static/katex/katex.mjs:5357–5371  ·  view source on GitHub ↗
(value, mode, options, classes)

Source from the content-addressed store, hash-verified

5355
5356
5357const mathdefault = function mathdefault(value, mode, options, classes) {
5358 if (/[0-9]/.test(value.charAt(0)) || // glyphs for \imath and \jmath do not exist in Math-Italic so we
5359 // need to use Main-Italic instead
5360 utils.contains(mathitLetters, value)) {
5361 return {
5362 fontName: "Main-Italic",
5363 fontClass: "mathit"
5364 };
5365 } else {
5366 return {
5367 fontName: "Math-Italic",
5368 fontClass: "mathdefault"
5369 };
5370 }
5371};
5372/**
5373 * Determines which of the font names (Main-Italic, Math-Italic, and Caligraphic)
5374 * and corresponding style tags (mathit, mathdefault, or mathcal) to use for font

Callers 1

makeOrdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected