katex 0.15.6 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +3 -3
  2. package/contrib/auto-render/auto-render.js +20 -1
  3. package/contrib/auto-render/test/auto-render-spec.js +88 -17
  4. package/contrib/copy-tex/README.md +9 -19
  5. package/contrib/copy-tex/copy-tex.js +39 -12
  6. package/contrib/copy-tex/katex2tex.js +16 -7
  7. package/contrib/mathtex-script-type/README.md +5 -5
  8. package/contrib/mhchem/README.md +1 -1
  9. package/contrib/render-a11y-string/render-a11y-string.js +5 -0
  10. package/dist/README.md +3 -3
  11. package/dist/contrib/auto-render.js +23 -1
  12. package/dist/contrib/auto-render.min.js +1 -1
  13. package/dist/contrib/auto-render.mjs +23 -1
  14. package/dist/contrib/copy-tex.js +38 -24
  15. package/dist/contrib/copy-tex.min.js +1 -1
  16. package/dist/contrib/copy-tex.mjs +35 -16
  17. package/dist/contrib/render-a11y-string.js +6 -0
  18. package/dist/contrib/render-a11y-string.min.js +1 -1
  19. package/dist/contrib/render-a11y-string.mjs +6 -0
  20. package/dist/katex.css +1 -1
  21. package/dist/katex.js +322 -199
  22. package/dist/katex.min.css +1 -1
  23. package/dist/katex.min.js +1 -1
  24. package/dist/katex.mjs +363 -241
  25. package/package.json +3 -3
  26. package/src/Parser.js +1 -1
  27. package/src/buildCommon.js +1 -1
  28. package/src/buildMathML.js +2 -2
  29. package/src/delimiter.js +68 -25
  30. package/src/domTree.js +1 -0
  31. package/src/environments/array.js +1 -1
  32. package/src/functions/enclose.js +1 -1
  33. package/src/functions/mclass.js +1 -1
  34. package/src/functions/op.js +1 -1
  35. package/src/functions/pmb.js +44 -0
  36. package/src/functions.js +1 -0
  37. package/src/macros.js +1 -9
  38. package/src/parseNode.js +7 -0
  39. package/src/stretchy.js +1 -1
  40. package/src/svgGeometry.js +56 -0
  41. package/contrib/copy-tex/copy-tex.css +0 -10
  42. package/contrib/copy-tex/copy-tex.webpack.js +0 -6
  43. package/dist/contrib/copy-tex.css +0 -13
  44. package/dist/contrib/copy-tex.min.css +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "katex",
3
- "version": "0.15.6",
3
+ "version": "0.16.2",
4
4
  "description": "Fast math typesetting for the web.",
5
5
  "main": "dist/katex.js",
6
6
  "exports": {
@@ -47,7 +47,7 @@
47
47
  "dist/"
48
48
  ],
49
49
  "license": "MIT",
50
- "packageManager": "yarn@3.2.0",
50
+ "packageManager": "yarn@3.2.2",
51
51
  "devDependencies": {
52
52
  "@babel/core": "^7.10.4",
53
53
  "@babel/eslint-parser": "^7.15.0",
@@ -127,7 +127,7 @@
127
127
  "test": "yarn test:lint && yarn test:flow && yarn test:jest",
128
128
  "test:lint": "yarn test:lint:js && yarn test:lint:css",
129
129
  "test:lint:js": "eslint .",
130
- "test:lint:css": "stylelint src/katex.less static/main.css contrib/**/*.css website/static/**/*.css",
130
+ "test:lint:css": "stylelint src/katex.less static/main.css website/static/**/*.css",
131
131
  "test:flow": "flow",
132
132
  "test:jest": "jest",
133
133
  "test:jest:watch": "jest --watch",
package/src/Parser.js CHANGED
@@ -922,7 +922,7 @@ export default class Parser {
922
922
  `Accented Unicode text character "${text[0]}" used in ` +
923
923
  `math mode`, nucleus);
924
924
  }
925
- text = unicodeSymbols[text[0]] + text.substr(1);
925
+ text = unicodeSymbols[text[0]] + text.slice(1);
926
926
  }
927
927
  // Strip off any combining characters
