Lines Matching refs:style
389 * about a specific style. It then provides instances of all the different kinds
395 * The main style class. Contains a unique id for the style, a size (which is
396 * the same for cramped and uncramped version of a style), and a cramped flag.
408 * Get the style of a superscript given a base in the current style.
416 * Get the style of a subscript given a base in the current style.
424 * Get the style of a fraction numerator given the fraction in the current
425 * style.
433 * Get the style of a fraction denominator given the fraction in the current
434 * style.
442 * Get the cramped version of a style (in particular, cramping a cramped style
443 * doesn't change the style).
451 * Get a text or display version of this style.
459 * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle)
481 …e(SS, 3, false), new Style(SSc, 3, true)]; // Lookup tables for switching from one style to another
1015 this.style = void 0;
1021 this.style = {};
1089 const initNode = function initNode(classes, options, style) { argument
1095 this.style = style || {};
1098 if (options.style.isTight()) {
1105 this.style.color = color;
1119 for (const style in this.style) {
1120 if (this.style.hasOwnProperty(style)) {
1121 // $FlowFixMe Flow doesn't seem to understand span.style's type.
1122 node.style[style] = this.style[style];
1154 for (const style in this.style) {
1155 if (this.style.hasOwnProperty(style)) {
1156 styles += `${utils.hyphenate(style)}:${this.style[style]};`;
1161 markup += ` style="${utils.escape(styles)}"`;
1190 * an inline style. It also contains information about its height, depth, and
1198 constructor(classes, children, options, style) { argument
1206 this.style = void 0;
1207 initNode.call(this, classes, options, style);
1247 this.style = void 0;
1275 constructor(src, alt, style) { argument
1282 this.style = void 0;
1286 this.style = style;
1299 for (const style in this.style) {
1300 if (this.style.hasOwnProperty(style)) {
1302 node.style[style] = this.style[style];
1314 for (const style in this.style) {
1315 if (this.style.hasOwnProperty(style)) {
1316 styles += `${utils.hyphenate(style)}:${this.style[style]};`;
1321 markup += ` style="${utils.escape(styles)}"`;
1343 constructor(text, height, depth, italic, skew, width, classes, style) { argument
1352 this.style = void 0;
1360 this.style = style || {};
1396 span.style.marginRight = this.italic + "em";
1404 for (const style in this.style) {
1405 if (this.style.hasOwnProperty(style)) {
1406 …|| document.createElement("span"); // $FlowFixMe Flow doesn't seem to understand span.style's type.
1408 span.style[style] = this.style[style];
1443 for (const style in this.style) {
1444 if (this.style.hasOwnProperty(style)) {
1445 styles += utils.hyphenate(style) + ":" + this.style[style] + ";";
1451 markup += " style=\"" + utils.escape(styles) + "\"";
4983 const sizeAtStyle = function sizeAtStyle(size, style) { argument
4984 return style.size < 2 ? size : sizeStyleMap[size - 1][style.size - 1];
4989 * This is the main options class. It contains the current style, size, color,
5004 this.style = void 0;
5017 this.style = data.style;
5039 style: this.style, property
5061 * Return an options object with the given style. If `this.style === style`,
5066 havingStyle(style) { argument
5067 if (this.style === style) {
5071 style: style, property
5072 size: sizeAtStyle(this.textSize, style)
5077 * Return an options object with a cramped version of the current style. If
5078 * the current style is cramped, returns `this`.
5083 return this.havingStyle(this.style.cramp());
5096 style: this.style.text(), property
5104 * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted,
5109 havingBaseStyle(style) { argument
5110 style = style || this.style.text();
5111 const wantSize = sizeAtStyle(Options.BASESIZE, style);
5113 if (this.size === wantSize && this.textSize === Options.BASESIZE && this.style === style) {
5117 style: style, property
5124 * Keep the effect of the current style, such as \scriptstyle.
5131 switch (this.style.id) {
5150 style: this.style.text(), property
5279 // *assuming* a font size of ptPerEm (normal size, normal style).
5331 * current style/scale. `options` gives the current options.
5350 if (options.style.isTight()) {
5351 // isTight() means current style is script/scriptscript.
5352 unitOptions = options.havingStyle(options.style.text());
5430 … "undefined" && console.warn("No character metrics " + `for '${value}' in style '${fontName}' and …
5437 if (options.style.isTight()) {
5444 symbolNode.style.color = color;
5478 * corresponding style tags (maindefault or mathit) to use for default math font,
5500 * and corresponding style tags (mathit, mathdefault, or mathcal) to use for font
5526 * corresponding style tags (mathbf or boldsymbol) to use for font "boldsymbol",
5634 for (const style in prev.style) {
5635 if (prev.style.hasOwnProperty(style) && prev.style[style] !== next.style[style]) {
5640 for (const style in next.style) {
5641 if (next.style.hasOwnProperty(style) && prev.style[style] !== next.style[style]) {
5715 const makeSpan = function makeSpan(classes, children, options, style) { argument
5716 const span = new Span(classes, children, options, style);
5723 const makeSvgSpan = (classes, children, options, style) => new Span(classes, children, options, sty… argument
5728 line.style.borderBottomWidth = line.height + "em";
5867 …pstrut.style.height = pstrutSize + "em"; // Create a new list of actual children at the correct of…
5882 const style = child.wrapperStyle || {};
5883 const childWrap = makeSpan(classes, [pstrut, elem], undefined, style);
5884 childWrap.style.top = -pstrutSize - currPos - elem.depth + "em";
5887 childWrap.style.marginLeft = child.marginLeft;
5891 childWrap.style.marginRight = child.marginRight;
5906 …vlist.style.height = maxPos + "em"; // A second row is used if necessary to represent the vlist's …
5918 …depthStrut.style.height = -minPos + "em"; // Safari wants the first row to have inline content; ot…
5945 rule.style.marginRight = `${size}em`;
5992 * - fontName: the "style" parameter to fontMetrics.getCharacterMetrics
6069 "style": "width:" + width + "em", property
6075 span.style.height = height + "em";
6076 span.style.width = width + "em";
6425 glueOptions = options.havingStyle(styleMap[node.style]);
6453 …type = getTypeOfDomTree(node); // 'mtight' indicates that the node is script or scriptscript style.
6570 * function for it. It also handles the interaction of size and style changes
6614 strut.style.height = body.height + body.depth + "em";
6615 strut.style.verticalAlign = -body.depth + "em";
6700 strut.style.height = htmlNode.height + htmlNode.depth + "em";
6701 strut.style.verticalAlign = -htmlNode.depth + "em";
7144 …math.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML"); // You can't style <math> nodes,…
7156 style: settings.displayMode ? Style$1.DISPLAY : Style$1.TEXT, property
7450 span.style.height = height + "em";
7472 span.style.height = height + "em";
7475 span.style.minWidth = minWidth + "em";
7493 img.style.borderColor = color;
7530 img.style.height = totalHeight + "em";
7646 accentBody.style.left = left + "em"; // \textcircled uses the \bigcirc glyph, so it needs some
7650 accentBody.style.top = ".2em";
7840 const style = options.style; // Build the argument groups in the appropriate style.
7845 let newOptions = options.havingStyle(style.sup());
7852 newOptions = options.havingStyle(style.sub());
8100 span.style.marginTop = calculateSize(group.size, options) + "em";
8129 * normal font, but in either text, script, or scriptscript style.
8160 * Puts a delimiter span in a given style, and adds appropriate height, depth,
8175 const centerSpan = function centerSpan(span, options, style) { argument
8176 const newOptions = options.havingBaseStyle(style);
8179 span.style.top = shift + "em";
8190 const makeSmallDelim = function makeSmallDelim(delim, style, center, options, mode, classes) { argument
8192 const span = styleWrap(text, style, options, classes);
8195 centerSpan(span, options, style);
8384 // centered around the axis in the current style, while normally it is
8503 // vertical alignment. So texHeight = span.height < span.style.height.
8519 span.style.minWidth = "0.853em";
8527 span.style.minWidth = "1.02em";
8536 span.style.minWidth = "0.742em";
8541 span.style.height = spanHeight + "em";
8601 style: Style$1.SCRIPTSCRIPT property
8604 style: Style$1.SCRIPT property
8607 style: Style$1.TEXT property
8624 style: Style$1.SCRIPTSCRIPT property
8627 style: Style$1.SCRIPT property
8630 style: Style$1.TEXT property
8638 style: Style$1.SCRIPTSCRIPT property
8641 style: Style$1.SCRIPT property
8644 style: Style$1.TEXT property
8684 // sizes (which correspond to larger numbers in style.size) we start earlier
8687 const start = Math.min(2, 3 - options.style.size);
8697 // account for the style change size.
8700 const newOptions = options.havingBaseStyle(sequence[i].style);
8743 return makeSmallDelim(delim, delimType.style, center, options, mode, classes);
8991 } // The size of delimiters is the same, regardless of what style we are
9166 img.style.borderStyle = "solid";
9167 img.style.borderWidth = `${ruleThickness}em`;
9173 img.style.backgroundColor = group.backgroundColor;
9176 img.style.borderColor = group.borderColor;
9265 node.setAttribute("style", "border: " + thk + "em solid " + String(group.borderColor));
9440 * with one group per cell. If given an optional argument style
9441 * ("text", "display", etc.), then each cell is cast into that style.
9445 function parseArray(parser, _ref, style) { argument
9491 if (style) {
9495 style, property
9546 } // Decides on a style for cells in an array according to whether the given
9690 colSep.style.width = options.fontMetrics().doubleRuleSep + "em";
9697 separator.style.height = totalHeight + "em";
9698 separator.style.borderRightWidth = `${ruleThickness}em`;
9699 separator.style.borderRightStyle = lineType;
9700 separator.style.margin = `0 -${ruleThickness / 2}em`;
9701 separator.style.verticalAlign = -(totalHeight - offset) + "em";
9723 colSep.style.width = sepwidth + "em";
9760 colSep.style.width = sepwidth + "em";
10183 // TODO(kevinb) get the current style.
10184 // For now we use the metrics for TEXT style which is what we were
10185 // doing before. Before attempting to get the current style we
10601 const style = `math${funcName.slice(1)}`;
10605 font: style,
10618 // Figure out what style this fraction should be in based on the
10620 let style = originalStyle; variable
10623 // Get display style as a default.
10624 // If incoming style is sub/sup, use style.text() to get correct size.
10625 style = style.id >= Style$1.SCRIPT.id ? style.text() : Style$1.DISPLAY;
10626 } else if (size === "text" && style.size === Style$1.DISPLAY.size) {
10627 // We're in a \tfrac but incoming style is displaystyle, so:
10628 style = Style$1.TEXT;
10630 style = Style$1.SCRIPT;
10632 style = Style$1.SCRIPTSCRIPT;
10635 return style;
10640 const style = adjustStyle(group.size, options.style);
10641 const nstyle = style.fracNum();
10642 const dstyle = style.fracDen();
10683 if (style.size === Style$1.DISPLAY.size || group.size === "display") {
10757 } // Since we manually change the style sometimes (with \dfrac or \tfrac),
10761 newOptions = options.havingStyle(style);
10767 if (style.size === Style$1.DISPLAY.size) {
10779 …er.customSizedDelim(group.leftDelim, delimSize, true, options.havingStyle(style), group.mode, ["mo…
10787 …r.customSizedDelim(group.rightDelim, delimSize, true, options.havingStyle(style), group.mode, ["mc…
10803 const style = adjustStyle(group.size, options.style);
10805 if (style.size !== options.style.size) {
10807 const isDisplay = style.size === Style$1.DISPLAY.size ? "true" : "false";
11111 …const style = options.style; // Pull out the `ParseNode<"horizBrace">` if `grp` is a "supsub" node.
11120 // with \limits, so we need to assign supsub style.
11121 …ldGroup(supSub.sup, options.havingStyle(style.sup()), options) : buildGroup(supSub.sub, options.ha…
11492 const style = { variable
11497 style.width = width + "em";
11501 style.verticalAlign = -depth + "em";
11504 const node = new Img(group.src, group.alt, style);
11627 strut.style.height = node.height + node.depth + "em";
11628 strut.style.verticalAlign = -node.depth + "em";
11676 style: "text",
11700 switch (options.style.size) {
11747 const assembleSupSub = (base, supGroup, subGroup, options, style, slant, baseShift) => { argument
11756 const elem = buildGroup(supGroup, options.havingStyle(style.sup()), options);
11764 const elem = buildGroup(subGroup, options.havingStyle(style.sub()), options);
11884 const style = options.style;
11887 …if (style.size === Style$1.DISPLAY.size && group.symbol && !utils.contains(noSuccessor, group.name…
11974 return assembleSupSub(base, supGroup, subGroup, options, style, slant, baseShift);
11977 base.style.position = "relative";
11978 base.style.top = baseShift + "em";
12228 return assembleSupSub(base, supGroup, subGroup, options, options.style, 0, 0);
12354 // Build the inner group in the cramped style.
12568 rule.style.borderRightWidth = width + "em";
12569 rule.style.borderTopWidth = height + "em";
12570 rule.style.bottom = shift + "em"; // Record the height and width
12662 // changes, because we don't keep state of what style we're currently
12817 if (options.style.id < Style$1.TEXT.id) {
12838 inner.style.paddingLeft = advanceWidth + "em"; // Overlay the image and the argument.
12862 // The index is always in scriptscript style
12915 const style = funcName.slice(1, funcName.length - 5);
12919 // Figure out what style to use by pulling out the style from
12921 style,
12928 const newStyle = styleMap$1[group.style];
12934 // Figure out what style we're changing to.
12935 const newStyle = styleMap$1[group.style];
12945 const attr = styleAttributes[group.style];
12968 …const delegate = base.limits && (options.style.size === Style$1.DISPLAY.size || base.alwaysHandleS…
12971 …const delegate = base.alwaysHandleSupSub && (options.style.size === Style$1.DISPLAY.size || base.l…
13012 const newOptions = options.havingStyle(options.style.sup());
13021 const newOptions = options.havingStyle(options.style.sub());
13032 if (options.style === Style$1.DISPLAY) {
13034 } else if (options.style.cramped) {
13165 …if (base && base.type === "op" && base.limits && (options.style === Style$1.DISPLAY || base.always…
13167 … === "operatorname" && base.alwaysHandleSupSub && (base.limits || options.style === Style$1.DISPLA…
13175 …if (base && base.type === "op" && base.limits && (options.style === Style$1.DISPLAY || base.always…
13177 … === "operatorname" && base.alwaysHandleSupSub && (base.limits || options.style === Style$1.DISPLA…
13185 if (base && base.type === "op" && base.limits && options.style === Style$1.DISPLAY) {
13187 …} else if (base && base.type === "operatorname" && base.alwaysHandleSupSub && (options.style === S…
13390 const font = group.font; // Checks if the argument is a font family or a font style.
13516 const newOptions = options.havingStyle(options.style.text());
16263 style: "text" // simulate \textstyle property
16899 node.setAttribute("style", `color:${options.errorColor}`);