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

Function buildCommon_mathdefault

static/katex/katex.js:5383–5397  ·  view source on GitHub ↗
(value, mode, options, classes)

Source from the content-addressed store, hash-verified

5381
5382
5383var buildCommon_mathdefault = function mathdefault(value, mode, options, classes) {
5384 if (/[0-9]/.test(value.charAt(0)) || // glyphs for \imath and \jmath do not exist in Math-Italic so we
5385 // need to use Main-Italic instead
5386 utils.contains(mathitLetters, value)) {
5387 return {
5388 fontName: "Main-Italic",
5389 fontClass: "mathit"
5390 };
5391 } else {
5392 return {
5393 fontName: "Math-Italic",
5394 fontClass: "mathdefault"
5395 };
5396 }
5397};
5398/**
5399 * Determines which of the font names (Main-Italic, Math-Italic, and Caligraphic)
5400 * and corresponding style tags (mathit, mathdefault, or mathcal) to use for font

Callers 1

buildCommon_makeOrdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected