MCPcopy Index your code
hub / github.com/TruthHun/BookStack / sizingGroup

Function sizingGroup

static/katex/katex.js:11952–11974  ·  view source on GitHub ↗
(value, options, baseOptions)

Source from the content-addressed store, hash-verified

11950
11951
11952function sizingGroup(value, options, baseOptions) {
11953 var inner = buildHTML_buildExpression(value, options, false);
11954 var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier; // Add size-resetting classes to the inner list and set maxFontSize
11955 // manually. Handle nested size changes.
11956
11957 for (var i = 0; i < inner.length; i++) {
11958 var pos = inner[i].classes.indexOf("sizing");
11959
11960 if (pos < 0) {
11961 Array.prototype.push.apply(inner[i].classes, options.sizingClasses(baseOptions));
11962 } else if (inner[i].classes[pos + 1] === "reset-size" + options.size) {
11963 // This is a nested size change: e.g., inner[i] is the "b" in
11964 // `\Huge a \small b`. Override the old size (the `reset-` class)
11965 // but not the new size.
11966 inner[i].classes[pos + 1] = "reset-size" + baseOptions.size;
11967 }
11968
11969 inner[i].height *= multiplier;
11970 inner[i].depth *= multiplier;
11971 }
11972
11973 return buildCommon.makeFragment(inner);
11974}
11975var sizeFuncs = ["\\tiny", "\\sixptsize", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"];
11976var sizing_htmlBuilder = function htmlBuilder(group, options) {
11977 // Handle sizing operators like \Huge. Real TeX doesn't actually allow

Callers 2

sizing_htmlBuilderFunction · 0.70
katex.jsFile · 0.70

Calls 2

sizingClassesMethod · 0.80

Tested by

no test coverage detected