diff --git a/src/delimiter.js b/src/delimiter.js index be39fc54..7cff6026 100644 --- a/src/delimiter.js +++ b/src/delimiter.js @@ -316,7 +316,7 @@ const makeStackedDelim = function(delim, heightTotal, center, options, mode, const sqrtInnerSVG = { // The main path geometry is from glyph U221A in the font KaTeX Main main: ``, // size4 is from glyph U221A in the font KaTeX_Size4-Regular 4: ` - `; } diff --git a/src/stretchy.js b/src/stretchy.js index 4ac5fcb6..9e80944f 100644 --- a/src/stretchy.js +++ b/src/stretchy.js @@ -137,18 +137,8 @@ const katexImagesData = { // gray pixel that a single path would generate. So we get arrow shafts // whose edges appear to be sharper. -const innerSVG = { - // Since bcancel's SVG is inline and it omits the viewBox attribute, - // it's stroke-width will not vary with span area. - bcancel: ``, - - cancel: ``, - - // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main - doubleleftarrow: `>`, +m8 0v40h399730v-40zm0 194v40h399730v-40z'/>`, - // doubleleftrightarrow is from glyph U+21D4 in font KaTeX Main - doubleleftrightarrow: `> -`, - - // doublerightarrow is from glyph U+21D2 in font KaTeX Main - doublerightarrow: `>`, +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z'/>`, + + leftarrow: ``, + + rightarrow: ``, +}; + +const innerSVG = { + // Since bcancel's SVG is inline and it omits the viewBox attribute, + // it's stroke-width will not vary with span area. + bcancel: ``, + + cancel: ``, + + // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main + doubleleftarrow: `>${svgPath["doubleleftarrow"]}`, + + // doubleleftrightarrow is from glyph U+21D4 in font KaTeX Main + doubleleftrightarrow: `>${svgPath["doubleleftarrow"]} +${svgPath["doublerightarrow"]}`, + + // doublerightarrow is from glyph U+21D2 in font KaTeX Main + doublerightarrow: `>${svgPath["doublerightarrow"]}`, // hookleftarrow is from glyph U+21A9 in font KaTeX Main hookleftarrow: `> +preserveAspectRatio='xMinYMin slice'>${svgPath["leftarrow"]} `, +preserveAspectRatio='xMaxYMin slice'>${svgPath["rightarrow"]}`, // leftarrow is from glyph U+2190 in font KaTeX Main leftarrow: `>`, - - // leftdoublearrow is from glyph U+21D0 in font KaTeX Main - leftdoublearrow: `>`, + slice'>${svgPath["leftarrow"]}`, // leftharpoon is from glyph U+21BD in font KaTeX Main leftharpoon: `>`, // leftharpoondown is from glyph U+21BD in font KaTeX Main leftharpoondown: `>`, +preserveAspectRatio='xMinYMin slice'>`, // leftrightarrow is from glyph U+2194 in font KaTeX Main leftrightarrow: `> +preserveAspectRatio='xMinYMin slice'>${svgPath["leftarrow"]} `, + slice'>${svgPath["rightarrow"]}`, // leftrightharpoons is from glyphs U+21BC/21B1 in font KaTeX Main leftrightharpoons: `> `, linesegment: `> -`, longequal: ` viewBox='0 0 100 334' preserveAspectRatio='none'> -`, +`, // mapsto is from glyph U+21A6 in font KaTeX Main mapsto: `>`, + 400000 522' preserveAspectRatio='xMaxYMin slice'>${svgPath["rightarrow"]}`, // overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular overbrace: `> `, // overgroup is from the MnSymbol package (public domain) overgroup: `>`, // rightarrow is from glyph U+2192 in font KaTeX Main rightarrow: `>`, + slice'>${svgPath["rightarrow"]}`, // rightharpoon is from glyph U+21C0 in font KaTeX Main rightharpoon: `>`, // rightharpoondown is from glyph U+21C1 in font KaTeX Main rightharpoondown: `> - -`, tilde3: ` viewBox='0 0 2339 306' preserveAspectRatio='none'> -`, tilde4: ` viewBox='0 0 2340 312' preserveAspectRatio='none'> - `, // undergroup is from the MnSymbol package (public domain) undergroup: `>`, // widehat1 is a modified version of a glyph from the MnSymbol package widehat1: ` viewBox='0 0 1062 239' preserveAspectRatio='none'> -`, // Ditto widehat2, widehat3, and widehat4 widehat2: ` viewBox='0 0 2364 300' preserveAspectRatio='none'> -`, widehat3: ` viewBox='0 0 2364 360' preserveAspectRatio='none'> -`, widehat4: ` viewBox='0 0 2364 420' preserveAspectRatio='none'> -`, - xcancel: ``, + xcancel: ` +`, }; const svgSpan = function(group, options) { diff --git a/static/katex.less b/static/katex.less index a6dfa472..1a97a23e 100644 --- a/static/katex.less +++ b/static/katex.less @@ -547,6 +547,14 @@ display: block; position: absolute; // absolute relative to parent width: 100%; + + path { + fill: currentColor; + } + + line { + stroke: currentColor; + } } // Define CSS for image whose width will match its span width.