928
928
  const match = combiningDiacriticalMarksEndRegex.exec(text);
@@ -190,7 +190,7 @@ const makeOrd = function<NODETYPE: "spacing" | "mathord" | "textord">(
190
190
  return makeSymbol(text, fontName, mode, options,
191
191
  classes.concat(fontClasses));
192
192
  } else if (ligatures.hasOwnProperty(text) &&
193
- fontName.substr(0, 10) === "Typewriter") {
193
+ fontName.slice(0, 10) === "Typewriter") {
194
194
  // Deconstruct ligatures in monospace fonts (\texttt, \tt).
195
195
  const parts = [];
196
196
  for (let i = 0; i < text.length; i++) {
@@ -32,8 +32,8 @@ export const makeText = function(
32
32
  if (symbols[mode][text] && symbols[mode][text].replace &&
33
33
  text.charCodeAt(0) !== 0xD835 &&
34
34
  !(ligatures.hasOwnProperty(text) && options &&
35
- ((options.fontFamily && options.fontFamily.substr(4, 2) === "tt") ||
36
- (options.font && options.font.substr(4, 2) === "tt")))) {
35
+ ((options.fontFamily && options.fontFamily.slice(4, 6) === "tt") ||
36
+ (options.font && options.font.slice(4, 6) === "tt")))) {
37
37
  text = symbols[mode][text].replace;
38
38
  }
39
39
 
package/src/delimiter.js CHANGED
@@ -25,7 +25,7 @@ import ParseError from "./ParseError";
25
25
  import Style from "./Style";
26
26
 
27
27
  import {PathNode, SvgNode, SymbolNode} from "./domTree";
28
- import {sqrtPath, innerPath} from "./svgGeometry";
28
+ import {sqrtPath, innerPath, tallDelim} from "./svgGeometry";
29
29
  import buildCommon from "./buildCommon";
30
30
  import {getCharacterMetrics} from "./fontMetrics";
31
31
  import symbols from "./symbols";
@@ -229,6 +229,8 @@ const makeStackedDelim = function(
229
229
  let middle;
230
230
  let repeat;
231
231
  let bottom;
232
+ let svgLabel = "";
233
+ let viewBoxWidth = 0;
232
234
  top = repeat = bottom = delim;
233
235
  middle = null;
234
236
  // Also keep track of what font the delimiters are in
@@ -255,44 +257,64 @@ const makeStackedDelim = function(
255
257
  bottom = "\\Downarrow";
256
258
  } else if (utils.contains(verts, delim)) {
257
259
  repeat = "\u2223";
260
+ svgLabel = "vert";
261
+ viewBoxWidth = 333;
258
262
  } else if (utils.contains(doubleVerts, delim)) {
259
263
  repeat = "\u2225";
264
+ svgLabel = "doublevert";
265
+ viewBoxWidth = 556;
260
266
  } else if (delim === "[" || delim === "\\lbrack") {
261
267
  top = "\u23a1";
262
268
  repeat = "\u23a2";
263
269
  bottom = "\u23a3";
264
270
  font = "Size4-Regular";
271
+ svgLabel = "lbrack";
272
+ viewBoxWidth = 667;
265
273
  } else if (delim === "]" || delim === "\\rbrack") {
266
274
  top = "\u23a4";
267
275
  repeat = "\u23a5";
268
276
  bottom = "\u23a6";
269
277
  font = "Size4-Regular";
278
+ svgLabel = "rbrack";
279
+ viewBoxWidth = 667;
270
280
  } else if (delim === "\\lfloor" || delim === "\u230a") {
271
281
  repeat = top = "\u23a2";
272
282
  bottom = "\u23a3";
273
283
  font = "Size4-Regular";
284
+ svgLabel = "lfloor";
285
+ viewBoxWidth = 667;
274
286
  } else if (delim === "\\lceil" || delim === "\u2308") {
275
287
  top = "\u23a1";
276
288
  repeat = bottom = "\u23a2";
277
289
  font = "Size4-Regular";
290
+ svgLabel = "lceil";
291
+ viewBoxWidth = 667;
278
292
  } else if (delim === "\\rfloor" || delim === "\u230b") {
279
293
  repeat = top = "\u23a5";
280
294
  bottom = "\u23a6";
281
295
  font = "Size4-Regular";
296
+ svgLabel = "rfloor";
297
+ viewBoxWidth = 667;
282
298
  } else if (delim === "\\rceil" || delim === "\u2309") {
283
299
  top = "\u23a4";
284
300
  repeat = bottom = "\u23a5";
285
301
  font = "Size4-Regular";
302
+ svgLabel = "rceil";
303
+ viewBoxWidth = 667;
286
304
  } else if (delim === "(" || delim === "\\lparen") {
287
305
  top = "\u239b";
288
306
  repeat = "\u239c";
289
307
  bottom = "\u239d";
290
308
  font = "Size4-Regular";
309
+ svgLabel = "lparen";
310
+ viewBoxWidth = 875;
291
311
  } else if (delim === ")" || delim === "\\rparen") {
292
312
  top = "\u239e";
293
313
  repeat = "\u239f";
294
314
  bottom = "\u23a0";
295
315
  font = "Size4-Regular";
316
+ svgLabel = "rparen";
317
+ viewBoxWidth = 875;
296
318
  } else if (delim === "\\{" || delim === "\\lbrace") {
297
319
  top = "\u23a7";
298
320
  middle = "\u23a8";
@@ -365,38 +387,59 @@ const makeStackedDelim = function(
365
387
  // Calculate the depth
366
388
  const depth = realHeightTotal / 2 - axisHeight;
367
389
 
368
-
369
390
  // Now, we start building the pieces that will go into the vlist
370
391
  // Keep a list of the pieces of the stacked delimiter
371
392
  const stack = [];
372
393
 
373
- // Add the bottom symbol
374
- stack.push(makeGlyphSpan(bottom, font, mode));
375
- stack.push(lap); // overlap
376
-
377
- if (middle === null) {
378
- // The middle section will be an SVG. Make it an extra 0.016em tall.
379
- // We'll overlap by 0.008em at top and bottom.
380
- const innerHeight = realHeightTotal - topHeightTotal - bottomHeightTotal
381
- + 2 * lapInEms;
382
- stack.push(makeInner(repeat, innerHeight, options));
394
+ if (svgLabel.length > 0) {
395
+ // Instead of stacking glyphs, create a single SVG.
396
+ // This evades browser problems with imprecise positioning of spans.
397
+ const midHeight = realHeightTotal - topHeightTotal - bottomHeightTotal;
398
+ const viewBoxHeight = Math.round(realHeightTotal * 1000);
399
+ const pathStr = tallDelim(svgLabel, Math.round(midHeight * 1000));
400
+ const path = new PathNode(svgLabel, pathStr);
401
+ const width = (viewBoxWidth / 1000).toFixed(3) + "em";
402
+ const height = (viewBoxHeight / 1000).toFixed(3) + "em";
403
+ const svg = new SvgNode([path], {
404
+ "width": width,
405
+ "height": height,
406
+ "viewBox": `0 0 ${viewBoxWidth} ${viewBoxHeight}`,
407
+ });
408
+ const wrapper = buildCommon.makeSvgSpan([], [svg], options);
409
+ wrapper.height = viewBoxHeight / 1000;
410
+ wrapper.style.width = width;
411
+ wrapper.style.height = height;
412
+ stack.push({type: "elem", elem: wrapper});
383
413
  } else {
384
- // When there is a middle bit, we need the middle part and two repeated
385
- // sections
386
- const innerHeight = (realHeightTotal - topHeightTotal - bottomHeightTotal -
387
- middleHeightTotal) / 2 + 2 * lapInEms;
388
- stack.push(makeInner(repeat, innerHeight, options));
389
- // Now insert the middle of the brace.
390
- stack.push(lap);
391
- stack.push(makeGlyphSpan(middle, font, mode));
414
+ // Stack glyphs
415
+ // Start by adding the bottom symbol
416
+ stack.push(makeGlyphSpan(bottom, font, mode));
417
+ stack.push(lap); // overlap
418
+
419
+ if (middle === null) {
420
+ // The middle section will be an SVG. Make it an extra 0.016em tall.
421
+ // We'll overlap by 0.008em at top and bottom.
422
+ const innerHeight = realHeightTotal - topHeightTotal - bottomHeightTotal
423
+ + 2 * lapInEms;
424
+ stack.push(makeInner(repeat, innerHeight, options));
425
+ } else {
426
+ // When there is a middle bit, we need the middle part and two repeated
427
+ // sections
428
+ const innerHeight = (realHeightTotal - topHeightTotal -
429
+ bottomHeightTotal - middleHeightTotal) / 2 + 2 * lapInEms;
430
+ stack.push(makeInner(repeat, innerHeight, options));
431
+ // Now insert the middle of the brace.
432
+ stack.push(lap);
433
+ stack.push(makeGlyphSpan(middle, font, mode));
434
+ stack.push(lap);
435
+ stack.push(makeInner(repeat, innerHeight, options));
436
+ }
437
+
438
+ // Add the top symbol
392
439
  stack.push(lap);
393
- stack.push(makeInner(repeat, innerHeight, options));
440
+ stack.push(makeGlyphSpan(top, font, mode));
394
441
  }
395
442
 
396
- // Add the top symbol
397
- stack.push(lap);
398
- stack.push(makeGlyphSpan(top, font, mode));
399
-
400
443
  // Finally, build the vlist
401
444
  const newOptions = options.havingBaseStyle(Style.TEXT);
402
445
  const inner = buildCommon.makeVList({
package/src/domTree.js CHANGED
@@ -153,6 +153,7 @@ export type CssStyle = $Shape<{
153
153
  minWidth: string,
154
154
  paddingLeft: string,
155
155
  position: string,
156
+ textShadow: string,
156
157
  top: string,
157
158
  width: string,
158
159
  verticalAlign: string,
@@ -256,7 +256,7 @@ function parseArray(
256
256
  // Decides on a style for cells in an array according to whether the given
257
257
  // environment name starts with the letter 'd'.
258
258
  function dCellStyle(envName): StyleStr {
259
- if (envName.substr(0, 1) === "d") {
259
+ if (envName.slice(0, 1) === "d") {
260
260
  return "display";
261
261
  } else {
262
262
  return "text";
@@ -20,7 +20,7 @@ const htmlBuilder = (group, options) => {
20
20
  const inner = buildCommon.wrapFragment(
21
21
  html.buildGroup(group.body, options), options);
22
22
 
23
- const label = group.label.substr(1);
23
+ const label = group.label.slice(1);
24
24
  let scale = options.sizeMultiplier;
25
25
  let img;
26
26
  let imgShift = 0;
@@ -75,7 +75,7 @@ defineFunction({
75
75
  return {
76
76
  type: "mclass",
77
77
  mode: parser.mode,
78
- mclass: "m" + funcName.substr(5), // TODO(kevinb): don't prefix with 'm'
78
+ mclass: "m" + funcName.slice(5), // TODO(kevinb): don't prefix with 'm'
79
79
  body: ordargument(body),
80
80
  isCharacterBox: utils.isCharacterBox(body),
81
81
  };
@@ -61,7 +61,7 @@ export const htmlBuilder: HtmlBuilderSupSub<"op"> = (grp, options) => {
61
61
  if (group.name === "\\oiint" || group.name === "\\oiiint") {
62
62
  // No font glyphs yet, so use a glyph w/o the oval.
63
63
  // TODO: When font glyphs are available, delete this code.
64
- stash = group.name.substr(1);
64
+ stash = group.name.slice(1);
65
65
  group.name = stash === "oiint" ? "\\iint" : "\\iiint";
66
66
  }
67
67
 
@@ -0,0 +1,44 @@
1
+ // @flow
2
+ import defineFunction, {ordargument} from "../defineFunction";
3
+ import buildCommon from "../buildCommon";
4
+ import mathMLTree from "../mathMLTree";
5
+ import * as html from "../buildHTML";
6
+ import * as mml from "../buildMathML";
7
+ import {binrelClass} from "./mclass";
8
+
9
+ import type {ParseNode} from "../parseNode";
10
+
11
+ // \pmb is a simulation of bold font.
12
+ // The version of \pmb in ambsy.sty works by typesetting three copies
13
+ // with small offsets. We use CSS text-shadow.
14
+ // It's a hack. Not as good as a real bold font. Better than nothing.
15
+
16
+ defineFunction({
17
+ type: "pmb",
18
+ names: ["\\pmb"],
19
+ props: {
20
+ numArgs: 1,
21
+ allowedInText: true,
22
+ },
23
+ handler({parser}, args) {
24
+ return {
25
+ type: "pmb",
26
+ mode: parser.mode,
27
+ mclass: binrelClass(args[0]),
28
+ body: ordargument(args[0]),
29
+ };
30
+ },
31
+ htmlBuilder(group: ParseNode<"pmb">, options) {
32
+ const elements = html.buildExpression(group.body, options, true);
33
+ const node = buildCommon.makeSpan([group.mclass], elements, options);
34
+ node.style.textShadow = "0.02em 0.01em 0.04px";
35
+ return node;
36
+ },
37
+ mathmlBuilder(group: ParseNode<"pmb">, style) {
38
+ const inner = mml.buildExpression(group.body, style);
39
+ // Wrap with an <mstyle> element.
40
+ const node = new mathMLTree.MathNode("mstyle", inner);
41
+ node.setAttribute("style", "text-shadow: 0.02em 0.01em 0.04px");
42
+ return node;
43
+ },
44
+ });
package/src/functions.js CHANGED
@@ -10,6 +10,7 @@ export default functions;
10
10
  import "./functions/accent";
11
11
  import "./functions/accentunder";
12
12
  import "./functions/arrow";
13
+ import "./functions/pmb";
13
14
  import "./environments/cd";
14
15
  import "./functions/char";
15
16
  import "./functions/color";
package/src/macros.js CHANGED
@@ -447,7 +447,7 @@ defineMacro("\\dots", function(context) {
447
447
  const next = context.expandAfterFuture().text;
448
448
  if (next in dotsByToken) {
449
449
  thedots = dotsByToken[next];
450
- } else if (next.substr(0, 4) === '\\not') {
450
+ } else if (next.slice(0, 4) === '\\not') {
451
451
  thedots = '\\dotsb';
452
452
  } else if (next in symbols.math) {
453
453
  if (utils.contains(['bin', 'rel'], symbols.math[next].group)) {
@@ -597,14 +597,6 @@ defineMacro("\\mod", "\\allowbreak" +
597
597
  "\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}" +
598
598
  "{\\rm mod}\\,\\,#1");
599
599
 
600
- // \pmb -- A simulation of bold.
601
- // The version in ambsy.sty works by typesetting three copies of the argument
602
- // with small offsets. We use two copies. We omit the vertical offset because
603
- // of rendering problems that makeVList encounters in Safari.
604
- defineMacro("\\pmb", "\\html@mathml{" +
605
- "\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}" +
606
- "{\\mathbf{#1}}");
607
-
608
600
  //////////////////////////////////////////////////////////////////////
609
601
  // LaTeX source2e
610
602
 
package/src/parseNode.js CHANGED
@@ -414,6 +414,13 @@ type ParseNodeTypes = {
414
414
  loc?: ?SourceLocation,
415
415
  body: AnyParseNode,
416
416
  |},
417
+ "pmb": {|
418
+ type: "pmb",
419
+ mode: Mode,
420
+ loc?: ?SourceLocation,
421
+ mclass: string,
422
+ body: AnyParseNode[],
423
+ |},
417
424
  "raisebox": {|
418
425
  type: "raisebox",
419
426
  mode: Mode,
package/src/stretchy.js CHANGED
@@ -191,7 +191,7 @@ const svgSpan = function(
191
191
  height: number,
192
192
  } {
193
193
  let viewBoxWidth = 400000; // default
194
- const label = group.label.substr(1);
194
+ const label = group.label.slice(1);
195
195
  if (utils.contains(["widehat", "widecheck", "widetilde", "utilde"],
196
196
  label)) {
197
197
  // Each type in the `if` statement corresponds to one of the ParseNode
@@ -487,3 +487,59 @@ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
487
487
  c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
488
488
  M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`,
489
489
  };
490
+
491
+ export const tallDelim = function(label: string, midHeight: number): string {
492
+ switch (label) {
493
+ case "lbrack":
494
+ return `M403 1759 V84 H666 V0 H319 V1759 v${midHeight} v1759 h347 v-84
495
+ H403z M403 1759 V0 H319 V1759 v${midHeight} v1759 h84z`;
496
+ case "rbrack":
497
+ return `M347 1759 V0 H0 V84 H263 V1759 v${midHeight} v1759 H0 v84 H347z
498
+ M347 1759 V0 H263 V1759 v${midHeight} v1759 h84z`;
499
+ case "vert":
500
+ return `M145 15 v585 v${midHeight} v585 c2.667,10,9.667,15,21,15
501
+ c10,0,16.667,-5,20,-15 v-585 v${-midHeight} v-585 c-2.667,-10,-9.667,-15,-21,-15
502
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v${midHeight} v585 h43z`;
503
+ case "doublevert":
504
+ return `M145 15 v585 v${midHeight} v585 c2.667,10,9.667,15,21,15
505
+ c10,0,16.667,-5,20,-15 v-585 v${-midHeight} v-585 c-2.667,-10,-9.667,-15,-21,-15
506
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v${midHeight} v585 h43z
507
+ M367 15 v585 v${midHeight} v585 c2.667,10,9.667,15,21,15
508
+ c10,0,16.667,-5,20,-15 v-585 v${-midHeight} v-585 c-2.667,-10,-9.667,-15,-21,-15
509
+ c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v${midHeight} v585 h43z`;
510
+ case "lfloor":
511
+ return `M319 602 V0 H403 V602 v${midHeight} v1715 h263 v84 H319z
512
+ MM319 602 V0 H403 V602 v${midHeight} v1715 H319z`;
513
+ case "rfloor":
514
+ return `M319 602 V0 H403 V602 v${midHeight} v1799 H0 v-84 H319z
515
+ MM319 602 V0 H403 V602 v${midHeight} v1715 H319z`;
516
+ case "lceil":
517
+ return `M403 1759 V84 H666 V0 H319 V1759 v${midHeight} v602 h84z
518
+ M403 1759 V0 H319 V1759 v${midHeight} v602 h84z`;
519
+ case "rceil":
520
+ return `M347 1759 V0 H0 V84 H263 V1759 v${midHeight} v602 h84z
521
+ M347 1759 V0 h-84 V1759 v${midHeight} v602 h84z`;
522
+ case "lparen":
523
+ return `M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
524
+ c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
525
+ -36,557 l0,${midHeight + 84}c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
526
+ 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
527
+ c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
528
+ -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
529
+ l0,-${midHeight + 92}c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
530
+ -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;
531
+ case "rparen":
532
+ return `M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
533
+ 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
534
+ c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,${midHeight + 9}
535
+ c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
536
+ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
537
+ c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
538
+ c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
539
+ l0,-${midHeight + 144}c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
540
+ -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;
541
+ default:
542
+ // We should not ever get here.
543
+ throw new Error("Unknown stretchy delimiter.");
544
+ }
545
+ };
@@ -1,10 +0,0 @@
1
- /* Force selection of entire .katex/.katex-display blocks, so that we can
2
- * copy/paste the entire source code. If you omit this CSS, partial
3
- * selections of a formula will work, but will copy the ugly HTML
4
- * representation instead of the LaTeX source code. (Full selections will
5
- * still produce the LaTeX source code.)
6
- */
7
- .katex,
8
- .katex-display {
9
- user-select: all;
10
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * This is the webpack entry point for KaTeX. As ECMAScript doesn't support
3
- * CSS modules natively, a separate entry point is used.
4
- */
5
- import './copy-tex.css';
6
- import './copy-tex.js';
@@ -1,13 +0,0 @@
1
- /* Force selection of entire .katex/.katex-display blocks, so that we can
2
- * copy/paste the entire source code. If you omit this CSS, partial
3
- * selections of a formula will work, but will copy the ugly HTML
4
- * representation instead of the LaTeX source code. (Full selections will
5
- * still produce the LaTeX source code.)
6
- */
7
- .katex,
8
- .katex-display {
9
- -webkit-user-select: all;
10
- -moz-user-select: all;
11
- user-select: all;
12
- }
13
-
@@ -1 +0,0 @@
1
- .katex,.katex-display{-webkit-user-select:all;-moz-user-select:all;user-select:all}