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

Function buildCommon_mathnormal

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

Source from the content-addressed store, hash-verified

5404
5405
5406var buildCommon_mathnormal = function mathnormal(value, mode, options, classes) {
5407 if (utils.contains(mathitLetters, value)) {
5408 return {
5409 fontName: "Main-Italic",
5410 fontClass: "mathit"
5411 };
5412 } else if (/[0-9]/.test(value.charAt(0))) {
5413 return {
5414 fontName: "Caligraphic-Regular",
5415 fontClass: "mathcal"
5416 };
5417 } else {
5418 return {
5419 fontName: "Math-Italic",
5420 fontClass: "mathdefault"
5421 };
5422 }
5423};
5424/**
5425 * Determines which of the two font names (Main-Bold and Math-BoldItalic) and
5426 * corresponding style tags (mathbf or boldsymbol) to use for font "boldsymbol",

Callers 1

buildCommon_makeOrdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected