@veracity/ai 1.0.1 → 2.0.1
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.
- package/dist/{ChatCompletionSSE.d.ts → ChatClient.d.ts} +22 -13
- package/dist/ChatClient.d.ts.map +1 -0
- package/dist/ChatMessageItem.d.ts +1 -1
- package/dist/ClientFunctionInvocation.d.ts +14 -0
- package/dist/ClientFunctionInvocation.d.ts.map +1 -0
- package/dist/ClientFunctionInvocationContext.d.ts +10 -0
- package/dist/ClientFunctionInvocationContext.d.ts.map +1 -0
- package/dist/Markdown/index.d.ts +2 -2
- package/dist/Markdown/index.d.ts.map +1 -1
- package/dist/Markdown/math.d.ts.map +1 -1
- package/dist/MaxInputLimitReachedError.d.ts +4 -0
- package/dist/MaxInputLimitReachedError.d.ts.map +1 -0
- package/dist/Pyodide.d.ts +1 -1
- package/dist/Pyodide.d.ts.map +1 -1
- package/dist/ToolCallBuilder.d.ts +13 -0
- package/dist/ToolCallBuilder.d.ts.map +1 -0
- package/dist/UnexpectedEndOfStreamError.d.ts +4 -0
- package/dist/UnexpectedEndOfStreamError.d.ts.map +1 -0
- package/dist/components/Button.d.ts +1 -0
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/ButtonOptionsDialog.d.ts +27 -0
- package/dist/components/ButtonOptionsDialog.d.ts.map +1 -0
- package/dist/components/Chat/index.d.ts +39 -0
- package/dist/components/Chat/index.d.ts.map +1 -0
- package/dist/components/Conversation.d.ts +54 -0
- package/dist/components/Conversation.d.ts.map +1 -0
- package/dist/components/ConversationMessage.d.ts +53 -0
- package/dist/components/ConversationMessage.d.ts.map +1 -0
- package/dist/components/PythonCodeInterpreter.d.ts +38 -0
- package/dist/components/PythonCodeInterpreter.d.ts.map +1 -0
- package/dist/components/Search.d.ts +16 -0
- package/dist/components/Search.d.ts.map +1 -0
- package/dist/components/icons/AngleDown.d.ts +3 -0
- package/dist/components/icons/AngleDown.d.ts.map +1 -0
- package/dist/components/icons/ArrowDown.d.ts +1 -1
- package/dist/components/icons/Check.d.ts +1 -1
- package/dist/components/icons/CheckCircle.d.ts +3 -0
- package/dist/components/icons/CheckCircle.d.ts.map +1 -0
- package/dist/components/icons/ExclamationCircle.d.ts +1 -1
- package/dist/components/icons/ExclamationTriangle.d.ts +1 -1
- package/dist/components/icons/InfoCircle.d.ts +1 -1
- package/dist/components/icons/QuestionCircle.d.ts +1 -1
- package/dist/components/icons/SearchIcon.d.ts +3 -0
- package/dist/components/icons/SearchIcon.d.ts.map +1 -0
- package/dist/components/icons/Spinner.d.ts +1 -1
- package/dist/components/icons/Times.d.ts +3 -0
- package/dist/components/icons/Times.d.ts.map +1 -0
- package/dist/components/icons/TimesCircle.d.ts +1 -1
- package/dist/core-CdG-ENX3.js +1069 -0
- package/dist/{csharp-Cigc7XMa.js → csharp-EkcwwkCa.js} +18 -13
- package/dist/{css-B-yPI1XM.js → css-CJS6IEi0.js} +127 -18
- package/dist/dtos.d.ts +34 -4
- package/dist/dtos.d.ts.map +1 -1
- package/dist/enums.d.ts +13 -29
- package/dist/enums.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/{javascript-CDslspYb.js → javascript-B2FVNeJt.js} +26 -24
- package/dist/{katex-Cj8zHzei.js → katex-c21813vb.js} +454 -428
- package/dist/{python-CzH_tl5q.js → python-CymlFLB0.js} +21 -19
- package/dist/{typescript-Bx5cZccb.js → typescript-Cg8DWaxm.js} +163 -148
- package/dist/utils/CancellationToken.d.ts.map +1 -1
- package/dist/utils/Channel.d.ts +42 -1
- package/dist/utils/Channel.d.ts.map +1 -1
- package/dist/utils/animateAsync.d.ts +1 -1
- package/dist/utils/createDeferred.d.ts.map +1 -1
- package/dist/utils/parsePartialJSON.d.ts +1 -1
- package/dist/utils/parsePartialJSON.d.ts.map +1 -1
- package/dist/veracity-ai.es.js +5359 -5416
- package/dist/veracity-ai.umd.js +37 -40
- package/package.json +28 -20
- package/dist/ChatCompletionSSE.d.ts.map +0 -1
- package/dist/Markdown copy.d.ts +0 -2
- package/dist/Markdown copy.d.ts.map +0 -1
- package/dist/MessageLimitExceededError.d.ts +0 -6
- package/dist/MessageLimitExceededError.d.ts.map +0 -1
- package/dist/Pyodide_test.d.ts +0 -1
- package/dist/Pyodide_test.d.ts.map +0 -1
- package/dist/components/AIChat/index.d.ts +0 -42
- package/dist/components/AIChat/index.d.ts.map +0 -1
- package/dist/components/AIChatAgentMessage.d.ts +0 -28
- package/dist/components/AIChatAgentMessage.d.ts.map +0 -1
- package/dist/components/AIChatMessage.d.ts +0 -1
- package/dist/components/AIChatMessage.d.ts.map +0 -1
- package/dist/components/AIChatToolCallGroup.d.ts +0 -21
- package/dist/components/AIChatToolCallGroup.d.ts.map +0 -1
- package/dist/components/AIChatUserMessage.d.ts +0 -14
- package/dist/components/AIChatUserMessage.d.ts.map +0 -1
- package/dist/components/AIConversation.d.ts +0 -8
- package/dist/components/AIConversation.d.ts.map +0 -1
- package/dist/components/AIParent.d.ts +0 -8
- package/dist/components/AIParent.d.ts.map +0 -1
- package/dist/components/ErrorNotification.d.ts +0 -2
- package/dist/components/ErrorNotification.d.ts.map +0 -1
- package/dist/components/ToolCallComponent/TaskItemComponent.d.ts +0 -14
- package/dist/components/ToolCallComponent/TaskItemComponent.d.ts.map +0 -1
- package/dist/components/ToolCallComponent/index.d.ts +0 -86
- package/dist/components/ToolCallComponent/index.d.ts.map +0 -1
- package/dist/components/VeracityAvatar.d.ts +0 -3
- package/dist/components/VeracityAvatar.d.ts.map +0 -1
- package/dist/components/VeracityLogoSquare.d.ts +0 -3
- package/dist/components/VeracityLogoSquare.d.ts.map +0 -1
- package/dist/core-Diwflo5W.js +0 -1077
- package/dist/modals.d.ts +0 -9
- package/dist/modals.d.ts.map +0 -1
- package/dist/utils/decodePythonTripleQuotedString.d.ts +0 -2
- package/dist/utils/decodePythonTripleQuotedString.d.ts.map +0 -1
- package/dist/utils/generateAvatarLetter.d.ts +0 -2
- package/dist/utils/generateAvatarLetter.d.ts.map +0 -1
- package/dist/utils/getElementTextPreserveNewlines.d.ts +0 -2
- package/dist/utils/getElementTextPreserveNewlines.d.ts.map +0 -1
|
@@ -18,7 +18,7 @@ class u0 {
|
|
|
18
18
|
return t ? !e || !e.loc || !t.loc || e.loc.lexer !== t.loc.lexer ? null : new u0(e.loc.lexer, e.loc.start, t.loc.end) : e && e.loc;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
class
|
|
21
|
+
class f0 {
|
|
22
22
|
// don't expand the token
|
|
23
23
|
// used in \noexpand
|
|
24
24
|
constructor(e, t) {
|
|
@@ -29,7 +29,7 @@ class x0 {
|
|
|
29
29
|
* the whole input range enclosed by these two.
|
|
30
30
|
*/
|
|
31
31
|
range(e, t) {
|
|
32
|
-
return new
|
|
32
|
+
return new f0(t, u0.range(this, e));
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
class M {
|
|
@@ -78,9 +78,9 @@ var pr = function r(e) {
|
|
|
78
78
|
throw new Error("Expected non-null, but got " + String(e));
|
|
79
79
|
return e;
|
|
80
80
|
}, ka = function(e) {
|
|
81
|
-
var t =
|
|
82
|
-
return t
|
|
83
|
-
},
|
|
81
|
+
var t = /^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);
|
|
82
|
+
return t ? t[2] !== ":" || !/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1]) ? null : t[1].toLowerCase() : "_relative";
|
|
83
|
+
}, q = {
|
|
84
84
|
contains: da,
|
|
85
85
|
deflt: fa,
|
|
86
86
|
escape: ya,
|
|
@@ -88,7 +88,7 @@ var pr = function r(e) {
|
|
|
88
88
|
getBaseElem: pr,
|
|
89
89
|
isCharacterBox: xa,
|
|
90
90
|
protocolFromUrl: ka
|
|
91
|
-
},
|
|
91
|
+
}, ze = {
|
|
92
92
|
displayMode: {
|
|
93
93
|
type: "boolean",
|
|
94
94
|
description: "Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",
|
|
@@ -195,9 +195,9 @@ function Sa(r) {
|
|
|
195
195
|
class ct {
|
|
196
196
|
constructor(e) {
|
|
197
197
|
this.displayMode = void 0, this.output = void 0, this.leqno = void 0, this.fleqn = void 0, this.throwOnError = void 0, this.errorColor = void 0, this.macros = void 0, this.minRuleThickness = void 0, this.colorIsTextColor = void 0, this.strict = void 0, this.trust = void 0, this.maxSize = void 0, this.maxExpand = void 0, this.globalGroup = void 0, e = e || {};
|
|
198
|
-
for (var t in
|
|
199
|
-
if (
|
|
200
|
-
var a =
|
|
198
|
+
for (var t in ze)
|
|
199
|
+
if (ze.hasOwnProperty(t)) {
|
|
200
|
+
var a = ze[t];
|
|
201
201
|
this[t] = e[t] !== void 0 ? a.processor ? a.processor(e[t]) : e[t] : Sa(a);
|
|
202
202
|
}
|
|
203
203
|
}
|
|
@@ -240,9 +240,14 @@ class ct {
|
|
|
240
240
|
* get added by this function (changing the specified object).
|
|
241
241
|
*/
|
|
242
242
|
isTrusted(e) {
|
|
243
|
-
e.url && !e.protocol
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
if (e.url && !e.protocol) {
|
|
244
|
+
var t = q.protocolFromUrl(e.url);
|
|
245
|
+
if (t == null)
|
|
246
|
+
return !1;
|
|
247
|
+
e.protocol = t;
|
|
248
|
+
}
|
|
249
|
+
var a = typeof this.trust == "function" ? this.trust(e) : this.trust;
|
|
250
|
+
return !!a;
|
|
246
251
|
}
|
|
247
252
|
}
|
|
248
253
|
class O0 {
|
|
@@ -253,40 +258,40 @@ class O0 {
|
|
|
253
258
|
* Get the style of a superscript given a base in the current style.
|
|
254
259
|
*/
|
|
255
260
|
sup() {
|
|
256
|
-
return
|
|
261
|
+
return y0[Ma[this.id]];
|
|
257
262
|
}
|
|
258
263
|
/**
|
|
259
264
|
* Get the style of a subscript given a base in the current style.
|
|
260
265
|
*/
|
|
261
266
|
sub() {
|
|
262
|
-
return
|
|
267
|
+
return y0[za[this.id]];
|
|
263
268
|
}
|
|
264
269
|
/**
|
|
265
270
|
* Get the style of a fraction numerator given the fraction in the current
|
|
266
271
|
* style.
|
|
267
272
|
*/
|
|
268
273
|
fracNum() {
|
|
269
|
-
return
|
|
274
|
+
return y0[Aa[this.id]];
|
|
270
275
|
}
|
|
271
276
|
/**
|
|
272
277
|
* Get the style of a fraction denominator given the fraction in the current
|
|
273
278
|
* style.
|
|
274
279
|
*/
|
|
275
280
|
fracDen() {
|
|
276
|
-
return
|
|
281
|
+
return y0[Ta[this.id]];
|
|
277
282
|
}
|
|
278
283
|
/**
|
|
279
284
|
* Get the cramped version of a style (in particular, cramping a cramped style
|
|
280
285
|
* doesn't change the style).
|
|
281
286
|
*/
|
|
282
287
|
cramp() {
|
|
283
|
-
return
|
|
288
|
+
return y0[Ba[this.id]];
|
|
284
289
|
}
|
|
285
290
|
/**
|
|
286
291
|
* Get a text or display version of this style.
|
|
287
292
|
*/
|
|
288
293
|
text() {
|
|
289
|
-
return
|
|
294
|
+
return y0[Da[this.id]];
|
|
290
295
|
}
|
|
291
296
|
/**
|
|
292
297
|
* Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle)
|
|
@@ -295,11 +300,11 @@ class O0 {
|
|
|
295
300
|
return this.size >= 2;
|
|
296
301
|
}
|
|
297
302
|
}
|
|
298
|
-
var dt = 0,
|
|
299
|
-
DISPLAY:
|
|
300
|
-
TEXT:
|
|
301
|
-
SCRIPT:
|
|
302
|
-
SCRIPTSCRIPT:
|
|
303
|
+
var dt = 0, Te = 1, _0 = 2, T0 = 3, le = 4, d0 = 5, ee = 6, n0 = 7, y0 = [new O0(dt, 0, !1), new O0(Te, 0, !0), new O0(_0, 1, !1), new O0(T0, 1, !0), new O0(le, 2, !1), new O0(d0, 2, !0), new O0(ee, 3, !1), new O0(n0, 3, !0)], Ma = [le, d0, le, d0, ee, n0, ee, n0], za = [d0, d0, d0, d0, n0, n0, n0, n0], Aa = [_0, T0, le, d0, ee, n0, ee, n0], Ta = [T0, T0, d0, d0, n0, n0, n0, n0], Ba = [Te, Te, T0, T0, d0, d0, n0, n0], Da = [dt, Te, _0, T0, _0, T0, _0, T0], R = {
|
|
304
|
+
DISPLAY: y0[dt],
|
|
305
|
+
TEXT: y0[_0],
|
|
306
|
+
SCRIPT: y0[le],
|
|
307
|
+
SCRIPTSCRIPT: y0[ee]
|
|
303
308
|
}, at = [{
|
|
304
309
|
// Latin characters beyond the Latin-1 characters we have metrics for.
|
|
305
310
|
// Needed for Czech, Hungarian and Turkish text, for example.
|
|
@@ -368,11 +373,11 @@ function Ca(r) {
|
|
|
368
373
|
}
|
|
369
374
|
return null;
|
|
370
375
|
}
|
|
371
|
-
var
|
|
372
|
-
at.forEach((r) => r.blocks.forEach((e) =>
|
|
376
|
+
var Ae = [];
|
|
377
|
+
at.forEach((r) => r.blocks.forEach((e) => Ae.push(...e)));
|
|
373
378
|
function vr(r) {
|
|
374
|
-
for (var e = 0; e <
|
|
375
|
-
if (r >=
|
|
379
|
+
for (var e = 0; e < Ae.length; e += 2)
|
|
380
|
+
if (r >= Ae[e] && r <= Ae[e + 1])
|
|
376
381
|
return !0;
|
|
377
382
|
return !1;
|
|
378
383
|
}
|
|
@@ -401,7 +406,7 @@ c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
|
401
406
|
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
402
407
|
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
403
408
|
M` + (1001 + e) + " " + t + "h400000v" + (40 + e) + "h-400000z";
|
|
404
|
-
},
|
|
409
|
+
}, Ea = function(e, t) {
|
|
405
410
|
return "M983 " + (10 + e + t) + `
|
|
406
411
|
l` + e / 3.13 + " -" + e + `
|
|
407
412
|
c4,-6.7,10,-10,18,-10 H400000v` + (40 + e) + `
|
|
@@ -412,7 +417,7 @@ c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
|
412
417
|
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
413
418
|
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
414
419
|
M` + (1001 + e) + " " + t + "h400000v" + (40 + e) + "h-400000z";
|
|
415
|
-
},
|
|
420
|
+
}, Ra = function(e, t) {
|
|
416
421
|
return "M424," + (2398 + e + t) + `
|
|
417
422
|
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
418
423
|
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
@@ -436,14 +441,14 @@ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,1
|
|
|
436
441
|
}, Oa = function(e) {
|
|
437
442
|
var t = e / 2;
|
|
438
443
|
return "M400000 " + e + " H0 L" + t + " 0 l65 45 L145 " + (e - 80) + " H400000z";
|
|
439
|
-
},
|
|
444
|
+
}, Fa = function(e, t, a) {
|
|
440
445
|
var n = a - 54 - t - e;
|
|
441
446
|
return "M702 " + (e + t) + "H400000" + (40 + e) + `
|
|
442
447
|
H742v` + n + `l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
443
448
|
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
444
449
|
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
445
450
|
219 661 l218 661zM702 ` + t + "H400000v" + (40 + e) + "H742z";
|
|
446
|
-
},
|
|
451
|
+
}, Ha = function(e, t, a) {
|
|
447
452
|
t = 1e3 * t;
|
|
448
453
|
var n = "";
|
|
449
454
|
switch (e) {
|
|
@@ -454,16 +459,16 @@ c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
|
454
459
|
n = qa(t, Q0);
|
|
455
460
|
break;
|
|
456
461
|
case "sqrtSize2":
|
|
457
|
-
n =
|
|
462
|
+
n = Ea(t, Q0);
|
|
458
463
|
break;
|
|
459
464
|
case "sqrtSize3":
|
|
460
|
-
n =
|
|
465
|
+
n = Ra(t, Q0);
|
|
461
466
|
break;
|
|
462
467
|
case "sqrtSize4":
|
|
463
468
|
n = Ia(t, Q0);
|
|
464
469
|
break;
|
|
465
470
|
case "sqrtTall":
|
|
466
|
-
n =
|
|
471
|
+
n = Fa(t, Q0, a);
|
|
467
472
|
}
|
|
468
473
|
return n;
|
|
469
474
|
}, La = function(e, t) {
|
|
@@ -795,14 +800,14 @@ l0,-` + (t + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
|
795
800
|
throw new Error("Unknown stretchy delimiter.");
|
|
796
801
|
}
|
|
797
802
|
};
|
|
798
|
-
class
|
|
803
|
+
class ue {
|
|
799
804
|
// HtmlDomNode
|
|
800
805
|
// Never used; needed for satisfying interface.
|
|
801
806
|
constructor(e) {
|
|
802
807
|
this.children = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.children = e, this.classes = [], this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = {};
|
|
803
808
|
}
|
|
804
809
|
hasClass(e) {
|
|
805
|
-
return
|
|
810
|
+
return q.contains(this.classes, e);
|
|
806
811
|
}
|
|
807
812
|
/** Convert the fragment into a node. */
|
|
808
813
|
toNode() {
|
|
@@ -825,7 +830,7 @@ class he {
|
|
|
825
830
|
return this.children.map(e).join("");
|
|
826
831
|
}
|
|
827
832
|
}
|
|
828
|
-
var
|
|
833
|
+
var x0 = {
|
|
829
834
|
"AMS-Regular": {
|
|
830
835
|
32: [0, 0, 0, 0, 0.25],
|
|
831
836
|
65: [0, 0.68889, 0, 0, 0.72222],
|
|
@@ -2900,7 +2905,7 @@ var y0 = {
|
|
|
2900
2905
|
8242: [0, 0.61111, 0, 0, 0.525],
|
|
2901
2906
|
9251: [0.11111, 0.21944, 0, 0, 0.525]
|
|
2902
2907
|
}
|
|
2903
|
-
},
|
|
2908
|
+
}, ve = {
|
|
2904
2909
|
slant: [0.25, 0.25, 0.25],
|
|
2905
2910
|
// sigma1
|
|
2906
2911
|
space: [0, 0, 0],
|
|
@@ -2967,7 +2972,7 @@ var y0 = {
|
|
|
2967
2972
|
sqrtRuleThickness: [0.04, 0.04, 0.04],
|
|
2968
2973
|
// This value determines how large a pt is, for metrics which are defined
|
|
2969
2974
|
// in terms of pts.
|
|
2970
|
-
// This value is also used in katex.
|
|
2975
|
+
// This value is also used in katex.scss; if you change it make sure the
|
|
2971
2976
|
// values match.
|
|
2972
2977
|
ptPerEm: [10, 10, 10],
|
|
2973
2978
|
// The space between adjacent `|` columns in an array definition. From
|
|
@@ -3056,13 +3061,13 @@ var y0 = {
|
|
|
3056
3061
|
я: "r"
|
|
3057
3062
|
};
|
|
3058
3063
|
function Ga(r, e) {
|
|
3059
|
-
|
|
3064
|
+
x0[r] = e;
|
|
3060
3065
|
}
|
|
3061
3066
|
function ft(r, e, t) {
|
|
3062
|
-
if (!
|
|
3067
|
+
if (!x0[e])
|
|
3063
3068
|
throw new Error("Font metrics not found for font: " + e + ".");
|
|
3064
|
-
var a = r.charCodeAt(0), n =
|
|
3065
|
-
if (!n && r[0] in Ot && (a = Ot[r[0]].charCodeAt(0), n =
|
|
3069
|
+
var a = r.charCodeAt(0), n = x0[e][a];
|
|
3070
|
+
if (!n && r[0] in Ot && (a = Ot[r[0]].charCodeAt(0), n = x0[e][a]), !n && t === "text" && vr(a) && (n = x0[e][77]), n)
|
|
3066
3071
|
return {
|
|
3067
3072
|
depth: n[0],
|
|
3068
3073
|
height: n[1],
|
|
@@ -3076,10 +3081,10 @@ function Va(r) {
|
|
|
3076
3081
|
var e;
|
|
3077
3082
|
if (r >= 5 ? e = 0 : r >= 3 ? e = 1 : e = 2, !Ue[e]) {
|
|
3078
3083
|
var t = Ue[e] = {
|
|
3079
|
-
cssEmPerMu:
|
|
3084
|
+
cssEmPerMu: ve.quad[e] / 18
|
|
3080
3085
|
};
|
|
3081
|
-
for (var a in
|
|
3082
|
-
|
|
3086
|
+
for (var a in ve)
|
|
3087
|
+
ve.hasOwnProperty(a) && (t[a] = ve[a][e]);
|
|
3083
3088
|
}
|
|
3084
3089
|
return Ue[e];
|
|
3085
3090
|
}
|
|
@@ -3108,7 +3113,7 @@ var Ua = [
|
|
|
3108
3113
|
// size10: [20.74, 14.4, 12] \huge
|
|
3109
3114
|
[11, 10, 9]
|
|
3110
3115
|
// size11: [24.88, 20.74, 17.28] \HUGE
|
|
3111
|
-
],
|
|
3116
|
+
], Ft = [
|
|
3112
3117
|
// fontMetrics.js:getGlobalMetrics also uses size indexes, so if
|
|
3113
3118
|
// you change size indexes, change that function.
|
|
3114
3119
|
0.5,
|
|
@@ -3122,7 +3127,7 @@ var Ua = [
|
|
|
3122
3127
|
1.728,
|
|
3123
3128
|
2.074,
|
|
3124
3129
|
2.488
|
|
3125
|
-
],
|
|
3130
|
+
], Ht = function(e, t) {
|
|
3126
3131
|
return t.size < 2 ? e : Ua[e - 1][t.size - 1];
|
|
3127
3132
|
};
|
|
3128
3133
|
class A0 {
|
|
@@ -3133,7 +3138,7 @@ class A0 {
|
|
|
3133
3138
|
* The base size index.
|
|
3134
3139
|
*/
|
|
3135
3140
|
constructor(e) {
|
|
3136
|
-
this.style = void 0, this.color = void 0, this.size = void 0, this.textSize = void 0, this.phantom = void 0, this.font = void 0, this.fontFamily = void 0, this.fontWeight = void 0, this.fontShape = void 0, this.sizeMultiplier = void 0, this.maxSize = void 0, this.minRuleThickness = void 0, this._fontMetrics = void 0, this.style = e.style, this.color = e.color, this.size = e.size || A0.BASESIZE, this.textSize = e.textSize || this.size, this.phantom = !!e.phantom, this.font = e.font || "", this.fontFamily = e.fontFamily || "", this.fontWeight = e.fontWeight || "", this.fontShape = e.fontShape || "", this.sizeMultiplier =
|
|
3141
|
+
this.style = void 0, this.color = void 0, this.size = void 0, this.textSize = void 0, this.phantom = void 0, this.font = void 0, this.fontFamily = void 0, this.fontWeight = void 0, this.fontShape = void 0, this.sizeMultiplier = void 0, this.maxSize = void 0, this.minRuleThickness = void 0, this._fontMetrics = void 0, this.style = e.style, this.color = e.color, this.size = e.size || A0.BASESIZE, this.textSize = e.textSize || this.size, this.phantom = !!e.phantom, this.font = e.font || "", this.fontFamily = e.fontFamily || "", this.fontWeight = e.fontWeight || "", this.fontShape = e.fontShape || "", this.sizeMultiplier = Ft[this.size - 1], this.maxSize = e.maxSize, this.minRuleThickness = e.minRuleThickness, this._fontMetrics = void 0;
|
|
3137
3142
|
}
|
|
3138
3143
|
/**
|
|
3139
3144
|
* Returns a new options object with the same properties as "this". Properties
|
|
@@ -3164,7 +3169,7 @@ class A0 {
|
|
|
3164
3169
|
havingStyle(e) {
|
|
3165
3170
|
return this.style === e ? this : this.extend({
|
|
3166
3171
|
style: e,
|
|
3167
|
-
size:
|
|
3172
|
+
size: Ht(this.textSize, e)
|
|
3168
3173
|
});
|
|
3169
3174
|
}
|
|
3170
3175
|
/**
|
|
@@ -3183,7 +3188,7 @@ class A0 {
|
|
|
3183
3188
|
style: this.style.text(),
|
|
3184
3189
|
size: e,
|
|
3185
3190
|
textSize: e,
|
|
3186
|
-
sizeMultiplier:
|
|
3191
|
+
sizeMultiplier: Ft[e - 1]
|
|
3187
3192
|
});
|
|
3188
3193
|
}
|
|
3189
3194
|
/**
|
|
@@ -3192,7 +3197,7 @@ class A0 {
|
|
|
3192
3197
|
*/
|
|
3193
3198
|
havingBaseStyle(e) {
|
|
3194
3199
|
e = e || this.style.text();
|
|
3195
|
-
var t =
|
|
3200
|
+
var t = Ht(A0.BASESIZE, e);
|
|
3196
3201
|
return this.size === t && this.textSize === A0.BASESIZE && this.style === e ? this : this.extend({
|
|
3197
3202
|
style: e,
|
|
3198
3203
|
size: t
|
|
@@ -3374,19 +3379,19 @@ var nt = {
|
|
|
3374
3379
|
return t;
|
|
3375
3380
|
}, xr = function(e) {
|
|
3376
3381
|
var t = "<" + e;
|
|
3377
|
-
this.classes.length && (t += ' class="' +
|
|
3382
|
+
this.classes.length && (t += ' class="' + q.escape(L0(this.classes)) + '"');
|
|
3378
3383
|
var a = "";
|
|
3379
3384
|
for (var n in this.style)
|
|
3380
|
-
this.style.hasOwnProperty(n) && (a +=
|
|
3381
|
-
a && (t += ' style="' +
|
|
3385
|
+
this.style.hasOwnProperty(n) && (a += q.hyphenate(n) + ":" + this.style[n] + ";");
|
|
3386
|
+
a && (t += ' style="' + q.escape(a) + '"');
|
|
3382
3387
|
for (var s in this.attributes)
|
|
3383
|
-
this.attributes.hasOwnProperty(s) && (t += " " + s + '="' +
|
|
3388
|
+
this.attributes.hasOwnProperty(s) && (t += " " + s + '="' + q.escape(this.attributes[s]) + '"');
|
|
3384
3389
|
t += ">";
|
|
3385
3390
|
for (var o = 0; o < this.children.length; o++)
|
|
3386
3391
|
t += this.children[o].toMarkup();
|
|
3387
3392
|
return t += "</" + e + ">", t;
|
|
3388
3393
|
};
|
|
3389
|
-
class
|
|
3394
|
+
class he {
|
|
3390
3395
|
constructor(e, t, a, n) {
|
|
3391
3396
|
this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.width = void 0, this.maxFontSize = void 0, this.style = void 0, br.call(this, e, a, n), this.children = t || [];
|
|
3392
3397
|
}
|
|
@@ -3399,7 +3404,7 @@ class me {
|
|
|
3399
3404
|
this.attributes[e] = t;
|
|
3400
3405
|
}
|
|
3401
3406
|
hasClass(e) {
|
|
3402
|
-
return
|
|
3407
|
+
return q.contains(this.classes, e);
|
|
3403
3408
|
}
|
|
3404
3409
|
toNode() {
|
|
3405
3410
|
return yr.call(this, "span");
|
|
@@ -3416,7 +3421,7 @@ class pt {
|
|
|
3416
3421
|
this.attributes[e] = t;
|
|
3417
3422
|
}
|
|
3418
3423
|
hasClass(e) {
|
|
3419
|
-
return
|
|
3424
|
+
return q.contains(this.classes, e);
|
|
3420
3425
|
}
|
|
3421
3426
|
toNode() {
|
|
3422
3427
|
return yr.call(this, "a");
|
|
@@ -3430,7 +3435,7 @@ class Xa {
|
|
|
3430
3435
|
this.src = void 0, this.alt = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.alt = t, this.src = e, this.classes = ["mord"], this.style = a;
|
|
3431
3436
|
}
|
|
3432
3437
|
hasClass(e) {
|
|
3433
|
-
return
|
|
3438
|
+
return q.contains(this.classes, e);
|
|
3434
3439
|
}
|
|
3435
3440
|
toNode() {
|
|
3436
3441
|
var e = document.createElement("img");
|
|
@@ -3440,10 +3445,10 @@ class Xa {
|
|
|
3440
3445
|
return e;
|
|
3441
3446
|
}
|
|
3442
3447
|
toMarkup() {
|
|
3443
|
-
var e =
|
|
3448
|
+
var e = '<img src="' + q.escape(this.src) + '"' + (' alt="' + q.escape(this.alt) + '"'), t = "";
|
|
3444
3449
|
for (var a in this.style)
|
|
3445
|
-
this.style.hasOwnProperty(a) && (t +=
|
|
3446
|
-
return t && (e += ' style="' +
|
|
3450
|
+
this.style.hasOwnProperty(a) && (t += q.hyphenate(a) + ":" + this.style[a] + ";");
|
|
3451
|
+
return t && (e += ' style="' + q.escape(t) + '"'), e += "'/>", e;
|
|
3447
3452
|
}
|
|
3448
3453
|
}
|
|
3449
3454
|
var $a = {
|
|
@@ -3453,14 +3458,14 @@ var $a = {
|
|
|
3453
3458
|
// 'ī': '\u0131\u0304', // enable when we add Extended Latin
|
|
3454
3459
|
ì: "ı̀"
|
|
3455
3460
|
};
|
|
3456
|
-
class
|
|
3461
|
+
class p0 {
|
|
3457
3462
|
constructor(e, t, a, n, s, o, h, c) {
|
|
3458
3463
|
this.text = void 0, this.height = void 0, this.depth = void 0, this.italic = void 0, this.skew = void 0, this.width = void 0, this.maxFontSize = void 0, this.classes = void 0, this.style = void 0, this.text = e, this.height = t || 0, this.depth = a || 0, this.italic = n || 0, this.skew = s || 0, this.width = o || 0, this.classes = h || [], this.style = c || {}, this.maxFontSize = 0;
|
|
3459
3464
|
var p = Ca(this.text.charCodeAt(0));
|
|
3460
3465
|
p && this.classes.push(p + "_fallback"), /[îïíì]/.test(this.text) && (this.text = $a[this.text]);
|
|
3461
3466
|
}
|
|
3462
3467
|
hasClass(e) {
|
|
3463
|
-
return
|
|
3468
|
+
return q.contains(this.classes, e);
|
|
3464
3469
|
}
|
|
3465
3470
|
/**
|
|
3466
3471
|
* Creates a text node or span from a symbol node. Note that a span is only
|
|
@@ -3478,13 +3483,13 @@ class f0 {
|
|
|
3478
3483
|
*/
|
|
3479
3484
|
toMarkup() {
|
|
3480
3485
|
var e = !1, t = "<span";
|
|
3481
|
-
this.classes.length && (e = !0, t += ' class="', t +=
|
|
3486
|
+
this.classes.length && (e = !0, t += ' class="', t += q.escape(L0(this.classes)), t += '"');
|
|
3482
3487
|
var a = "";
|
|
3483
3488
|
this.italic > 0 && (a += "margin-right:" + this.italic + "em;");
|
|
3484
3489
|
for (var n in this.style)
|
|
3485
|
-
this.style.hasOwnProperty(n) && (a +=
|
|
3486
|
-
a && (e = !0, t += ' style="' +
|
|
3487
|
-
var s =
|
|
3490
|
+
this.style.hasOwnProperty(n) && (a += q.hyphenate(n) + ":" + this.style[n] + ";");
|
|
3491
|
+
a && (e = !0, t += ' style="' + q.escape(a) + '"');
|
|
3492
|
+
var s = q.escape(this.text);
|
|
3488
3493
|
return e ? (t += ">", t += s, t += "</span>", t) : s;
|
|
3489
3494
|
}
|
|
3490
3495
|
}
|
|
@@ -3503,7 +3508,7 @@ class D0 {
|
|
|
3503
3508
|
toMarkup() {
|
|
3504
3509
|
var e = '<svg xmlns="http://www.w3.org/2000/svg"';
|
|
3505
3510
|
for (var t in this.attributes)
|
|
3506
|
-
Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + "
|
|
3511
|
+
Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="' + q.escape(this.attributes[t]) + '"');
|
|
3507
3512
|
e += ">";
|
|
3508
3513
|
for (var a = 0; a < this.children.length; a++)
|
|
3509
3514
|
e += this.children[a].toMarkup();
|
|
@@ -3519,7 +3524,7 @@ class P0 {
|
|
|
3519
3524
|
return this.alternate ? t.setAttribute("d", this.alternate) : t.setAttribute("d", It[this.pathName]), t;
|
|
3520
3525
|
}
|
|
3521
3526
|
toMarkup() {
|
|
3522
|
-
return this.alternate ?
|
|
3527
|
+
return this.alternate ? '<path d="' + q.escape(this.alternate) + '"/>' : '<path d="' + q.escape(It[this.pathName]) + '"/>';
|
|
3523
3528
|
}
|
|
3524
3529
|
}
|
|
3525
3530
|
class it {
|
|
@@ -3535,17 +3540,17 @@ class it {
|
|
|
3535
3540
|
toMarkup() {
|
|
3536
3541
|
var e = "<line";
|
|
3537
3542
|
for (var t in this.attributes)
|
|
3538
|
-
Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + "
|
|
3543
|
+
Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="' + q.escape(this.attributes[t]) + '"');
|
|
3539
3544
|
return e += "/>", e;
|
|
3540
3545
|
}
|
|
3541
3546
|
}
|
|
3542
3547
|
function Lt(r) {
|
|
3543
|
-
if (r instanceof
|
|
3548
|
+
if (r instanceof p0)
|
|
3544
3549
|
return r;
|
|
3545
3550
|
throw new Error("Expected symbolNode but got " + String(r) + ".");
|
|
3546
3551
|
}
|
|
3547
3552
|
function Wa(r) {
|
|
3548
|
-
if (r instanceof
|
|
3553
|
+
if (r instanceof he)
|
|
3549
3554
|
return r;
|
|
3550
3555
|
throw new Error("Expected span<HtmlDomNode> but got " + String(r) + ".");
|
|
3551
3556
|
}
|
|
@@ -3573,7 +3578,7 @@ function i(r, e, t, a, n, s) {
|
|
|
3573
3578
|
replace: a
|
|
3574
3579
|
}, s && a && ($[r][a] = $[r][n]);
|
|
3575
3580
|
}
|
|
3576
|
-
var l = "math", k = "text", u = "main", d = "ams", W = "accent-token", D = "bin", i0 = "close", te = "inner",
|
|
3581
|
+
var l = "math", k = "text", u = "main", d = "ams", W = "accent-token", D = "bin", i0 = "close", te = "inner", E = "mathord", _ = "op-token", h0 = "open", qe = "punct", f = "rel", q0 = "spacing", v = "textord";
|
|
3577
3582
|
i(l, u, f, "≡", "\\equiv", !0);
|
|
3578
3583
|
i(l, u, f, "≺", "\\prec", !0);
|
|
3579
3584
|
i(l, u, f, "≻", "\\succ", !0);
|
|
@@ -3598,8 +3603,8 @@ i(l, u, f, "∝", "\\propto", !0);
|
|
|
3598
3603
|
i(l, u, f, "⊢", "\\vdash", !0);
|
|
3599
3604
|
i(l, u, f, "⊣", "\\dashv", !0);
|
|
3600
3605
|
i(l, u, f, "∋", "\\owns");
|
|
3601
|
-
i(l, u,
|
|
3602
|
-
i(l, u,
|
|
3606
|
+
i(l, u, qe, ".", "\\ldotp");
|
|
3607
|
+
i(l, u, qe, "⋅", "\\cdotp");
|
|
3603
3608
|
i(l, u, v, "#", "\\#");
|
|
3604
3609
|
i(k, u, v, "#", "\\#");
|
|
3605
3610
|
i(l, u, v, "&", "\\&");
|
|
@@ -3938,36 +3943,36 @@ i(l, u, v, "⊤", "\\top");
|
|
|
3938
3943
|
i(l, u, v, "⊥", "\\bot");
|
|
3939
3944
|
i(l, u, v, "∅", "\\emptyset");
|
|
3940
3945
|
i(l, d, v, "∅", "\\varnothing");
|
|
3941
|
-
i(l, u,
|
|
3942
|
-
i(l, u,
|
|
3943
|
-
i(l, u,
|
|
3944
|
-
i(l, u,
|
|
3945
|
-
i(l, u,
|
|
3946
|
-
i(l, u,
|
|
3947
|
-
i(l, u,
|
|
3948
|
-
i(l, u,
|
|
3949
|
-
i(l, u,
|
|
3950
|
-
i(l, u,
|
|
3951
|
-
i(l, u,
|
|
3952
|
-
i(l, u,
|
|
3953
|
-
i(l, u,
|
|
3954
|
-
i(l, u,
|
|
3955
|
-
i(l, u,
|
|
3956
|
-
i(l, u,
|
|
3957
|
-
i(l, u,
|
|
3958
|
-
i(l, u,
|
|
3959
|
-
i(l, u,
|
|
3960
|
-
i(l, u,
|
|
3961
|
-
i(l, u,
|
|
3962
|
-
i(l, u,
|
|
3963
|
-
i(l, u,
|
|
3964
|
-
i(l, u,
|
|
3965
|
-
i(l, u,
|
|
3966
|
-
i(l, u,
|
|
3967
|
-
i(l, u,
|
|
3968
|
-
i(l, u,
|
|
3969
|
-
i(l, u,
|
|
3970
|
-
i(l, u,
|
|
3946
|
+
i(l, u, E, "α", "\\alpha", !0);
|
|
3947
|
+
i(l, u, E, "β", "\\beta", !0);
|
|
3948
|
+
i(l, u, E, "γ", "\\gamma", !0);
|
|
3949
|
+
i(l, u, E, "δ", "\\delta", !0);
|
|
3950
|
+
i(l, u, E, "ϵ", "\\epsilon", !0);
|
|
3951
|
+
i(l, u, E, "ζ", "\\zeta", !0);
|
|
3952
|
+
i(l, u, E, "η", "\\eta", !0);
|
|
3953
|
+
i(l, u, E, "θ", "\\theta", !0);
|
|
3954
|
+
i(l, u, E, "ι", "\\iota", !0);
|
|
3955
|
+
i(l, u, E, "κ", "\\kappa", !0);
|
|
3956
|
+
i(l, u, E, "λ", "\\lambda", !0);
|
|
3957
|
+
i(l, u, E, "μ", "\\mu", !0);
|
|
3958
|
+
i(l, u, E, "ν", "\\nu", !0);
|
|
3959
|
+
i(l, u, E, "ξ", "\\xi", !0);
|
|
3960
|
+
i(l, u, E, "ο", "\\omicron", !0);
|
|
3961
|
+
i(l, u, E, "π", "\\pi", !0);
|
|
3962
|
+
i(l, u, E, "ρ", "\\rho", !0);
|
|
3963
|
+
i(l, u, E, "σ", "\\sigma", !0);
|
|
3964
|
+
i(l, u, E, "τ", "\\tau", !0);
|
|
3965
|
+
i(l, u, E, "υ", "\\upsilon", !0);
|
|
3966
|
+
i(l, u, E, "ϕ", "\\phi", !0);
|
|
3967
|
+
i(l, u, E, "χ", "\\chi", !0);
|
|
3968
|
+
i(l, u, E, "ψ", "\\psi", !0);
|
|
3969
|
+
i(l, u, E, "ω", "\\omega", !0);
|
|
3970
|
+
i(l, u, E, "ε", "\\varepsilon", !0);
|
|
3971
|
+
i(l, u, E, "ϑ", "\\vartheta", !0);
|
|
3972
|
+
i(l, u, E, "ϖ", "\\varpi", !0);
|
|
3973
|
+
i(l, u, E, "ϱ", "\\varrho", !0);
|
|
3974
|
+
i(l, u, E, "ς", "\\varsigma", !0);
|
|
3975
|
+
i(l, u, E, "φ", "\\varphi", !0);
|
|
3971
3976
|
i(l, u, D, "∗", "*", !0);
|
|
3972
3977
|
i(l, u, D, "+", "+");
|
|
3973
3978
|
i(l, u, D, "−", "-", !0);
|
|
@@ -4026,8 +4031,8 @@ i(k, u, q0, " ", "\\space");
|
|
|
4026
4031
|
i(k, u, q0, " ", "\\nobreakspace");
|
|
4027
4032
|
i(l, u, q0, null, "\\nobreak");
|
|
4028
4033
|
i(l, u, q0, null, "\\allowbreak");
|
|
4029
|
-
i(l, u,
|
|
4030
|
-
i(l, u,
|
|
4034
|
+
i(l, u, qe, ",", ",");
|
|
4035
|
+
i(l, u, qe, ";", ";");
|
|
4031
4036
|
i(l, d, D, "⊼", "\\barwedge", !0);
|
|
4032
4037
|
i(l, d, D, "⊻", "\\veebar", !0);
|
|
4033
4038
|
i(l, u, D, "⊙", "\\odot", !0);
|
|
@@ -4107,6 +4112,7 @@ i(l, u, te, "…", "\\ldots", !0);
|
|
|
4107
4112
|
i(l, u, te, "⋯", "\\@cdots", !0);
|
|
4108
4113
|
i(l, u, te, "⋱", "\\ddots", !0);
|
|
4109
4114
|
i(l, u, v, "⋮", "\\varvdots");
|
|
4115
|
+
i(k, u, v, "⋮", "\\varvdots");
|
|
4110
4116
|
i(l, u, W, "ˊ", "\\acute");
|
|
4111
4117
|
i(l, u, W, "ˋ", "\\grave");
|
|
4112
4118
|
i(l, u, W, "¨", "\\ddot");
|
|
@@ -4118,8 +4124,8 @@ i(l, u, W, "^", "\\hat");
|
|
|
4118
4124
|
i(l, u, W, "⃗", "\\vec");
|
|
4119
4125
|
i(l, u, W, "˙", "\\dot");
|
|
4120
4126
|
i(l, u, W, "˚", "\\mathring");
|
|
4121
|
-
i(l, u,
|
|
4122
|
-
i(l, u,
|
|
4127
|
+
i(l, u, E, "", "\\@imath");
|
|
4128
|
+
i(l, u, E, "", "\\@jmath");
|
|
4123
4129
|
i(l, u, v, "ı", "ı");
|
|
4124
4130
|
i(l, u, v, "ȷ", "ȷ");
|
|
4125
4131
|
i(k, u, v, "ı", "\\i", !0);
|
|
@@ -4181,10 +4187,10 @@ for (var Xe = 0; Xe < Vt.length; Xe++) {
|
|
|
4181
4187
|
var Ut = Vt.charAt(Xe);
|
|
4182
4188
|
i(k, u, v, Ut, Ut);
|
|
4183
4189
|
}
|
|
4184
|
-
var
|
|
4185
|
-
for (var $e = 0; $e <
|
|
4186
|
-
var
|
|
4187
|
-
i(l, u,
|
|
4190
|
+
var Be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
4191
|
+
for (var $e = 0; $e < Be.length; $e++) {
|
|
4192
|
+
var ge = Be.charAt($e);
|
|
4193
|
+
i(l, u, E, ge, ge), i(k, u, v, ge, ge);
|
|
4188
4194
|
}
|
|
4189
4195
|
i(l, d, v, "C", "ℂ");
|
|
4190
4196
|
i(k, d, v, "C", "ℂ");
|
|
@@ -4200,26 +4206,26 @@ i(l, d, v, "R", "ℝ");
|
|
|
4200
4206
|
i(k, d, v, "R", "ℝ");
|
|
4201
4207
|
i(l, d, v, "Z", "ℤ");
|
|
4202
4208
|
i(k, d, v, "Z", "ℤ");
|
|
4203
|
-
i(l, u,
|
|
4204
|
-
i(k, u,
|
|
4205
|
-
var
|
|
4206
|
-
for (var a0 = 0; a0 <
|
|
4207
|
-
var J =
|
|
4208
|
-
|
|
4209
|
+
i(l, u, E, "h", "ℎ");
|
|
4210
|
+
i(k, u, E, "h", "ℎ");
|
|
4211
|
+
var I = "";
|
|
4212
|
+
for (var a0 = 0; a0 < Be.length; a0++) {
|
|
4213
|
+
var J = Be.charAt(a0);
|
|
4214
|
+
I = String.fromCharCode(55349, 56320 + a0), i(l, u, E, J, I), i(k, u, v, J, I), I = String.fromCharCode(55349, 56372 + a0), i(l, u, E, J, I), i(k, u, v, J, I), I = String.fromCharCode(55349, 56424 + a0), i(l, u, E, J, I), i(k, u, v, J, I), I = String.fromCharCode(55349, 56580 + a0), i(l, u, E, J, I), i(k, u, v, J, I), I = String.fromCharCode(55349, 56684 + a0), i(l, u, E, J, I), i(k, u, v, J, I), I = String.fromCharCode(55349, 56736 + a0), i(l, u, E, J, I), i(k, u, v, J, I), I = String.fromCharCode(55349, 56788 + a0), i(l, u, E, J, I), i(k, u, v, J, I), I = String.fromCharCode(55349, 56840 + a0), i(l, u, E, J, I), i(k, u, v, J, I), I = String.fromCharCode(55349, 56944 + a0), i(l, u, E, J, I), i(k, u, v, J, I), a0 < 26 && (I = String.fromCharCode(55349, 56632 + a0), i(l, u, E, J, I), i(k, u, v, J, I), I = String.fromCharCode(55349, 56476 + a0), i(l, u, E, J, I), i(k, u, v, J, I));
|
|
4209
4215
|
}
|
|
4210
|
-
|
|
4211
|
-
i(l, u,
|
|
4212
|
-
i(k, u, v, "k",
|
|
4216
|
+
I = "𝕜";
|
|
4217
|
+
i(l, u, E, "k", I);
|
|
4218
|
+
i(k, u, v, "k", I);
|
|
4213
4219
|
for (var Y0 = 0; Y0 < 10; Y0++) {
|
|
4214
|
-
var
|
|
4215
|
-
|
|
4220
|
+
var F0 = Y0.toString();
|
|
4221
|
+
I = String.fromCharCode(55349, 57294 + Y0), i(l, u, E, F0, I), i(k, u, v, F0, I), I = String.fromCharCode(55349, 57314 + Y0), i(l, u, E, F0, I), i(k, u, v, F0, I), I = String.fromCharCode(55349, 57324 + Y0), i(l, u, E, F0, I), i(k, u, v, F0, I), I = String.fromCharCode(55349, 57334 + Y0), i(l, u, E, F0, I), i(k, u, v, F0, I);
|
|
4216
4222
|
}
|
|
4217
4223
|
var st = "ÐÞþ";
|
|
4218
4224
|
for (var We = 0; We < st.length; We++) {
|
|
4219
|
-
var
|
|
4220
|
-
i(l, u,
|
|
4225
|
+
var be = st.charAt(We);
|
|
4226
|
+
i(l, u, E, be, be), i(k, u, v, be, be);
|
|
4221
4227
|
}
|
|
4222
|
-
var
|
|
4228
|
+
var ye = [
|
|
4223
4229
|
["mathbf", "textbf", "Main-Bold"],
|
|
4224
4230
|
// A-Z bold upright
|
|
4225
4231
|
["mathbf", "textbf", "Main-Bold"],
|
|
@@ -4290,13 +4296,13 @@ var xe = [
|
|
|
4290
4296
|
var a = e.charCodeAt(0), n = e.charCodeAt(1), s = (a - 55296) * 1024 + (n - 56320) + 65536, o = t === "math" ? 0 : 1;
|
|
4291
4297
|
if (119808 <= s && s < 120484) {
|
|
4292
4298
|
var h = Math.floor((s - 119808) / 26);
|
|
4293
|
-
return [
|
|
4299
|
+
return [ye[h][2], ye[h][o]];
|
|
4294
4300
|
} else if (120782 <= s && s <= 120831) {
|
|
4295
4301
|
var c = Math.floor((s - 120782) / 10);
|
|
4296
4302
|
return [Yt[c][2], Yt[c][o]];
|
|
4297
4303
|
} else {
|
|
4298
4304
|
if (s === 120485 || s === 120486)
|
|
4299
|
-
return [
|
|
4305
|
+
return [ye[0][2], ye[0][o]];
|
|
4300
4306
|
if (120486 < s && s < 120782)
|
|
4301
4307
|
return ["", ""];
|
|
4302
4308
|
throw new M("Unsupported character: " + e);
|
|
@@ -4306,15 +4312,15 @@ var xe = [
|
|
|
4306
4312
|
value: e,
|
|
4307
4313
|
metrics: ft(e, t, a)
|
|
4308
4314
|
};
|
|
4309
|
-
},
|
|
4315
|
+
}, b0 = function(e, t, a, n, s) {
|
|
4310
4316
|
var o = Ee(e, t, a), h = o.metrics;
|
|
4311
4317
|
e = o.value;
|
|
4312
4318
|
var c;
|
|
4313
4319
|
if (h) {
|
|
4314
4320
|
var p = h.italic;
|
|
4315
|
-
(a === "text" || n && n.font === "mathit") && (p = 0), c = new
|
|
4321
|
+
(a === "text" || n && n.font === "mathit") && (p = 0), c = new p0(e, h.height, h.depth, p, h.skew, h.width, s);
|
|
4316
4322
|
} else
|
|
4317
|
-
typeof console < "u" && console.warn("No character metrics " + ("for '" + e + "' in style '" + t + "' and mode '" + a + "'")), c = new
|
|
4323
|
+
typeof console < "u" && console.warn("No character metrics " + ("for '" + e + "' in style '" + t + "' and mode '" + a + "'")), c = new p0(e, 0, 0, 0, 0, 0, s);
|
|
4318
4324
|
if (n) {
|
|
4319
4325
|
c.maxFontSize = n.sizeMultiplier, n.style.isTight() && c.classes.push("mtight");
|
|
4320
4326
|
var g = n.getColor();
|
|
@@ -4322,7 +4328,7 @@ var xe = [
|
|
|
4322
4328
|
}
|
|
4323
4329
|
return c;
|
|
4324
4330
|
}, Ja = function(e, t, a, n) {
|
|
4325
|
-
return n === void 0 && (n = []), a.font === "boldsymbol" && Ee(e, "Main-Bold", t).metrics ?
|
|
4331
|
+
return n === void 0 && (n = []), a.font === "boldsymbol" && Ee(e, "Main-Bold", t).metrics ? b0(e, "Main-Bold", t, a, n.concat(["mathbf"])) : e === "\\" || $[t][e].font === "main" ? b0(e, "Main-Regular", t, a, n) : b0(e, "AMS-Regular", t, a, n.concat(["amsrm"]));
|
|
4326
4332
|
}, Qa = function(e, t, a, n, s) {
|
|
4327
4333
|
return s !== "textord" && Ee(e, "Math-BoldItalic", t).metrics ? {
|
|
4328
4334
|
fontName: "Math-BoldItalic",
|
|
@@ -4334,35 +4340,34 @@ var xe = [
|
|
|
4334
4340
|
}, _a = function(e, t, a) {
|
|
4335
4341
|
var n = e.mode, s = e.text, o = ["mord"], h = n === "math" || n === "text" && t.font, c = h ? t.font : t.fontFamily, p = "", g = "";
|
|
4336
4342
|
if (s.charCodeAt(0) === 55349 && ([p, g] = Ka(s, n)), p.length > 0)
|
|
4337
|
-
return
|
|
4343
|
+
return b0(s, p, n, t, o.concat(g));
|
|
4338
4344
|
if (c) {
|
|
4339
4345
|
var y, w;
|
|
4340
4346
|
if (c === "boldsymbol") {
|
|
4341
4347
|
var x = Qa(s, n, t, o, a);
|
|
4342
4348
|
y = x.fontName, w = [x.fontClass];
|
|
4343
|
-
} else
|
|
4344
|
-
h ? (y = Mr[c].fontName, w = [c]) : (y = we(c, t.fontWeight, t.fontShape), w = [c, t.fontWeight, t.fontShape]);
|
|
4349
|
+
} else h ? (y = Mr[c].fontName, w = [c]) : (y = xe(c, t.fontWeight, t.fontShape), w = [c, t.fontWeight, t.fontShape]);
|
|
4345
4350
|
if (Ee(s, y, n).metrics)
|
|
4346
|
-
return
|
|
4351
|
+
return b0(s, y, n, t, o.concat(w));
|
|
4347
4352
|
if (wr.hasOwnProperty(s) && y.slice(0, 10) === "Typewriter") {
|
|
4348
4353
|
for (var z = [], T = 0; T < s.length; T++)
|
|
4349
|
-
z.push(
|
|
4354
|
+
z.push(b0(s[T], y, n, t, o.concat(w)));
|
|
4350
4355
|
return Sr(z);
|
|
4351
4356
|
}
|
|
4352
4357
|
}
|
|
4353
4358
|
if (a === "mathord")
|
|
4354
|
-
return
|
|
4359
|
+
return b0(s, "Math-Italic", n, t, o.concat(["mathnormal"]));
|
|
4355
4360
|
if (a === "textord") {
|
|
4356
4361
|
var C = $[n][s] && $[n][s].font;
|
|
4357
4362
|
if (C === "ams") {
|
|
4358
|
-
var N =
|
|
4359
|
-
return
|
|
4363
|
+
var N = xe("amsrm", t.fontWeight, t.fontShape);
|
|
4364
|
+
return b0(s, N, n, t, o.concat("amsrm", t.fontWeight, t.fontShape));
|
|
4360
4365
|
} else if (C === "main" || !C) {
|
|
4361
|
-
var O =
|
|
4362
|
-
return
|
|
4366
|
+
var O = xe("textrm", t.fontWeight, t.fontShape);
|
|
4367
|
+
return b0(s, O, n, t, o.concat(t.fontWeight, t.fontShape));
|
|
4363
4368
|
} else {
|
|
4364
|
-
var
|
|
4365
|
-
return
|
|
4369
|
+
var F = xe(C, t.fontWeight, t.fontShape);
|
|
4370
|
+
return b0(s, F, n, t, o.concat(F, t.fontWeight, t.fontShape));
|
|
4366
4371
|
}
|
|
4367
4372
|
} else
|
|
4368
4373
|
throw new Error("unexpected type: " + a + " in makeOrd");
|
|
@@ -4384,7 +4389,7 @@ var xe = [
|
|
|
4384
4389
|
}, t1 = (r) => {
|
|
4385
4390
|
for (var e = 0; e < r.length - 1; e++) {
|
|
4386
4391
|
var t = r[e], a = r[e + 1];
|
|
4387
|
-
t instanceof
|
|
4392
|
+
t instanceof p0 && a instanceof p0 && e1(t, a) && (t.text += a.text, t.height = Math.max(t.height, a.height), t.depth = Math.max(t.depth, a.depth), t.italic = a.italic, r.splice(e + 1, 1), e--);
|
|
4388
4393
|
}
|
|
4389
4394
|
return r;
|
|
4390
4395
|
}, vt = function(e) {
|
|
@@ -4394,19 +4399,19 @@ var xe = [
|
|
|
4394
4399
|
}
|
|
4395
4400
|
e.height = t, e.depth = a, e.maxFontSize = n;
|
|
4396
4401
|
}, l0 = function(e, t, a, n) {
|
|
4397
|
-
var s = new
|
|
4402
|
+
var s = new he(e, t, a, n);
|
|
4398
4403
|
return vt(s), s;
|
|
4399
|
-
}, kr = (r, e, t, a) => new
|
|
4404
|
+
}, kr = (r, e, t, a) => new he(r, e, t, a), r1 = function(e, t, a) {
|
|
4400
4405
|
var n = l0([e], [], t);
|
|
4401
4406
|
return n.height = Math.max(a || t.fontMetrics().defaultRuleThickness, t.minRuleThickness), n.style.borderBottomWidth = A(n.height), n.maxFontSize = 1, n;
|
|
4402
4407
|
}, a1 = function(e, t, a, n) {
|
|
4403
4408
|
var s = new pt(e, t, a, n);
|
|
4404
4409
|
return vt(s), s;
|
|
4405
4410
|
}, Sr = function(e) {
|
|
4406
|
-
var t = new
|
|
4411
|
+
var t = new ue(e);
|
|
4407
4412
|
return vt(t), t;
|
|
4408
4413
|
}, n1 = function(e, t) {
|
|
4409
|
-
return e instanceof
|
|
4414
|
+
return e instanceof ue ? l0([], [e], t) : e;
|
|
4410
4415
|
}, i1 = function(e) {
|
|
4411
4416
|
if (e.positionType === "individualShift") {
|
|
4412
4417
|
for (var t = e.children, a = [t[0]], n = -t[0].shift - t[0].elem.depth, s = n, o = 1; o < t.length; o++) {
|
|
@@ -4464,8 +4469,8 @@ var xe = [
|
|
|
4464
4469
|
if (T.type === "kern")
|
|
4465
4470
|
x += T.size;
|
|
4466
4471
|
else {
|
|
4467
|
-
var C = T.elem, N = T.wrapperClasses || [], O = T.wrapperStyle || {},
|
|
4468
|
-
|
|
4472
|
+
var C = T.elem, N = T.wrapperClasses || [], O = T.wrapperStyle || {}, F = l0(N, [p, C], void 0, O);
|
|
4473
|
+
F.style.top = A(-s - x - C.depth), T.marginLeft && (F.style.marginLeft = T.marginLeft), T.marginRight && (F.style.marginRight = T.marginRight), g.push(F), x += C.height + C.depth;
|
|
4469
4474
|
}
|
|
4470
4475
|
y = Math.min(y, x), w = Math.max(w, x);
|
|
4471
4476
|
}
|
|
@@ -4475,7 +4480,7 @@ var xe = [
|
|
|
4475
4480
|
if (y < 0) {
|
|
4476
4481
|
var U = l0([], []), G = l0(["vlist"], [U]);
|
|
4477
4482
|
G.style.height = A(-y);
|
|
4478
|
-
var j = l0(["vlist-s"], [new
|
|
4483
|
+
var j = l0(["vlist-s"], [new p0("")]);
|
|
4479
4484
|
L = [l0(["vlist-r"], [V, j]), l0(["vlist-r"], [G])];
|
|
4480
4485
|
} else
|
|
4481
4486
|
L = [l0(["vlist-r"], [V])];
|
|
@@ -4484,7 +4489,7 @@ var xe = [
|
|
|
4484
4489
|
}, l1 = (r, e) => {
|
|
4485
4490
|
var t = l0(["mspace"], [], e), a = K(r, e);
|
|
4486
4491
|
return t.style.marginRight = A(a), t;
|
|
4487
|
-
},
|
|
4492
|
+
}, xe = function(e, t, a) {
|
|
4488
4493
|
var n = "";
|
|
4489
4494
|
switch (e) {
|
|
4490
4495
|
case "amsrm":
|
|
@@ -4526,6 +4531,10 @@ var xe = [
|
|
|
4526
4531
|
variant: "italic",
|
|
4527
4532
|
fontName: "Math-Italic"
|
|
4528
4533
|
},
|
|
4534
|
+
mathsfit: {
|
|
4535
|
+
variant: "sans-serif-italic",
|
|
4536
|
+
fontName: "SansSerif-Italic"
|
|
4537
|
+
},
|
|
4529
4538
|
// "boldsymbol" is missing because they require the use of multiple fonts:
|
|
4530
4539
|
// Math-BoldItalic and Main-Bold. This is handled by a special case in
|
|
4531
4540
|
// makeOrd which ends up calling boldsymbol.
|
|
@@ -4575,7 +4584,7 @@ var xe = [
|
|
|
4575
4584
|
return c.height = s, c.style.height = A(s), c.style.width = A(n), c;
|
|
4576
4585
|
}, b = {
|
|
4577
4586
|
fontMap: Mr,
|
|
4578
|
-
makeSymbol:
|
|
4587
|
+
makeSymbol: b0,
|
|
4579
4588
|
mathsym: Ja,
|
|
4580
4589
|
makeSpan: l0,
|
|
4581
4590
|
makeSvgSpan: kr,
|
|
@@ -4666,7 +4675,7 @@ var xe = [
|
|
|
4666
4675
|
minner: {
|
|
4667
4676
|
mop: Z
|
|
4668
4677
|
}
|
|
4669
|
-
}, Ar = {},
|
|
4678
|
+
}, Ar = {}, De = {}, Ce = {};
|
|
4670
4679
|
function B(r) {
|
|
4671
4680
|
for (var {
|
|
4672
4681
|
type: e,
|
|
@@ -4688,7 +4697,7 @@ function B(r) {
|
|
|
4688
4697
|
handler: n
|
|
4689
4698
|
}, c = 0; c < t.length; ++c)
|
|
4690
4699
|
Ar[t[c]] = h;
|
|
4691
|
-
e && (s && (
|
|
4700
|
+
e && (s && (De[e] = s), o && (Ce[e] = o));
|
|
4692
4701
|
}
|
|
4693
4702
|
function $0(r) {
|
|
4694
4703
|
var {
|
|
@@ -4709,7 +4718,7 @@ function $0(r) {
|
|
|
4709
4718
|
mathmlBuilder: a
|
|
4710
4719
|
});
|
|
4711
4720
|
}
|
|
4712
|
-
var
|
|
4721
|
+
var Ne = function(e) {
|
|
4713
4722
|
return e.type === "ordgroup" && e.body.length === 1 ? e.body[0] : e;
|
|
4714
4723
|
}, Q = function(e) {
|
|
4715
4724
|
return e.type === "ordgroup" ? e.body : [e];
|
|
@@ -4731,7 +4740,7 @@ var qe = function(e) {
|
|
|
4731
4740
|
n === void 0 && (n = [null, null]);
|
|
4732
4741
|
for (var s = [], o = 0; o < e.length; o++) {
|
|
4733
4742
|
var h = P(e[o], t);
|
|
4734
|
-
if (h instanceof
|
|
4743
|
+
if (h instanceof ue) {
|
|
4735
4744
|
var c = h.children;
|
|
4736
4745
|
s.push(...c);
|
|
4737
4746
|
} else
|
|
@@ -4747,7 +4756,7 @@ var qe = function(e) {
|
|
|
4747
4756
|
var y = C0([n[0] || "leftmost"], [], t), w = C0([n[1] || "rightmost"], [], t), x = a === "root";
|
|
4748
4757
|
return Xt(s, (z, T) => {
|
|
4749
4758
|
var C = T.classes[0], N = z.classes[0];
|
|
4750
|
-
C === "mbin" &&
|
|
4759
|
+
C === "mbin" && q.contains(c1, N) ? T.classes[0] = "mord" : N === "mbin" && q.contains(m1, C) && (z.classes[0] = "mord");
|
|
4751
4760
|
}, {
|
|
4752
4761
|
node: y
|
|
4753
4762
|
}, w, x), Xt(s, (z, T) => {
|
|
@@ -4776,7 +4785,7 @@ var qe = function(e) {
|
|
|
4776
4785
|
}
|
|
4777
4786
|
n && e.pop();
|
|
4778
4787
|
}, Tr = function(e) {
|
|
4779
|
-
return e instanceof
|
|
4788
|
+
return e instanceof ue || e instanceof pt || e instanceof he && e.hasClass("enclosing") ? e : null;
|
|
4780
4789
|
}, p1 = function r(e, t) {
|
|
4781
4790
|
var a = Tr(e);
|
|
4782
4791
|
if (a) {
|
|
@@ -4797,8 +4806,8 @@ var qe = function(e) {
|
|
|
4797
4806
|
}, P = function(e, t, a) {
|
|
4798
4807
|
if (!e)
|
|
4799
4808
|
return C0();
|
|
4800
|
-
if (
|
|
4801
|
-
var n =
|
|
4809
|
+
if (De[e.type]) {
|
|
4810
|
+
var n = De[e.type](e, t);
|
|
4802
4811
|
if (a && t.size !== a.size) {
|
|
4803
4812
|
n = C0(t.sizingClasses(a), [n], t);
|
|
4804
4813
|
var s = t.sizeMultiplier / a.sizeMultiplier;
|
|
@@ -4808,7 +4817,7 @@ var qe = function(e) {
|
|
|
4808
4817
|
} else
|
|
4809
4818
|
throw new M("Got group of unknown type: '" + e.type + "'");
|
|
4810
4819
|
};
|
|
4811
|
-
function
|
|
4820
|
+
function we(r, e) {
|
|
4812
4821
|
var t = C0(["base"], r, e), a = C0(["strut"]);
|
|
4813
4822
|
return a.style.height = A(t.height + t.depth), t.depth && (a.style.verticalAlign = A(-t.depth)), t.children.unshift(a), t;
|
|
4814
4823
|
}
|
|
@@ -4821,12 +4830,11 @@ function ot(r, e) {
|
|
|
4821
4830
|
if (o.push(a[h]), a[h].hasClass("mbin") || a[h].hasClass("mrel") || a[h].hasClass("allowbreak")) {
|
|
4822
4831
|
for (var c = !1; h < a.length - 1 && a[h + 1].hasClass("mspace") && !a[h + 1].hasClass("newline"); )
|
|
4823
4832
|
h++, o.push(a[h]), a[h].hasClass("nobreak") && (c = !0);
|
|
4824
|
-
c || (s.push(
|
|
4825
|
-
} else
|
|
4826
|
-
|
|
4827
|
-
o.length > 0 && s.push(ke(o, e));
|
|
4833
|
+
c || (s.push(we(o, e)), o = []);
|
|
4834
|
+
} else a[h].hasClass("newline") && (o.pop(), o.length > 0 && (s.push(we(o, e)), o = []), s.push(a[h]));
|
|
4835
|
+
o.length > 0 && s.push(we(o, e));
|
|
4828
4836
|
var p;
|
|
4829
|
-
t ? (p =
|
|
4837
|
+
t ? (p = we(t0(t, e, !0)), p.classes = ["tag"], s.push(p)) : n && s.push(n);
|
|
4830
4838
|
var g = C0(["katex-html"], s);
|
|
4831
4839
|
if (g.setAttribute("aria-hidden", "true"), p) {
|
|
4832
4840
|
var y = p.children[0];
|
|
@@ -4835,7 +4843,7 @@ function ot(r, e) {
|
|
|
4835
4843
|
return g;
|
|
4836
4844
|
}
|
|
4837
4845
|
function Br(r) {
|
|
4838
|
-
return new
|
|
4846
|
+
return new ue(r);
|
|
4839
4847
|
}
|
|
4840
4848
|
class c0 {
|
|
4841
4849
|
constructor(e, t, a) {
|
|
@@ -4872,8 +4880,8 @@ class c0 {
|
|
|
4872
4880
|
toMarkup() {
|
|
4873
4881
|
var e = "<" + this.type;
|
|
4874
4882
|
for (var t in this.attributes)
|
|
4875
|
-
Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="', e +=
|
|
4876
|
-
this.classes.length > 0 && (e += ' class ="' +
|
|
4883
|
+
Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="', e += q.escape(this.attributes[t]), e += '"');
|
|
4884
|
+
this.classes.length > 0 && (e += ' class ="' + q.escape(L0(this.classes)) + '"'), e += ">";
|
|
4877
4885
|
for (var a = 0; a < this.children.length; a++)
|
|
4878
4886
|
e += this.children[a].toMarkup();
|
|
4879
4887
|
return e += "</" + this.type + ">", e;
|
|
@@ -4900,7 +4908,7 @@ class ie {
|
|
|
4900
4908
|
* (representing the text itself).
|
|
4901
4909
|
*/
|
|
4902
4910
|
toMarkup() {
|
|
4903
|
-
return
|
|
4911
|
+
return q.escape(this.toText());
|
|
4904
4912
|
}
|
|
4905
4913
|
/**
|
|
4906
4914
|
* Converts the text node into a string
|
|
@@ -4944,7 +4952,7 @@ var S = {
|
|
|
4944
4952
|
TextNode: ie,
|
|
4945
4953
|
SpaceNode: v1,
|
|
4946
4954
|
newDocumentFragment: Br
|
|
4947
|
-
},
|
|
4955
|
+
}, v0 = function(e, t, a) {
|
|
4948
4956
|
return $[t][e] && $[t][e].replace && e.charCodeAt(0) !== 55349 && !(wr.hasOwnProperty(e) && a && (a.fontFamily && a.fontFamily.slice(4, 6) === "tt" || a.font && a.font.slice(4, 6) === "tt")) && (e = $[t][e].replace), new S.TextNode(e);
|
|
4949
4957
|
}, gt = function(e) {
|
|
4950
4958
|
return e.length === 1 ? e[0] : new S.MathNode("mrow", e);
|
|
@@ -4971,6 +4979,8 @@ var S = {
|
|
|
4971
4979
|
return "bold";
|
|
4972
4980
|
if (a === "mathbb")
|
|
4973
4981
|
return "double-struck";
|
|
4982
|
+
if (a === "mathsfit")
|
|
4983
|
+
return "sans-serif-italic";
|
|
4974
4984
|
if (a === "mathfrak")
|
|
4975
4985
|
return "fraktur";
|
|
4976
4986
|
if (a === "mathscr" || a === "mathcal")
|
|
@@ -4980,7 +4990,7 @@ var S = {
|
|
|
4980
4990
|
if (a === "mathtt")
|
|
4981
4991
|
return "monospace";
|
|
4982
4992
|
var s = e.text;
|
|
4983
|
-
if (
|
|
4993
|
+
if (q.contains(["\\imath", "\\jmath"], s))
|
|
4984
4994
|
return null;
|
|
4985
4995
|
$[n][s] && $[n][s].replace && (s = $[n][s].replace);
|
|
4986
4996
|
var o = b.fontMap[a].fontName;
|
|
@@ -5021,15 +5031,15 @@ var S = {
|
|
|
5021
5031
|
}, X = function(e, t) {
|
|
5022
5032
|
if (!e)
|
|
5023
5033
|
return new S.MathNode("mrow");
|
|
5024
|
-
if (
|
|
5025
|
-
var a =
|
|
5034
|
+
if (Ce[e.type]) {
|
|
5035
|
+
var a = Ce[e.type](e, t);
|
|
5026
5036
|
return a;
|
|
5027
5037
|
} else
|
|
5028
5038
|
throw new M("Got group of unknown type: '" + e.type + "'");
|
|
5029
5039
|
};
|
|
5030
5040
|
function $t(r, e, t, a, n) {
|
|
5031
5041
|
var s = o0(r, t), o;
|
|
5032
|
-
s.length === 1 && s[0] instanceof c0 &&
|
|
5042
|
+
s.length === 1 && s[0] instanceof c0 && q.contains(["mrow", "mtable"], s[0].type) ? o = s[0] : o = new S.MathNode("mrow", s);
|
|
5033
5043
|
var h = new S.MathNode("annotation", [new S.TextNode(e)]);
|
|
5034
5044
|
h.setAttribute("encoding", "application/x-tex");
|
|
5035
5045
|
var c = new S.MathNode("semantics", [o, h]), p = new S.MathNode("math", [c]);
|
|
@@ -5164,7 +5174,7 @@ var Dr = function(e) {
|
|
|
5164
5174
|
}, S1 = function(e, t) {
|
|
5165
5175
|
function a() {
|
|
5166
5176
|
var h = 4e5, c = e.label.slice(1);
|
|
5167
|
-
if (
|
|
5177
|
+
if (q.contains(["widehat", "widecheck", "widetilde", "utilde"], c)) {
|
|
5168
5178
|
var p = e, g = k1(p.base), y, w, x;
|
|
5169
5179
|
if (g > 5)
|
|
5170
5180
|
c === "widehat" || c === "widecheck" ? (y = 420, h = 2364, x = 0.42, w = c + "4") : (y = 312, h = 2340, x = 0.34, w = "tilde4");
|
|
@@ -5184,7 +5194,7 @@ var Dr = function(e) {
|
|
|
5184
5194
|
height: x
|
|
5185
5195
|
};
|
|
5186
5196
|
} else {
|
|
5187
|
-
var N = [], O = w1[c], [
|
|
5197
|
+
var N = [], O = w1[c], [F, V, L] = O, U = L / 1e3, G = F.length, j, Y;
|
|
5188
5198
|
if (G === 1) {
|
|
5189
5199
|
var M0 = O[3];
|
|
5190
5200
|
j = ["hide-tail"], Y = [M0];
|
|
@@ -5196,7 +5206,7 @@ var Dr = function(e) {
|
|
|
5196
5206
|
throw new Error(`Correct katexImagesData or update code here to support
|
|
5197
5207
|
` + G + " children.");
|
|
5198
5208
|
for (var r0 = 0; r0 < G; r0++) {
|
|
5199
|
-
var e0 = new P0(
|
|
5209
|
+
var e0 = new P0(F[r0]), U0 = new D0([e0], {
|
|
5200
5210
|
width: "400em",
|
|
5201
5211
|
height: A(U),
|
|
5202
5212
|
viewBox: "0 0 " + h + " " + L,
|
|
@@ -5257,26 +5267,26 @@ var Dr = function(e) {
|
|
|
5257
5267
|
mathMLnode: x1,
|
|
5258
5268
|
svgSpan: S1
|
|
5259
5269
|
};
|
|
5260
|
-
function
|
|
5270
|
+
function H(r, e) {
|
|
5261
5271
|
if (!r || r.type !== e)
|
|
5262
5272
|
throw new Error("Expected node of type " + e + ", but got " + (r ? "node of type " + r.type : String(r)));
|
|
5263
5273
|
return r;
|
|
5264
5274
|
}
|
|
5265
5275
|
function yt(r) {
|
|
5266
|
-
var e =
|
|
5276
|
+
var e = Re(r);
|
|
5267
5277
|
if (!e)
|
|
5268
5278
|
throw new Error("Expected node of symbol group type, but got " + (r ? "node of type " + r.type : String(r)));
|
|
5269
5279
|
return e;
|
|
5270
5280
|
}
|
|
5271
|
-
function
|
|
5281
|
+
function Re(r) {
|
|
5272
5282
|
return r && (r.type === "atom" || Za.hasOwnProperty(r.type)) ? r : null;
|
|
5273
5283
|
}
|
|
5274
5284
|
var xt = (r, e) => {
|
|
5275
5285
|
var t, a, n;
|
|
5276
|
-
r && r.type === "supsub" ? (a =
|
|
5277
|
-
var s = P(t, e.havingCrampedStyle()), o = a.isShifty &&
|
|
5286
|
+
r && r.type === "supsub" ? (a = H(r.base, "accent"), t = a.base, r.base = t, n = Wa(P(r, e)), r.base = a) : (a = H(r, "accent"), t = a.base);
|
|
5287
|
+
var s = P(t, e.havingCrampedStyle()), o = a.isShifty && q.isCharacterBox(t), h = 0;
|
|
5278
5288
|
if (o) {
|
|
5279
|
-
var c =
|
|
5289
|
+
var c = q.getBaseElem(t), p = P(c, e.havingCrampedStyle());
|
|
5280
5290
|
h = Lt(p).skew;
|
|
5281
5291
|
}
|
|
5282
5292
|
var g = a.label === "\\c", y = g ? s.height + s.depth : Math.min(s.height, e.fontMetrics().xHeight), w;
|
|
@@ -5322,7 +5332,7 @@ var xt = (r, e) => {
|
|
|
5322
5332
|
var N = b.makeSpan(["mord", "accent"], [w], e);
|
|
5323
5333
|
return n ? (n.children[0] = N, n.height = Math.max(N.height, n.height), n.classes[0] = "mord", n) : N;
|
|
5324
5334
|
}, Nr = (r, e) => {
|
|
5325
|
-
var t = r.isStretchy ? N0.mathMLnode(r.label) : new S.MathNode("mo", [
|
|
5335
|
+
var t = r.isStretchy ? N0.mathMLnode(r.label) : new S.MathNode("mo", [v0(r.label, r.mode)]), a = new S.MathNode("mover", [X(r.base, e), t]);
|
|
5326
5336
|
return a.setAttribute("accent", "true"), a;
|
|
5327
5337
|
}, z1 = new RegExp(["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring"].map((r) => "\\" + r).join("|"));
|
|
5328
5338
|
B({
|
|
@@ -5332,7 +5342,7 @@ B({
|
|
|
5332
5342
|
numArgs: 1
|
|
5333
5343
|
},
|
|
5334
5344
|
handler: (r, e) => {
|
|
5335
|
-
var t =
|
|
5345
|
+
var t = Ne(e[0]), a = !z1.test(r.funcName), n = !a || r.funcName === "\\widehat" || r.funcName === "\\widetilde" || r.funcName === "\\widecheck";
|
|
5336
5346
|
return {
|
|
5337
5347
|
type: "accent",
|
|
5338
5348
|
mode: r.parser.mode,
|
|
@@ -5410,7 +5420,7 @@ B({
|
|
|
5410
5420
|
return a.setAttribute("accentunder", "true"), a;
|
|
5411
5421
|
}
|
|
5412
5422
|
});
|
|
5413
|
-
var
|
|
5423
|
+
var ke = (r) => {
|
|
5414
5424
|
var e = new S.MathNode("mpadded", r ? [r] : []);
|
|
5415
5425
|
return e.setAttribute("width", "+0.6em"), e.setAttribute("lspace", "0.3em"), e;
|
|
5416
5426
|
};
|
|
@@ -5511,17 +5521,17 @@ B({
|
|
|
5511
5521
|
t.setAttribute("minsize", r.label.charAt(0) === "x" ? "1.75em" : "3.0em");
|
|
5512
5522
|
var a;
|
|
5513
5523
|
if (r.body) {
|
|
5514
|
-
var n =
|
|
5524
|
+
var n = ke(X(r.body, e));
|
|
5515
5525
|
if (r.below) {
|
|
5516
|
-
var s =
|
|
5526
|
+
var s = ke(X(r.below, e));
|
|
5517
5527
|
a = new S.MathNode("munderover", [t, s, n]);
|
|
5518
5528
|
} else
|
|
5519
5529
|
a = new S.MathNode("mover", [t, n]);
|
|
5520
5530
|
} else if (r.below) {
|
|
5521
|
-
var o =
|
|
5531
|
+
var o = ke(X(r.below, e));
|
|
5522
5532
|
a = new S.MathNode("munder", [t, o]);
|
|
5523
5533
|
} else
|
|
5524
|
-
a =
|
|
5534
|
+
a = ke(), a = new S.MathNode("mover", [t, a]);
|
|
5525
5535
|
return a;
|
|
5526
5536
|
}
|
|
5527
5537
|
});
|
|
@@ -5530,7 +5540,7 @@ function qr(r, e) {
|
|
|
5530
5540
|
var t = t0(r.body, e, !0);
|
|
5531
5541
|
return A1([r.mclass], t, e);
|
|
5532
5542
|
}
|
|
5533
|
-
function
|
|
5543
|
+
function Er(r, e) {
|
|
5534
5544
|
var t, a = o0(r.body, e);
|
|
5535
5545
|
return r.mclass === "minner" ? t = new S.MathNode("mpadded", a) : r.mclass === "mord" ? r.isCharacterBox ? (t = a[0], t.type = "mi") : t = new S.MathNode("mi", a) : (r.isCharacterBox ? (t = a[0], t.type = "mo") : t = new S.MathNode("mo", a), r.mclass === "mbin" ? (t.attributes.lspace = "0.22em", t.attributes.rspace = "0.22em") : r.mclass === "mpunct" ? (t.attributes.lspace = "0em", t.attributes.rspace = "0.17em") : r.mclass === "mopen" || r.mclass === "mclose" ? (t.attributes.lspace = "0em", t.attributes.rspace = "0em") : r.mclass === "minner" && (t.attributes.lspace = "0.0556em", t.attributes.width = "+0.1111em")), t;
|
|
5536
5546
|
}
|
|
@@ -5552,13 +5562,13 @@ B({
|
|
|
5552
5562
|
mclass: "m" + a.slice(5),
|
|
5553
5563
|
// TODO(kevinb): don't prefix with 'm'
|
|
5554
5564
|
body: Q(n),
|
|
5555
|
-
isCharacterBox:
|
|
5565
|
+
isCharacterBox: q.isCharacterBox(n)
|
|
5556
5566
|
};
|
|
5557
5567
|
},
|
|
5558
5568
|
htmlBuilder: qr,
|
|
5559
|
-
mathmlBuilder:
|
|
5569
|
+
mathmlBuilder: Er
|
|
5560
5570
|
});
|
|
5561
|
-
var
|
|
5571
|
+
var Ie = (r) => {
|
|
5562
5572
|
var e = r.type === "ordgroup" && r.body.length ? r.body[0] : r;
|
|
5563
5573
|
return e.type === "atom" && (e.family === "bin" || e.family === "rel") ? "m" + e.family : "mord";
|
|
5564
5574
|
};
|
|
@@ -5575,9 +5585,9 @@ B({
|
|
|
5575
5585
|
return {
|
|
5576
5586
|
type: "mclass",
|
|
5577
5587
|
mode: t.mode,
|
|
5578
|
-
mclass:
|
|
5588
|
+
mclass: Ie(e[0]),
|
|
5579
5589
|
body: Q(e[1]),
|
|
5580
|
-
isCharacterBox:
|
|
5590
|
+
isCharacterBox: q.isCharacterBox(e[1])
|
|
5581
5591
|
};
|
|
5582
5592
|
}
|
|
5583
5593
|
});
|
|
@@ -5592,7 +5602,7 @@ B({
|
|
|
5592
5602
|
parser: t,
|
|
5593
5603
|
funcName: a
|
|
5594
5604
|
} = r, n = e[1], s = e[0], o;
|
|
5595
|
-
a !== "\\stackrel" ? o =
|
|
5605
|
+
a !== "\\stackrel" ? o = Ie(n) : o = "mrel";
|
|
5596
5606
|
var h = {
|
|
5597
5607
|
type: "op",
|
|
5598
5608
|
mode: n.mode,
|
|
@@ -5614,11 +5624,11 @@ B({
|
|
|
5614
5624
|
mode: t.mode,
|
|
5615
5625
|
mclass: o,
|
|
5616
5626
|
body: [c],
|
|
5617
|
-
isCharacterBox:
|
|
5627
|
+
isCharacterBox: q.isCharacterBox(c)
|
|
5618
5628
|
};
|
|
5619
5629
|
},
|
|
5620
5630
|
htmlBuilder: qr,
|
|
5621
|
-
mathmlBuilder:
|
|
5631
|
+
mathmlBuilder: Er
|
|
5622
5632
|
});
|
|
5623
5633
|
B({
|
|
5624
5634
|
type: "pmb",
|
|
@@ -5634,7 +5644,7 @@ B({
|
|
|
5634
5644
|
return {
|
|
5635
5645
|
type: "pmb",
|
|
5636
5646
|
mode: t.mode,
|
|
5637
|
-
mclass:
|
|
5647
|
+
mclass: Ie(e[0]),
|
|
5638
5648
|
body: Q(e[0])
|
|
5639
5649
|
};
|
|
5640
5650
|
},
|
|
@@ -5727,23 +5737,22 @@ function C1(r) {
|
|
|
5727
5737
|
type: "ordgroup",
|
|
5728
5738
|
mode: "math",
|
|
5729
5739
|
body: []
|
|
5730
|
-
}, !("=|.".indexOf(p) > -1))
|
|
5731
|
-
|
|
5732
|
-
for (var
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
break;
|
|
5737
|
-
}
|
|
5738
|
-
if (jt(o[x]))
|
|
5739
|
-
throw new M("Missing a " + p + " character to complete a CD arrow.", o[x]);
|
|
5740
|
-
g[y].body.push(o[x]);
|
|
5740
|
+
}, !("=|.".indexOf(p) > -1)) if ("<>AV".indexOf(p) > -1)
|
|
5741
|
+
for (var y = 0; y < 2; y++) {
|
|
5742
|
+
for (var w = !0, x = c + 1; x < o.length; x++) {
|
|
5743
|
+
if (B1(o[x], p)) {
|
|
5744
|
+
w = !1, c = x;
|
|
5745
|
+
break;
|
|
5741
5746
|
}
|
|
5742
|
-
if (
|
|
5743
|
-
throw new M("Missing a " + p + " character to complete a CD arrow.", o[
|
|
5747
|
+
if (jt(o[x]))
|
|
5748
|
+
throw new M("Missing a " + p + " character to complete a CD arrow.", o[x]);
|
|
5749
|
+
g[y].body.push(o[x]);
|
|
5744
5750
|
}
|
|
5745
|
-
|
|
5746
|
-
|
|
5751
|
+
if (w)
|
|
5752
|
+
throw new M("Missing a " + p + " character to complete a CD arrow.", o[c]);
|
|
5753
|
+
}
|
|
5754
|
+
else
|
|
5755
|
+
throw new M('Expected one of "<>AV=|." after @', o[c]);
|
|
5747
5756
|
var z = D1(p, g, r), T = {
|
|
5748
5757
|
type: "styling",
|
|
5749
5758
|
body: [z],
|
|
@@ -5837,8 +5846,8 @@ B({
|
|
|
5837
5846
|
handler(r, e) {
|
|
5838
5847
|
for (var {
|
|
5839
5848
|
parser: t
|
|
5840
|
-
} = r, a =
|
|
5841
|
-
var h =
|
|
5849
|
+
} = r, a = H(e[0], "ordgroup"), n = a.body, s = "", o = 0; o < n.length; o++) {
|
|
5850
|
+
var h = H(n[o], "textord");
|
|
5842
5851
|
s += h.text;
|
|
5843
5852
|
}
|
|
5844
5853
|
var c = parseInt(s), p;
|
|
@@ -5853,7 +5862,7 @@ B({
|
|
|
5853
5862
|
};
|
|
5854
5863
|
}
|
|
5855
5864
|
});
|
|
5856
|
-
var
|
|
5865
|
+
var Rr = (r, e) => {
|
|
5857
5866
|
var t = t0(r.body, e.withColor(r.color), !1);
|
|
5858
5867
|
return b.makeFragment(t);
|
|
5859
5868
|
}, Ir = (r, e) => {
|
|
@@ -5871,7 +5880,7 @@ B({
|
|
|
5871
5880
|
handler(r, e) {
|
|
5872
5881
|
var {
|
|
5873
5882
|
parser: t
|
|
5874
|
-
} = r, a =
|
|
5883
|
+
} = r, a = H(e[0], "color-token").color, n = e[1];
|
|
5875
5884
|
return {
|
|
5876
5885
|
type: "color",
|
|
5877
5886
|
mode: t.mode,
|
|
@@ -5879,7 +5888,7 @@ B({
|
|
|
5879
5888
|
body: Q(n)
|
|
5880
5889
|
};
|
|
5881
5890
|
},
|
|
5882
|
-
htmlBuilder:
|
|
5891
|
+
htmlBuilder: Rr,
|
|
5883
5892
|
mathmlBuilder: Ir
|
|
5884
5893
|
});
|
|
5885
5894
|
B({
|
|
@@ -5894,7 +5903,7 @@ B({
|
|
|
5894
5903
|
var {
|
|
5895
5904
|
parser: t,
|
|
5896
5905
|
breakOnTokenText: a
|
|
5897
|
-
} = r, n =
|
|
5906
|
+
} = r, n = H(e[0], "color-token").color;
|
|
5898
5907
|
t.gullet.macros.set("\\current@color", n);
|
|
5899
5908
|
var s = t.parseExpression(!0, a);
|
|
5900
5909
|
return {
|
|
@@ -5904,7 +5913,7 @@ B({
|
|
|
5904
5913
|
body: s
|
|
5905
5914
|
};
|
|
5906
5915
|
},
|
|
5907
|
-
htmlBuilder:
|
|
5916
|
+
htmlBuilder: Rr,
|
|
5908
5917
|
mathmlBuilder: Ir
|
|
5909
5918
|
});
|
|
5910
5919
|
B({
|
|
@@ -5923,7 +5932,7 @@ B({
|
|
|
5923
5932
|
type: "cr",
|
|
5924
5933
|
mode: a.mode,
|
|
5925
5934
|
newLine: s,
|
|
5926
|
-
size: n &&
|
|
5935
|
+
size: n && H(n, "size").value
|
|
5927
5936
|
};
|
|
5928
5937
|
},
|
|
5929
5938
|
// The following builders are called only at the top level,
|
|
@@ -5955,7 +5964,7 @@ var ut = {
|
|
|
5955
5964
|
}, N1 = (r) => {
|
|
5956
5965
|
var e = r.gullet.popToken();
|
|
5957
5966
|
return e.text === "=" && (e = r.gullet.popToken(), e.text === " " && (e = r.gullet.popToken())), e;
|
|
5958
|
-
},
|
|
5967
|
+
}, Fr = (r, e, t, a) => {
|
|
5959
5968
|
var n = r.gullet.macros.get(t.text);
|
|
5960
5969
|
n == null && (t.noexpand = !0, n = {
|
|
5961
5970
|
tokens: [t],
|
|
@@ -5984,7 +5993,7 @@ B({
|
|
|
5984
5993
|
e.consumeSpaces();
|
|
5985
5994
|
var a = e.fetch();
|
|
5986
5995
|
if (ut[a.text])
|
|
5987
|
-
return (t === "\\global" || t === "\\\\globallong") && (a.text = ut[a.text]),
|
|
5996
|
+
return (t === "\\global" || t === "\\\\globallong") && (a.text = ut[a.text]), H(e.parseFunction(), "internal");
|
|
5988
5997
|
throw new M("Invalid token after macro prefix", a);
|
|
5989
5998
|
}
|
|
5990
5999
|
});
|
|
@@ -6051,7 +6060,7 @@ B({
|
|
|
6051
6060
|
} = r, a = Or(e.gullet.popToken());
|
|
6052
6061
|
e.gullet.consumeSpaces();
|
|
6053
6062
|
var n = N1(e);
|
|
6054
|
-
return
|
|
6063
|
+
return Fr(e, a, n, t === "\\\\globallet"), {
|
|
6055
6064
|
type: "internal",
|
|
6056
6065
|
mode: e.mode
|
|
6057
6066
|
};
|
|
@@ -6074,7 +6083,7 @@ B({
|
|
|
6074
6083
|
parser: e,
|
|
6075
6084
|
funcName: t
|
|
6076
6085
|
} = r, a = Or(e.gullet.popToken()), n = e.gullet.popToken(), s = e.gullet.popToken();
|
|
6077
|
-
return
|
|
6086
|
+
return Fr(e, a, s, t === "\\\\globalfuture"), e.gullet.pushToken(s), e.gullet.pushToken(n), {
|
|
6078
6087
|
type: "internal",
|
|
6079
6088
|
mode: e.mode
|
|
6080
6089
|
};
|
|
@@ -6088,17 +6097,17 @@ var ne = function(e, t, a) {
|
|
|
6088
6097
|
}, wt = function(e, t, a, n) {
|
|
6089
6098
|
var s = a.havingBaseStyle(t), o = b.makeSpan(n.concat(s.sizingClasses(a)), [e], a), h = s.sizeMultiplier / a.sizeMultiplier;
|
|
6090
6099
|
return o.height *= h, o.depth *= h, o.maxFontSize = s.sizeMultiplier, o;
|
|
6091
|
-
},
|
|
6100
|
+
}, Hr = function(e, t, a) {
|
|
6092
6101
|
var n = t.havingBaseStyle(a), s = (1 - t.sizeMultiplier / n.sizeMultiplier) * t.fontMetrics().axisHeight;
|
|
6093
6102
|
e.classes.push("delimcenter"), e.style.top = A(s), e.height -= s, e.depth += s;
|
|
6094
6103
|
}, q1 = function(e, t, a, n, s, o) {
|
|
6095
6104
|
var h = b.makeSymbol(e, "Main-Regular", s, n), c = wt(h, t, n, o);
|
|
6096
|
-
return a &&
|
|
6097
|
-
},
|
|
6105
|
+
return a && Hr(c, n, t), c;
|
|
6106
|
+
}, E1 = function(e, t, a, n) {
|
|
6098
6107
|
return b.makeSymbol(e, "Size" + t + "-Regular", a, n);
|
|
6099
6108
|
}, Lr = function(e, t, a, n, s, o) {
|
|
6100
|
-
var h =
|
|
6101
|
-
return a &&
|
|
6109
|
+
var h = E1(e, t, s, n), c = wt(b.makeSpan(["delimsizing", "size" + t], [h], n), R.TEXT, n, o);
|
|
6110
|
+
return a && Hr(c, n, R.TEXT), c;
|
|
6102
6111
|
}, je = function(e, t, a) {
|
|
6103
6112
|
var n;
|
|
6104
6113
|
t === "Size1-Regular" ? n = "delim-size1" : n = "delim-size4";
|
|
@@ -6108,7 +6117,7 @@ var ne = function(e, t, a) {
|
|
|
6108
6117
|
elem: s
|
|
6109
6118
|
};
|
|
6110
6119
|
}, Ze = function(e, t, a) {
|
|
6111
|
-
var n =
|
|
6120
|
+
var n = x0["Size4-Regular"][e.charCodeAt(0)] ? x0["Size4-Regular"][e.charCodeAt(0)][4] : x0["Size1-Regular"][e.charCodeAt(0)][4], s = new P0("inner", La(e, Math.round(1e3 * t))), o = new D0([s], {
|
|
6112
6121
|
width: A(n),
|
|
6113
6122
|
height: A(t),
|
|
6114
6123
|
// Override CSS rule `.katex svg { width: 100% }`
|
|
@@ -6120,41 +6129,41 @@ var ne = function(e, t, a) {
|
|
|
6120
6129
|
type: "elem",
|
|
6121
6130
|
elem: h
|
|
6122
6131
|
};
|
|
6123
|
-
}, ht = 8e-3,
|
|
6132
|
+
}, ht = 8e-3, Se = {
|
|
6124
6133
|
type: "kern",
|
|
6125
6134
|
size: -1 * ht
|
|
6126
|
-
},
|
|
6135
|
+
}, R1 = ["|", "\\lvert", "\\rvert", "\\vert"], I1 = ["\\|", "\\lVert", "\\rVert", "\\Vert"], Pr = function(e, t, a, n, s, o) {
|
|
6127
6136
|
var h, c, p, g, y = "", w = 0;
|
|
6128
6137
|
h = p = g = e, c = null;
|
|
6129
6138
|
var x = "Size1-Regular";
|
|
6130
|
-
e === "\\uparrow" ? p = g = "⏐" : e === "\\Uparrow" ? p = g = "‖" : e === "\\downarrow" ? h = p = "⏐" : e === "\\Downarrow" ? h = p = "‖" : e === "\\updownarrow" ? (h = "\\uparrow", p = "⏐", g = "\\downarrow") : e === "\\Updownarrow" ? (h = "\\Uparrow", p = "‖", g = "\\Downarrow") :
|
|
6131
|
-
var z = ne(h, x, s), T = z.height + z.depth, C = ne(p, x, s), N = C.height + C.depth, O = ne(g, x, s),
|
|
6139
|
+
e === "\\uparrow" ? p = g = "⏐" : e === "\\Uparrow" ? p = g = "‖" : e === "\\downarrow" ? h = p = "⏐" : e === "\\Downarrow" ? h = p = "‖" : e === "\\updownarrow" ? (h = "\\uparrow", p = "⏐", g = "\\downarrow") : e === "\\Updownarrow" ? (h = "\\Uparrow", p = "‖", g = "\\Downarrow") : q.contains(R1, e) ? (p = "∣", y = "vert", w = 333) : q.contains(I1, e) ? (p = "∥", y = "doublevert", w = 556) : e === "[" || e === "\\lbrack" ? (h = "⎡", p = "⎢", g = "⎣", x = "Size4-Regular", y = "lbrack", w = 667) : e === "]" || e === "\\rbrack" ? (h = "⎤", p = "⎥", g = "⎦", x = "Size4-Regular", y = "rbrack", w = 667) : e === "\\lfloor" || e === "⌊" ? (p = h = "⎢", g = "⎣", x = "Size4-Regular", y = "lfloor", w = 667) : e === "\\lceil" || e === "⌈" ? (h = "⎡", p = g = "⎢", x = "Size4-Regular", y = "lceil", w = 667) : e === "\\rfloor" || e === "⌋" ? (p = h = "⎥", g = "⎦", x = "Size4-Regular", y = "rfloor", w = 667) : e === "\\rceil" || e === "⌉" ? (h = "⎤", p = g = "⎥", x = "Size4-Regular", y = "rceil", w = 667) : e === "(" || e === "\\lparen" ? (h = "⎛", p = "⎜", g = "⎝", x = "Size4-Regular", y = "lparen", w = 875) : e === ")" || e === "\\rparen" ? (h = "⎞", p = "⎟", g = "⎠", x = "Size4-Regular", y = "rparen", w = 875) : e === "\\{" || e === "\\lbrace" ? (h = "⎧", c = "⎨", g = "⎩", p = "⎪", x = "Size4-Regular") : e === "\\}" || e === "\\rbrace" ? (h = "⎫", c = "⎬", g = "⎭", p = "⎪", x = "Size4-Regular") : e === "\\lgroup" || e === "⟮" ? (h = "⎧", g = "⎩", p = "⎪", x = "Size4-Regular") : e === "\\rgroup" || e === "⟯" ? (h = "⎫", g = "⎭", p = "⎪", x = "Size4-Regular") : e === "\\lmoustache" || e === "⎰" ? (h = "⎧", g = "⎭", p = "⎪", x = "Size4-Regular") : (e === "\\rmoustache" || e === "⎱") && (h = "⎫", g = "⎩", p = "⎪", x = "Size4-Regular");
|
|
6140
|
+
var z = ne(h, x, s), T = z.height + z.depth, C = ne(p, x, s), N = C.height + C.depth, O = ne(g, x, s), F = O.height + O.depth, V = 0, L = 1;
|
|
6132
6141
|
if (c !== null) {
|
|
6133
6142
|
var U = ne(c, x, s);
|
|
6134
6143
|
V = U.height + U.depth, L = 2;
|
|
6135
6144
|
}
|
|
6136
|
-
var G = T +
|
|
6145
|
+
var G = T + F + V, j = Math.max(0, Math.ceil((t - G) / (L * N))), Y = G + j * L * N, M0 = n.fontMetrics().axisHeight;
|
|
6137
6146
|
a && (M0 *= n.sizeMultiplier);
|
|
6138
6147
|
var r0 = Y / 2 - M0, e0 = [];
|
|
6139
6148
|
if (y.length > 0) {
|
|
6140
|
-
var U0 = Y - T -
|
|
6149
|
+
var U0 = Y - T - F, s0 = Math.round(Y * 1e3), g0 = Pa(y, Math.round(U0 * 1e3)), E0 = new P0(y, g0), W0 = (w / 1e3).toFixed(3) + "em", j0 = (s0 / 1e3).toFixed(3) + "em", Le = new D0([E0], {
|
|
6141
6150
|
width: W0,
|
|
6142
6151
|
height: j0,
|
|
6143
6152
|
viewBox: "0 0 " + w + " " + s0
|
|
6144
|
-
}),
|
|
6145
|
-
|
|
6153
|
+
}), R0 = b.makeSvgSpan([], [Le], n);
|
|
6154
|
+
R0.height = s0 / 1e3, R0.style.width = W0, R0.style.height = j0, e0.push({
|
|
6146
6155
|
type: "elem",
|
|
6147
|
-
elem:
|
|
6156
|
+
elem: R0
|
|
6148
6157
|
});
|
|
6149
6158
|
} else {
|
|
6150
|
-
if (e0.push(je(g, x, s)), e0.push(
|
|
6151
|
-
var I0 = Y - T -
|
|
6159
|
+
if (e0.push(je(g, x, s)), e0.push(Se), c === null) {
|
|
6160
|
+
var I0 = Y - T - F + 2 * ht;
|
|
6152
6161
|
e0.push(Ze(p, I0, n));
|
|
6153
6162
|
} else {
|
|
6154
|
-
var m0 = (Y - T -
|
|
6155
|
-
e0.push(Ze(p, m0, n)), e0.push(
|
|
6163
|
+
var m0 = (Y - T - F - V) / 2 + 2 * ht;
|
|
6164
|
+
e0.push(Ze(p, m0, n)), e0.push(Se), e0.push(je(c, x, s)), e0.push(Se), e0.push(Ze(p, m0, n));
|
|
6156
6165
|
}
|
|
6157
|
-
e0.push(
|
|
6166
|
+
e0.push(Se), e0.push(je(h, x, s));
|
|
6158
6167
|
}
|
|
6159
6168
|
var ae = n.havingBaseStyle(R.TEXT), Pe = b.makeVList({
|
|
6160
6169
|
positionType: "bottom",
|
|
@@ -6163,7 +6172,7 @@ var ne = function(e, t, a) {
|
|
|
6163
6172
|
}, ae);
|
|
6164
6173
|
return wt(b.makeSpan(["delimsizing", "mult"], [Pe], ae), R.TEXT, n, o);
|
|
6165
6174
|
}, Ke = 80, Je = 0.08, Qe = function(e, t, a, n, s) {
|
|
6166
|
-
var o =
|
|
6175
|
+
var o = Ha(e, n, a), h = new P0(e, o), c = new D0([h], {
|
|
6167
6176
|
// Note: 1000:1 ratio of viewBox to document em width.
|
|
6168
6177
|
width: "400em",
|
|
6169
6178
|
height: A(t),
|
|
@@ -6182,10 +6191,10 @@ var ne = function(e, t, a) {
|
|
|
6182
6191
|
// have thicker rules.
|
|
6183
6192
|
ruleWidth: (t.fontMetrics().sqrtRuleThickness + o) * s
|
|
6184
6193
|
};
|
|
6185
|
-
}, Gr = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "\\surd"],
|
|
6186
|
-
if (e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle"),
|
|
6194
|
+
}, Gr = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "\\surd"], F1 = ["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱"], Vr = ["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"], se = [0, 1.2, 1.8, 2.4, 3], H1 = function(e, t, a, n, s) {
|
|
6195
|
+
if (e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle"), q.contains(Gr, e) || q.contains(Vr, e))
|
|
6187
6196
|
return Lr(e, t, !1, a, n, s);
|
|
6188
|
-
if (
|
|
6197
|
+
if (q.contains(F1, e))
|
|
6189
6198
|
return Pr(e, se[t], !1, a, n, s);
|
|
6190
6199
|
throw new M("Illegal delimiter: '" + e + "'");
|
|
6191
6200
|
}, L1 = [{
|
|
@@ -6265,7 +6274,7 @@ var ne = function(e, t, a) {
|
|
|
6265
6274
|
}, Xr = function(e, t, a, n, s, o) {
|
|
6266
6275
|
e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle");
|
|
6267
6276
|
var h;
|
|
6268
|
-
|
|
6277
|
+
q.contains(Vr, e) ? h = L1 : q.contains(Gr, e) ? h = Ur : h = P1;
|
|
6269
6278
|
var c = Yr(e, t, h, n);
|
|
6270
6279
|
return c.type === "small" ? q1(e, c.style, a, n, s, o) : c.type === "large" ? Lr(e, c.size, a, n, s, o) : Pr(e, t, a, n, s, o);
|
|
6271
6280
|
}, V1 = function(e, t, a, n, s, o) {
|
|
@@ -6285,7 +6294,7 @@ var ne = function(e, t, a) {
|
|
|
6285
6294
|
return Xr(e, y, !0, n, s, o);
|
|
6286
6295
|
}, B0 = {
|
|
6287
6296
|
sqrtImage: O1,
|
|
6288
|
-
sizedDelim:
|
|
6297
|
+
sizedDelim: H1,
|
|
6289
6298
|
sizeToMaxHeight: se,
|
|
6290
6299
|
customSizedDelim: Xr,
|
|
6291
6300
|
leftRightDelim: V1
|
|
@@ -6355,9 +6364,9 @@ var ne = function(e, t, a) {
|
|
|
6355
6364
|
size: 4
|
|
6356
6365
|
}
|
|
6357
6366
|
}, U1 = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "<", ">", "\\langle", "⟨", "\\rangle", "⟩", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."];
|
|
6358
|
-
function
|
|
6359
|
-
var t =
|
|
6360
|
-
if (t &&
|
|
6367
|
+
function Oe(r, e) {
|
|
6368
|
+
var t = Re(r);
|
|
6369
|
+
if (t && q.contains(U1, t.text))
|
|
6361
6370
|
return t;
|
|
6362
6371
|
throw t ? new M("Invalid delimiter '" + t.text + "' after '" + e.funcName + "'", r) : new M("Invalid delimiter type '" + r.type + "'", r);
|
|
6363
6372
|
}
|
|
@@ -6369,7 +6378,7 @@ B({
|
|
|
6369
6378
|
argTypes: ["primitive"]
|
|
6370
6379
|
},
|
|
6371
6380
|
handler: (r, e) => {
|
|
6372
|
-
var t =
|
|
6381
|
+
var t = Oe(e[0], r);
|
|
6373
6382
|
return {
|
|
6374
6383
|
type: "delimsizing",
|
|
6375
6384
|
mode: r.parser.mode,
|
|
@@ -6381,7 +6390,7 @@ B({
|
|
|
6381
6390
|
htmlBuilder: (r, e) => r.delim === "." ? b.makeSpan([r.mclass]) : B0.sizedDelim(r.delim, r.size, e, r.mode, [r.mclass]),
|
|
6382
6391
|
mathmlBuilder: (r) => {
|
|
6383
6392
|
var e = [];
|
|
6384
|
-
r.delim !== "." && e.push(
|
|
6393
|
+
r.delim !== "." && e.push(v0(r.delim, r.mode));
|
|
6385
6394
|
var t = new S.MathNode("mo", e);
|
|
6386
6395
|
r.mclass === "mopen" || r.mclass === "mclose" ? t.setAttribute("fence", "true") : t.setAttribute("fence", "false"), t.setAttribute("stretchy", "true");
|
|
6387
6396
|
var a = A(B0.sizeToMaxHeight[r.size]);
|
|
@@ -6406,7 +6415,7 @@ B({
|
|
|
6406
6415
|
return {
|
|
6407
6416
|
type: "leftright-right",
|
|
6408
6417
|
mode: r.parser.mode,
|
|
6409
|
-
delim:
|
|
6418
|
+
delim: Oe(e[0], r).text,
|
|
6410
6419
|
color: t
|
|
6411
6420
|
// undefined if not set via \color
|
|
6412
6421
|
};
|
|
@@ -6420,11 +6429,11 @@ B({
|
|
|
6420
6429
|
primitive: !0
|
|
6421
6430
|
},
|
|
6422
6431
|
handler: (r, e) => {
|
|
6423
|
-
var t =
|
|
6432
|
+
var t = Oe(e[0], r), a = r.parser;
|
|
6424
6433
|
++a.leftrightDepth;
|
|
6425
6434
|
var n = a.parseExpression(!1);
|
|
6426
6435
|
--a.leftrightDepth, a.expect("\\right", !1);
|
|
6427
|
-
var s =
|
|
6436
|
+
var s = H(a.parseFunction(), "leftright-right");
|
|
6428
6437
|
return {
|
|
6429
6438
|
type: "leftright",
|
|
6430
6439
|
mode: a.mode,
|
|
@@ -6458,11 +6467,11 @@ B({
|
|
|
6458
6467
|
Kt(r);
|
|
6459
6468
|
var t = o0(r.body, e);
|
|
6460
6469
|
if (r.left !== ".") {
|
|
6461
|
-
var a = new S.MathNode("mo", [
|
|
6470
|
+
var a = new S.MathNode("mo", [v0(r.left, r.mode)]);
|
|
6462
6471
|
a.setAttribute("fence", "true"), t.unshift(a);
|
|
6463
6472
|
}
|
|
6464
6473
|
if (r.right !== ".") {
|
|
6465
|
-
var n = new S.MathNode("mo", [
|
|
6474
|
+
var n = new S.MathNode("mo", [v0(r.right, r.mode)]);
|
|
6466
6475
|
n.setAttribute("fence", "true"), r.rightColor && n.setAttribute("mathcolor", r.rightColor), t.push(n);
|
|
6467
6476
|
}
|
|
6468
6477
|
return gt(t);
|
|
@@ -6476,7 +6485,7 @@ B({
|
|
|
6476
6485
|
primitive: !0
|
|
6477
6486
|
},
|
|
6478
6487
|
handler: (r, e) => {
|
|
6479
|
-
var t =
|
|
6488
|
+
var t = Oe(e[0], r);
|
|
6480
6489
|
if (!r.parser.leftrightDepth)
|
|
6481
6490
|
throw new M("\\middle without preceding \\left", t);
|
|
6482
6491
|
return {
|
|
@@ -6500,12 +6509,12 @@ B({
|
|
|
6500
6509
|
return t;
|
|
6501
6510
|
},
|
|
6502
6511
|
mathmlBuilder: (r, e) => {
|
|
6503
|
-
var t = r.delim === "\\vert" || r.delim === "|" ?
|
|
6512
|
+
var t = r.delim === "\\vert" || r.delim === "|" ? v0("|", "text") : v0(r.delim, r.mode), a = new S.MathNode("mo", [t]);
|
|
6504
6513
|
return a.setAttribute("fence", "true"), a.setAttribute("lspace", "0.05em"), a.setAttribute("rspace", "0.05em"), a;
|
|
6505
6514
|
}
|
|
6506
6515
|
});
|
|
6507
6516
|
var kt = (r, e) => {
|
|
6508
|
-
var t = b.wrapFragment(P(r.body, e), e), a = r.label.slice(1), n = e.sizeMultiplier, s, o = 0, h =
|
|
6517
|
+
var t = b.wrapFragment(P(r.body, e), e), a = r.label.slice(1), n = e.sizeMultiplier, s, o = 0, h = q.isCharacterBox(r.body);
|
|
6509
6518
|
if (a === "sout")
|
|
6510
6519
|
s = b.makeSpan(["stretchy", "sout"]), s.height = e.fontMetrics().defaultRuleThickness / n, o = -0.5 * e.fontMetrics().xHeight;
|
|
6511
6520
|
else if (a === "phase") {
|
|
@@ -6555,7 +6564,7 @@ var kt = (r, e) => {
|
|
|
6555
6564
|
]
|
|
6556
6565
|
}, e);
|
|
6557
6566
|
else {
|
|
6558
|
-
var
|
|
6567
|
+
var F = /cancel|phase/.test(a) ? ["svg-align"] : [];
|
|
6559
6568
|
O = b.makeVList({
|
|
6560
6569
|
positionType: "individualShift",
|
|
6561
6570
|
children: [
|
|
@@ -6569,7 +6578,7 @@ var kt = (r, e) => {
|
|
|
6569
6578
|
type: "elem",
|
|
6570
6579
|
elem: s,
|
|
6571
6580
|
shift: o,
|
|
6572
|
-
wrapperClasses:
|
|
6581
|
+
wrapperClasses: F
|
|
6573
6582
|
}
|
|
6574
6583
|
]
|
|
6575
6584
|
}, e);
|
|
@@ -6626,7 +6635,7 @@ B({
|
|
|
6626
6635
|
var {
|
|
6627
6636
|
parser: a,
|
|
6628
6637
|
funcName: n
|
|
6629
|
-
} = r, s =
|
|
6638
|
+
} = r, s = H(e[0], "color-token").color, o = e[1];
|
|
6630
6639
|
return {
|
|
6631
6640
|
type: "enclose",
|
|
6632
6641
|
mode: a.mode,
|
|
@@ -6650,7 +6659,7 @@ B({
|
|
|
6650
6659
|
var {
|
|
6651
6660
|
parser: a,
|
|
6652
6661
|
funcName: n
|
|
6653
|
-
} = r, s =
|
|
6662
|
+
} = r, s = H(e[0], "color-token").color, o = H(e[1], "color-token").color, h = e[2];
|
|
6654
6663
|
return {
|
|
6655
6664
|
type: "enclose",
|
|
6656
6665
|
mode: a.mode,
|
|
@@ -6741,7 +6750,7 @@ function w0(r) {
|
|
|
6741
6750
|
handler: n
|
|
6742
6751
|
}, c = 0; c < t.length; ++c)
|
|
6743
6752
|
$r[t[c]] = h;
|
|
6744
|
-
s && (
|
|
6753
|
+
s && (De[e] = s), o && (Ce[e] = o);
|
|
6745
6754
|
}
|
|
6746
6755
|
var Wr = {};
|
|
6747
6756
|
function m(r, e) {
|
|
@@ -6786,13 +6795,13 @@ function V0(r, e, t) {
|
|
|
6786
6795
|
}
|
|
6787
6796
|
r.gullet.beginGroup();
|
|
6788
6797
|
var z = [], T = [z], C = [], N = [], O = c != null ? [] : void 0;
|
|
6789
|
-
function
|
|
6798
|
+
function F() {
|
|
6790
6799
|
c && r.gullet.macros.set("\\@eqnsw", "1", !0);
|
|
6791
6800
|
}
|
|
6792
6801
|
function V() {
|
|
6793
|
-
O && (r.gullet.macros.get("\\df@tag") ? (O.push(r.subparse([new
|
|
6802
|
+
O && (r.gullet.macros.get("\\df@tag") ? (O.push(r.subparse([new f0("\\df@tag")])), r.gullet.macros.set("\\df@tag", void 0, !0)) : O.push(!!c && r.gullet.macros.get("\\@eqnsw") === "1"));
|
|
6794
6803
|
}
|
|
6795
|
-
for (
|
|
6804
|
+
for (F(), N.push(Jt(r)); ; ) {
|
|
6796
6805
|
var L = r.parseExpression(!1, p ? "\\end" : "\\\\");
|
|
6797
6806
|
r.gullet.endGroup(), r.gullet.beginGroup(), L = {
|
|
6798
6807
|
type: "ordgroup",
|
|
@@ -6818,7 +6827,7 @@ function V0(r, e, t) {
|
|
|
6818
6827
|
} else if (U === "\\\\") {
|
|
6819
6828
|
r.consume();
|
|
6820
6829
|
var G = void 0;
|
|
6821
|
-
r.gullet.future().text !== " " && (G = r.parseSizeGroup(!0)), C.push(G ? G.value : null), V(), N.push(Jt(r)), z = [], T.push(z),
|
|
6830
|
+
r.gullet.future().text !== " " && (G = r.parseSizeGroup(!0)), C.push(G ? G.value : null), V(), N.push(Jt(r)), z = [], T.push(z), F();
|
|
6822
6831
|
} else
|
|
6823
6832
|
throw new M("Expected & or \\\\ or \\cr or \\end", r.nextToken);
|
|
6824
6833
|
}
|
|
@@ -6854,12 +6863,12 @@ var k0 = function(e, t) {
|
|
|
6854
6863
|
var z = e.colSeparationType === "CD" ? K({
|
|
6855
6864
|
number: 3,
|
|
6856
6865
|
unit: "ex"
|
|
6857
|
-
}, t) : 12 * y, T = 3 * y, C = e.arraystretch * z, N = 0.7 * C, O = 0.3 * C,
|
|
6858
|
-
function V(
|
|
6859
|
-
for (var
|
|
6860
|
-
|
|
6861
|
-
pos:
|
|
6862
|
-
isDashed: pe
|
|
6866
|
+
}, t) : 12 * y, T = 3 * y, C = e.arraystretch * z, N = 0.7 * C, O = 0.3 * C, F = 0;
|
|
6867
|
+
function V(fe) {
|
|
6868
|
+
for (var pe = 0; pe < fe.length; ++pe)
|
|
6869
|
+
pe > 0 && (F += 0.25), p.push({
|
|
6870
|
+
pos: F,
|
|
6871
|
+
isDashed: fe[pe]
|
|
6863
6872
|
});
|
|
6864
6873
|
}
|
|
6865
6874
|
for (V(o[0]), a = 0; a < e.body.length; ++a) {
|
|
@@ -6871,46 +6880,46 @@ var k0 = function(e, t) {
|
|
|
6871
6880
|
G < Y.depth && (G = Y.depth), U < Y.height && (U = Y.height), j[n] = Y;
|
|
6872
6881
|
}
|
|
6873
6882
|
var M0 = e.rowGaps[a], r0 = 0;
|
|
6874
|
-
M0 && (r0 = K(M0, t), r0 > 0 && (r0 += O, G < r0 && (G = r0), r0 = 0)), e.addJot && (G += T), j.height = U, j.depth = G,
|
|
6883
|
+
M0 && (r0 = K(M0, t), r0 > 0 && (r0 += O, G < r0 && (G = r0), r0 = 0)), e.addJot && (G += T), j.height = U, j.depth = G, F += U, j.pos = F, F += G + r0, c[a] = j, V(o[a + 1]);
|
|
6875
6884
|
}
|
|
6876
|
-
var e0 =
|
|
6877
|
-
if (e.tags && e.tags.some((
|
|
6885
|
+
var e0 = F / 2 + t.fontMetrics().axisHeight, U0 = e.cols || [], s0 = [], g0, E0, W0 = [];
|
|
6886
|
+
if (e.tags && e.tags.some((fe) => fe))
|
|
6878
6887
|
for (a = 0; a < s; ++a) {
|
|
6879
|
-
var j0 = c[a], Le = j0.pos - e0,
|
|
6880
|
-
|
|
6888
|
+
var j0 = c[a], Le = j0.pos - e0, R0 = e.tags[a], I0 = void 0;
|
|
6889
|
+
R0 === !0 ? I0 = b.makeSpan(["eqn-num"], [], t) : R0 === !1 ? I0 = b.makeSpan([], [], t) : I0 = b.makeSpan([], t0(R0, t, !0), t), I0.depth = j0.depth, I0.height = j0.height, W0.push({
|
|
6881
6890
|
type: "elem",
|
|
6882
6891
|
elem: I0,
|
|
6883
6892
|
shift: Le
|
|
6884
6893
|
});
|
|
6885
6894
|
}
|
|
6886
6895
|
for (
|
|
6887
|
-
n = 0,
|
|
6896
|
+
n = 0, E0 = 0;
|
|
6888
6897
|
// Continue while either there are more columns or more column
|
|
6889
6898
|
// descriptions, so trailing separators don't get lost.
|
|
6890
|
-
n < h ||
|
|
6891
|
-
++n, ++
|
|
6899
|
+
n < h || E0 < U0.length;
|
|
6900
|
+
++n, ++E0
|
|
6892
6901
|
) {
|
|
6893
|
-
for (var m0 = U0[
|
|
6894
|
-
if (ae || (
|
|
6902
|
+
for (var m0 = U0[E0] || {}, ae = !0; m0.type === "separator"; ) {
|
|
6903
|
+
if (ae || (g0 = b.makeSpan(["arraycolsep"], []), g0.style.width = A(t.fontMetrics().doubleRuleSep), s0.push(g0)), m0.separator === "|" || m0.separator === ":") {
|
|
6895
6904
|
var Pe = m0.separator === "|" ? "solid" : "dashed", Z0 = b.makeSpan(["vertical-separator"], [], t);
|
|
6896
|
-
Z0.style.height = A(
|
|
6897
|
-
var qt =
|
|
6905
|
+
Z0.style.height = A(F), Z0.style.borderRightWidth = A(g), Z0.style.borderRightStyle = Pe, Z0.style.margin = "0 " + A(-g / 2);
|
|
6906
|
+
var qt = F - e0;
|
|
6898
6907
|
qt && (Z0.style.verticalAlign = A(-qt)), s0.push(Z0);
|
|
6899
6908
|
} else
|
|
6900
6909
|
throw new M("Invalid separator type: " + m0.separator);
|
|
6901
|
-
|
|
6910
|
+
E0++, m0 = U0[E0] || {}, ae = !1;
|
|
6902
6911
|
}
|
|
6903
6912
|
if (!(n >= h)) {
|
|
6904
6913
|
var K0 = void 0;
|
|
6905
|
-
(n > 0 || e.hskipBeforeAndAfter) && (K0 =
|
|
6914
|
+
(n > 0 || e.hskipBeforeAndAfter) && (K0 = q.deflt(m0.pregap, w), K0 !== 0 && (g0 = b.makeSpan(["arraycolsep"], []), g0.style.width = A(K0), s0.push(g0)));
|
|
6906
6915
|
var J0 = [];
|
|
6907
6916
|
for (a = 0; a < s; ++a) {
|
|
6908
|
-
var
|
|
6909
|
-
if (
|
|
6910
|
-
var ha =
|
|
6911
|
-
|
|
6917
|
+
var ce = c[a], de = ce[n];
|
|
6918
|
+
if (de) {
|
|
6919
|
+
var ha = ce.pos - e0;
|
|
6920
|
+
de.depth = ce.depth, de.height = ce.height, J0.push({
|
|
6912
6921
|
type: "elem",
|
|
6913
|
-
elem:
|
|
6922
|
+
elem: de,
|
|
6914
6923
|
shift: ha
|
|
6915
6924
|
});
|
|
6916
6925
|
}
|
|
@@ -6918,7 +6927,7 @@ var k0 = function(e, t) {
|
|
|
6918
6927
|
J0 = b.makeVList({
|
|
6919
6928
|
positionType: "individualShift",
|
|
6920
6929
|
children: J0
|
|
6921
|
-
}, t), J0 = b.makeSpan(["col-align-" + (m0.align || "c")], [J0]), s0.push(J0), (n < h - 1 || e.hskipBeforeAndAfter) && (K0 =
|
|
6930
|
+
}, t), J0 = b.makeSpan(["col-align-" + (m0.align || "c")], [J0]), s0.push(J0), (n < h - 1 || e.hskipBeforeAndAfter) && (K0 = q.deflt(m0.postgap, w), K0 !== 0 && (g0 = b.makeSpan(["arraycolsep"], []), g0.style.width = A(K0), s0.push(g0)));
|
|
6922
6931
|
}
|
|
6923
6932
|
}
|
|
6924
6933
|
if (c = b.makeSpan(["mtable"], s0), p.length > 0) {
|
|
@@ -6927,15 +6936,15 @@ var k0 = function(e, t) {
|
|
|
6927
6936
|
elem: c,
|
|
6928
6937
|
shift: 0
|
|
6929
6938
|
}]; p.length > 0; ) {
|
|
6930
|
-
var
|
|
6931
|
-
|
|
6939
|
+
var Et = p.pop(), Rt = Et.pos - e0;
|
|
6940
|
+
Et.isDashed ? Ge.push({
|
|
6932
6941
|
type: "elem",
|
|
6933
6942
|
elem: ca,
|
|
6934
|
-
shift:
|
|
6943
|
+
shift: Rt
|
|
6935
6944
|
}) : Ge.push({
|
|
6936
6945
|
type: "elem",
|
|
6937
6946
|
elem: ma,
|
|
6938
|
-
shift:
|
|
6947
|
+
shift: Rt
|
|
6939
6948
|
});
|
|
6940
6949
|
}
|
|
6941
6950
|
c = b.makeVList({
|
|
@@ -6966,16 +6975,15 @@ var k0 = function(e, t) {
|
|
|
6966
6975
|
if (e.cols && e.cols.length > 0) {
|
|
6967
6976
|
var z = e.cols, T = "", C = !1, N = 0, O = z.length;
|
|
6968
6977
|
z[0].type === "separator" && (w += "top ", N = 1), z[z.length - 1].type === "separator" && (w += "bottom ", O -= 1);
|
|
6969
|
-
for (var
|
|
6970
|
-
z[
|
|
6978
|
+
for (var F = N; F < O; F++)
|
|
6979
|
+
z[F].type === "align" ? (x += Y1[z[F].align], C && (T += "none "), C = !0) : z[F].type === "separator" && C && (T += z[F].separator === "|" ? "solid " : "dashed ", C = !1);
|
|
6971
6980
|
g.setAttribute("columnalign", x.trim()), /[sd]/.test(T) && g.setAttribute("columnlines", T.trim());
|
|
6972
6981
|
}
|
|
6973
6982
|
if (e.colSeparationType === "align") {
|
|
6974
6983
|
for (var V = e.cols || [], L = "", U = 1; U < V.length; U++)
|
|
6975
6984
|
L += U % 2 ? "0em " : "1em ";
|
|
6976
6985
|
g.setAttribute("columnspacing", L.trim());
|
|
6977
|
-
} else
|
|
6978
|
-
e.colSeparationType === "alignat" || e.colSeparationType === "gather" ? g.setAttribute("columnspacing", "0em") : e.colSeparationType === "small" ? g.setAttribute("columnspacing", "0.2778em") : e.colSeparationType === "CD" ? g.setAttribute("columnspacing", "0.5em") : g.setAttribute("columnspacing", "1em");
|
|
6986
|
+
} else e.colSeparationType === "alignat" || e.colSeparationType === "gather" ? g.setAttribute("columnspacing", "0em") : e.colSeparationType === "small" ? g.setAttribute("columnspacing", "0.2778em") : e.colSeparationType === "CD" ? g.setAttribute("columnspacing", "0.5em") : g.setAttribute("columnspacing", "1em");
|
|
6979
6987
|
var G = "", j = e.hLinesBeforeRow;
|
|
6980
6988
|
w += j[0].length > 0 ? "left " : "", w += j[j.length - 1].length > 0 ? "right " : "";
|
|
6981
6989
|
for (var Y = 1; Y < j.length - 1; Y++)
|
|
@@ -6998,7 +7006,7 @@ var k0 = function(e, t) {
|
|
|
6998
7006
|
};
|
|
6999
7007
|
if (t[0] && t[0].type === "ordgroup") {
|
|
7000
7008
|
for (var g = "", y = 0; y < t[0].body.length; y++) {
|
|
7001
|
-
var w =
|
|
7009
|
+
var w = H(t[0].body[y], "textord");
|
|
7002
7010
|
g += w.text;
|
|
7003
7011
|
}
|
|
7004
7012
|
h = Number(g), c = h * 2;
|
|
@@ -7006,7 +7014,7 @@ var k0 = function(e, t) {
|
|
|
7006
7014
|
var x = !c;
|
|
7007
7015
|
o.body.forEach(function(N) {
|
|
7008
7016
|
for (var O = 1; O < N.length; O += 2) {
|
|
7009
|
-
var
|
|
7017
|
+
var F = H(N[O], "styling"), V = H(F.body[0], "ordgroup");
|
|
7010
7018
|
V.body.unshift(p);
|
|
7011
7019
|
}
|
|
7012
7020
|
if (x)
|
|
@@ -7035,7 +7043,7 @@ w0({
|
|
|
7035
7043
|
numArgs: 1
|
|
7036
7044
|
},
|
|
7037
7045
|
handler(r, e) {
|
|
7038
|
-
var t =
|
|
7046
|
+
var t = Re(e[0]), a = t ? [e[0]] : H(e[0], "ordgroup").body, n = a.map(function(o) {
|
|
7039
7047
|
var h = yt(o), c = h.text;
|
|
7040
7048
|
if ("lcr".indexOf(c) !== -1)
|
|
7041
7049
|
return {
|
|
@@ -7135,7 +7143,7 @@ w0({
|
|
|
7135
7143
|
numArgs: 1
|
|
7136
7144
|
},
|
|
7137
7145
|
handler(r, e) {
|
|
7138
|
-
var t =
|
|
7146
|
+
var t = Re(e[0]), a = t ? [e[0]] : H(e[0], "ordgroup").body, n = a.map(function(o) {
|
|
7139
7147
|
var h = yt(o), c = h.text;
|
|
7140
7148
|
if ("lc".indexOf(c) !== -1)
|
|
7141
7149
|
return {
|
|
@@ -7213,7 +7221,7 @@ w0({
|
|
|
7213
7221
|
numArgs: 0
|
|
7214
7222
|
},
|
|
7215
7223
|
handler(r) {
|
|
7216
|
-
|
|
7224
|
+
q.contains(["gather", "gather*"], r.envName) && Fe(r);
|
|
7217
7225
|
var e = {
|
|
7218
7226
|
cols: [{
|
|
7219
7227
|
type: "align",
|
|
@@ -7303,7 +7311,7 @@ B({
|
|
|
7303
7311
|
if (n.type !== "ordgroup")
|
|
7304
7312
|
throw new M("Invalid environment name", n);
|
|
7305
7313
|
for (var s = "", o = 0; o < n.body.length; ++o)
|
|
7306
|
-
s +=
|
|
7314
|
+
s += H(n.body[o], "textord").text;
|
|
7307
7315
|
if (a === "\\begin") {
|
|
7308
7316
|
if (!Qt.hasOwnProperty(s))
|
|
7309
7317
|
throw new M("No such environment: " + s, n);
|
|
@@ -7316,7 +7324,7 @@ B({
|
|
|
7316
7324
|
parser: t
|
|
7317
7325
|
}, y = h.handler(g, c, p);
|
|
7318
7326
|
t.expect("\\end", !1);
|
|
7319
|
-
var w = t.nextToken, x =
|
|
7327
|
+
var w = t.nextToken, x = H(t.parseFunction(), "environment");
|
|
7320
7328
|
if (x.name !== s)
|
|
7321
7329
|
throw new M("Mismatch: \\begin{" + s + "} matched by \\end{" + x.name + "}", w);
|
|
7322
7330
|
return y;
|
|
@@ -7349,6 +7357,7 @@ B({
|
|
|
7349
7357
|
"\\mathit",
|
|
7350
7358
|
"\\mathbf",
|
|
7351
7359
|
"\\mathnormal",
|
|
7360
|
+
"\\mathsfit",
|
|
7352
7361
|
// families
|
|
7353
7362
|
"\\mathbb",
|
|
7354
7363
|
"\\mathcal",
|
|
@@ -7369,7 +7378,7 @@ B({
|
|
|
7369
7378
|
var {
|
|
7370
7379
|
parser: t,
|
|
7371
7380
|
funcName: a
|
|
7372
|
-
} = r, n =
|
|
7381
|
+
} = r, n = Ne(e[0]), s = a;
|
|
7373
7382
|
return s in _t && (s = _t[s]), {
|
|
7374
7383
|
type: "font",
|
|
7375
7384
|
mode: t.mode,
|
|
@@ -7389,11 +7398,11 @@ B({
|
|
|
7389
7398
|
handler: (r, e) => {
|
|
7390
7399
|
var {
|
|
7391
7400
|
parser: t
|
|
7392
|
-
} = r, a = e[0], n =
|
|
7401
|
+
} = r, a = e[0], n = q.isCharacterBox(a);
|
|
7393
7402
|
return {
|
|
7394
7403
|
type: "mclass",
|
|
7395
7404
|
mode: t.mode,
|
|
7396
|
-
mclass:
|
|
7405
|
+
mclass: Ie(a),
|
|
7397
7406
|
body: [{
|
|
7398
7407
|
type: "font",
|
|
7399
7408
|
mode: t.mode,
|
|
@@ -7453,7 +7462,7 @@ var Jr = (r, e) => {
|
|
|
7453
7462
|
if (g) {
|
|
7454
7463
|
var O = e.fontMetrics().axisHeight;
|
|
7455
7464
|
x - o.depth - (O + 0.5 * y) < z && (x += z - (x - o.depth - (O + 0.5 * y))), O - 0.5 * y - (p.height - T) < z && (T += z - (O - 0.5 * y - (p.height - T)));
|
|
7456
|
-
var
|
|
7465
|
+
var F = -(O - 0.5 * y);
|
|
7457
7466
|
C = b.makeVList({
|
|
7458
7467
|
positionType: "individualShift",
|
|
7459
7468
|
children: [{
|
|
@@ -7463,7 +7472,7 @@ var Jr = (r, e) => {
|
|
|
7463
7472
|
}, {
|
|
7464
7473
|
type: "elem",
|
|
7465
7474
|
elem: g,
|
|
7466
|
-
shift:
|
|
7475
|
+
shift: F
|
|
7467
7476
|
}, {
|
|
7468
7477
|
type: "elem",
|
|
7469
7478
|
elem: o,
|
|
@@ -7671,16 +7680,16 @@ B({
|
|
|
7671
7680
|
handler(r, e) {
|
|
7672
7681
|
var {
|
|
7673
7682
|
parser: t
|
|
7674
|
-
} = r, a = e[4], n = e[5], s =
|
|
7683
|
+
} = r, a = e[4], n = e[5], s = Ne(e[0]), o = s.type === "atom" && s.family === "open" ? tr(s.text) : null, h = Ne(e[1]), c = h.type === "atom" && h.family === "close" ? tr(h.text) : null, p = H(e[2], "size"), g, y = null;
|
|
7675
7684
|
p.isBlank ? g = !0 : (y = p.value, g = y.number > 0);
|
|
7676
7685
|
var w = "auto", x = e[3];
|
|
7677
7686
|
if (x.type === "ordgroup") {
|
|
7678
7687
|
if (x.body.length > 0) {
|
|
7679
|
-
var z =
|
|
7688
|
+
var z = H(x.body[0], "textord");
|
|
7680
7689
|
w = er[Number(z.text)];
|
|
7681
7690
|
}
|
|
7682
7691
|
} else
|
|
7683
|
-
x =
|
|
7692
|
+
x = H(x, "textord"), w = er[Number(x.text)];
|
|
7684
7693
|
return {
|
|
7685
7694
|
type: "genfrac",
|
|
7686
7695
|
mode: t.mode,
|
|
@@ -7715,7 +7724,7 @@ B({
|
|
|
7715
7724
|
type: "infix",
|
|
7716
7725
|
mode: t.mode,
|
|
7717
7726
|
replaceWith: "\\\\abovefrac",
|
|
7718
|
-
size:
|
|
7727
|
+
size: H(e[0], "size").value,
|
|
7719
7728
|
token: n
|
|
7720
7729
|
};
|
|
7721
7730
|
}
|
|
@@ -7731,7 +7740,7 @@ B({
|
|
|
7731
7740
|
var {
|
|
7732
7741
|
parser: t,
|
|
7733
7742
|
funcName: a
|
|
7734
|
-
} = r, n = e[0], s = wa(
|
|
7743
|
+
} = r, n = e[0], s = wa(H(e[1], "infix").size), o = e[2], h = s.number > 0;
|
|
7735
7744
|
return {
|
|
7736
7745
|
type: "genfrac",
|
|
7737
7746
|
mode: t.mode,
|
|
@@ -7750,7 +7759,7 @@ B({
|
|
|
7750
7759
|
});
|
|
7751
7760
|
var Qr = (r, e) => {
|
|
7752
7761
|
var t = e.style, a, n;
|
|
7753
|
-
r.type === "supsub" ? (a = r.sup ? P(r.sup, e.havingStyle(t.sup()), e) : P(r.sub, e.havingStyle(t.sub()), e), n =
|
|
7762
|
+
r.type === "supsub" ? (a = r.sup ? P(r.sup, e.havingStyle(t.sup()), e) : P(r.sub, e.havingStyle(t.sub()), e), n = H(r.base, "horizBrace")) : n = H(r, "horizBrace");
|
|
7754
7763
|
var s = P(n.base, e.havingBaseStyle(R.DISPLAY)), o = N0.svgSpan(n, e), h;
|
|
7755
7764
|
if (n.isOver ? (h = b.makeVList({
|
|
7756
7765
|
positionType: "firstBaseline",
|
|
@@ -7844,7 +7853,7 @@ B({
|
|
|
7844
7853
|
handler: (r, e) => {
|
|
7845
7854
|
var {
|
|
7846
7855
|
parser: t
|
|
7847
|
-
} = r, a = e[1], n =
|
|
7856
|
+
} = r, a = e[1], n = H(e[0], "url").url;
|
|
7848
7857
|
return t.settings.isTrusted({
|
|
7849
7858
|
command: "\\href",
|
|
7850
7859
|
url: n
|
|
@@ -7875,7 +7884,7 @@ B({
|
|
|
7875
7884
|
handler: (r, e) => {
|
|
7876
7885
|
var {
|
|
7877
7886
|
parser: t
|
|
7878
|
-
} = r, a =
|
|
7887
|
+
} = r, a = H(e[0], "url").url;
|
|
7879
7888
|
if (!t.settings.isTrusted({
|
|
7880
7889
|
command: "\\url",
|
|
7881
7890
|
url: a
|
|
@@ -7943,7 +7952,7 @@ B({
|
|
|
7943
7952
|
parser: t,
|
|
7944
7953
|
funcName: a,
|
|
7945
7954
|
token: n
|
|
7946
|
-
} = r, s =
|
|
7955
|
+
} = r, s = H(e[0], "raw").string, o = e[1];
|
|
7947
7956
|
t.settings.strict && t.settings.reportNonstrict("htmlExtension", "HTML extension is disabled on strict mode");
|
|
7948
7957
|
var h, c = {};
|
|
7949
7958
|
switch (a) {
|
|
@@ -8063,7 +8072,7 @@ B({
|
|
|
8063
8072
|
unit: "em"
|
|
8064
8073
|
}, h = "";
|
|
8065
8074
|
if (t[0])
|
|
8066
|
-
for (var c =
|
|
8075
|
+
for (var c = H(t[0], "raw").string, p = c.split(","), g = 0; g < p.length; g++) {
|
|
8067
8076
|
var y = p[g].split("=");
|
|
8068
8077
|
if (y.length === 2) {
|
|
8069
8078
|
var w = y[1].trim();
|
|
@@ -8085,7 +8094,7 @@ B({
|
|
|
8085
8094
|
}
|
|
8086
8095
|
}
|
|
8087
8096
|
}
|
|
8088
|
-
var x =
|
|
8097
|
+
var x = H(e[0], "url").url;
|
|
8089
8098
|
return h === "" && (h = x, h = h.replace(/^.*[\\/]/, ""), h = h.substring(0, h.lastIndexOf("."))), a.settings.isTrusted({
|
|
8090
8099
|
command: "\\includegraphics",
|
|
8091
8100
|
url: x
|
|
@@ -8135,7 +8144,7 @@ B({
|
|
|
8135
8144
|
var {
|
|
8136
8145
|
parser: t,
|
|
8137
8146
|
funcName: a
|
|
8138
|
-
} = r, n =
|
|
8147
|
+
} = r, n = H(e[0], "size");
|
|
8139
8148
|
if (t.settings.strict) {
|
|
8140
8149
|
var s = a[1] === "m", o = n.value.unit === "mu";
|
|
8141
8150
|
s ? (o || t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + a + " supports only mu units, " + ("not " + n.value.unit + " units")), t.mode !== "math" && t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + a + " works only in math mode")) : o && t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + a + " doesn't support mu units");
|
|
@@ -8269,7 +8278,7 @@ B({
|
|
|
8269
8278
|
});
|
|
8270
8279
|
var _r = (r, e, t, a, n, s, o) => {
|
|
8271
8280
|
r = b.makeSpan([], [r]);
|
|
8272
|
-
var h = t &&
|
|
8281
|
+
var h = t && q.isCharacterBox(t), c, p;
|
|
8273
8282
|
if (e) {
|
|
8274
8283
|
var g = P(e, a.havingStyle(n.sup()), a);
|
|
8275
8284
|
p = {
|
|
@@ -8365,9 +8374,9 @@ var _r = (r, e, t, a, n, s, o) => {
|
|
|
8365
8374
|
return b.makeSpan(["mop", "op-limits"], C, a);
|
|
8366
8375
|
}, ea = ["\\smallint"], re = (r, e) => {
|
|
8367
8376
|
var t, a, n = !1, s;
|
|
8368
|
-
r.type === "supsub" ? (t = r.sup, a = r.sub, s =
|
|
8377
|
+
r.type === "supsub" ? (t = r.sup, a = r.sub, s = H(r.base, "op"), n = !0) : s = H(r, "op");
|
|
8369
8378
|
var o = e.style, h = !1;
|
|
8370
|
-
o.size === R.DISPLAY.size && s.symbol && !
|
|
8379
|
+
o.size === R.DISPLAY.size && s.symbol && !q.contains(ea, s.name) && (h = !0);
|
|
8371
8380
|
var c;
|
|
8372
8381
|
if (s.symbol) {
|
|
8373
8382
|
var p = h ? "Size2-Regular" : "Size1-Regular", g = "";
|
|
@@ -8388,23 +8397,23 @@ var _r = (r, e, t, a, n, s, o) => {
|
|
|
8388
8397
|
}
|
|
8389
8398
|
} else if (s.body) {
|
|
8390
8399
|
var x = t0(s.body, e, !0);
|
|
8391
|
-
x.length === 1 && x[0] instanceof
|
|
8400
|
+
x.length === 1 && x[0] instanceof p0 ? (c = x[0], c.classes[0] = "mop") : c = b.makeSpan(["mop"], x, e);
|
|
8392
8401
|
} else {
|
|
8393
8402
|
for (var z = [], T = 1; T < s.name.length; T++)
|
|
8394
8403
|
z.push(b.mathsym(s.name[T], s.mode, e));
|
|
8395
8404
|
c = b.makeSpan(["mop"], z, e);
|
|
8396
8405
|
}
|
|
8397
8406
|
var C = 0, N = 0;
|
|
8398
|
-
return (c instanceof
|
|
8399
|
-
},
|
|
8407
|
+
return (c instanceof p0 || s.name === "\\oiint" || s.name === "\\oiiint") && !s.suppressBaseShift && (C = (c.height - c.depth) / 2 - e.fontMetrics().axisHeight, N = c.italic), n ? _r(c, t, a, e, o, N, C) : (C && (c.style.position = "relative", c.style.top = A(C)), c);
|
|
8408
|
+
}, me = (r, e) => {
|
|
8400
8409
|
var t;
|
|
8401
8410
|
if (r.symbol)
|
|
8402
|
-
t = new c0("mo", [
|
|
8411
|
+
t = new c0("mo", [v0(r.name, r.mode)]), q.contains(ea, r.name) && t.setAttribute("largeop", "false");
|
|
8403
8412
|
else if (r.body)
|
|
8404
8413
|
t = new c0("mo", o0(r.body, e));
|
|
8405
8414
|
else {
|
|
8406
8415
|
t = new c0("mi", [new ie(r.name.slice(1))]);
|
|
8407
|
-
var a = new c0("mo", [
|
|
8416
|
+
var a = new c0("mo", [v0("", "text")]);
|
|
8408
8417
|
r.parentIsSupSub ? t = new c0("mrow", [t, a]) : t = Br([t, a]);
|
|
8409
8418
|
}
|
|
8410
8419
|
return t;
|
|
@@ -8443,7 +8452,7 @@ B({
|
|
|
8443
8452
|
};
|
|
8444
8453
|
},
|
|
8445
8454
|
htmlBuilder: re,
|
|
8446
|
-
mathmlBuilder:
|
|
8455
|
+
mathmlBuilder: me
|
|
8447
8456
|
});
|
|
8448
8457
|
B({
|
|
8449
8458
|
type: "op",
|
|
@@ -8466,7 +8475,7 @@ B({
|
|
|
8466
8475
|
};
|
|
8467
8476
|
},
|
|
8468
8477
|
htmlBuilder: re,
|
|
8469
|
-
mathmlBuilder:
|
|
8478
|
+
mathmlBuilder: me
|
|
8470
8479
|
});
|
|
8471
8480
|
var W1 = {
|
|
8472
8481
|
"∫": "\\int",
|
|
@@ -8497,7 +8506,7 @@ B({
|
|
|
8497
8506
|
};
|
|
8498
8507
|
},
|
|
8499
8508
|
htmlBuilder: re,
|
|
8500
|
-
mathmlBuilder:
|
|
8509
|
+
mathmlBuilder: me
|
|
8501
8510
|
});
|
|
8502
8511
|
B({
|
|
8503
8512
|
type: "op",
|
|
@@ -8520,7 +8529,7 @@ B({
|
|
|
8520
8529
|
};
|
|
8521
8530
|
},
|
|
8522
8531
|
htmlBuilder: re,
|
|
8523
|
-
mathmlBuilder:
|
|
8532
|
+
mathmlBuilder: me
|
|
8524
8533
|
});
|
|
8525
8534
|
B({
|
|
8526
8535
|
type: "op",
|
|
@@ -8543,11 +8552,11 @@ B({
|
|
|
8543
8552
|
};
|
|
8544
8553
|
},
|
|
8545
8554
|
htmlBuilder: re,
|
|
8546
|
-
mathmlBuilder:
|
|
8555
|
+
mathmlBuilder: me
|
|
8547
8556
|
});
|
|
8548
8557
|
var ta = (r, e) => {
|
|
8549
8558
|
var t, a, n = !1, s;
|
|
8550
|
-
r.type === "supsub" ? (t = r.sup, a = r.sub, s =
|
|
8559
|
+
r.type === "supsub" ? (t = r.sup, a = r.sub, s = H(r.base, "operatorname"), n = !0) : s = H(r, "operatorname");
|
|
8551
8560
|
var o;
|
|
8552
8561
|
if (s.body.length > 0) {
|
|
8553
8562
|
for (var h = s.body.map((y) => {
|
|
@@ -8559,7 +8568,7 @@ var ta = (r, e) => {
|
|
|
8559
8568
|
} : y;
|
|
8560
8569
|
}), c = t0(h, e.withFont("mathrm"), !0), p = 0; p < c.length; p++) {
|
|
8561
8570
|
var g = c[p];
|
|
8562
|
-
g instanceof
|
|
8571
|
+
g instanceof p0 && (g.text = g.text.replace(/\u2212/, "-").replace(/\u2217/, "*"));
|
|
8563
8572
|
}
|
|
8564
8573
|
o = b.makeSpan(["mop"], c, e);
|
|
8565
8574
|
} else
|
|
@@ -8568,25 +8577,25 @@ var ta = (r, e) => {
|
|
|
8568
8577
|
}, j1 = (r, e) => {
|
|
8569
8578
|
for (var t = o0(r.body, e.withFont("mathrm")), a = !0, n = 0; n < t.length; n++) {
|
|
8570
8579
|
var s = t[n];
|
|
8571
|
-
if (!(s instanceof S.SpaceNode))
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
}
|
|
8585
|
-
default:
|
|
8586
|
-
a = !1;
|
|
8580
|
+
if (!(s instanceof S.SpaceNode)) if (s instanceof S.MathNode)
|
|
8581
|
+
switch (s.type) {
|
|
8582
|
+
case "mi":
|
|
8583
|
+
case "mn":
|
|
8584
|
+
case "ms":
|
|
8585
|
+
case "mspace":
|
|
8586
|
+
case "mtext":
|
|
8587
|
+
break;
|
|
8588
|
+
// Do nothing yet.
|
|
8589
|
+
case "mo": {
|
|
8590
|
+
var o = s.children[0];
|
|
8591
|
+
s.children.length === 1 && o instanceof S.TextNode ? o.text = o.text.replace(/\u2212/, "-").replace(/\u2217/, "*") : a = !1;
|
|
8592
|
+
break;
|
|
8587
8593
|
}
|
|
8588
|
-
|
|
8589
|
-
|
|
8594
|
+
default:
|
|
8595
|
+
a = !1;
|
|
8596
|
+
}
|
|
8597
|
+
else
|
|
8598
|
+
a = !1;
|
|
8590
8599
|
}
|
|
8591
8600
|
if (a) {
|
|
8592
8601
|
var h = t.map((g) => g.toText()).join("");
|
|
@@ -8594,7 +8603,7 @@ var ta = (r, e) => {
|
|
|
8594
8603
|
}
|
|
8595
8604
|
var c = new S.MathNode("mi", t);
|
|
8596
8605
|
c.setAttribute("mathvariant", "normal");
|
|
8597
|
-
var p = new S.MathNode("mo", [
|
|
8606
|
+
var p = new S.MathNode("mo", [v0("", "text")]);
|
|
8598
8607
|
return r.parentIsSupSub ? new S.MathNode("mrow", [c, p]) : S.newDocumentFragment([c, p]);
|
|
8599
8608
|
};
|
|
8600
8609
|
B({
|
|
@@ -8770,7 +8779,7 @@ B({
|
|
|
8770
8779
|
handler(r, e) {
|
|
8771
8780
|
var {
|
|
8772
8781
|
parser: t
|
|
8773
|
-
} = r, a =
|
|
8782
|
+
} = r, a = H(e[0], "size").value, n = e[1];
|
|
8774
8783
|
return {
|
|
8775
8784
|
type: "raisebox",
|
|
8776
8785
|
mode: t.mode,
|
|
@@ -8817,16 +8826,18 @@ B({
|
|
|
8817
8826
|
props: {
|
|
8818
8827
|
numArgs: 2,
|
|
8819
8828
|
numOptionalArgs: 1,
|
|
8829
|
+
allowedInText: !0,
|
|
8830
|
+
allowedInMath: !0,
|
|
8820
8831
|
argTypes: ["size", "size", "size"]
|
|
8821
8832
|
},
|
|
8822
8833
|
handler(r, e, t) {
|
|
8823
8834
|
var {
|
|
8824
8835
|
parser: a
|
|
8825
|
-
} = r, n = t[0], s =
|
|
8836
|
+
} = r, n = t[0], s = H(e[0], "size"), o = H(e[1], "size");
|
|
8826
8837
|
return {
|
|
8827
8838
|
type: "rule",
|
|
8828
8839
|
mode: a.mode,
|
|
8829
|
-
shift: n &&
|
|
8840
|
+
shift: n && H(n, "size").value,
|
|
8830
8841
|
width: s.value,
|
|
8831
8842
|
height: o.value
|
|
8832
8843
|
};
|
|
@@ -8891,7 +8902,7 @@ B({
|
|
|
8891
8902
|
handler: (r, e, t) => {
|
|
8892
8903
|
var {
|
|
8893
8904
|
parser: a
|
|
8894
|
-
} = r, n = !1, s = !1, o = t[0] &&
|
|
8905
|
+
} = r, n = !1, s = !1, o = t[0] && H(t[0], "ordgroup");
|
|
8895
8906
|
if (o)
|
|
8896
8907
|
for (var h = "", c = 0; c < o.body.length; ++c) {
|
|
8897
8908
|
var p = o.body[c];
|
|
@@ -9062,15 +9073,14 @@ var K1 = function(e, t) {
|
|
|
9062
9073
|
return s ? ta : null;
|
|
9063
9074
|
} else {
|
|
9064
9075
|
if (a.type === "accent")
|
|
9065
|
-
return
|
|
9076
|
+
return q.isCharacterBox(a.base) ? xt : null;
|
|
9066
9077
|
if (a.type === "horizBrace") {
|
|
9067
9078
|
var o = !e.sub;
|
|
9068
9079
|
return o === a.isOver ? Qr : null;
|
|
9069
9080
|
} else
|
|
9070
9081
|
return null;
|
|
9071
9082
|
}
|
|
9072
|
-
else
|
|
9073
|
-
return null;
|
|
9083
|
+
else return null;
|
|
9074
9084
|
};
|
|
9075
9085
|
$0({
|
|
9076
9086
|
type: "supsub",
|
|
@@ -9082,7 +9092,7 @@ $0({
|
|
|
9082
9092
|
base: a,
|
|
9083
9093
|
sup: n,
|
|
9084
9094
|
sub: s
|
|
9085
|
-
} = r, o = P(a, e), h, c, p = e.fontMetrics(), g = 0, y = 0, w = a &&
|
|
9095
|
+
} = r, o = P(a, e), h, c, p = e.fontMetrics(), g = 0, y = 0, w = a && q.isCharacterBox(a);
|
|
9086
9096
|
if (n) {
|
|
9087
9097
|
var x = e.havingStyle(e.style.sup());
|
|
9088
9098
|
h = P(n, x, e), w || (g = o.height - x.fontMetrics().supDrop * x.sizeMultiplier / e.sizeMultiplier);
|
|
@@ -9095,8 +9105,8 @@ $0({
|
|
|
9095
9105
|
e.style === R.DISPLAY ? T = p.sup1 : e.style.cramped ? T = p.sup3 : T = p.sup2;
|
|
9096
9106
|
var C = e.sizeMultiplier, N = A(0.5 / p.ptPerEm / C), O = null;
|
|
9097
9107
|
if (c) {
|
|
9098
|
-
var
|
|
9099
|
-
(o instanceof
|
|
9108
|
+
var F = r.base && r.base.type === "op" && r.base.name && (r.base.name === "\\oiint" || r.base.name === "\\oiiint");
|
|
9109
|
+
(o instanceof p0 || F) && (O = A(-o.italic));
|
|
9100
9110
|
}
|
|
9101
9111
|
var V;
|
|
9102
9112
|
if (h && c) {
|
|
@@ -9180,12 +9190,11 @@ $0({
|
|
|
9180
9190
|
return b.mathsym(r.text, r.mode, e, ["m" + r.family]);
|
|
9181
9191
|
},
|
|
9182
9192
|
mathmlBuilder(r, e) {
|
|
9183
|
-
var t = new S.MathNode("mo", [
|
|
9193
|
+
var t = new S.MathNode("mo", [v0(r.text, r.mode)]);
|
|
9184
9194
|
if (r.family === "bin") {
|
|
9185
9195
|
var a = bt(r, e);
|
|
9186
9196
|
a === "bold-italic" && t.setAttribute("mathvariant", a);
|
|
9187
|
-
} else
|
|
9188
|
-
r.family === "punct" ? t.setAttribute("separator", "true") : (r.family === "open" || r.family === "close") && t.setAttribute("stretchy", "false");
|
|
9197
|
+
} else r.family === "punct" ? t.setAttribute("separator", "true") : (r.family === "open" || r.family === "close") && t.setAttribute("stretchy", "false");
|
|
9189
9198
|
return t;
|
|
9190
9199
|
}
|
|
9191
9200
|
});
|
|
@@ -9200,7 +9209,7 @@ $0({
|
|
|
9200
9209
|
return b.makeOrd(r, e, "mathord");
|
|
9201
9210
|
},
|
|
9202
9211
|
mathmlBuilder(r, e) {
|
|
9203
|
-
var t = new S.MathNode("mi", [
|
|
9212
|
+
var t = new S.MathNode("mi", [v0(r.text, r.mode, e)]), a = bt(r, e) || "italic";
|
|
9204
9213
|
return a !== aa[t.type] && t.setAttribute("mathvariant", a), t;
|
|
9205
9214
|
}
|
|
9206
9215
|
});
|
|
@@ -9210,7 +9219,7 @@ $0({
|
|
|
9210
9219
|
return b.makeOrd(r, e, "textord");
|
|
9211
9220
|
},
|
|
9212
9221
|
mathmlBuilder(r, e) {
|
|
9213
|
-
var t =
|
|
9222
|
+
var t = v0(r.text, r.mode, e), a = bt(r, e) || "normal", n;
|
|
9214
9223
|
return r.mode === "text" ? n = new S.MathNode("mtext", [t]) : /[0-9]/.test(r.text) ? n = new S.MathNode("mn", [t]) : r.text === "\\prime" ? n = new S.MathNode("mo", [t]) : n = new S.MathNode("mi", [t]), a !== aa[n.type] && n.setAttribute("mathvariant", a), n;
|
|
9215
9224
|
}
|
|
9216
9225
|
});
|
|
@@ -9281,7 +9290,15 @@ var sr = {
|
|
|
9281
9290
|
"\\textup": "textup"
|
|
9282
9291
|
}, or = (r, e) => {
|
|
9283
9292
|
var t = r.font;
|
|
9284
|
-
|
|
9293
|
+
if (t) {
|
|
9294
|
+
if (sr[t])
|
|
9295
|
+
return e.withTextFontFamily(sr[t]);
|
|
9296
|
+
if (lr[t])
|
|
9297
|
+
return e.withTextFontWeight(lr[t]);
|
|
9298
|
+
if (t === "\\emph")
|
|
9299
|
+
return e.fontShape === "textit" ? e.withTextFontShape("textup") : e.withTextFontShape("textit");
|
|
9300
|
+
} else return e;
|
|
9301
|
+
return e.withTextFontShape(J1[t]);
|
|
9285
9302
|
};
|
|
9286
9303
|
B({
|
|
9287
9304
|
type: "text",
|
|
@@ -9297,7 +9314,8 @@ B({
|
|
|
9297
9314
|
"\\textmd",
|
|
9298
9315
|
// Font Shapes
|
|
9299
9316
|
"\\textit",
|
|
9300
|
-
"\\textup"
|
|
9317
|
+
"\\textup",
|
|
9318
|
+
"\\emph"
|
|
9301
9319
|
],
|
|
9302
9320
|
props: {
|
|
9303
9321
|
numArgs: 1,
|
|
@@ -9426,7 +9444,7 @@ B({
|
|
|
9426
9444
|
return a.setAttribute("mathvariant", "monospace"), a;
|
|
9427
9445
|
}
|
|
9428
9446
|
});
|
|
9429
|
-
var ur = (r) => r.body.replace(/ /g, r.star ? "␣" : " "),
|
|
9447
|
+
var ur = (r) => r.body.replace(/ /g, r.star ? "␣" : " "), H0 = Ar, na = `[ \r
|
|
9430
9448
|
]`, Q1 = "\\\\[a-zA-Z@]+", _1 = "\\\\[^\uD800-\uDFFF]", e4 = "(" + Q1 + ")" + na + "*", t4 = `\\\\(
|
|
9431
9449
|
|[ \r ]+
|
|
9432
9450
|
?)[ \r ]*`, mt = "[̀-ͯ]", r4 = new RegExp(mt + "+$"), a4 = "(" + na + "+)|" + // whitespace
|
|
@@ -9458,17 +9476,17 @@ class hr {
|
|
|
9458
9476
|
lex() {
|
|
9459
9477
|
var e = this.input, t = this.tokenRegex.lastIndex;
|
|
9460
9478
|
if (t === e.length)
|
|
9461
|
-
return new
|
|
9479
|
+
return new f0("EOF", new u0(this, t, t));
|
|
9462
9480
|
var a = this.tokenRegex.exec(e);
|
|
9463
9481
|
if (a === null || a.index !== t)
|
|
9464
|
-
throw new M("Unexpected character: '" + e[t] + "'", new
|
|
9482
|
+
throw new M("Unexpected character: '" + e[t] + "'", new f0(e[t], new u0(this, t, t + 1)));
|
|
9465
9483
|
var n = a[6] || a[3] || (a[2] ? "\\ " : " ");
|
|
9466
9484
|
if (this.catcodes[n] === 14) {
|
|
9467
9485
|
var s = e.indexOf(`
|
|
9468
9486
|
`, this.tokenRegex.lastIndex);
|
|
9469
9487
|
return s === -1 ? (this.tokenRegex.lastIndex = e.length, this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")) : this.tokenRegex.lastIndex = s + 1, this.lex();
|
|
9470
9488
|
}
|
|
9471
|
-
return new
|
|
9489
|
+
return new f0(n, new u0(this, t, this.tokenRegex.lastIndex));
|
|
9472
9490
|
}
|
|
9473
9491
|
}
|
|
9474
9492
|
class n4 {
|
|
@@ -9677,7 +9695,7 @@ m("\\errmessage", (r) => {
|
|
|
9677
9695
|
});
|
|
9678
9696
|
m("\\show", (r) => {
|
|
9679
9697
|
var e = r.popToken(), t = e.text;
|
|
9680
|
-
return console.log(e, r.macros.get(t),
|
|
9698
|
+
return console.log(e, r.macros.get(t), H0[t], $.math[t], $.text[t]), "";
|
|
9681
9699
|
});
|
|
9682
9700
|
m("\\bgroup", "{");
|
|
9683
9701
|
m("\\egroup", "}");
|
|
@@ -9734,7 +9752,7 @@ m("\\ulcorner", '\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');
|
|
|
9734
9752
|
m("\\urcorner", '\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');
|
|
9735
9753
|
m("\\llcorner", '\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');
|
|
9736
9754
|
m("\\lrcorner", '\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');
|
|
9737
|
-
m("\\vdots", "
|
|
9755
|
+
m("\\vdots", "{\\varvdots\\rule{0pt}{15pt}}");
|
|
9738
9756
|
m("⋮", "\\vdots");
|
|
9739
9757
|
m("\\varGamma", "\\mathit{\\Gamma}");
|
|
9740
9758
|
m("\\varDelta", "\\mathit{\\Delta}");
|
|
@@ -9753,6 +9771,8 @@ m("\\boxed", "\\fbox{$\\displaystyle{#1}$}");
|
|
|
9753
9771
|
m("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;");
|
|
9754
9772
|
m("\\implies", "\\DOTSB\\;\\Longrightarrow\\;");
|
|
9755
9773
|
m("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;");
|
|
9774
|
+
m("\\dddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");
|
|
9775
|
+
m("\\ddddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");
|
|
9756
9776
|
var cr = {
|
|
9757
9777
|
",": "\\dotsc",
|
|
9758
9778
|
"\\not": "\\dotsb",
|
|
@@ -9810,7 +9830,7 @@ var cr = {
|
|
|
9810
9830
|
};
|
|
9811
9831
|
m("\\dots", function(r) {
|
|
9812
9832
|
var e = "\\dotso", t = r.expandAfterFuture().text;
|
|
9813
|
-
return t in cr ? e = cr[t] : (t.slice(0, 4) === "\\not" || t in $.math &&
|
|
9833
|
+
return t in cr ? e = cr[t] : (t.slice(0, 4) === "\\not" || t in $.math && q.contains(["bin", "rel"], $.math[t].group)) && (e = "\\dotsb"), e;
|
|
9814
9834
|
});
|
|
9815
9835
|
var Dt = {
|
|
9816
9836
|
// \rightdelim@ checks for the following:
|
|
@@ -9884,7 +9904,7 @@ m("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}");
|
|
|
9884
9904
|
m("\\mod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");
|
|
9885
9905
|
m("\\newline", "\\\\\\relax");
|
|
9886
9906
|
m("\\TeX", "\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");
|
|
9887
|
-
var ia = A(
|
|
9907
|
+
var ia = A(x0["Main-Regular"][84][1] - 0.7 * x0["Main-Regular"][65][1]);
|
|
9888
9908
|
m("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + ia + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}");
|
|
9889
9909
|
m("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + ia + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}");
|
|
9890
9910
|
m("\\hspace", "\\@ifstar\\@hspacer\\@hspace");
|
|
@@ -10212,7 +10232,7 @@ class s4 {
|
|
|
10212
10232
|
start: t,
|
|
10213
10233
|
end: a
|
|
10214
10234
|
} = this.consumeArg());
|
|
10215
|
-
return this.pushToken(new
|
|
10235
|
+
return this.pushToken(new f0("EOF", a.loc)), this.pushTokens(n), t.range(a, "");
|
|
10216
10236
|
}
|
|
10217
10237
|
/**
|
|
10218
10238
|
* Consume all following space tokens, without expansion.
|
|
@@ -10275,6 +10295,14 @@ class s4 {
|
|
|
10275
10295
|
o.push(this.consumeArg(t && t[h + 1]).tokens);
|
|
10276
10296
|
return o;
|
|
10277
10297
|
}
|
|
10298
|
+
/**
|
|
10299
|
+
* Increment `expansionCount` by the specified amount.
|
|
10300
|
+
* Throw an error if it exceeds `maxExpand`.
|
|
10301
|
+
*/
|
|
10302
|
+
countExpansion(e) {
|
|
10303
|
+
if (this.expansionCount += e, this.expansionCount > this.settings.maxExpand)
|
|
10304
|
+
throw new M("Too many expansions: infinite loop or need to increase maxExpand setting");
|
|
10305
|
+
}
|
|
10278
10306
|
/**
|
|
10279
10307
|
* Expand the next token only once if possible.
|
|
10280
10308
|
*
|
|
@@ -10301,8 +10329,7 @@ class s4 {
|
|
|
10301
10329
|
throw new M("Undefined control sequence: " + a);
|
|
10302
10330
|
return this.pushToken(t), !1;
|
|
10303
10331
|
}
|
|
10304
|
-
|
|
10305
|
-
throw new M("Too many expansions: infinite loop or need to increase maxExpand setting");
|
|
10332
|
+
this.countExpansion(1);
|
|
10306
10333
|
var s = n.tokens, o = this.consumeArgs(n.numArgs, n.delimiters);
|
|
10307
10334
|
if (n.numArgs) {
|
|
10308
10335
|
s = s.slice();
|
|
@@ -10347,7 +10374,7 @@ class s4 {
|
|
|
10347
10374
|
* tokens, or return `undefined` if no such macro is defined.
|
|
10348
10375
|
*/
|
|
10349
10376
|
expandMacro(e) {
|
|
10350
|
-
return this.macros.has(e) ? this.expandTokens([new
|
|
10377
|
+
return this.macros.has(e) ? this.expandTokens([new f0(e)]) : void 0;
|
|
10351
10378
|
}
|
|
10352
10379
|
/**
|
|
10353
10380
|
* Fully expand the given token stream and return the resulting list of
|
|
@@ -10361,7 +10388,7 @@ class s4 {
|
|
|
10361
10388
|
var n = this.stack.pop();
|
|
10362
10389
|
n.treatAsRelax && (n.noexpand = !1, n.treatAsRelax = !1), t.push(n);
|
|
10363
10390
|
}
|
|
10364
|
-
return t;
|
|
10391
|
+
return this.countExpansion(t.length), t;
|
|
10365
10392
|
}
|
|
10366
10393
|
/**
|
|
10367
10394
|
* Fully expand the given macro name and return the result as a string,
|
|
@@ -10408,17 +10435,17 @@ class s4 {
|
|
|
10408
10435
|
* `implicitCommands`.
|
|
10409
10436
|
*/
|
|
10410
10437
|
isDefined(e) {
|
|
10411
|
-
return this.macros.has(e) ||
|
|
10438
|
+
return this.macros.has(e) || H0.hasOwnProperty(e) || $.math.hasOwnProperty(e) || $.text.hasOwnProperty(e) || la.hasOwnProperty(e);
|
|
10412
10439
|
}
|
|
10413
10440
|
/**
|
|
10414
10441
|
* Determine whether a command is expandable.
|
|
10415
10442
|
*/
|
|
10416
10443
|
isExpandable(e) {
|
|
10417
10444
|
var t = this.macros.get(e);
|
|
10418
|
-
return t != null ? typeof t == "string" || typeof t == "function" || !t.unexpandable :
|
|
10445
|
+
return t != null ? typeof t == "string" || typeof t == "function" || !t.unexpandable : H0.hasOwnProperty(e) && !H0[e].primitive;
|
|
10419
10446
|
}
|
|
10420
10447
|
}
|
|
10421
|
-
var dr = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,
|
|
10448
|
+
var dr = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/, Me = Object.freeze({
|
|
10422
10449
|
"₊": "+",
|
|
10423
10450
|
"₋": "-",
|
|
10424
10451
|
"₌": "=",
|
|
@@ -10914,7 +10941,7 @@ var dr = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗ
|
|
|
10914
10941
|
Ώ: "Ώ",
|
|
10915
10942
|
Ὼ: "Ὼ"
|
|
10916
10943
|
};
|
|
10917
|
-
class
|
|
10944
|
+
class He {
|
|
10918
10945
|
constructor(e, t) {
|
|
10919
10946
|
this.mode = void 0, this.gullet = void 0, this.settings = void 0, this.leftrightDepth = void 0, this.nextToken = void 0, this.mode = "math", this.gullet = new s4(e, t, this.mode), this.settings = t, this.leftrightDepth = 0;
|
|
10920
10947
|
}
|
|
@@ -10965,7 +10992,7 @@ class ue {
|
|
|
10965
10992
|
*/
|
|
10966
10993
|
subparse(e) {
|
|
10967
10994
|
var t = this.nextToken;
|
|
10968
|
-
this.consume(), this.gullet.pushToken(new
|
|
10995
|
+
this.consume(), this.gullet.pushToken(new f0("}")), this.gullet.pushTokens(e);
|
|
10969
10996
|
var a = this.parseExpression(!1);
|
|
10970
10997
|
return this.expect("}"), this.nextToken = t, a;
|
|
10971
10998
|
}
|
|
@@ -10984,14 +11011,13 @@ class ue {
|
|
|
10984
11011
|
for (var a = []; ; ) {
|
|
10985
11012
|
this.mode === "math" && this.consumeSpaces();
|
|
10986
11013
|
var n = this.fetch();
|
|
10987
|
-
if (
|
|
11014
|
+
if (He.endOfExpression.indexOf(n.text) !== -1 || t && n.text === t || e && H0[n.text] && H0[n.text].infix)
|
|
10988
11015
|
break;
|
|
10989
11016
|
var s = this.parseAtom(t);
|
|
10990
11017
|
if (s) {
|
|
10991
11018
|
if (s.type === "internal")
|
|
10992
11019
|
continue;
|
|
10993
|
-
} else
|
|
10994
|
-
break;
|
|
11020
|
+
} else break;
|
|
10995
11021
|
a.push(s);
|
|
10996
11022
|
}
|
|
10997
11023
|
return this.mode === "text" && this.formLigatures(a), this.handleInfixNodes(a);
|
|
@@ -11102,16 +11128,16 @@ class ue {
|
|
|
11102
11128
|
mode: this.mode,
|
|
11103
11129
|
body: c
|
|
11104
11130
|
};
|
|
11105
|
-
} else if (
|
|
11106
|
-
var p =
|
|
11107
|
-
for (this.consume(); ; ) {
|
|
11131
|
+
} else if (Me[s.text]) {
|
|
11132
|
+
var p = dr.test(s.text), g = [];
|
|
11133
|
+
for (g.push(new f0(Me[s.text])), this.consume(); ; ) {
|
|
11108
11134
|
var y = this.fetch().text;
|
|
11109
|
-
if (!
|
|
11135
|
+
if (!Me[y] || dr.test(y) !== p)
|
|
11110
11136
|
break;
|
|
11111
|
-
|
|
11137
|
+
g.unshift(new f0(Me[y])), this.consume();
|
|
11112
11138
|
}
|
|
11113
|
-
var w =
|
|
11114
|
-
|
|
11139
|
+
var w = this.subparse(g);
|
|
11140
|
+
p ? n = {
|
|
11115
11141
|
type: "ordgroup",
|
|
11116
11142
|
mode: "math",
|
|
11117
11143
|
body: w
|
|
@@ -11135,7 +11161,7 @@ class ue {
|
|
|
11135
11161
|
* Parses an entire function, including its base and all of its arguments.
|
|
11136
11162
|
*/
|
|
11137
11163
|
parseFunction(e, t) {
|
|
11138
|
-
var a = this.fetch(), n = a.text, s =
|
|
11164
|
+
var a = this.fetch(), n = a.text, s = H0[n];
|
|
11139
11165
|
if (!s)
|
|
11140
11166
|
return null;
|
|
11141
11167
|
if (this.consume(), t && t !== "atom" && !s.allowedInArgument)
|
|
@@ -11159,7 +11185,7 @@ class ue {
|
|
|
11159
11185
|
parser: this,
|
|
11160
11186
|
token: n,
|
|
11161
11187
|
breakOnTokenText: s
|
|
11162
|
-
}, h =
|
|
11188
|
+
}, h = H0[e];
|
|
11163
11189
|
if (h && h.handler)
|
|
11164
11190
|
return h.handler(o, t, a);
|
|
11165
11191
|
throw new M("No function handler for " + e);
|
|
@@ -11481,11 +11507,11 @@ class ue {
|
|
|
11481
11507
|
return o;
|
|
11482
11508
|
}
|
|
11483
11509
|
}
|
|
11484
|
-
|
|
11510
|
+
He.endOfExpression = ["}", "\\endgroup", "\\end", "\\right", "&"];
|
|
11485
11511
|
var Ct = function(e, t) {
|
|
11486
11512
|
if (!(typeof e == "string" || e instanceof String))
|
|
11487
11513
|
throw new TypeError("KaTeX can only parse string typed expression");
|
|
11488
|
-
var a = new
|
|
11514
|
+
var a = new He(e, t);
|
|
11489
11515
|
delete a.gullet.macros.current["\\df@tag"];
|
|
11490
11516
|
var n = a.parse();
|
|
11491
11517
|
if (delete a.gullet.macros.current["\\current@color"], delete a.gullet.macros.current["\\color"], a.gullet.macros.get("\\df@tag")) {
|
|
@@ -11495,7 +11521,7 @@ var Ct = function(e, t) {
|
|
|
11495
11521
|
type: "tag",
|
|
11496
11522
|
mode: "text",
|
|
11497
11523
|
body: n,
|
|
11498
|
-
tag: a.subparse([new
|
|
11524
|
+
tag: a.subparse([new f0("\\df@tag")])
|
|
11499
11525
|
}];
|
|
11500
11526
|
}
|
|
11501
11527
|
return n;
|
|
@@ -11516,7 +11542,7 @@ var l4 = function(e, t) {
|
|
|
11516
11542
|
}, ua = function(e, t, a) {
|
|
11517
11543
|
if (a.throwOnError || !(e instanceof M))
|
|
11518
11544
|
throw e;
|
|
11519
|
-
var n = b.makeSpan(["katex-error"], [new
|
|
11545
|
+
var n = b.makeSpan(["katex-error"], [new p0(t)]);
|
|
11520
11546
|
return n.setAttribute("title", e.toString()), n.setAttribute("style", "color:" + a.errorColor), n;
|
|
11521
11547
|
}, Nt = function(e, t) {
|
|
11522
11548
|
var a = new ct(t);
|
|
@@ -11538,7 +11564,7 @@ var l4 = function(e, t) {
|
|
|
11538
11564
|
/**
|
|
11539
11565
|
* Current KaTeX version
|
|
11540
11566
|
*/
|
|
11541
|
-
version: "0.16.
|
|
11567
|
+
version: "0.16.15",
|
|
11542
11568
|
/**
|
|
11543
11569
|
* Renders the given LaTeX into an HTML+MathML combination, and adds
|
|
11544
11570
|
* it as a child to the specified DOM node.
|
|
@@ -11556,7 +11582,7 @@ var l4 = function(e, t) {
|
|
|
11556
11582
|
/**
|
|
11557
11583
|
* The shema of Settings
|
|
11558
11584
|
*/
|
|
11559
|
-
SETTINGS_SCHEMA:
|
|
11585
|
+
SETTINGS_SCHEMA: ze,
|
|
11560
11586
|
/**
|
|
11561
11587
|
* Parses the given LaTeX into KaTeX's internal parse tree structure,
|
|
11562
11588
|
* without rendering to HTML or MathML.
|
|
@@ -11611,9 +11637,9 @@ var l4 = function(e, t) {
|
|
|
11611
11637
|
* to change. Use at your own risk.
|
|
11612
11638
|
*/
|
|
11613
11639
|
__domTree: {
|
|
11614
|
-
Span:
|
|
11640
|
+
Span: he,
|
|
11615
11641
|
Anchor: pt,
|
|
11616
|
-
SymbolNode:
|
|
11642
|
+
SymbolNode: p0,
|
|
11617
11643
|
SvgNode: D0,
|
|
11618
11644
|
PathNode: P0,
|
|
11619
11645
|
LineNode: it
|