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

Function centerSpan

static/katex/katex.mjs:8008–8015  ·  view source on GitHub ↗
(span, options, style)

Source from the content-addressed store, hash-verified

8006};
8007
8008const centerSpan = function centerSpan(span, options, style) {
8009 const newOptions = options.havingBaseStyle(style);
8010 const shift = (1 - options.sizeMultiplier / newOptions.sizeMultiplier) * options.fontMetrics().axisHeight;
8011 span.classes.push("delimcenter");
8012 span.style.top = shift + "em";
8013 span.height -= shift;
8014 span.depth += shift;
8015};
8016/**
8017 * Makes a small delimiter. This is a delimiter that comes in the Main-Regular
8018 * font, but is restyled to either be in textstyle, scriptstyle, or

Callers 2

makeSmallDelimFunction · 0.70
makeLargeDelimFunction · 0.70

Calls 2

havingBaseStyleMethod · 0.80
fontMetricsMethod · 0.80

Tested by

no test coverage detected