jekyll-latex-block 0.11.1 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -3
- data/lib/jekyll/latex_block/version.rb +1 -1
- data/lib/js/katex.js +1140 -1257
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29d0e6af9b01547225770694ef08748be0e442479d883a13b76550580b3c106b
|
4
|
+
data.tar.gz: 7c5b255cf9d86bc907d7672c64e5c345bbdcd3a53aa18584a5020a65b79686af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b8ff7e0ec3ca1d623fde3572061d3dbd3dbb7c4c343387ebb2ad40bc555cf687f6cc3d51a29846846baa4a79d26649207636c819aa08c090e6b77df9c8a4951
|
7
|
+
data.tar.gz: a31443d39967bb856e08c6d874e67737f872a277bf2d4f04cc937bdafdb9a9c023152604ef3a9bb4c6bf686b02d8a138512a6b116c1ebca324b56fca5b2a5726
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ Add this gem to your project's `Gemfile`:
|
|
17
17
|
|
18
18
|
```ruby
|
19
19
|
group :jekyll_plugins do
|
20
|
-
gem "jekyll-latex-block", "~> 0.
|
20
|
+
gem "jekyll-latex-block", "~> 0.12.0"
|
21
21
|
end
|
22
22
|
```
|
23
23
|
|
@@ -52,10 +52,17 @@ client-side JavaScript.
|
|
52
52
|
|
53
53
|
### Easy-mode CSS & Fonts Integration :heavy_check_mark:
|
54
54
|
|
55
|
-
Place the following stylesheet
|
55
|
+
Place the following stylesheet just above your closing `</body>` tag.
|
56
|
+
|
57
|
+
<details>
|
58
|
+
<summary>Why not place it in the <tt><head></tt>?</summary>
|
59
|
+
CSS is a blocking resource. If this external resource is (a) placed in the head, and (b) were to not load (or slowly load) for whatever reason, it would block the entire page from rendering.
|
60
|
+
<br><br>
|
61
|
+
The official recommendation for using this plugin is "external CSS belongs at the end of the body". Ultimately, you can do whatever you want. :shrug:
|
62
|
+
</details>
|
56
63
|
|
57
64
|
```html
|
58
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.
|
65
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/katex.min.css" integrity="sha512-h7nl+xz8wgDlNM4NqKEM4F1NkIRS17M9+uJwIGwuo8vGqIl4BhuCKdxjWEINm+xyrUjNCnK5dCrhM0sj+wTIXw==" crossorigin="anonymous" />
|
59
66
|
```
|
60
67
|
|
61
68
|
### Hard-mode CSS & Fonts Integration :warning:
|
data/lib/js/katex.js
CHANGED
@@ -177,10 +177,14 @@ function () {
|
|
177
177
|
var Token_Token =
|
178
178
|
/*#__PURE__*/
|
179
179
|
function () {
|
180
|
+
// don't expand the token
|
181
|
+
// used in \noexpand
|
180
182
|
function Token(text, // the text of this token
|
181
183
|
loc) {
|
182
184
|
this.text = void 0;
|
183
185
|
this.loc = void 0;
|
186
|
+
this.noexpand = void 0;
|
187
|
+
this.treatAsRelax = void 0;
|
184
188
|
this.text = text;
|
185
189
|
this.loc = loc;
|
186
190
|
}
|
@@ -418,6 +422,7 @@ function () {
|
|
418
422
|
this.trust = void 0;
|
419
423
|
this.maxSize = void 0;
|
420
424
|
this.maxExpand = void 0;
|
425
|
+
this.globalGroup = void 0;
|
421
426
|
// allow null options
|
422
427
|
options = options || {};
|
423
428
|
this.displayMode = utils.deflt(options.displayMode, false);
|
@@ -433,6 +438,7 @@ function () {
|
|
433
438
|
this.trust = utils.deflt(options.trust, false);
|
434
439
|
this.maxSize = Math.max(0, utils.deflt(options.maxSize, Infinity));
|
435
440
|
this.maxExpand = Math.max(0, utils.deflt(options.maxExpand, 1000));
|
441
|
+
this.globalGroup = utils.deflt(options.globalGroup, false);
|
436
442
|
}
|
437
443
|
/**
|
438
444
|
* Report nonstrict (non-LaTeX-compatible) input.
|
@@ -844,6 +850,9 @@ var sqrtPath = function sqrtPath(size, extraViniculum, viewBoxHeight) {
|
|
844
850
|
return path;
|
845
851
|
};
|
846
852
|
var svgGeometry_path = {
|
853
|
+
// Two paths that cover gaps in built-up parentheses.
|
854
|
+
leftParenInner: "M291 0 H417 V300 H291 z",
|
855
|
+
rightParenInner: "M457 0 H583 V300 H457 z",
|
847
856
|
// The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main
|
848
857
|
doubleleftarrow: "M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",
|
849
858
|
// doublerightarrow is from glyph U+21D2 in font KaTeX Main
|
@@ -1568,6 +1577,7 @@ function assertSpan(group) {
|
|
1568
1577
|
// This file is GENERATED by buildMetrics.sh. DO NOT MODIFY.
|
1569
1578
|
/* harmony default export */ var fontMetricsData = ({
|
1570
1579
|
"AMS-Regular": {
|
1580
|
+
"32": [0, 0, 0, 0, 0.25],
|
1571
1581
|
"65": [0, 0.68889, 0, 0, 0.72222],
|
1572
1582
|
"66": [0, 0.68889, 0, 0, 0.66667],
|
1573
1583
|
"67": [0, 0.68889, 0, 0, 0.72222],
|
@@ -1595,6 +1605,7 @@ function assertSpan(group) {
|
|
1595
1605
|
"89": [0, 0.68889, 0, 0, 0.72222],
|
1596
1606
|
"90": [0, 0.68889, 0, 0, 0.66667],
|
1597
1607
|
"107": [0, 0.68889, 0, 0, 0.55556],
|
1608
|
+
"160": [0, 0, 0, 0, 0.25],
|
1598
1609
|
"165": [0, 0.675, 0.025, 0, 0.75],
|
1599
1610
|
"174": [0.15559, 0.69224, 0, 0, 0.94666],
|
1600
1611
|
"240": [0, 0.68889, 0, 0, 0.55556],
|
@@ -1825,16 +1836,7 @@ function assertSpan(group) {
|
|
1825
1836
|
"57371": [0.13597, 0.63597, 0, 0, 0.77778]
|
1826
1837
|
},
|
1827
1838
|
"Caligraphic-Regular": {
|
1828
|
-
"
|
1829
|
-
"49": [0, 0.43056, 0, 0, 0.5],
|
1830
|
-
"50": [0, 0.43056, 0, 0, 0.5],
|
1831
|
-
"51": [0.19444, 0.43056, 0, 0, 0.5],
|
1832
|
-
"52": [0.19444, 0.43056, 0, 0, 0.5],
|
1833
|
-
"53": [0.19444, 0.43056, 0, 0, 0.5],
|
1834
|
-
"54": [0, 0.64444, 0, 0, 0.5],
|
1835
|
-
"55": [0.19444, 0.43056, 0, 0, 0.5],
|
1836
|
-
"56": [0, 0.64444, 0, 0, 0.5],
|
1837
|
-
"57": [0.19444, 0.43056, 0, 0, 0.5],
|
1839
|
+
"32": [0, 0, 0, 0, 0.25],
|
1838
1840
|
"65": [0, 0.68333, 0, 0.19445, 0.79847],
|
1839
1841
|
"66": [0, 0.68333, 0.03041, 0.13889, 0.65681],
|
1840
1842
|
"67": [0, 0.68333, 0.05834, 0.13889, 0.52653],
|
@@ -1860,9 +1862,11 @@ function assertSpan(group) {
|
|
1860
1862
|
"87": [0, 0.68333, 0.08222, 0.08334, 0.98778],
|
1861
1863
|
"88": [0, 0.68333, 0.14643, 0.13889, 0.7133],
|
1862
1864
|
"89": [0.09722, 0.68333, 0.08222, 0.08334, 0.66834],
|
1863
|
-
"90": [0, 0.68333, 0.07944, 0.13889, 0.72473]
|
1865
|
+
"90": [0, 0.68333, 0.07944, 0.13889, 0.72473],
|
1866
|
+
"160": [0, 0, 0, 0, 0.25]
|
1864
1867
|
},
|
1865
1868
|
"Fraktur-Regular": {
|
1869
|
+
"32": [0, 0, 0, 0, 0.25],
|
1866
1870
|
"33": [0, 0.69141, 0, 0, 0.29574],
|
1867
1871
|
"34": [0, 0.69141, 0, 0, 0.21471],
|
1868
1872
|
"38": [0, 0.69141, 0, 0, 0.73786],
|
@@ -1944,6 +1948,7 @@ function assertSpan(group) {
|
|
1944
1948
|
"120": [0.18906, 0.47534, 0, 0, 0.38865],
|
1945
1949
|
"121": [0.18906, 0.47534, 0, 0, 0.49884],
|
1946
1950
|
"122": [0.18906, 0.47534, 0, 0, 0.39054],
|
1951
|
+
"160": [0, 0, 0, 0, 0.25],
|
1947
1952
|
"8216": [0, 0.69141, 0, 0, 0.21471],
|
1948
1953
|
"8217": [0, 0.69141, 0, 0, 0.21471],
|
1949
1954
|
"58112": [0, 0.62119, 0, 0, 0.49749],
|
@@ -1956,6 +1961,7 @@ function assertSpan(group) {
|
|
1956
1961
|
"58119": [0, 0.47534, 0, 0, 0.50073]
|
1957
1962
|
},
|
1958
1963
|
"Main-Bold": {
|
1964
|
+
"32": [0, 0, 0, 0, 0.25],
|
1959
1965
|
"33": [0, 0.69444, 0, 0, 0.35],
|
1960
1966
|
"34": [0, 0.69444, 0, 0, 0.60278],
|
1961
1967
|
"35": [0.19444, 0.69444, 0, 0, 0.95833],
|
@@ -2049,6 +2055,8 @@ function assertSpan(group) {
|
|
2049
2055
|
"124": [0.25, 0.75, 0, 0, 0.31944],
|
2050
2056
|
"125": [0.25, 0.75, 0, 0, 0.575],
|
2051
2057
|
"126": [0.35, 0.34444, 0, 0, 0.575],
|
2058
|
+
"160": [0, 0, 0, 0, 0.25],
|
2059
|
+
"163": [0, 0.69444, 0, 0, 0.86853],
|
2052
2060
|
"168": [0, 0.69444, 0, 0, 0.575],
|
2053
2061
|
"172": [0, 0.44444, 0, 0, 0.76666],
|
2054
2062
|
"176": [0, 0.69444, 0, 0, 0.86944],
|
@@ -2206,6 +2214,7 @@ function assertSpan(group) {
|
|
2206
2214
|
"57376": [0.19444, 0.69444, 0, 0, 0]
|
2207
2215
|
},
|
2208
2216
|
"Main-BoldItalic": {
|
2217
|
+
"32": [0, 0, 0, 0, 0.25],
|
2209
2218
|
"33": [0, 0.69444, 0.11417, 0, 0.38611],
|
2210
2219
|
"34": [0, 0.69444, 0.07939, 0, 0.62055],
|
2211
2220
|
"35": [0.19444, 0.69444, 0.06833, 0, 0.94444],
|
@@ -2292,7 +2301,7 @@ function assertSpan(group) {
|
|
2292
2301
|
"121": [0.19444, 0.44444, 0.105, 0, 0.56166],
|
2293
2302
|
"122": [0, 0.44444, 0.13889, 0, 0.49055],
|
2294
2303
|
"126": [0.35, 0.34444, 0.11472, 0, 0.59111],
|
2295
|
-
"
|
2304
|
+
"160": [0, 0, 0, 0, 0.25],
|
2296
2305
|
"168": [0, 0.69444, 0.11473, 0, 0.59111],
|
2297
2306
|
"176": [0, 0.69444, 0, 0, 0.94888],
|
2298
2307
|
"184": [0.17014, 0, 0, 0, 0.53222],
|
@@ -2334,6 +2343,7 @@ function assertSpan(group) {
|
|
2334
2343
|
"8221": [0, 0.69444, 0.07939, 0, 0.62055]
|
2335
2344
|
},
|
2336
2345
|
"Main-Italic": {
|
2346
|
+
"32": [0, 0, 0, 0, 0.25],
|
2337
2347
|
"33": [0, 0.69444, 0.12417, 0, 0.30667],
|
2338
2348
|
"34": [0, 0.69444, 0.06961, 0, 0.51444],
|
2339
2349
|
"35": [0.19444, 0.69444, 0.06616, 0, 0.81777],
|
@@ -2420,7 +2430,7 @@ function assertSpan(group) {
|
|
2420
2430
|
"121": [0.19444, 0.43056, 0.08847, 0, 0.48555],
|
2421
2431
|
"122": [0, 0.43056, 0.12292, 0, 0.40889],
|
2422
2432
|
"126": [0.35, 0.31786, 0.11585, 0, 0.51111],
|
2423
|
-
"
|
2433
|
+
"160": [0, 0, 0, 0, 0.25],
|
2424
2434
|
"168": [0, 0.66786, 0.10474, 0, 0.51111],
|
2425
2435
|
"176": [0, 0.69444, 0, 0, 0.83129],
|
2426
2436
|
"184": [0.17014, 0, 0, 0, 0.46],
|
@@ -2429,10 +2439,8 @@ function assertSpan(group) {
|
|
2429
2439
|
"223": [0.19444, 0.69444, 0.10514, 0, 0.53666],
|
2430
2440
|
"230": [0, 0.43056, 0.07514, 0, 0.71555],
|
2431
2441
|
"248": [0.09722, 0.52778, 0.09194, 0, 0.51111],
|
2432
|
-
"305": [0, 0.43056, 0, 0.02778, 0.32246],
|
2433
2442
|
"338": [0, 0.68333, 0.12028, 0, 0.98499],
|
2434
2443
|
"339": [0, 0.43056, 0.07514, 0, 0.71555],
|
2435
|
-
"567": [0.19444, 0.43056, 0, 0.08334, 0.38403],
|
2436
2444
|
"710": [0, 0.69444, 0.06646, 0, 0.51111],
|
2437
2445
|
"711": [0, 0.62847, 0.08295, 0, 0.51111],
|
2438
2446
|
"713": [0, 0.56167, 0.10333, 0, 0.51111],
|
@@ -2558,6 +2566,7 @@ function assertSpan(group) {
|
|
2558
2566
|
"125": [0.25, 0.75, 0, 0, 0.5],
|
2559
2567
|
"126": [0.35, 0.31786, 0, 0, 0.5],
|
2560
2568
|
"160": [0, 0, 0, 0, 0.25],
|
2569
|
+
"163": [0, 0.69444, 0, 0, 0.76909],
|
2561
2570
|
"167": [0.19444, 0.69444, 0, 0, 0.44445],
|
2562
2571
|
"168": [0, 0.66786, 0, 0, 0.5],
|
2563
2572
|
"172": [0, 0.43056, 0, 0, 0.66667],
|
@@ -2740,6 +2749,17 @@ function assertSpan(group) {
|
|
2740
2749
|
"57376": [0.19444, 0.69444, 0, 0, 0]
|
2741
2750
|
},
|
2742
2751
|
"Math-BoldItalic": {
|
2752
|
+
"32": [0, 0, 0, 0, 0.25],
|
2753
|
+
"48": [0, 0.44444, 0, 0, 0.575],
|
2754
|
+
"49": [0, 0.44444, 0, 0, 0.575],
|
2755
|
+
"50": [0, 0.44444, 0, 0, 0.575],
|
2756
|
+
"51": [0.19444, 0.44444, 0, 0, 0.575],
|
2757
|
+
"52": [0.19444, 0.44444, 0, 0, 0.575],
|
2758
|
+
"53": [0.19444, 0.44444, 0, 0, 0.575],
|
2759
|
+
"54": [0, 0.64444, 0, 0, 0.575],
|
2760
|
+
"55": [0.19444, 0.44444, 0, 0, 0.575],
|
2761
|
+
"56": [0, 0.64444, 0, 0, 0.575],
|
2762
|
+
"57": [0.19444, 0.44444, 0, 0, 0.575],
|
2743
2763
|
"65": [0, 0.68611, 0, 0, 0.86944],
|
2744
2764
|
"66": [0, 0.68611, 0.04835, 0, 0.8664],
|
2745
2765
|
"67": [0, 0.68611, 0.06979, 0, 0.81694],
|
@@ -2792,6 +2812,7 @@ function assertSpan(group) {
|
|
2792
2812
|
"120": [0, 0.44444, 0, 0, 0.65903],
|
2793
2813
|
"121": [0.19444, 0.44444, 0.03704, 0, 0.59028],
|
2794
2814
|
"122": [0, 0.44444, 0.04213, 0, 0.55509],
|
2815
|
+
"160": [0, 0, 0, 0, 0.25],
|
2795
2816
|
"915": [0, 0.68611, 0.15972, 0, 0.65694],
|
2796
2817
|
"916": [0, 0.68611, 0, 0, 0.95833],
|
2797
2818
|
"920": [0, 0.68611, 0.03194, 0, 0.86722],
|
@@ -2832,9 +2853,22 @@ function assertSpan(group) {
|
|
2832
2853
|
"981": [0.19444, 0.69444, 0, 0, 0.7125],
|
2833
2854
|
"982": [0, 0.44444, 0.03194, 0, 0.975],
|
2834
2855
|
"1009": [0.19444, 0.44444, 0, 0, 0.6118],
|
2835
|
-
"1013": [0, 0.44444, 0, 0, 0.48333]
|
2856
|
+
"1013": [0, 0.44444, 0, 0, 0.48333],
|
2857
|
+
"57649": [0, 0.44444, 0, 0, 0.39352],
|
2858
|
+
"57911": [0.19444, 0.44444, 0, 0, 0.43889]
|
2836
2859
|
},
|
2837
2860
|
"Math-Italic": {
|
2861
|
+
"32": [0, 0, 0, 0, 0.25],
|
2862
|
+
"48": [0, 0.43056, 0, 0, 0.5],
|
2863
|
+
"49": [0, 0.43056, 0, 0, 0.5],
|
2864
|
+
"50": [0, 0.43056, 0, 0, 0.5],
|
2865
|
+
"51": [0.19444, 0.43056, 0, 0, 0.5],
|
2866
|
+
"52": [0.19444, 0.43056, 0, 0, 0.5],
|
2867
|
+
"53": [0.19444, 0.43056, 0, 0, 0.5],
|
2868
|
+
"54": [0, 0.64444, 0, 0, 0.5],
|
2869
|
+
"55": [0.19444, 0.43056, 0, 0, 0.5],
|
2870
|
+
"56": [0, 0.64444, 0, 0, 0.5],
|
2871
|
+
"57": [0.19444, 0.43056, 0, 0, 0.5],
|
2838
2872
|
"65": [0, 0.68333, 0, 0.13889, 0.75],
|
2839
2873
|
"66": [0, 0.68333, 0.05017, 0.08334, 0.75851],
|
2840
2874
|
"67": [0, 0.68333, 0.07153, 0.08334, 0.71472],
|
@@ -2887,6 +2921,7 @@ function assertSpan(group) {
|
|
2887
2921
|
"120": [0, 0.43056, 0, 0.02778, 0.57153],
|
2888
2922
|
"121": [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],
|
2889
2923
|
"122": [0, 0.43056, 0.04398, 0.05556, 0.46505],
|
2924
|
+
"160": [0, 0, 0, 0, 0.25],
|
2890
2925
|
"915": [0, 0.68333, 0.13889, 0.08334, 0.61528],
|
2891
2926
|
"916": [0, 0.68333, 0, 0.16667, 0.83334],
|
2892
2927
|
"920": [0, 0.68333, 0.02778, 0.08334, 0.76278],
|
@@ -2927,104 +2962,12 @@ function assertSpan(group) {
|
|
2927
2962
|
"981": [0.19444, 0.69444, 0, 0.08334, 0.59583],
|
2928
2963
|
"982": [0, 0.43056, 0.02778, 0, 0.82813],
|
2929
2964
|
"1009": [0.19444, 0.43056, 0, 0.08334, 0.51702],
|
2930
|
-
"1013": [0, 0.43056, 0, 0.05556, 0.4059]
|
2931
|
-
|
2932
|
-
|
2933
|
-
"65": [0, 0.68333, 0, 0.13889, 0.75],
|
2934
|
-
"66": [0, 0.68333, 0.05017, 0.08334, 0.75851],
|
2935
|
-
"67": [0, 0.68333, 0.07153, 0.08334, 0.71472],
|
2936
|
-
"68": [0, 0.68333, 0.02778, 0.05556, 0.82792],
|
2937
|
-
"69": [0, 0.68333, 0.05764, 0.08334, 0.7382],
|
2938
|
-
"70": [0, 0.68333, 0.13889, 0.08334, 0.64306],
|
2939
|
-
"71": [0, 0.68333, 0, 0.08334, 0.78625],
|
2940
|
-
"72": [0, 0.68333, 0.08125, 0.05556, 0.83125],
|
2941
|
-
"73": [0, 0.68333, 0.07847, 0.11111, 0.43958],
|
2942
|
-
"74": [0, 0.68333, 0.09618, 0.16667, 0.55451],
|
2943
|
-
"75": [0, 0.68333, 0.07153, 0.05556, 0.84931],
|
2944
|
-
"76": [0, 0.68333, 0, 0.02778, 0.68056],
|
2945
|
-
"77": [0, 0.68333, 0.10903, 0.08334, 0.97014],
|
2946
|
-
"78": [0, 0.68333, 0.10903, 0.08334, 0.80347],
|
2947
|
-
"79": [0, 0.68333, 0.02778, 0.08334, 0.76278],
|
2948
|
-
"80": [0, 0.68333, 0.13889, 0.08334, 0.64201],
|
2949
|
-
"81": [0.19444, 0.68333, 0, 0.08334, 0.79056],
|
2950
|
-
"82": [0, 0.68333, 0.00773, 0.08334, 0.75929],
|
2951
|
-
"83": [0, 0.68333, 0.05764, 0.08334, 0.6132],
|
2952
|
-
"84": [0, 0.68333, 0.13889, 0.08334, 0.58438],
|
2953
|
-
"85": [0, 0.68333, 0.10903, 0.02778, 0.68278],
|
2954
|
-
"86": [0, 0.68333, 0.22222, 0, 0.58333],
|
2955
|
-
"87": [0, 0.68333, 0.13889, 0, 0.94445],
|
2956
|
-
"88": [0, 0.68333, 0.07847, 0.08334, 0.82847],
|
2957
|
-
"89": [0, 0.68333, 0.22222, 0, 0.58056],
|
2958
|
-
"90": [0, 0.68333, 0.07153, 0.08334, 0.68264],
|
2959
|
-
"97": [0, 0.43056, 0, 0, 0.52859],
|
2960
|
-
"98": [0, 0.69444, 0, 0, 0.42917],
|
2961
|
-
"99": [0, 0.43056, 0, 0.05556, 0.43276],
|
2962
|
-
"100": [0, 0.69444, 0, 0.16667, 0.52049],
|
2963
|
-
"101": [0, 0.43056, 0, 0.05556, 0.46563],
|
2964
|
-
"102": [0.19444, 0.69444, 0.10764, 0.16667, 0.48959],
|
2965
|
-
"103": [0.19444, 0.43056, 0.03588, 0.02778, 0.47697],
|
2966
|
-
"104": [0, 0.69444, 0, 0, 0.57616],
|
2967
|
-
"105": [0, 0.65952, 0, 0, 0.34451],
|
2968
|
-
"106": [0.19444, 0.65952, 0.05724, 0, 0.41181],
|
2969
|
-
"107": [0, 0.69444, 0.03148, 0, 0.5206],
|
2970
|
-
"108": [0, 0.69444, 0.01968, 0.08334, 0.29838],
|
2971
|
-
"109": [0, 0.43056, 0, 0, 0.87801],
|
2972
|
-
"110": [0, 0.43056, 0, 0, 0.60023],
|
2973
|
-
"111": [0, 0.43056, 0, 0.05556, 0.48472],
|
2974
|
-
"112": [0.19444, 0.43056, 0, 0.08334, 0.50313],
|
2975
|
-
"113": [0.19444, 0.43056, 0.03588, 0.08334, 0.44641],
|
2976
|
-
"114": [0, 0.43056, 0.02778, 0.05556, 0.45116],
|
2977
|
-
"115": [0, 0.43056, 0, 0.05556, 0.46875],
|
2978
|
-
"116": [0, 0.61508, 0, 0.08334, 0.36111],
|
2979
|
-
"117": [0, 0.43056, 0, 0.02778, 0.57246],
|
2980
|
-
"118": [0, 0.43056, 0.03588, 0.02778, 0.48472],
|
2981
|
-
"119": [0, 0.43056, 0.02691, 0.08334, 0.71592],
|
2982
|
-
"120": [0, 0.43056, 0, 0.02778, 0.57153],
|
2983
|
-
"121": [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],
|
2984
|
-
"122": [0, 0.43056, 0.04398, 0.05556, 0.46505],
|
2985
|
-
"915": [0, 0.68333, 0.13889, 0.08334, 0.61528],
|
2986
|
-
"916": [0, 0.68333, 0, 0.16667, 0.83334],
|
2987
|
-
"920": [0, 0.68333, 0.02778, 0.08334, 0.76278],
|
2988
|
-
"923": [0, 0.68333, 0, 0.16667, 0.69445],
|
2989
|
-
"926": [0, 0.68333, 0.07569, 0.08334, 0.74236],
|
2990
|
-
"928": [0, 0.68333, 0.08125, 0.05556, 0.83125],
|
2991
|
-
"931": [0, 0.68333, 0.05764, 0.08334, 0.77986],
|
2992
|
-
"933": [0, 0.68333, 0.13889, 0.05556, 0.58333],
|
2993
|
-
"934": [0, 0.68333, 0, 0.08334, 0.66667],
|
2994
|
-
"936": [0, 0.68333, 0.11, 0.05556, 0.61222],
|
2995
|
-
"937": [0, 0.68333, 0.05017, 0.08334, 0.7724],
|
2996
|
-
"945": [0, 0.43056, 0.0037, 0.02778, 0.6397],
|
2997
|
-
"946": [0.19444, 0.69444, 0.05278, 0.08334, 0.56563],
|
2998
|
-
"947": [0.19444, 0.43056, 0.05556, 0, 0.51773],
|
2999
|
-
"948": [0, 0.69444, 0.03785, 0.05556, 0.44444],
|
3000
|
-
"949": [0, 0.43056, 0, 0.08334, 0.46632],
|
3001
|
-
"950": [0.19444, 0.69444, 0.07378, 0.08334, 0.4375],
|
3002
|
-
"951": [0.19444, 0.43056, 0.03588, 0.05556, 0.49653],
|
3003
|
-
"952": [0, 0.69444, 0.02778, 0.08334, 0.46944],
|
3004
|
-
"953": [0, 0.43056, 0, 0.05556, 0.35394],
|
3005
|
-
"954": [0, 0.43056, 0, 0, 0.57616],
|
3006
|
-
"955": [0, 0.69444, 0, 0, 0.58334],
|
3007
|
-
"956": [0.19444, 0.43056, 0, 0.02778, 0.60255],
|
3008
|
-
"957": [0, 0.43056, 0.06366, 0.02778, 0.49398],
|
3009
|
-
"958": [0.19444, 0.69444, 0.04601, 0.11111, 0.4375],
|
3010
|
-
"959": [0, 0.43056, 0, 0.05556, 0.48472],
|
3011
|
-
"960": [0, 0.43056, 0.03588, 0, 0.57003],
|
3012
|
-
"961": [0.19444, 0.43056, 0, 0.08334, 0.51702],
|
3013
|
-
"962": [0.09722, 0.43056, 0.07986, 0.08334, 0.36285],
|
3014
|
-
"963": [0, 0.43056, 0.03588, 0, 0.57141],
|
3015
|
-
"964": [0, 0.43056, 0.1132, 0.02778, 0.43715],
|
3016
|
-
"965": [0, 0.43056, 0.03588, 0.02778, 0.54028],
|
3017
|
-
"966": [0.19444, 0.43056, 0, 0.08334, 0.65417],
|
3018
|
-
"967": [0.19444, 0.43056, 0, 0.05556, 0.62569],
|
3019
|
-
"968": [0.19444, 0.69444, 0.03588, 0.11111, 0.65139],
|
3020
|
-
"969": [0, 0.43056, 0.03588, 0, 0.62245],
|
3021
|
-
"977": [0, 0.69444, 0, 0.08334, 0.59144],
|
3022
|
-
"981": [0.19444, 0.69444, 0, 0.08334, 0.59583],
|
3023
|
-
"982": [0, 0.43056, 0.02778, 0, 0.82813],
|
3024
|
-
"1009": [0.19444, 0.43056, 0, 0.08334, 0.51702],
|
3025
|
-
"1013": [0, 0.43056, 0, 0.05556, 0.4059]
|
2965
|
+
"1013": [0, 0.43056, 0, 0.05556, 0.4059],
|
2966
|
+
"57649": [0, 0.43056, 0, 0.02778, 0.32246],
|
2967
|
+
"57911": [0.19444, 0.43056, 0, 0.08334, 0.38403]
|
3026
2968
|
},
|
3027
2969
|
"SansSerif-Bold": {
|
2970
|
+
"32": [0, 0, 0, 0, 0.25],
|
3028
2971
|
"33": [0, 0.69444, 0, 0, 0.36667],
|
3029
2972
|
"34": [0, 0.69444, 0, 0, 0.55834],
|
3030
2973
|
"35": [0.19444, 0.69444, 0, 0, 0.91667],
|
@@ -3112,6 +3055,7 @@ function assertSpan(group) {
|
|
3112
3055
|
"121": [0.19444, 0.45833, 0.01528, 0, 0.5],
|
3113
3056
|
"122": [0, 0.45833, 0, 0, 0.47639],
|
3114
3057
|
"126": [0.35, 0.34444, 0, 0, 0.55],
|
3058
|
+
"160": [0, 0, 0, 0, 0.25],
|
3115
3059
|
"168": [0, 0.69444, 0, 0, 0.55],
|
3116
3060
|
"176": [0, 0.69444, 0, 0, 0.73334],
|
3117
3061
|
"180": [0, 0.69444, 0, 0, 0.55],
|
@@ -3145,6 +3089,7 @@ function assertSpan(group) {
|
|
3145
3089
|
"8221": [0, 0.69444, 0, 0, 0.55834]
|
3146
3090
|
},
|
3147
3091
|
"SansSerif-Italic": {
|
3092
|
+
"32": [0, 0, 0, 0, 0.25],
|
3148
3093
|
"33": [0, 0.69444, 0.05733, 0, 0.31945],
|
3149
3094
|
"34": [0, 0.69444, 0.00316, 0, 0.5],
|
3150
3095
|
"35": [0.19444, 0.69444, 0.05087, 0, 0.83334],
|
@@ -3232,6 +3177,7 @@ function assertSpan(group) {
|
|
3232
3177
|
"121": [0.19444, 0.44444, 0.10836, 0, 0.46111],
|
3233
3178
|
"122": [0, 0.44444, 0.08752, 0, 0.43472],
|
3234
3179
|
"126": [0.35, 0.32659, 0.08826, 0, 0.5],
|
3180
|
+
"160": [0, 0, 0, 0, 0.25],
|
3235
3181
|
"168": [0, 0.67937, 0.06385, 0, 0.5],
|
3236
3182
|
"176": [0, 0.69444, 0, 0, 0.73752],
|
3237
3183
|
"184": [0.17014, 0, 0, 0, 0.44445],
|
@@ -3266,6 +3212,7 @@ function assertSpan(group) {
|
|
3266
3212
|
"8221": [0, 0.69444, 0.00316, 0, 0.5]
|
3267
3213
|
},
|
3268
3214
|
"SansSerif-Regular": {
|
3215
|
+
"32": [0, 0, 0, 0, 0.25],
|
3269
3216
|
"33": [0, 0.69444, 0, 0, 0.31945],
|
3270
3217
|
"34": [0, 0.69444, 0, 0, 0.5],
|
3271
3218
|
"35": [0.19444, 0.69444, 0, 0, 0.83334],
|
@@ -3353,6 +3300,7 @@ function assertSpan(group) {
|
|
3353
3300
|
"121": [0.19444, 0.44444, 0.01389, 0, 0.46111],
|
3354
3301
|
"122": [0, 0.44444, 0, 0, 0.43472],
|
3355
3302
|
"126": [0.35, 0.32659, 0, 0, 0.5],
|
3303
|
+
"160": [0, 0, 0, 0, 0.25],
|
3356
3304
|
"168": [0, 0.67937, 0, 0, 0.5],
|
3357
3305
|
"176": [0, 0.69444, 0, 0, 0.66667],
|
3358
3306
|
"184": [0.17014, 0, 0, 0, 0.44445],
|
@@ -3387,6 +3335,7 @@ function assertSpan(group) {
|
|
3387
3335
|
"8221": [0, 0.69444, 0, 0, 0.5]
|
3388
3336
|
},
|
3389
3337
|
"Script-Regular": {
|
3338
|
+
"32": [0, 0, 0, 0, 0.25],
|
3390
3339
|
"65": [0, 0.7, 0.22925, 0, 0.80253],
|
3391
3340
|
"66": [0, 0.7, 0.04087, 0, 0.90757],
|
3392
3341
|
"67": [0, 0.7, 0.1689, 0, 0.66619],
|
@@ -3412,9 +3361,11 @@ function assertSpan(group) {
|
|
3412
3361
|
"87": [0, 0.7, 0.27523, 0, 0.80532],
|
3413
3362
|
"88": [0, 0.7, 0.26006, 0, 0.94445],
|
3414
3363
|
"89": [0, 0.7, 0.2939, 0, 0.70961],
|
3415
|
-
"90": [0, 0.7, 0.24037, 0, 0.8212]
|
3364
|
+
"90": [0, 0.7, 0.24037, 0, 0.8212],
|
3365
|
+
"160": [0, 0, 0, 0, 0.25]
|
3416
3366
|
},
|
3417
3367
|
"Size1-Regular": {
|
3368
|
+
"32": [0, 0, 0, 0, 0.25],
|
3418
3369
|
"40": [0.35001, 0.85, 0, 0, 0.45834],
|
3419
3370
|
"41": [0.35001, 0.85, 0, 0, 0.45834],
|
3420
3371
|
"47": [0.35001, 0.85, 0, 0, 0.57778],
|
@@ -3423,6 +3374,7 @@ function assertSpan(group) {
|
|
3423
3374
|
"93": [0.35001, 0.85, 0, 0, 0.41667],
|
3424
3375
|
"123": [0.35001, 0.85, 0, 0, 0.58334],
|
3425
3376
|
"125": [0.35001, 0.85, 0, 0, 0.58334],
|
3377
|
+
"160": [0, 0, 0, 0, 0.25],
|
3426
3378
|
"710": [0, 0.72222, 0, 0, 0.55556],
|
3427
3379
|
"732": [0, 0.72222, 0, 0, 0.55556],
|
3428
3380
|
"770": [0, 0.72222, 0, 0, 0.55556],
|
@@ -3460,6 +3412,7 @@ function assertSpan(group) {
|
|
3460
3412
|
"10758": [0.25001, 0.75, 0, 0, 0.83334]
|
3461
3413
|
},
|
3462
3414
|
"Size2-Regular": {
|
3415
|
+
"32": [0, 0, 0, 0, 0.25],
|
3463
3416
|
"40": [0.65002, 1.15, 0, 0, 0.59722],
|
3464
3417
|
"41": [0.65002, 1.15, 0, 0, 0.59722],
|
3465
3418
|
"47": [0.65002, 1.15, 0, 0, 0.81111],
|
@@ -3468,6 +3421,7 @@ function assertSpan(group) {
|
|
3468
3421
|
"93": [0.65002, 1.15, 0, 0, 0.47222],
|
3469
3422
|
"123": [0.65002, 1.15, 0, 0, 0.66667],
|
3470
3423
|
"125": [0.65002, 1.15, 0, 0, 0.66667],
|
3424
|
+
"160": [0, 0, 0, 0, 0.25],
|
3471
3425
|
"710": [0, 0.75, 0, 0, 1.0],
|
3472
3426
|
"732": [0, 0.75, 0, 0, 1.0],
|
3473
3427
|
"770": [0, 0.75, 0, 0, 1.0],
|
@@ -3497,6 +3451,7 @@ function assertSpan(group) {
|
|
3497
3451
|
"10758": [0.55001, 1.05, 0, 0, 1.11111]
|
3498
3452
|
},
|
3499
3453
|
"Size3-Regular": {
|
3454
|
+
"32": [0, 0, 0, 0, 0.25],
|
3500
3455
|
"40": [0.95003, 1.45, 0, 0, 0.73611],
|
3501
3456
|
"41": [0.95003, 1.45, 0, 0, 0.73611],
|
3502
3457
|
"47": [0.95003, 1.45, 0, 0, 1.04445],
|
@@ -3505,6 +3460,7 @@ function assertSpan(group) {
|
|
3505
3460
|
"93": [0.95003, 1.45, 0, 0, 0.52778],
|
3506
3461
|
"123": [0.95003, 1.45, 0, 0, 0.75],
|
3507
3462
|
"125": [0.95003, 1.45, 0, 0, 0.75],
|
3463
|
+
"160": [0, 0, 0, 0, 0.25],
|
3508
3464
|
"710": [0, 0.75, 0, 0, 1.44445],
|
3509
3465
|
"732": [0, 0.75, 0, 0, 1.44445],
|
3510
3466
|
"770": [0, 0.75, 0, 0, 1.44445],
|
@@ -3518,6 +3474,7 @@ function assertSpan(group) {
|
|
3518
3474
|
"10217": [0.95003, 1.45, 0, 0, 0.75]
|
3519
3475
|
},
|
3520
3476
|
"Size4-Regular": {
|
3477
|
+
"32": [0, 0, 0, 0, 0.25],
|
3521
3478
|
"40": [1.25003, 1.75, 0, 0, 0.79167],
|
3522
3479
|
"41": [1.25003, 1.75, 0, 0, 0.79167],
|
3523
3480
|
"47": [1.25003, 1.75, 0, 0, 1.27778],
|
@@ -3526,6 +3483,7 @@ function assertSpan(group) {
|
|
3526
3483
|
"93": [1.25003, 1.75, 0, 0, 0.58334],
|
3527
3484
|
"123": [1.25003, 1.75, 0, 0, 0.80556],
|
3528
3485
|
"125": [1.25003, 1.75, 0, 0, 0.80556],
|
3486
|
+
"160": [0, 0, 0, 0, 0.25],
|
3529
3487
|
"710": [0, 0.825, 0, 0, 1.8889],
|
3530
3488
|
"732": [0, 0.825, 0, 0, 1.8889],
|
3531
3489
|
"770": [0, 0.825, 0, 0, 1.8889],
|
@@ -4238,9 +4196,10 @@ defineSymbol(symbols_math, ams, symbols_textord, "\u25A0", "\\blacksquare");
|
|
4238
4196
|
defineSymbol(symbols_math, ams, symbols_textord, "\u29EB", "\\blacklozenge");
|
4239
4197
|
defineSymbol(symbols_math, ams, symbols_textord, "\u2605", "\\bigstar");
|
4240
4198
|
defineSymbol(symbols_math, ams, symbols_textord, "\u2222", "\\sphericalangle", true);
|
4241
|
-
defineSymbol(symbols_math, ams, symbols_textord, "\u2201", "\\complement", true); // unicode-math maps U+F0
|
4199
|
+
defineSymbol(symbols_math, ams, symbols_textord, "\u2201", "\\complement", true); // unicode-math maps U+F0 to \matheth. We map to AMS function \eth
|
4242
4200
|
|
4243
4201
|
defineSymbol(symbols_math, ams, symbols_textord, "\xF0", "\\eth", true);
|
4202
|
+
defineSymbol(symbols_text, main, symbols_textord, "\xF0", "\xF0");
|
4244
4203
|
defineSymbol(symbols_math, ams, symbols_textord, "\u2571", "\\diagup");
|
4245
4204
|
defineSymbol(symbols_math, ams, symbols_textord, "\u2572", "\\diagdown");
|
4246
4205
|
defineSymbol(symbols_math, ams, symbols_textord, "\u25A1", "\\square");
|
@@ -4259,10 +4218,10 @@ defineSymbol(symbols_math, ams, symbols_textord, "\u2137", "\\gimel", true); //
|
|
4259
4218
|
defineSymbol(symbols_math, ams, symbols_textord, "\u03DD", "\\digamma", true);
|
4260
4219
|
defineSymbol(symbols_math, ams, symbols_textord, "\u03F0", "\\varkappa"); // AMS Delimiters
|
4261
4220
|
|
4262
|
-
defineSymbol(symbols_math, ams, symbols_open, "\u250C", "
|
4263
|
-
defineSymbol(symbols_math, ams, symbols_close, "\u2510", "
|
4264
|
-
defineSymbol(symbols_math, ams, symbols_open, "\u2514", "
|
4265
|
-
defineSymbol(symbols_math, ams, symbols_close, "\u2518", "
|
4221
|
+
defineSymbol(symbols_math, ams, symbols_open, "\u250C", "\\@ulcorner", true);
|
4222
|
+
defineSymbol(symbols_math, ams, symbols_close, "\u2510", "\\@urcorner", true);
|
4223
|
+
defineSymbol(symbols_math, ams, symbols_open, "\u2514", "\\@llcorner", true);
|
4224
|
+
defineSymbol(symbols_math, ams, symbols_close, "\u2518", "\\@lrcorner", true); // AMS Binary Relations
|
4266
4225
|
|
4267
4226
|
defineSymbol(symbols_math, ams, rel, "\u2266", "\\leqq", true);
|
4268
4227
|
defineSymbol(symbols_math, ams, rel, "\u2A7D", "\\leqslant", true);
|
@@ -4490,28 +4449,22 @@ defineSymbol(symbols_math, main, bin, "\u2228", "\\lor");
|
|
4490
4449
|
defineSymbol(symbols_math, main, bin, "\u2227", "\\wedge", true);
|
4491
4450
|
defineSymbol(symbols_math, main, bin, "\u2228", "\\vee", true);
|
4492
4451
|
defineSymbol(symbols_math, main, symbols_textord, "\u221A", "\\surd");
|
4493
|
-
defineSymbol(symbols_math, main, symbols_open, "(", "(");
|
4494
|
-
defineSymbol(symbols_math, main, symbols_open, "[", "[");
|
4495
4452
|
defineSymbol(symbols_math, main, symbols_open, "\u27E8", "\\langle", true);
|
4496
4453
|
defineSymbol(symbols_math, main, symbols_open, "\u2223", "\\lvert");
|
4497
4454
|
defineSymbol(symbols_math, main, symbols_open, "\u2225", "\\lVert");
|
4498
|
-
defineSymbol(symbols_math, main, symbols_close, ")", ")");
|
4499
|
-
defineSymbol(symbols_math, main, symbols_close, "]", "]");
|
4500
4455
|
defineSymbol(symbols_math, main, symbols_close, "?", "?");
|
4501
4456
|
defineSymbol(symbols_math, main, symbols_close, "!", "!");
|
4502
4457
|
defineSymbol(symbols_math, main, symbols_close, "\u27E9", "\\rangle", true);
|
4503
4458
|
defineSymbol(symbols_math, main, symbols_close, "\u2223", "\\rvert");
|
4504
4459
|
defineSymbol(symbols_math, main, symbols_close, "\u2225", "\\rVert");
|
4505
4460
|
defineSymbol(symbols_math, main, rel, "=", "=");
|
4506
|
-
defineSymbol(symbols_math, main, rel, "<", "<");
|
4507
|
-
defineSymbol(symbols_math, main, rel, ">", ">");
|
4508
4461
|
defineSymbol(symbols_math, main, rel, ":", ":");
|
4509
4462
|
defineSymbol(symbols_math, main, rel, "\u2248", "\\approx", true);
|
4510
4463
|
defineSymbol(symbols_math, main, rel, "\u2245", "\\cong", true);
|
4511
4464
|
defineSymbol(symbols_math, main, rel, "\u2265", "\\ge");
|
4512
4465
|
defineSymbol(symbols_math, main, rel, "\u2265", "\\geq", true);
|
4513
4466
|
defineSymbol(symbols_math, main, rel, "\u2190", "\\gets");
|
4514
|
-
defineSymbol(symbols_math, main, rel, ">", "\\gt");
|
4467
|
+
defineSymbol(symbols_math, main, rel, ">", "\\gt", true);
|
4515
4468
|
defineSymbol(symbols_math, main, rel, "\u2208", "\\in", true);
|
4516
4469
|
defineSymbol(symbols_math, main, rel, "\uE020", "\\@not");
|
4517
4470
|
defineSymbol(symbols_math, main, rel, "\u2282", "\\subset", true);
|
@@ -4524,7 +4477,7 @@ defineSymbol(symbols_math, main, rel, "\u22A8", "\\models");
|
|
4524
4477
|
defineSymbol(symbols_math, main, rel, "\u2190", "\\leftarrow", true);
|
4525
4478
|
defineSymbol(symbols_math, main, rel, "\u2264", "\\le");
|
4526
4479
|
defineSymbol(symbols_math, main, rel, "\u2264", "\\leq", true);
|
4527
|
-
defineSymbol(symbols_math, main, rel, "<", "\\lt");
|
4480
|
+
defineSymbol(symbols_math, main, rel, "<", "\\lt", true);
|
4528
4481
|
defineSymbol(symbols_math, main, rel, "\u2192", "\\rightarrow", true);
|
4529
4482
|
defineSymbol(symbols_math, main, rel, "\u2192", "\\to");
|
4530
4483
|
defineSymbol(symbols_math, ams, rel, "\u2271", "\\ngeq", true);
|
@@ -4535,6 +4488,7 @@ defineSymbol(symbols_math, main, symbols_spacing, "\xA0", "\\space"); // Ref: La
|
|
4535
4488
|
|
4536
4489
|
defineSymbol(symbols_math, main, symbols_spacing, "\xA0", "\\nobreakspace");
|
4537
4490
|
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "\\ ");
|
4491
|
+
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", " ");
|
4538
4492
|
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "~");
|
4539
4493
|
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "\\space");
|
4540
4494
|
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "\\nobreakspace");
|
@@ -4566,15 +4520,15 @@ defineSymbol(symbols_text, main, symbols_textord, "}", "\\}");
|
|
4566
4520
|
defineSymbol(symbols_text, main, symbols_textord, "}", "\\textbraceright");
|
4567
4521
|
defineSymbol(symbols_math, main, symbols_open, "{", "\\lbrace");
|
4568
4522
|
defineSymbol(symbols_math, main, symbols_close, "}", "\\rbrace");
|
4569
|
-
defineSymbol(symbols_math, main, symbols_open, "[", "\\lbrack");
|
4570
|
-
defineSymbol(symbols_text, main, symbols_textord, "[", "\\lbrack");
|
4571
|
-
defineSymbol(symbols_math, main, symbols_close, "]", "\\rbrack");
|
4572
|
-
defineSymbol(symbols_text, main, symbols_textord, "]", "\\rbrack");
|
4573
|
-
defineSymbol(symbols_math, main, symbols_open, "(", "\\lparen");
|
4574
|
-
defineSymbol(symbols_math, main, symbols_close, ")", "\\rparen");
|
4575
|
-
defineSymbol(symbols_text, main, symbols_textord, "<", "\\textless"); // in T1 fontenc
|
4523
|
+
defineSymbol(symbols_math, main, symbols_open, "[", "\\lbrack", true);
|
4524
|
+
defineSymbol(symbols_text, main, symbols_textord, "[", "\\lbrack", true);
|
4525
|
+
defineSymbol(symbols_math, main, symbols_close, "]", "\\rbrack", true);
|
4526
|
+
defineSymbol(symbols_text, main, symbols_textord, "]", "\\rbrack", true);
|
4527
|
+
defineSymbol(symbols_math, main, symbols_open, "(", "\\lparen", true);
|
4528
|
+
defineSymbol(symbols_math, main, symbols_close, ")", "\\rparen", true);
|
4529
|
+
defineSymbol(symbols_text, main, symbols_textord, "<", "\\textless", true); // in T1 fontenc
|
4576
4530
|
|
4577
|
-
defineSymbol(symbols_text, main, symbols_textord, ">", "\\textgreater"); // in T1 fontenc
|
4531
|
+
defineSymbol(symbols_text, main, symbols_textord, ">", "\\textgreater", true); // in T1 fontenc
|
4578
4532
|
|
4579
4533
|
defineSymbol(symbols_math, main, symbols_open, "\u230A", "\\lfloor", true);
|
4580
4534
|
defineSymbol(symbols_math, main, symbols_close, "\u230B", "\\rfloor", true);
|
@@ -4583,7 +4537,7 @@ defineSymbol(symbols_math, main, symbols_close, "\u2309", "\\rceil", true);
|
|
4583
4537
|
defineSymbol(symbols_math, main, symbols_textord, "\\", "\\backslash");
|
4584
4538
|
defineSymbol(symbols_math, main, symbols_textord, "\u2223", "|");
|
4585
4539
|
defineSymbol(symbols_math, main, symbols_textord, "\u2223", "\\vert");
|
4586
|
-
defineSymbol(symbols_text, main, symbols_textord, "|", "\\textbar"); // in T1 fontenc
|
4540
|
+
defineSymbol(symbols_text, main, symbols_textord, "|", "\\textbar", true); // in T1 fontenc
|
4587
4541
|
|
4588
4542
|
defineSymbol(symbols_math, main, symbols_textord, "\u2225", "\\|");
|
4589
4543
|
defineSymbol(symbols_math, main, symbols_textord, "\u2225", "\\Vert");
|
@@ -4613,8 +4567,6 @@ defineSymbol(symbols_math, main, op, "\u2A02", "\\bigotimes");
|
|
4613
4567
|
defineSymbol(symbols_math, main, op, "\u2A01", "\\bigoplus");
|
4614
4568
|
defineSymbol(symbols_math, main, op, "\u2A00", "\\bigodot");
|
4615
4569
|
defineSymbol(symbols_math, main, op, "\u222E", "\\oint");
|
4616
|
-
defineSymbol(symbols_math, main, op, "\u222F", "\\oiint");
|
4617
|
-
defineSymbol(symbols_math, main, op, "\u2230", "\\oiiint");
|
4618
4570
|
defineSymbol(symbols_math, main, op, "\u2A06", "\\bigsqcup");
|
4619
4571
|
defineSymbol(symbols_math, main, op, "\u222B", "\\smallint");
|
4620
4572
|
defineSymbol(symbols_text, main, symbols_inner, "\u2026", "\\textellipsis");
|
@@ -4635,14 +4587,16 @@ defineSymbol(symbols_math, main, symbols_accent, "\u02C7", "\\check");
|
|
4635
4587
|
defineSymbol(symbols_math, main, symbols_accent, "^", "\\hat");
|
4636
4588
|
defineSymbol(symbols_math, main, symbols_accent, "\u20D7", "\\vec");
|
4637
4589
|
defineSymbol(symbols_math, main, symbols_accent, "\u02D9", "\\dot");
|
4638
|
-
defineSymbol(symbols_math, main, symbols_accent, "\u02DA", "\\mathring");
|
4639
|
-
|
4640
|
-
defineSymbol(symbols_math, main, mathord, "\
|
4590
|
+
defineSymbol(symbols_math, main, symbols_accent, "\u02DA", "\\mathring"); // \imath and \jmath should be invariant to \mathrm, \mathbf, etc., so use PUA
|
4591
|
+
|
4592
|
+
defineSymbol(symbols_math, main, mathord, "\uE131", "\\@imath");
|
4593
|
+
defineSymbol(symbols_math, main, mathord, "\uE237", "\\@jmath");
|
4594
|
+
defineSymbol(symbols_math, main, symbols_textord, "\u0131", "\u0131");
|
4595
|
+
defineSymbol(symbols_math, main, symbols_textord, "\u0237", "\u0237");
|
4641
4596
|
defineSymbol(symbols_text, main, symbols_textord, "\u0131", "\\i", true);
|
4642
4597
|
defineSymbol(symbols_text, main, symbols_textord, "\u0237", "\\j", true);
|
4643
4598
|
defineSymbol(symbols_text, main, symbols_textord, "\xDF", "\\ss", true);
|
4644
4599
|
defineSymbol(symbols_text, main, symbols_textord, "\xE6", "\\ae", true);
|
4645
|
-
defineSymbol(symbols_text, main, symbols_textord, "\xE6", "\\ae", true);
|
4646
4600
|
defineSymbol(symbols_text, main, symbols_textord, "\u0153", "\\oe", true);
|
4647
4601
|
defineSymbol(symbols_text, main, symbols_textord, "\xF8", "\\o", true);
|
4648
4602
|
defineSymbol(symbols_text, main, symbols_textord, "\xC6", "\\AE", true);
|
@@ -4679,34 +4633,31 @@ var ligatures = {
|
|
4679
4633
|
"``": true,
|
4680
4634
|
"''": true
|
4681
4635
|
};
|
4682
|
-
defineSymbol(symbols_text, main, symbols_textord, "\u2013", "--");
|
4636
|
+
defineSymbol(symbols_text, main, symbols_textord, "\u2013", "--", true);
|
4683
4637
|
defineSymbol(symbols_text, main, symbols_textord, "\u2013", "\\textendash");
|
4684
|
-
defineSymbol(symbols_text, main, symbols_textord, "\u2014", "---");
|
4638
|
+
defineSymbol(symbols_text, main, symbols_textord, "\u2014", "---", true);
|
4685
4639
|
defineSymbol(symbols_text, main, symbols_textord, "\u2014", "\\textemdash");
|
4686
|
-
defineSymbol(symbols_text, main, symbols_textord, "\u2018", "`");
|
4640
|
+
defineSymbol(symbols_text, main, symbols_textord, "\u2018", "`", true);
|
4687
4641
|
defineSymbol(symbols_text, main, symbols_textord, "\u2018", "\\textquoteleft");
|
4688
|
-
defineSymbol(symbols_text, main, symbols_textord, "\u2019", "'");
|
4642
|
+
defineSymbol(symbols_text, main, symbols_textord, "\u2019", "'", true);
|
4689
4643
|
defineSymbol(symbols_text, main, symbols_textord, "\u2019", "\\textquoteright");
|
4690
|
-
defineSymbol(symbols_text, main, symbols_textord, "\u201C", "``");
|
4644
|
+
defineSymbol(symbols_text, main, symbols_textord, "\u201C", "``", true);
|
4691
4645
|
defineSymbol(symbols_text, main, symbols_textord, "\u201C", "\\textquotedblleft");
|
4692
|
-
defineSymbol(symbols_text, main, symbols_textord, "\u201D", "''");
|
4646
|
+
defineSymbol(symbols_text, main, symbols_textord, "\u201D", "''", true);
|
4693
4647
|
defineSymbol(symbols_text, main, symbols_textord, "\u201D", "\\textquotedblright"); // \degree from gensymb package
|
4694
4648
|
|
4695
4649
|
defineSymbol(symbols_math, main, symbols_textord, "\xB0", "\\degree", true);
|
4696
4650
|
defineSymbol(symbols_text, main, symbols_textord, "\xB0", "\\degree"); // \textdegree from inputenc package
|
4697
4651
|
|
4698
4652
|
defineSymbol(symbols_text, main, symbols_textord, "\xB0", "\\textdegree", true); // TODO: In LaTeX, \pounds can generate a different character in text and math
|
4699
|
-
// mode, but among our fonts, only Main-
|
4653
|
+
// mode, but among our fonts, only Main-Regular defines this character "163".
|
4700
4654
|
|
4701
|
-
defineSymbol(symbols_math, main,
|
4702
|
-
defineSymbol(symbols_math, main,
|
4703
|
-
defineSymbol(symbols_text, main,
|
4704
|
-
defineSymbol(symbols_text, main,
|
4655
|
+
defineSymbol(symbols_math, main, symbols_textord, "\xA3", "\\pounds");
|
4656
|
+
defineSymbol(symbols_math, main, symbols_textord, "\xA3", "\\mathsterling", true);
|
4657
|
+
defineSymbol(symbols_text, main, symbols_textord, "\xA3", "\\pounds");
|
4658
|
+
defineSymbol(symbols_text, main, symbols_textord, "\xA3", "\\textsterling", true);
|
4705
4659
|
defineSymbol(symbols_math, ams, symbols_textord, "\u2720", "\\maltese");
|
4706
|
-
defineSymbol(symbols_text, ams, symbols_textord, "\u2720", "\\maltese");
|
4707
|
-
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "\\ ");
|
4708
|
-
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", " ");
|
4709
|
-
defineSymbol(symbols_text, main, symbols_spacing, "\xA0", "~"); // There are lots of symbols which are the same, so we add them in afterwards.
|
4660
|
+
defineSymbol(symbols_text, ams, symbols_textord, "\u2720", "\\maltese"); // There are lots of symbols which are the same, so we add them in afterwards.
|
4710
4661
|
// All of these are textords in math mode
|
4711
4662
|
|
4712
4663
|
var mathTextSymbols = "0123456789/@.\"";
|
@@ -4717,7 +4668,7 @@ for (var symbols_i = 0; symbols_i < mathTextSymbols.length; symbols_i++) {
|
|
4717
4668
|
} // All of these are textords in text mode
|
4718
4669
|
|
4719
4670
|
|
4720
|
-
var textSymbols = "0123456789!@*()
|
4671
|
+
var textSymbols = "0123456789!@*()-=+\";:?/.,";
|
4721
4672
|
|
4722
4673
|
for (var src_symbols_i = 0; src_symbols_i < textSymbols.length; src_symbols_i++) {
|
4723
4674
|
var _ch = textSymbols.charAt(src_symbols_i);
|
@@ -4846,7 +4797,7 @@ for (var symbols_i4 = 0; symbols_i4 < 10; symbols_i4++) {
|
|
4846
4797
|
// TODO(edemaine): Fix this.
|
4847
4798
|
|
4848
4799
|
|
4849
|
-
var extraLatin = "
|
4800
|
+
var extraLatin = "\xC7\xD0\xDE\xE7\xFE";
|
4850
4801
|
|
4851
4802
|
for (var _i5 = 0; _i5 < extraLatin.length; _i5++) {
|
4852
4803
|
var _ch5 = extraLatin.charAt(_i5);
|
@@ -4854,15 +4805,6 @@ for (var _i5 = 0; _i5 < extraLatin.length; _i5++) {
|
|
4854
4805
|
defineSymbol(symbols_math, main, mathord, _ch5, _ch5);
|
4855
4806
|
defineSymbol(symbols_text, main, symbols_textord, _ch5, _ch5);
|
4856
4807
|
}
|
4857
|
-
|
4858
|
-
defineSymbol(symbols_text, main, symbols_textord, "ð", "ð"); // Unicode versions of existing characters
|
4859
|
-
|
4860
|
-
defineSymbol(symbols_text, main, symbols_textord, "\u2013", "–");
|
4861
|
-
defineSymbol(symbols_text, main, symbols_textord, "\u2014", "—");
|
4862
|
-
defineSymbol(symbols_text, main, symbols_textord, "\u2018", "‘");
|
4863
|
-
defineSymbol(symbols_text, main, symbols_textord, "\u2019", "’");
|
4864
|
-
defineSymbol(symbols_text, main, symbols_textord, "\u201C", "“");
|
4865
|
-
defineSymbol(symbols_text, main, symbols_textord, "\u201D", "”");
|
4866
4808
|
// CONCATENATED MODULE: ./src/wide-character.js
|
4867
4809
|
/**
|
4868
4810
|
* This file provides support for Unicode range U+1D400 to U+1D7FF,
|
@@ -4884,8 +4826,8 @@ defineSymbol(symbols_text, main, symbols_textord, "\u201D", "”");
|
|
4884
4826
|
|
4885
4827
|
var wideLatinLetterData = [["mathbf", "textbf", "Main-Bold"], // A-Z bold upright
|
4886
4828
|
["mathbf", "textbf", "Main-Bold"], // a-z bold upright
|
4887
|
-
["
|
4888
|
-
["
|
4829
|
+
["mathnormal", "textit", "Math-Italic"], // A-Z italic
|
4830
|
+
["mathnormal", "textit", "Math-Italic"], // a-z italic
|
4889
4831
|
["boldsymbol", "boldsymbol", "Main-BoldItalic"], // A-Z bold italic
|
4890
4832
|
["boldsymbol", "boldsymbol", "Main-BoldItalic"], // a-z bold italic
|
4891
4833
|
// Map fancy A-Z letters to script, not calligraphic.
|
@@ -5388,15 +5330,10 @@ var units_calculateSize = function calculateSize(sizeValue, options) {
|
|
5388
5330
|
|
5389
5331
|
|
5390
5332
|
|
5391
|
-
// The following have to be loaded from Main-Italic font, using class mathit
|
5392
|
-
var mathitLetters = ["\\imath", "ı", // dotless i
|
5393
|
-
"\\jmath", "ȷ", // dotless j
|
5394
|
-
"\\pounds", "\\mathsterling", "\\textsterling", "£"];
|
5395
5333
|
/**
|
5396
5334
|
* Looks up the given symbol in fontMetrics, after applying any symbol
|
5397
5335
|
* replacements defined in symbol.js
|
5398
5336
|
*/
|
5399
|
-
|
5400
5337
|
var buildCommon_lookupSymbol = function lookupSymbol(value, // TODO(#963): Use a union type for this.
|
5401
5338
|
fontName, mode) {
|
5402
5339
|
// Replace the value with its replaced value from symbol.js
|
@@ -5483,54 +5420,6 @@ var buildCommon_mathsym = function mathsym(value, mode, options, classes) {
|
|
5483
5420
|
return buildCommon_makeSymbol(value, "AMS-Regular", mode, options, classes.concat(["amsrm"]));
|
5484
5421
|
}
|
5485
5422
|
};
|
5486
|
-
/**
|
5487
|
-
* Determines which of the two font names (Main-Italic and Math-Italic) and
|
5488
|
-
* corresponding style tags (maindefault or mathit) to use for default math font,
|
5489
|
-
* depending on the symbol.
|
5490
|
-
*/
|
5491
|
-
|
5492
|
-
|
5493
|
-
var buildCommon_mathdefault = function mathdefault(value, mode, options, classes) {
|
5494
|
-
if (/[0-9]/.test(value.charAt(0)) || // glyphs for \imath and \jmath do not exist in Math-Italic so we
|
5495
|
-
// need to use Main-Italic instead
|
5496
|
-
utils.contains(mathitLetters, value)) {
|
5497
|
-
return {
|
5498
|
-
fontName: "Main-Italic",
|
5499
|
-
fontClass: "mathit"
|
5500
|
-
};
|
5501
|
-
} else {
|
5502
|
-
return {
|
5503
|
-
fontName: "Math-Italic",
|
5504
|
-
fontClass: "mathdefault"
|
5505
|
-
};
|
5506
|
-
}
|
5507
|
-
};
|
5508
|
-
/**
|
5509
|
-
* Determines which of the font names (Main-Italic, Math-Italic, and Caligraphic)
|
5510
|
-
* and corresponding style tags (mathit, mathdefault, or mathcal) to use for font
|
5511
|
-
* "mathnormal", depending on the symbol. Use this function instead of fontMap for
|
5512
|
-
* font "mathnormal".
|
5513
|
-
*/
|
5514
|
-
|
5515
|
-
|
5516
|
-
var buildCommon_mathnormal = function mathnormal(value, mode, options, classes) {
|
5517
|
-
if (utils.contains(mathitLetters, value)) {
|
5518
|
-
return {
|
5519
|
-
fontName: "Main-Italic",
|
5520
|
-
fontClass: "mathit"
|
5521
|
-
};
|
5522
|
-
} else if (/[0-9]/.test(value.charAt(0))) {
|
5523
|
-
return {
|
5524
|
-
fontName: "Caligraphic-Regular",
|
5525
|
-
fontClass: "mathcal"
|
5526
|
-
};
|
5527
|
-
} else {
|
5528
|
-
return {
|
5529
|
-
fontName: "Math-Italic",
|
5530
|
-
fontClass: "mathdefault"
|
5531
|
-
};
|
5532
|
-
}
|
5533
|
-
};
|
5534
5423
|
/**
|
5535
5424
|
* Determines which of the two font names (Main-Bold and Math-BoldItalic) and
|
5536
5425
|
* corresponding style tags (mathbf or boldsymbol) to use for font "boldsymbol",
|
@@ -5539,8 +5428,8 @@ var buildCommon_mathnormal = function mathnormal(value, mode, options, classes)
|
|
5539
5428
|
*/
|
5540
5429
|
|
5541
5430
|
|
5542
|
-
var boldsymbol = function boldsymbol(value, mode, options, classes) {
|
5543
|
-
if (buildCommon_lookupSymbol(value, "Math-BoldItalic", mode).metrics) {
|
5431
|
+
var boldsymbol = function boldsymbol(value, mode, options, classes, type) {
|
5432
|
+
if (type !== "textord" && buildCommon_lookupSymbol(value, "Math-BoldItalic", mode).metrics) {
|
5544
5433
|
return {
|
5545
5434
|
fontName: "Math-BoldItalic",
|
5546
5435
|
fontClass: "boldsymbol"
|
@@ -5578,13 +5467,10 @@ var buildCommon_makeOrd = function makeOrd(group, options, type) {
|
|
5578
5467
|
var fontName;
|
5579
5468
|
var fontClasses;
|
5580
5469
|
|
5581
|
-
if (fontOrFamily === "boldsymbol"
|
5582
|
-
var fontData =
|
5470
|
+
if (fontOrFamily === "boldsymbol") {
|
5471
|
+
var fontData = boldsymbol(text, mode, options, classes, type);
|
5583
5472
|
fontName = fontData.fontName;
|
5584
5473
|
fontClasses = [fontData.fontClass];
|
5585
|
-
} else if (utils.contains(mathitLetters, text)) {
|
5586
|
-
fontName = "Main-Italic";
|
5587
|
-
fontClasses = ["mathit"];
|
5588
5474
|
} else if (isFont) {
|
5589
5475
|
fontName = fontMap[fontOrFamily].fontName;
|
5590
5476
|
fontClasses = [fontOrFamily];
|
@@ -5609,8 +5495,7 @@ var buildCommon_makeOrd = function makeOrd(group, options, type) {
|
|
5609
5495
|
|
5610
5496
|
|
5611
5497
|
if (type === "mathord") {
|
5612
|
-
|
5613
|
-
return buildCommon_makeSymbol(text, fontLookup.fontName, mode, options, classes.concat([fontLookup.fontClass]));
|
5498
|
+
return buildCommon_makeSymbol(text, "Math-Italic", mode, options, classes.concat(["mathnormal"]));
|
5614
5499
|
} else if (type === "textord") {
|
5615
5500
|
var font = src_symbols[mode][text] && src_symbols[mode][text].font;
|
5616
5501
|
|
@@ -6028,12 +5913,13 @@ var fontMap = {
|
|
6028
5913
|
variant: "italic",
|
6029
5914
|
fontName: "Main-Italic"
|
6030
5915
|
},
|
6031
|
-
|
6032
|
-
|
6033
|
-
|
6034
|
-
|
6035
|
-
//
|
6036
|
-
// and
|
5916
|
+
"mathnormal": {
|
5917
|
+
variant: "italic",
|
5918
|
+
fontName: "Math-Italic"
|
5919
|
+
},
|
5920
|
+
// "boldsymbol" is missing because they require the use of multiple fonts:
|
5921
|
+
// Math-BoldItalic and Main-Bold. This is handled by a special case in
|
5922
|
+
// makeOrd which ends up calling boldsymbol.
|
6037
5923
|
// families
|
6038
5924
|
"mathbb": {
|
6039
5925
|
variant: "double-struck",
|
@@ -6068,7 +5954,9 @@ var svgData = {
|
|
6068
5954
|
// oval to overlay the integrand
|
6069
5955
|
oiintSize2: ["oiintSize2", 1.472, 0.659],
|
6070
5956
|
oiiintSize1: ["oiiintSize1", 1.304, 0.499],
|
6071
|
-
oiiintSize2: ["oiiintSize2", 1.98, 0.659]
|
5957
|
+
oiiintSize2: ["oiiintSize2", 1.98, 0.659],
|
5958
|
+
leftParenInner: ["leftParenInner", 0.875, 0.3],
|
5959
|
+
rightParenInner: ["rightParenInner", 0.875, 0.3]
|
6072
5960
|
};
|
6073
5961
|
|
6074
5962
|
var buildCommon_staticSvg = function staticSvg(value, options) {
|
@@ -6110,88 +5998,6 @@ var buildCommon_staticSvg = function staticSvg(value, options) {
|
|
6110
5998
|
svgData: svgData,
|
6111
5999
|
tryCombineChars: buildCommon_tryCombineChars
|
6112
6000
|
});
|
6113
|
-
// CONCATENATED MODULE: ./src/parseNode.js
|
6114
|
-
|
6115
|
-
|
6116
|
-
/**
|
6117
|
-
* Asserts that the node is of the given type and returns it with stricter
|
6118
|
-
* typing. Throws if the node's type does not match.
|
6119
|
-
*/
|
6120
|
-
function assertNodeType(node, type) {
|
6121
|
-
var typedNode = checkNodeType(node, type);
|
6122
|
-
|
6123
|
-
if (!typedNode) {
|
6124
|
-
throw new Error("Expected node of type " + type + ", but got " + (node ? "node of type " + node.type : String(node)));
|
6125
|
-
} // $FlowFixMe: Unsure why.
|
6126
|
-
|
6127
|
-
|
6128
|
-
return typedNode;
|
6129
|
-
}
|
6130
|
-
/**
|
6131
|
-
* Returns the node more strictly typed iff it is of the given type. Otherwise,
|
6132
|
-
* returns null.
|
6133
|
-
*/
|
6134
|
-
|
6135
|
-
function checkNodeType(node, type) {
|
6136
|
-
if (node && node.type === type) {
|
6137
|
-
// The definition of ParseNode<TYPE> doesn't communicate to flow that
|
6138
|
-
// `type: TYPE` (as that's not explicitly mentioned anywhere), though that
|
6139
|
-
// happens to be true for all our value types.
|
6140
|
-
// $FlowFixMe
|
6141
|
-
return node;
|
6142
|
-
}
|
6143
|
-
|
6144
|
-
return null;
|
6145
|
-
}
|
6146
|
-
/**
|
6147
|
-
* Asserts that the node is of the given type and returns it with stricter
|
6148
|
-
* typing. Throws if the node's type does not match.
|
6149
|
-
*/
|
6150
|
-
|
6151
|
-
function assertAtomFamily(node, family) {
|
6152
|
-
var typedNode = checkAtomFamily(node, family);
|
6153
|
-
|
6154
|
-
if (!typedNode) {
|
6155
|
-
throw new Error("Expected node of type \"atom\" and family \"" + family + "\", but got " + (node ? node.type === "atom" ? "atom of family " + node.family : "node of type " + node.type : String(node)));
|
6156
|
-
}
|
6157
|
-
|
6158
|
-
return typedNode;
|
6159
|
-
}
|
6160
|
-
/**
|
6161
|
-
* Returns the node more strictly typed iff it is of the given type. Otherwise,
|
6162
|
-
* returns null.
|
6163
|
-
*/
|
6164
|
-
|
6165
|
-
function checkAtomFamily(node, family) {
|
6166
|
-
return node && node.type === "atom" && node.family === family ? node : null;
|
6167
|
-
}
|
6168
|
-
/**
|
6169
|
-
* Returns the node more strictly typed iff it is of the given type. Otherwise,
|
6170
|
-
* returns null.
|
6171
|
-
*/
|
6172
|
-
|
6173
|
-
function assertSymbolNodeType(node) {
|
6174
|
-
var typedNode = checkSymbolNodeType(node);
|
6175
|
-
|
6176
|
-
if (!typedNode) {
|
6177
|
-
throw new Error("Expected node of symbol group type, but got " + (node ? "node of type " + node.type : String(node)));
|
6178
|
-
}
|
6179
|
-
|
6180
|
-
return typedNode;
|
6181
|
-
}
|
6182
|
-
/**
|
6183
|
-
* Returns the node more strictly typed iff it is of the given type. Otherwise,
|
6184
|
-
* returns null.
|
6185
|
-
*/
|
6186
|
-
|
6187
|
-
function checkSymbolNodeType(node) {
|
6188
|
-
if (node && (node.type === "atom" || NON_ATOMS.hasOwnProperty(node.type))) {
|
6189
|
-
// $FlowFixMe
|
6190
|
-
return node;
|
6191
|
-
}
|
6192
|
-
|
6193
|
-
return null;
|
6194
|
-
}
|
6195
6001
|
// CONCATENATED MODULE: ./src/spacingData.js
|
6196
6002
|
/**
|
6197
6003
|
* Describes spaces between different classes of atoms.
|
@@ -6286,7 +6092,20 @@ var tightSpacings = {
|
|
6286
6092
|
}
|
6287
6093
|
};
|
6288
6094
|
// CONCATENATED MODULE: ./src/defineFunction.js
|
6095
|
+
/** Context provided to function handlers for error messages. */
|
6096
|
+
// Note: reverse the order of the return type union will cause a flow error.
|
6097
|
+
// See https://github.com/facebook/flow/issues/3663.
|
6098
|
+
// More general version of `HtmlBuilder` for nodes (e.g. \sum, accent types)
|
6099
|
+
// whose presence impacts super/subscripting. In this case, ParseNode<"supsub">
|
6100
|
+
// delegates its HTML building to the HtmlBuilder corresponding to these nodes.
|
6289
6101
|
|
6102
|
+
/**
|
6103
|
+
* Final function spec for use at parse time.
|
6104
|
+
* This is almost identical to `FunctionPropSpec`, except it
|
6105
|
+
* 1. includes the function handler, and
|
6106
|
+
* 2. requires all arguments except argTypes.
|
6107
|
+
* It is generated by `defineFunction()` below.
|
6108
|
+
*/
|
6290
6109
|
|
6291
6110
|
/**
|
6292
6111
|
* All registered functions.
|
@@ -6365,9 +6184,8 @@ function defineFunctionBuilders(_ref2) {
|
|
6365
6184
|
} // Since the corresponding buildHTML/buildMathML function expects a
|
6366
6185
|
// list of elements, we normalize for different kinds of arguments
|
6367
6186
|
|
6368
|
-
var
|
6369
|
-
|
6370
|
-
return node ? node.body : [arg];
|
6187
|
+
var ordargument = function ordargument(arg) {
|
6188
|
+
return arg.type === "ordgroup" ? arg.body : [arg];
|
6371
6189
|
};
|
6372
6190
|
// CONCATENATED MODULE: ./src/buildHTML.js
|
6373
6191
|
/**
|
@@ -6384,7 +6202,6 @@ var defineFunction_ordargument = function ordargument(arg) {
|
|
6384
6202
|
|
6385
6203
|
|
6386
6204
|
|
6387
|
-
|
6388
6205
|
var buildHTML_makeSpan = buildCommon.makeSpan; // Binary atoms (first class `mbin`) change into ordinary atoms (`mord`)
|
6389
6206
|
// depending on their surroundings. See TeXbook pg. 442-446, Rules 5 and 6,
|
6390
6207
|
// and the text before Rule 19.
|
@@ -6444,10 +6261,9 @@ var buildHTML_buildExpression = function buildExpression(expression, options, is
|
|
6444
6261
|
var glueOptions = options;
|
6445
6262
|
|
6446
6263
|
if (expression.length === 1) {
|
6447
|
-
var node =
|
6264
|
+
var node = expression[0];
|
6448
6265
|
|
6449
|
-
if (
|
6450
|
-
} else if (node.type === "sizing") {
|
6266
|
+
if (node.type === "sizing") {
|
6451
6267
|
glueOptions = options.havingSize(node.size);
|
6452
6268
|
} else if (node.type === "styling") {
|
6453
6269
|
glueOptions = options.havingStyle(styleMap[node.style]);
|
@@ -6464,6 +6280,7 @@ var buildHTML_buildExpression = function buildExpression(expression, options, is
|
|
6464
6280
|
// Before determining what spaces to insert, perform bin cancellation.
|
6465
6281
|
// Binary operators change to ordinary symbols in some contexts.
|
6466
6282
|
|
6283
|
+
var isRoot = isRealGroup === "root";
|
6467
6284
|
traverseNonSpaceNodes(groups, function (node, prev) {
|
6468
6285
|
var prevType = prev.classes[0];
|
6469
6286
|
var type = node.classes[0];
|
@@ -6475,7 +6292,7 @@ var buildHTML_buildExpression = function buildExpression(expression, options, is
|
|
6475
6292
|
}
|
6476
6293
|
}, {
|
6477
6294
|
node: dummyPrev
|
6478
|
-
}, dummyNext);
|
6295
|
+
}, dummyNext, isRoot);
|
6479
6296
|
traverseNonSpaceNodes(groups, function (node, prev) {
|
6480
6297
|
var prevType = getTypeOfDomTree(prev);
|
6481
6298
|
var type = getTypeOfDomTree(node); // 'mtight' indicates that the node is script or scriptscript style.
|
@@ -6488,7 +6305,7 @@ var buildHTML_buildExpression = function buildExpression(expression, options, is
|
|
6488
6305
|
}
|
6489
6306
|
}, {
|
6490
6307
|
node: dummyPrev
|
6491
|
-
}, dummyNext);
|
6308
|
+
}, dummyNext, isRoot);
|
6492
6309
|
return groups;
|
6493
6310
|
}; // Depth-first traverse non-space `nodes`, calling `callback` with the current and
|
6494
6311
|
// previous node as arguments, optionally returning a node to insert after the
|
@@ -6496,7 +6313,7 @@ var buildHTML_buildExpression = function buildExpression(expression, options, is
|
|
6496
6313
|
// function to insert after it. `next` is a node that will be added to the right.
|
6497
6314
|
// Used for bin cancellation and inserting spacings.
|
6498
6315
|
|
6499
|
-
var traverseNonSpaceNodes = function traverseNonSpaceNodes(nodes, callback, prev, next) {
|
6316
|
+
var traverseNonSpaceNodes = function traverseNonSpaceNodes(nodes, callback, prev, next, isRoot) {
|
6500
6317
|
if (next) {
|
6501
6318
|
// temporarily append the right node, if exists
|
6502
6319
|
nodes.push(next);
|
@@ -6511,29 +6328,33 @@ var traverseNonSpaceNodes = function traverseNonSpaceNodes(nodes, callback, prev
|
|
6511
6328
|
if (partialGroup) {
|
6512
6329
|
// Recursive DFS
|
6513
6330
|
// $FlowFixMe: make nodes a $ReadOnlyArray by returning a new array
|
6514
|
-
traverseNonSpaceNodes(partialGroup.children, callback, prev);
|
6331
|
+
traverseNonSpaceNodes(partialGroup.children, callback, prev, null, isRoot);
|
6515
6332
|
continue;
|
6516
6333
|
} // Ignore explicit spaces (e.g., \;, \,) when determining what implicit
|
6517
6334
|
// spacing should go between atoms of different classes
|
6518
6335
|
|
6519
6336
|
|
6520
|
-
|
6521
|
-
continue;
|
6522
|
-
}
|
6337
|
+
var nonspace = !node.hasClass("mspace");
|
6523
6338
|
|
6524
|
-
|
6339
|
+
if (nonspace) {
|
6340
|
+
var result = callback(node, prev.node);
|
6525
6341
|
|
6526
|
-
|
6527
|
-
|
6528
|
-
|
6529
|
-
|
6530
|
-
|
6531
|
-
|
6532
|
-
|
6342
|
+
if (result) {
|
6343
|
+
if (prev.insertAfter) {
|
6344
|
+
prev.insertAfter(result);
|
6345
|
+
} else {
|
6346
|
+
// insert at front
|
6347
|
+
nodes.unshift(result);
|
6348
|
+
i++;
|
6349
|
+
}
|
6533
6350
|
}
|
6534
6351
|
}
|
6535
6352
|
|
6536
|
-
|
6353
|
+
if (nonspace) {
|
6354
|
+
prev.node = node;
|
6355
|
+
} else if (isRoot && node.hasClass("newline")) {
|
6356
|
+
prev.node = buildHTML_makeSpan(["leftmost"]); // treat like beginning of line
|
6357
|
+
}
|
6537
6358
|
|
6538
6359
|
prev.insertAfter = function (index) {
|
6539
6360
|
return function (n) {
|
@@ -6550,7 +6371,7 @@ var traverseNonSpaceNodes = function traverseNonSpaceNodes(nodes, callback, prev
|
|
6550
6371
|
|
6551
6372
|
|
6552
6373
|
var buildHTML_checkPartialGroup = function checkPartialGroup(node) {
|
6553
|
-
if (node instanceof tree_DocumentFragment || node instanceof domTree_Anchor) {
|
6374
|
+
if (node instanceof tree_DocumentFragment || node instanceof domTree_Anchor || node instanceof domTree_Span && node.hasClass("enclosing")) {
|
6554
6375
|
return node;
|
6555
6376
|
}
|
6556
6377
|
|
@@ -6635,10 +6456,6 @@ function buildHTMLUnbreakable(children, options) {
|
|
6635
6456
|
var body = buildHTML_makeSpan(["base"], children, options); // Add strut, which ensures that the top of the HTML element falls at
|
6636
6457
|
// the height of the expression, and the bottom of the HTML element
|
6637
6458
|
// falls at the depth of the expression.
|
6638
|
-
// We used to have separate top and bottom struts, where the bottom strut
|
6639
|
-
// would like to use `vertical-align: top`, but in IE 9 this lowers the
|
6640
|
-
// baseline of the box to the bottom of this strut (instead of staying in
|
6641
|
-
// the normal place) so we use an absolute value for vertical-align instead.
|
6642
6459
|
|
6643
6460
|
var strut = buildHTML_makeSpan(["strut"]);
|
6644
6461
|
strut.style.height = body.height + body.depth + "em";
|
@@ -6662,7 +6479,7 @@ function buildHTML(tree, options) {
|
|
6662
6479
|
} // Build the expression contained in the tree
|
6663
6480
|
|
6664
6481
|
|
6665
|
-
var expression = buildHTML_buildExpression(tree, options,
|
6482
|
+
var expression = buildHTML_buildExpression(tree, options, "root");
|
6666
6483
|
var children = []; // Create one base node for each chunk between potential line breaks.
|
6667
6484
|
// The TeXBook [p.173] says "A formula will be broken only after a
|
6668
6485
|
// relation symbol like $=$ or $<$ or $\rightarrow$, or after a binary
|
@@ -7050,7 +6867,7 @@ var buildMathML_getVariant = function getVariant(group, options) {
|
|
7050
6867
|
if (font === "mathit") {
|
7051
6868
|
return "italic";
|
7052
6869
|
} else if (font === "boldsymbol") {
|
7053
|
-
return "bold-italic";
|
6870
|
+
return group.type === "textord" ? "bold" : "bold-italic";
|
7054
6871
|
} else if (font === "mathbf") {
|
7055
6872
|
return "bold";
|
7056
6873
|
} else if (font === "mathbb") {
|
@@ -7190,7 +7007,7 @@ var buildMathML_buildGroup = function buildGroup(group, options) {
|
|
7190
7007
|
* we can do appropriate styling.
|
7191
7008
|
*/
|
7192
7009
|
|
7193
|
-
function buildMathML(tree, texExpression, options, forMathmlOnly) {
|
7010
|
+
function buildMathML(tree, texExpression, options, isDisplayMode, forMathmlOnly) {
|
7194
7011
|
var expression = buildMathML_buildExpression(tree, options); // Wrap up the expression in an mrow so it is presented in the semantics
|
7195
7012
|
// tag correctly, unless it's a single <mrow> or <mtable>.
|
7196
7013
|
|
@@ -7207,11 +7024,16 @@ function buildMathML(tree, texExpression, options, forMathmlOnly) {
|
|
7207
7024
|
annotation.setAttribute("encoding", "application/x-tex");
|
7208
7025
|
var semantics = new mathMLTree.MathNode("semantics", [wrapper, annotation]);
|
7209
7026
|
var math = new mathMLTree.MathNode("math", [semantics]);
|
7210
|
-
math.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML");
|
7027
|
+
math.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML");
|
7028
|
+
|
7029
|
+
if (isDisplayMode) {
|
7030
|
+
math.setAttribute("display", "block");
|
7031
|
+
} // You can't style <math> nodes, so we wrap the node in a span.
|
7211
7032
|
// NOTE: The span class is not typed to have <math> nodes as children, and
|
7212
7033
|
// we don't want to make the children type more generic since the children
|
7213
7034
|
// of span are expected to have more fields in `buildHtml` contexts.
|
7214
7035
|
|
7036
|
+
|
7215
7037
|
var wrapperClass = forMathmlOnly ? "katex" : "katex-mathml"; // $FlowFixMe
|
7216
7038
|
|
7217
7039
|
return buildCommon.makeSpan([wrapperClass], [math]);
|
@@ -7255,12 +7077,12 @@ var buildTree_buildTree = function buildTree(tree, expression, settings) {
|
|
7255
7077
|
var katexNode;
|
7256
7078
|
|
7257
7079
|
if (settings.output === "mathml") {
|
7258
|
-
return buildMathML(tree, expression, options, true);
|
7080
|
+
return buildMathML(tree, expression, options, settings.displayMode, true);
|
7259
7081
|
} else if (settings.output === "html") {
|
7260
7082
|
var htmlNode = buildHTML(tree, options);
|
7261
7083
|
katexNode = buildCommon.makeSpan(["katex"], [htmlNode]);
|
7262
7084
|
} else {
|
7263
|
-
var mathMLNode = buildMathML(tree, expression, options, false);
|
7085
|
+
var mathMLNode = buildMathML(tree, expression, options, settings.displayMode, false);
|
7264
7086
|
|
7265
7087
|
var _htmlNode = buildHTML(tree, options);
|
7266
7088
|
|
@@ -7620,6 +7442,47 @@ var stretchy_encloseSpan = function encloseSpan(inner, label, pad, options) {
|
|
7620
7442
|
mathMLnode: stretchy_mathMLnode,
|
7621
7443
|
svgSpan: stretchy_svgSpan
|
7622
7444
|
});
|
7445
|
+
// CONCATENATED MODULE: ./src/parseNode.js
|
7446
|
+
|
7447
|
+
|
7448
|
+
/**
|
7449
|
+
* Asserts that the node is of the given type and returns it with stricter
|
7450
|
+
* typing. Throws if the node's type does not match.
|
7451
|
+
*/
|
7452
|
+
function assertNodeType(node, type) {
|
7453
|
+
if (!node || node.type !== type) {
|
7454
|
+
throw new Error("Expected node of type " + type + ", but got " + (node ? "node of type " + node.type : String(node)));
|
7455
|
+
}
|
7456
|
+
|
7457
|
+
return node;
|
7458
|
+
}
|
7459
|
+
/**
|
7460
|
+
* Returns the node more strictly typed iff it is of the given type. Otherwise,
|
7461
|
+
* returns null.
|
7462
|
+
*/
|
7463
|
+
|
7464
|
+
function assertSymbolNodeType(node) {
|
7465
|
+
var typedNode = checkSymbolNodeType(node);
|
7466
|
+
|
7467
|
+
if (!typedNode) {
|
7468
|
+
throw new Error("Expected node of symbol group type, but got " + (node ? "node of type " + node.type : String(node)));
|
7469
|
+
}
|
7470
|
+
|
7471
|
+
return typedNode;
|
7472
|
+
}
|
7473
|
+
/**
|
7474
|
+
* Returns the node more strictly typed iff it is of the given type. Otherwise,
|
7475
|
+
* returns null.
|
7476
|
+
*/
|
7477
|
+
|
7478
|
+
function checkSymbolNodeType(node) {
|
7479
|
+
if (node && (node.type === "atom" || NON_ATOMS.hasOwnProperty(node.type))) {
|
7480
|
+
// $FlowFixMe
|
7481
|
+
return node;
|
7482
|
+
}
|
7483
|
+
|
7484
|
+
return null;
|
7485
|
+
}
|
7623
7486
|
// CONCATENATED MODULE: ./src/functions/accent.js
|
7624
7487
|
|
7625
7488
|
|
@@ -7635,10 +7498,9 @@ var accent_htmlBuilder = function htmlBuilder(grp, options) {
|
|
7635
7498
|
// Accents are handled in the TeXbook pg. 443, rule 12.
|
7636
7499
|
var base;
|
7637
7500
|
var group;
|
7638
|
-
var supSub = checkNodeType(grp, "supsub");
|
7639
7501
|
var supSubGroup;
|
7640
7502
|
|
7641
|
-
if (
|
7503
|
+
if (grp && grp.type === "supsub") {
|
7642
7504
|
// If our base is a character box, and we have superscripts and
|
7643
7505
|
// subscripts, the supsub will defer to us. In particular, we want
|
7644
7506
|
// to attach the superscripts and subscripts to the inner body (so
|
@@ -7647,16 +7509,16 @@ var accent_htmlBuilder = function htmlBuilder(grp, options) {
|
|
7647
7509
|
// sticking the base of the accent into the base of the supsub, and
|
7648
7510
|
// rendering that, while keeping track of where the accent is.
|
7649
7511
|
// The real accent group is the base of the supsub group
|
7650
|
-
group = assertNodeType(
|
7512
|
+
group = assertNodeType(grp.base, "accent"); // The character box is the base of the accent group
|
7651
7513
|
|
7652
7514
|
base = group.base; // Stick the character box into the base of the supsub group
|
7653
7515
|
|
7654
|
-
|
7516
|
+
grp.base = base; // Rerender the supsub group with its new base, and store that
|
7655
7517
|
// result.
|
7656
7518
|
|
7657
|
-
supSubGroup = assertSpan(buildHTML_buildGroup(
|
7519
|
+
supSubGroup = assertSpan(buildHTML_buildGroup(grp, options)); // reset original base
|
7658
7520
|
|
7659
|
-
|
7521
|
+
grp.base = group;
|
7660
7522
|
} else {
|
7661
7523
|
group = assertNodeType(grp, "accent");
|
7662
7524
|
base = group.base;
|
@@ -7880,8 +7742,8 @@ defineFunction({
|
|
7880
7742
|
var kern = group.label === "\\utilde" ? 0.12 : 0; // Generate the vlist, with the appropriate kerns
|
7881
7743
|
|
7882
7744
|
var vlist = buildCommon.makeVList({
|
7883
|
-
positionType: "
|
7884
|
-
positionData:
|
7745
|
+
positionType: "top",
|
7746
|
+
positionData: innerGroup.height,
|
7885
7747
|
children: [{
|
7886
7748
|
type: "elem",
|
7887
7749
|
elem: accentBody,
|
@@ -8117,7 +7979,7 @@ defineFunction({
|
|
8117
7979
|
type: "color",
|
8118
7980
|
mode: parser.mode,
|
8119
7981
|
color: color,
|
8120
|
-
body:
|
7982
|
+
body: ordargument(body)
|
8121
7983
|
};
|
8122
7984
|
},
|
8123
7985
|
htmlBuilder: color_htmlBuilder,
|
@@ -8219,15 +8081,212 @@ defineFunction({
|
|
8219
8081
|
mathmlBuilder: function mathmlBuilder(group, options) {
|
8220
8082
|
var node = new mathMLTree.MathNode("mspace");
|
8221
8083
|
|
8222
|
-
if (group.newLine) {
|
8223
|
-
node.setAttribute("linebreak", "newline");
|
8084
|
+
if (group.newLine) {
|
8085
|
+
node.setAttribute("linebreak", "newline");
|
8086
|
+
|
8087
|
+
if (group.size) {
|
8088
|
+
node.setAttribute("height", units_calculateSize(group.size, options) + "em");
|
8089
|
+
}
|
8090
|
+
}
|
8091
|
+
|
8092
|
+
return node;
|
8093
|
+
}
|
8094
|
+
});
|
8095
|
+
// CONCATENATED MODULE: ./src/functions/def.js
|
8096
|
+
|
8097
|
+
|
8098
|
+
|
8099
|
+
var globalMap = {
|
8100
|
+
"\\global": "\\global",
|
8101
|
+
"\\long": "\\\\globallong",
|
8102
|
+
"\\\\globallong": "\\\\globallong",
|
8103
|
+
"\\def": "\\gdef",
|
8104
|
+
"\\gdef": "\\gdef",
|
8105
|
+
"\\edef": "\\xdef",
|
8106
|
+
"\\xdef": "\\xdef",
|
8107
|
+
"\\let": "\\\\globallet",
|
8108
|
+
"\\futurelet": "\\\\globalfuture"
|
8109
|
+
};
|
8110
|
+
|
8111
|
+
var def_checkControlSequence = function checkControlSequence(tok) {
|
8112
|
+
var name = tok.text;
|
8113
|
+
|
8114
|
+
if (/^(?:[\\{}$&#^_]|EOF)$/.test(name)) {
|
8115
|
+
throw new src_ParseError("Expected a control sequence", tok);
|
8116
|
+
}
|
8117
|
+
|
8118
|
+
return name;
|
8119
|
+
};
|
8120
|
+
|
8121
|
+
var getRHS = function getRHS(parser) {
|
8122
|
+
var tok = parser.gullet.popToken();
|
8123
|
+
|
8124
|
+
if (tok.text === "=") {
|
8125
|
+
// consume optional equals
|
8126
|
+
tok = parser.gullet.popToken();
|
8127
|
+
|
8128
|
+
if (tok.text === " ") {
|
8129
|
+
// consume one optional space
|
8130
|
+
tok = parser.gullet.popToken();
|
8131
|
+
}
|
8132
|
+
}
|
8133
|
+
|
8134
|
+
return tok;
|
8135
|
+
};
|
8136
|
+
|
8137
|
+
var letCommand = function letCommand(parser, name, tok, global) {
|
8138
|
+
var macro = parser.gullet.macros.get(tok.text);
|
8139
|
+
|
8140
|
+
if (macro == null) {
|
8141
|
+
// don't expand it later even if a macro with the same name is defined
|
8142
|
+
// e.g., \let\foo=\frac \def\frac{\relax} \frac12
|
8143
|
+
tok.noexpand = true;
|
8144
|
+
macro = {
|
8145
|
+
tokens: [tok],
|
8146
|
+
numArgs: 0,
|
8147
|
+
// reproduce the same behavior in expansion
|
8148
|
+
unexpandable: !parser.gullet.isExpandable(tok.text)
|
8149
|
+
};
|
8150
|
+
}
|
8151
|
+
|
8152
|
+
parser.gullet.macros.set(name, macro, global);
|
8153
|
+
}; // <assignment> -> <non-macro assignment>|<macro assignment>
|
8154
|
+
// <non-macro assignment> -> <simple assignment>|\global<non-macro assignment>
|
8155
|
+
// <macro assignment> -> <definition>|<prefix><macro assignment>
|
8156
|
+
// <prefix> -> \global|\long|\outer
|
8157
|
+
|
8158
|
+
|
8159
|
+
defineFunction({
|
8160
|
+
type: "internal",
|
8161
|
+
names: ["\\global", "\\long", "\\\\globallong"],
|
8162
|
+
props: {
|
8163
|
+
numArgs: 0,
|
8164
|
+
allowedInText: true
|
8165
|
+
},
|
8166
|
+
handler: function handler(_ref) {
|
8167
|
+
var parser = _ref.parser,
|
8168
|
+
funcName = _ref.funcName;
|
8169
|
+
parser.consumeSpaces();
|
8170
|
+
var token = parser.fetch();
|
8171
|
+
|
8172
|
+
if (globalMap[token.text]) {
|
8173
|
+
// KaTeX doesn't have \par, so ignore \long
|
8174
|
+
if (funcName === "\\global" || funcName === "\\\\globallong") {
|
8175
|
+
token.text = globalMap[token.text];
|
8176
|
+
}
|
8177
|
+
|
8178
|
+
return assertNodeType(parser.parseFunction(), "internal");
|
8179
|
+
}
|
8180
|
+
|
8181
|
+
throw new src_ParseError("Invalid token after macro prefix", token);
|
8182
|
+
}
|
8183
|
+
}); // Basic support for macro definitions: \def, \gdef, \edef, \xdef
|
8184
|
+
// <definition> -> <def><control sequence><definition text>
|
8185
|
+
// <def> -> \def|\gdef|\edef|\xdef
|
8186
|
+
// <definition text> -> <parameter text><left brace><balanced text><right brace>
|
8187
|
+
|
8188
|
+
defineFunction({
|
8189
|
+
type: "internal",
|
8190
|
+
names: ["\\def", "\\gdef", "\\edef", "\\xdef"],
|
8191
|
+
props: {
|
8192
|
+
numArgs: 0,
|
8193
|
+
allowedInText: true
|
8194
|
+
},
|
8195
|
+
handler: function handler(_ref2) {
|
8196
|
+
var parser = _ref2.parser,
|
8197
|
+
funcName = _ref2.funcName;
|
8198
|
+
var arg = parser.gullet.consumeArgs(1)[0];
|
8199
|
+
|
8200
|
+
if (arg.length !== 1) {
|
8201
|
+
throw new src_ParseError("\\gdef's first argument must be a macro name");
|
8202
|
+
}
|
8203
|
+
|
8204
|
+
var name = arg[0].text; // Count argument specifiers, and check they are in the order #1 #2 ...
|
8205
|
+
|
8206
|
+
var numArgs = 0;
|
8207
|
+
arg = parser.gullet.consumeArgs(1)[0];
|
8208
|
+
|
8209
|
+
while (arg.length === 1 && arg[0].text === "#") {
|
8210
|
+
arg = parser.gullet.consumeArgs(1)[0];
|
8211
|
+
|
8212
|
+
if (arg.length !== 1) {
|
8213
|
+
throw new src_ParseError("Invalid argument number length \"" + arg.length + "\"");
|
8214
|
+
}
|
8215
|
+
|
8216
|
+
if (!/^[1-9]$/.test(arg[0].text)) {
|
8217
|
+
throw new src_ParseError("Invalid argument number \"" + arg[0].text + "\"");
|
8218
|
+
}
|
8219
|
+
|
8220
|
+
numArgs++;
|
8224
8221
|
|
8225
|
-
if (
|
8226
|
-
|
8222
|
+
if (parseInt(arg[0].text) !== numArgs) {
|
8223
|
+
throw new src_ParseError("Argument number \"" + arg[0].text + "\" out of order");
|
8227
8224
|
}
|
8225
|
+
|
8226
|
+
arg = parser.gullet.consumeArgs(1)[0];
|
8228
8227
|
}
|
8229
8228
|
|
8230
|
-
|
8229
|
+
if (funcName === "\\edef" || funcName === "\\xdef") {
|
8230
|
+
arg = parser.gullet.expandTokens(arg);
|
8231
|
+
arg.reverse(); // to fit in with stack order
|
8232
|
+
} // Final arg is the expansion of the macro
|
8233
|
+
|
8234
|
+
|
8235
|
+
parser.gullet.macros.set(name, {
|
8236
|
+
tokens: arg,
|
8237
|
+
numArgs: numArgs
|
8238
|
+
}, funcName === globalMap[funcName]);
|
8239
|
+
return {
|
8240
|
+
type: "internal",
|
8241
|
+
mode: parser.mode
|
8242
|
+
};
|
8243
|
+
}
|
8244
|
+
}); // <simple assignment> -> <let assignment>
|
8245
|
+
// <let assignment> -> \futurelet<control sequence><token><token>
|
8246
|
+
// | \let<control sequence><equals><one optional space><token>
|
8247
|
+
// <equals> -> <optional spaces>|<optional spaces>=
|
8248
|
+
|
8249
|
+
defineFunction({
|
8250
|
+
type: "internal",
|
8251
|
+
names: ["\\let", "\\\\globallet"],
|
8252
|
+
props: {
|
8253
|
+
numArgs: 0,
|
8254
|
+
allowedInText: true
|
8255
|
+
},
|
8256
|
+
handler: function handler(_ref3) {
|
8257
|
+
var parser = _ref3.parser,
|
8258
|
+
funcName = _ref3.funcName;
|
8259
|
+
var name = def_checkControlSequence(parser.gullet.popToken());
|
8260
|
+
parser.gullet.consumeSpaces();
|
8261
|
+
var tok = getRHS(parser);
|
8262
|
+
letCommand(parser, name, tok, funcName === "\\\\globallet");
|
8263
|
+
return {
|
8264
|
+
type: "internal",
|
8265
|
+
mode: parser.mode
|
8266
|
+
};
|
8267
|
+
}
|
8268
|
+
}); // ref: https://www.tug.org/TUGboat/tb09-3/tb22bechtolsheim.pdf
|
8269
|
+
|
8270
|
+
defineFunction({
|
8271
|
+
type: "internal",
|
8272
|
+
names: ["\\futurelet", "\\\\globalfuture"],
|
8273
|
+
props: {
|
8274
|
+
numArgs: 0,
|
8275
|
+
allowedInText: true
|
8276
|
+
},
|
8277
|
+
handler: function handler(_ref4) {
|
8278
|
+
var parser = _ref4.parser,
|
8279
|
+
funcName = _ref4.funcName;
|
8280
|
+
var name = def_checkControlSequence(parser.gullet.popToken());
|
8281
|
+
var middle = parser.gullet.popToken();
|
8282
|
+
var tok = parser.gullet.popToken();
|
8283
|
+
letCommand(parser, name, tok, funcName === "\\\\globalfuture");
|
8284
|
+
parser.gullet.pushToken(tok);
|
8285
|
+
parser.gullet.pushToken(middle);
|
8286
|
+
return {
|
8287
|
+
type: "internal",
|
8288
|
+
mode: parser.mode
|
8289
|
+
};
|
8231
8290
|
}
|
8232
8291
|
});
|
8233
8292
|
// CONCATENATED MODULE: ./src/delimiter.js
|
@@ -8558,12 +8617,33 @@ var delimiter_makeStackedDelim = function makeStackedDelim(delim, heightTotal, c
|
|
8558
8617
|
// at a position that juts 0.005 above the bottom of the top element.
|
8559
8618
|
|
8560
8619
|
|
8561
|
-
|
8562
|
-
|
8563
|
-
|
8564
|
-
|
8565
|
-
|
8566
|
-
|
8620
|
+
if ((repeat === "\u239C" || repeat === "\u239F") && repeatCount === 0) {
|
8621
|
+
// Parentheses need a short repeat element in order to avoid an overrun.
|
8622
|
+
// We'll make a 0.3em tall element from a SVG.
|
8623
|
+
var overlap = buildCommon.svgData.leftParenInner[2] / 2;
|
8624
|
+
inners.push({
|
8625
|
+
type: "kern",
|
8626
|
+
size: -overlap
|
8627
|
+
});
|
8628
|
+
var pathName = repeat === "\u239C" ? "leftParenInner" : "rightParenInner";
|
8629
|
+
var innerSpan = buildCommon.staticSvg(pathName, options);
|
8630
|
+
inners.push({
|
8631
|
+
type: "elem",
|
8632
|
+
elem: innerSpan
|
8633
|
+
});
|
8634
|
+
inners.push({
|
8635
|
+
type: "kern",
|
8636
|
+
size: -overlap
|
8637
|
+
});
|
8638
|
+
} else {
|
8639
|
+
inners.push({
|
8640
|
+
type: "kern",
|
8641
|
+
size: shiftOfExtraElement
|
8642
|
+
});
|
8643
|
+
inners.push(delimiter_makeInner(repeat, font, mode));
|
8644
|
+
inners.push(lap);
|
8645
|
+
} // Add the top symbol
|
8646
|
+
|
8567
8647
|
|
8568
8648
|
inners.push(delimiter_makeInner(top, font, mode)); // Finally, build the vlist
|
8569
8649
|
|
@@ -8987,8 +9067,10 @@ function checkDelimiter(delim, context) {
|
|
8987
9067
|
|
8988
9068
|
if (symDelim && utils.contains(delimiters, symDelim.text)) {
|
8989
9069
|
return symDelim;
|
9070
|
+
} else if (symDelim) {
|
9071
|
+
throw new src_ParseError("Invalid delimiter '" + symDelim.text + "' after '" + context.funcName + "'", delim);
|
8990
9072
|
} else {
|
8991
|
-
throw new src_ParseError("Invalid delimiter
|
9073
|
+
throw new src_ParseError("Invalid delimiter type '" + delim.type + "'", delim);
|
8992
9074
|
}
|
8993
9075
|
}
|
8994
9076
|
|
@@ -9976,7 +10058,7 @@ var array_mathmlBuilder = function mathmlBuilder(group, options) {
|
|
9976
10058
|
var menclose = "";
|
9977
10059
|
var align = "";
|
9978
10060
|
|
9979
|
-
if (group.cols) {
|
10061
|
+
if (group.cols && group.cols.length > 0) {
|
9980
10062
|
// Find column alignment, column spacing, and vertical lines.
|
9981
10063
|
var cols = group.cols;
|
9982
10064
|
var columnLines = "";
|
@@ -10091,13 +10173,12 @@ var array_alignedHandler = function alignedHandler(context, args) {
|
|
10091
10173
|
mode: context.mode,
|
10092
10174
|
body: []
|
10093
10175
|
};
|
10094
|
-
var ordgroup = checkNodeType(args[0], "ordgroup");
|
10095
10176
|
|
10096
|
-
if (ordgroup) {
|
10177
|
+
if (args[0] && args[0].type === "ordgroup") {
|
10097
10178
|
var arg0 = "";
|
10098
10179
|
|
10099
|
-
for (var i = 0; i <
|
10100
|
-
var textord = assertNodeType(
|
10180
|
+
for (var i = 0; i < args[0].body.length; i++) {
|
10181
|
+
var textord = assertNodeType(args[0].body[i], "textord");
|
10101
10182
|
arg0 += textord.text;
|
10102
10183
|
}
|
10103
10184
|
|
@@ -10110,10 +10191,8 @@ var array_alignedHandler = function alignedHandler(context, args) {
|
|
10110
10191
|
for (var _i3 = 1; _i3 < row.length; _i3 += 2) {
|
10111
10192
|
// Modify ordgroup node within styling node
|
10112
10193
|
var styling = assertNodeType(row[_i3], "styling");
|
10113
|
-
|
10114
|
-
|
10115
|
-
|
10116
|
-
_ordgroup.body.unshift(emptyGroup);
|
10194
|
+
var ordgroup = assertNodeType(styling.body[0], "ordgroup");
|
10195
|
+
ordgroup.body.unshift(emptyGroup);
|
10117
10196
|
}
|
10118
10197
|
|
10119
10198
|
if (!isAligned) {
|
@@ -10291,7 +10370,7 @@ defineEnvironment({
|
|
10291
10370
|
};
|
10292
10371
|
res = parseArray(context.parser, res, "script");
|
10293
10372
|
|
10294
|
-
if (res.body[0].length > 1) {
|
10373
|
+
if (res.body.length > 0 && res.body[0].length > 1) {
|
10295
10374
|
throw new src_ParseError("{subarray} can contain only one column");
|
10296
10375
|
}
|
10297
10376
|
|
@@ -10304,10 +10383,11 @@ defineEnvironment({
|
|
10304
10383
|
// \left\{\begin{array}{@{}l@{\quad}l@{}} … \end{array}\right.
|
10305
10384
|
// {dcases} is a {cases} environment where cells are set in \displaystyle,
|
10306
10385
|
// as defined in mathtools.sty.
|
10386
|
+
// {rcases} is another mathtools environment. It's brace is on the right side.
|
10307
10387
|
|
10308
10388
|
defineEnvironment({
|
10309
10389
|
type: "array",
|
10310
|
-
names: ["cases", "dcases"],
|
10390
|
+
names: ["cases", "dcases", "rcases", "drcases"],
|
10311
10391
|
props: {
|
10312
10392
|
numArgs: 0
|
10313
10393
|
},
|
@@ -10337,8 +10417,8 @@ defineEnvironment({
|
|
10337
10417
|
type: "leftright",
|
10338
10418
|
mode: context.mode,
|
10339
10419
|
body: [res],
|
10340
|
-
left: "\\{",
|
10341
|
-
right: ".",
|
10420
|
+
left: context.envName.indexOf("r") > -1 ? "." : "\\{",
|
10421
|
+
right: context.envName.indexOf("r") > -1 ? "\\}" : ".",
|
10342
10422
|
rightColor: undefined
|
10343
10423
|
};
|
10344
10424
|
},
|
@@ -10557,7 +10637,7 @@ defineFunction({
|
|
10557
10637
|
mode: parser.mode,
|
10558
10638
|
mclass: "m" + funcName.substr(5),
|
10559
10639
|
// TODO(kevinb): don't prefix with 'm'
|
10560
|
-
body:
|
10640
|
+
body: ordargument(body),
|
10561
10641
|
isCharacterBox: utils.isCharacterBox(body)
|
10562
10642
|
};
|
10563
10643
|
},
|
@@ -10625,7 +10705,7 @@ defineFunction({
|
|
10625
10705
|
parentIsSupSub: false,
|
10626
10706
|
symbol: false,
|
10627
10707
|
suppressBaseShift: funcName !== "\\stackrel",
|
10628
|
-
body:
|
10708
|
+
body: ordargument(baseArg)
|
10629
10709
|
};
|
10630
10710
|
var supsub = {
|
10631
10711
|
type: "supsub",
|
@@ -10731,7 +10811,7 @@ defineFunction({
|
|
10731
10811
|
|
10732
10812
|
defineFunction({
|
10733
10813
|
type: "font",
|
10734
|
-
names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it"],
|
10814
|
+
names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it", "\\cal"],
|
10735
10815
|
props: {
|
10736
10816
|
numArgs: 0,
|
10737
10817
|
allowedInText: true
|
@@ -11144,20 +11224,8 @@ defineFunction({
|
|
11144
11224
|
var numer = args[4];
|
11145
11225
|
var denom = args[5]; // Look into the parse nodes to get the desired delimiters.
|
11146
11226
|
|
11147
|
-
var
|
11148
|
-
|
11149
|
-
if (leftNode) {
|
11150
|
-
leftNode = assertAtomFamily(args[0], "open");
|
11151
|
-
}
|
11152
|
-
|
11153
|
-
var leftDelim = leftNode ? delimFromValue(leftNode.text) : null;
|
11154
|
-
var rightNode = checkNodeType(args[1], "atom");
|
11155
|
-
|
11156
|
-
if (rightNode) {
|
11157
|
-
rightNode = assertAtomFamily(args[1], "close");
|
11158
|
-
}
|
11159
|
-
|
11160
|
-
var rightDelim = rightNode ? delimFromValue(rightNode.text) : null;
|
11227
|
+
var leftDelim = args[0].type === "atom" && args[0].family === "open" ? delimFromValue(args[0].text) : null;
|
11228
|
+
var rightDelim = args[1].type === "atom" && args[1].family === "close" ? delimFromValue(args[1].text) : null;
|
11161
11229
|
var barNode = assertNodeType(args[2], "size");
|
11162
11230
|
var hasBarLine;
|
11163
11231
|
var barSize = null;
|
@@ -11174,15 +11242,15 @@ defineFunction({
|
|
11174
11242
|
|
11175
11243
|
|
11176
11244
|
var size = "auto";
|
11177
|
-
var styl =
|
11245
|
+
var styl = args[3];
|
11178
11246
|
|
11179
|
-
if (styl) {
|
11247
|
+
if (styl.type === "ordgroup") {
|
11180
11248
|
if (styl.body.length > 0) {
|
11181
11249
|
var textOrd = assertNodeType(styl.body[0], "textord");
|
11182
11250
|
size = stylArray[Number(textOrd.text)];
|
11183
11251
|
}
|
11184
11252
|
} else {
|
11185
|
-
styl = assertNodeType(
|
11253
|
+
styl = assertNodeType(styl, "textord");
|
11186
11254
|
size = stylArray[Number(styl.text)];
|
11187
11255
|
}
|
11188
11256
|
|
@@ -11269,14 +11337,13 @@ var horizBrace_htmlBuilder = function htmlBuilder(grp, options) {
|
|
11269
11337
|
|
11270
11338
|
var supSubGroup;
|
11271
11339
|
var group;
|
11272
|
-
var supSub = checkNodeType(grp, "supsub");
|
11273
11340
|
|
11274
|
-
if (
|
11341
|
+
if (grp.type === "supsub") {
|
11275
11342
|
// Ref: LaTeX source2e: }}}}\limits}
|
11276
11343
|
// i.e. LaTeX treats the brace similar to an op and passes it
|
11277
11344
|
// with \limits, so we need to assign supsub style.
|
11278
|
-
supSubGroup =
|
11279
|
-
group = assertNodeType(
|
11345
|
+
supSubGroup = grp.sup ? buildHTML_buildGroup(grp.sup, options.havingStyle(style.sup()), options) : buildHTML_buildGroup(grp.sub, options.havingStyle(style.sub()), options);
|
11346
|
+
group = assertNodeType(grp.base, "horizBrace");
|
11280
11347
|
} else {
|
11281
11348
|
group = assertNodeType(grp, "horizBrace");
|
11282
11349
|
} // Build the base group
|
@@ -11426,7 +11493,7 @@ defineFunction({
|
|
11426
11493
|
type: "href",
|
11427
11494
|
mode: parser.mode,
|
11428
11495
|
href: href,
|
11429
|
-
body:
|
11496
|
+
body: ordargument(body)
|
11430
11497
|
};
|
11431
11498
|
},
|
11432
11499
|
htmlBuilder: function htmlBuilder(group, options) {
|
@@ -11489,8 +11556,120 @@ defineFunction({
|
|
11489
11556
|
type: "href",
|
11490
11557
|
mode: parser.mode,
|
11491
11558
|
href: href,
|
11492
|
-
body:
|
11559
|
+
body: ordargument(body)
|
11560
|
+
};
|
11561
|
+
}
|
11562
|
+
});
|
11563
|
+
// CONCATENATED MODULE: ./src/functions/html.js
|
11564
|
+
|
11565
|
+
|
11566
|
+
|
11567
|
+
|
11568
|
+
|
11569
|
+
|
11570
|
+
defineFunction({
|
11571
|
+
type: "html",
|
11572
|
+
names: ["\\htmlClass", "\\htmlId", "\\htmlStyle", "\\htmlData"],
|
11573
|
+
props: {
|
11574
|
+
numArgs: 2,
|
11575
|
+
argTypes: ["raw", "original"],
|
11576
|
+
allowedInText: true
|
11577
|
+
},
|
11578
|
+
handler: function handler(_ref, args) {
|
11579
|
+
var parser = _ref.parser,
|
11580
|
+
funcName = _ref.funcName,
|
11581
|
+
token = _ref.token;
|
11582
|
+
var value = assertNodeType(args[0], "raw").string;
|
11583
|
+
var body = args[1];
|
11584
|
+
|
11585
|
+
if (parser.settings.strict) {
|
11586
|
+
parser.settings.reportNonstrict("htmlExtension", "HTML extension is disabled on strict mode");
|
11587
|
+
}
|
11588
|
+
|
11589
|
+
var trustContext;
|
11590
|
+
var attributes = {};
|
11591
|
+
|
11592
|
+
switch (funcName) {
|
11593
|
+
case "\\htmlClass":
|
11594
|
+
attributes.class = value;
|
11595
|
+
trustContext = {
|
11596
|
+
command: "\\htmlClass",
|
11597
|
+
class: value
|
11598
|
+
};
|
11599
|
+
break;
|
11600
|
+
|
11601
|
+
case "\\htmlId":
|
11602
|
+
attributes.id = value;
|
11603
|
+
trustContext = {
|
11604
|
+
command: "\\htmlId",
|
11605
|
+
id: value
|
11606
|
+
};
|
11607
|
+
break;
|
11608
|
+
|
11609
|
+
case "\\htmlStyle":
|
11610
|
+
attributes.style = value;
|
11611
|
+
trustContext = {
|
11612
|
+
command: "\\htmlStyle",
|
11613
|
+
style: value
|
11614
|
+
};
|
11615
|
+
break;
|
11616
|
+
|
11617
|
+
case "\\htmlData":
|
11618
|
+
{
|
11619
|
+
var data = value.split(",");
|
11620
|
+
|
11621
|
+
for (var i = 0; i < data.length; i++) {
|
11622
|
+
var keyVal = data[i].split("=");
|
11623
|
+
|
11624
|
+
if (keyVal.length !== 2) {
|
11625
|
+
throw new src_ParseError("Error parsing key-value for \\htmlData");
|
11626
|
+
}
|
11627
|
+
|
11628
|
+
attributes["data-" + keyVal[0].trim()] = keyVal[1].trim();
|
11629
|
+
}
|
11630
|
+
|
11631
|
+
trustContext = {
|
11632
|
+
command: "\\htmlData",
|
11633
|
+
attributes: attributes
|
11634
|
+
};
|
11635
|
+
break;
|
11636
|
+
}
|
11637
|
+
|
11638
|
+
default:
|
11639
|
+
throw new Error("Unrecognized html command");
|
11640
|
+
}
|
11641
|
+
|
11642
|
+
if (!parser.settings.isTrusted(trustContext)) {
|
11643
|
+
return parser.formatUnsupportedCmd(funcName);
|
11644
|
+
}
|
11645
|
+
|
11646
|
+
return {
|
11647
|
+
type: "html",
|
11648
|
+
mode: parser.mode,
|
11649
|
+
attributes: attributes,
|
11650
|
+
body: ordargument(body)
|
11493
11651
|
};
|
11652
|
+
},
|
11653
|
+
htmlBuilder: function htmlBuilder(group, options) {
|
11654
|
+
var elements = buildHTML_buildExpression(group.body, options, false);
|
11655
|
+
var classes = ["enclosing"];
|
11656
|
+
|
11657
|
+
if (group.attributes.class) {
|
11658
|
+
classes.push.apply(classes, group.attributes.class.trim().split(/\s+/));
|
11659
|
+
}
|
11660
|
+
|
11661
|
+
var span = buildCommon.makeSpan(classes, elements, options);
|
11662
|
+
|
11663
|
+
for (var attr in group.attributes) {
|
11664
|
+
if (attr !== "class" && group.attributes.hasOwnProperty(attr)) {
|
11665
|
+
span.setAttribute(attr, group.attributes[attr]);
|
11666
|
+
}
|
11667
|
+
}
|
11668
|
+
|
11669
|
+
return span;
|
11670
|
+
},
|
11671
|
+
mathmlBuilder: function mathmlBuilder(group, options) {
|
11672
|
+
return buildExpressionRow(group.body, options);
|
11494
11673
|
}
|
11495
11674
|
});
|
11496
11675
|
// CONCATENATED MODULE: ./src/functions/htmlmathml.js
|
@@ -11510,8 +11689,8 @@ defineFunction({
|
|
11510
11689
|
return {
|
11511
11690
|
type: "htmlmathml",
|
11512
11691
|
mode: parser.mode,
|
11513
|
-
html:
|
11514
|
-
mathml:
|
11692
|
+
html: ordargument(args[0]),
|
11693
|
+
mathml: ordargument(args[1])
|
11515
11694
|
};
|
11516
11695
|
},
|
11517
11696
|
htmlBuilder: function htmlBuilder(group, options) {
|
@@ -11800,21 +11979,16 @@ defineFunction({
|
|
11800
11979
|
// two items involved in the lap.
|
11801
11980
|
// Next, use a strut to set the height of the HTML bounding box.
|
11802
11981
|
// Otherwise, a tall argument may be misplaced.
|
11982
|
+
// This code resolved issue #1153
|
11803
11983
|
|
11804
11984
|
var strut = buildCommon.makeSpan(["strut"]);
|
11805
11985
|
strut.style.height = node.height + node.depth + "em";
|
11806
11986
|
strut.style.verticalAlign = -node.depth + "em";
|
11807
11987
|
node.children.unshift(strut); // Next, prevent vertical misplacement when next to something tall.
|
11988
|
+
// This code resolves issue #1234
|
11808
11989
|
|
11809
|
-
node = buildCommon.
|
11810
|
-
|
11811
|
-
children: [{
|
11812
|
-
type: "elem",
|
11813
|
-
elem: node
|
11814
|
-
}]
|
11815
|
-
}, options); // Get the horizontal spacing correct relative to adjacent items.
|
11816
|
-
|
11817
|
-
return buildCommon.makeSpan(["mord"], [node], options);
|
11990
|
+
node = buildCommon.makeSpan(["thinbox"], [node], options);
|
11991
|
+
return buildCommon.makeSpan(["mord", "vbox"], [node], options);
|
11818
11992
|
},
|
11819
11993
|
mathmlBuilder: function mathmlBuilder(group, options) {
|
11820
11994
|
// mathllap, mathrlap, mathclap
|
@@ -11909,10 +12083,10 @@ defineFunction({
|
|
11909
12083
|
return {
|
11910
12084
|
type: "mathchoice",
|
11911
12085
|
mode: parser.mode,
|
11912
|
-
display:
|
11913
|
-
text:
|
11914
|
-
script:
|
11915
|
-
scriptscript:
|
12086
|
+
display: ordargument(args[0]),
|
12087
|
+
text: ordargument(args[1]),
|
12088
|
+
script: ordargument(args[2]),
|
12089
|
+
scriptscript: ordargument(args[3])
|
11916
12090
|
};
|
11917
12091
|
},
|
11918
12092
|
htmlBuilder: function htmlBuilder(group, options) {
|
@@ -11930,8 +12104,6 @@ defineFunction({
|
|
11930
12104
|
|
11931
12105
|
// For an operator with limits, assemble the base, sup, and sub into a span.
|
11932
12106
|
var assembleSupSub_assembleSupSub = function assembleSupSub(base, supGroup, subGroup, options, style, slant, baseShift) {
|
11933
|
-
// IE 8 clips \int if it is in a display: inline-block. We wrap it
|
11934
|
-
// in a new span so it is an inline, and works.
|
11935
12107
|
base = buildCommon.makeSpan([], [base]);
|
11936
12108
|
var sub;
|
11937
12109
|
var sup; // We manually have to handle the superscripts and subscripts. This,
|
@@ -12064,15 +12236,14 @@ var op_htmlBuilder = function htmlBuilder(grp, options) {
|
|
12064
12236
|
var subGroup;
|
12065
12237
|
var hasLimits = false;
|
12066
12238
|
var group;
|
12067
|
-
var supSub = checkNodeType(grp, "supsub");
|
12068
12239
|
|
12069
|
-
if (
|
12240
|
+
if (grp.type === "supsub") {
|
12070
12241
|
// If we have limits, supsub will pass us its group to handle. Pull
|
12071
12242
|
// out the superscript and subscript and set the group to the op in
|
12072
12243
|
// its base.
|
12073
|
-
supGroup =
|
12074
|
-
subGroup =
|
12075
|
-
group = assertNodeType(
|
12244
|
+
supGroup = grp.sup;
|
12245
|
+
subGroup = grp.sub;
|
12246
|
+
group = assertNodeType(grp.base, "op");
|
12076
12247
|
hasLimits = true;
|
12077
12248
|
} else {
|
12078
12249
|
group = assertNodeType(grp, "op");
|
@@ -12268,7 +12439,7 @@ defineFunction({
|
|
12268
12439
|
limits: false,
|
12269
12440
|
parentIsSupSub: false,
|
12270
12441
|
symbol: false,
|
12271
|
-
body:
|
12442
|
+
body: ordargument(body)
|
12272
12443
|
};
|
12273
12444
|
},
|
12274
12445
|
htmlBuilder: op_htmlBuilder,
|
@@ -12374,15 +12545,14 @@ var operatorname_htmlBuilder = function htmlBuilder(grp, options) {
|
|
12374
12545
|
var subGroup;
|
12375
12546
|
var hasLimits = false;
|
12376
12547
|
var group;
|
12377
|
-
var supSub = checkNodeType(grp, "supsub");
|
12378
12548
|
|
12379
|
-
if (
|
12549
|
+
if (grp.type === "supsub") {
|
12380
12550
|
// If we have limits, supsub will pass us its group to handle. Pull
|
12381
12551
|
// out the superscript and subscript and set the group to the op in
|
12382
12552
|
// its base.
|
12383
|
-
supGroup =
|
12384
|
-
subGroup =
|
12385
|
-
group = assertNodeType(
|
12553
|
+
supGroup = grp.sup;
|
12554
|
+
subGroup = grp.sub;
|
12555
|
+
group = assertNodeType(grp.base, "operatorname");
|
12386
12556
|
hasLimits = true;
|
12387
12557
|
} else {
|
12388
12558
|
group = assertNodeType(grp, "operatorname");
|
@@ -12507,7 +12677,7 @@ defineFunction({
|
|
12507
12677
|
return {
|
12508
12678
|
type: "operatorname",
|
12509
12679
|
mode: parser.mode,
|
12510
|
-
body:
|
12680
|
+
body: ordargument(body),
|
12511
12681
|
alwaysHandleSupSub: funcName === "\\operatorname*",
|
12512
12682
|
limits: false,
|
12513
12683
|
parentIsSupSub: false
|
@@ -12608,7 +12778,7 @@ defineFunction({
|
|
12608
12778
|
return {
|
12609
12779
|
type: "phantom",
|
12610
12780
|
mode: parser.mode,
|
12611
|
-
body:
|
12781
|
+
body: ordargument(body)
|
12612
12782
|
};
|
12613
12783
|
},
|
12614
12784
|
htmlBuilder: function htmlBuilder(group, options) {
|
@@ -12662,7 +12832,7 @@ defineFunction({
|
|
12662
12832
|
return buildCommon.makeSpan(["mord"], [node], options);
|
12663
12833
|
},
|
12664
12834
|
mathmlBuilder: function mathmlBuilder(group, options) {
|
12665
|
-
var inner = buildMathML_buildExpression(
|
12835
|
+
var inner = buildMathML_buildExpression(ordargument(group.body), options);
|
12666
12836
|
var phantom = new mathMLTree.MathNode("mphantom", inner);
|
12667
12837
|
var node = new mathMLTree.MathNode("mpadded", [phantom]);
|
12668
12838
|
node.setAttribute("height", "0px");
|
@@ -12692,7 +12862,7 @@ defineFunction({
|
|
12692
12862
|
return buildCommon.makeSpan(["mord", "rlap"], [inner, fix], options);
|
12693
12863
|
},
|
12694
12864
|
mathmlBuilder: function mathmlBuilder(group, options) {
|
12695
|
-
var inner = buildMathML_buildExpression(
|
12865
|
+
var inner = buildMathML_buildExpression(ordargument(group.body), options);
|
12696
12866
|
var phantom = new mathMLTree.MathNode("mphantom", inner);
|
12697
12867
|
var node = new mathMLTree.MathNode("mpadded", [phantom]);
|
12698
12868
|
node.setAttribute("width", "0px");
|
@@ -13192,7 +13362,6 @@ defineFunction({
|
|
13192
13362
|
|
13193
13363
|
|
13194
13364
|
|
13195
|
-
|
13196
13365
|
/**
|
13197
13366
|
* Sometimes, groups perform special rules when they have superscripts or
|
13198
13367
|
* subscripts attached to them. This function lets the `supsub` group know that
|
@@ -13373,14 +13542,13 @@ defineFunctionBuilders({
|
|
13373
13542
|
var isBrace = false;
|
13374
13543
|
var isOver;
|
13375
13544
|
var isSup;
|
13376
|
-
var horizBrace = checkNodeType(group.base, "horizBrace");
|
13377
13545
|
|
13378
|
-
if (horizBrace) {
|
13546
|
+
if (group.base && group.base.type === "horizBrace") {
|
13379
13547
|
isSup = !!group.sup;
|
13380
13548
|
|
13381
|
-
if (isSup ===
|
13549
|
+
if (isSup === group.base.isOver) {
|
13382
13550
|
isBrace = true;
|
13383
|
-
isOver =
|
13551
|
+
isOver = group.base.isOver;
|
13384
13552
|
}
|
13385
13553
|
}
|
13386
13554
|
|
@@ -13670,7 +13838,7 @@ defineFunction({
|
|
13670
13838
|
return {
|
13671
13839
|
type: "text",
|
13672
13840
|
mode: parser.mode,
|
13673
|
-
body:
|
13841
|
+
body: ordargument(body),
|
13674
13842
|
font: funcName
|
13675
13843
|
};
|
13676
13844
|
},
|
@@ -13837,6 +14005,8 @@ var functions = _functions;
|
|
13837
14005
|
|
13838
14006
|
|
13839
14007
|
|
14008
|
+
|
14009
|
+
|
13840
14010
|
|
13841
14011
|
|
13842
14012
|
|
@@ -14112,6 +14282,7 @@ function () {
|
|
14112
14282
|
|
14113
14283
|
|
14114
14284
|
|
14285
|
+
|
14115
14286
|
var builtinMacros = {};
|
14116
14287
|
/* harmony default export */ var macros = (builtinMacros); // This function might one day accept an additional argument and do more things.
|
14117
14288
|
|
@@ -14119,7 +14290,37 @@ function defineMacro(name, body) {
|
|
14119
14290
|
builtinMacros[name] = body;
|
14120
14291
|
} //////////////////////////////////////////////////////////////////////
|
14121
14292
|
// macro tools
|
14122
|
-
|
14293
|
+
|
14294
|
+
defineMacro("\\noexpand", function (context) {
|
14295
|
+
// The expansion is the token itself; but that token is interpreted
|
14296
|
+
// as if its meaning were ‘\relax’ if it is a control sequence that
|
14297
|
+
// would ordinarily be expanded by TeX’s expansion rules.
|
14298
|
+
var t = context.popToken();
|
14299
|
+
|
14300
|
+
if (context.isExpandable(t.text)) {
|
14301
|
+
t.noexpand = true;
|
14302
|
+
t.treatAsRelax = true;
|
14303
|
+
}
|
14304
|
+
|
14305
|
+
return {
|
14306
|
+
tokens: [t],
|
14307
|
+
numArgs: 0
|
14308
|
+
};
|
14309
|
+
});
|
14310
|
+
defineMacro("\\expandafter", function (context) {
|
14311
|
+
// TeX first reads the token that comes immediately after \expandafter,
|
14312
|
+
// without expanding it; let’s call this token t. Then TeX reads the
|
14313
|
+
// token that comes after t (and possibly more tokens, if that token
|
14314
|
+
// has an argument), replacing it by its expansion. Finally TeX puts
|
14315
|
+
// t back in front of that expansion.
|
14316
|
+
var t = context.popToken();
|
14317
|
+
context.expandOnce(true); // expand only an expandable token
|
14318
|
+
|
14319
|
+
return {
|
14320
|
+
tokens: [t],
|
14321
|
+
numArgs: 0
|
14322
|
+
};
|
14323
|
+
}); // LaTeX's \@firstoftwo{#1}{#2} expands to #1, skipping #2
|
14123
14324
|
// TeX source: \long\def\@firstoftwo#1#2{#1}
|
14124
14325
|
|
14125
14326
|
defineMacro("\\@firstoftwo", function (context) {
|
@@ -14138,12 +14339,14 @@ defineMacro("\\@secondoftwo", function (context) {
|
|
14138
14339
|
numArgs: 0
|
14139
14340
|
};
|
14140
14341
|
}); // LaTeX's \@ifnextchar{#1}{#2}{#3} looks ahead to the next (unexpanded)
|
14141
|
-
// symbol
|
14142
|
-
//
|
14342
|
+
// symbol that isn't a space, consuming any spaces but not consuming the
|
14343
|
+
// first nonspace character. If that nonspace character matches #1, then
|
14344
|
+
// the macro expands to #2; otherwise, it expands to #3.
|
14143
14345
|
|
14144
14346
|
defineMacro("\\@ifnextchar", function (context) {
|
14145
14347
|
var args = context.consumeArgs(3); // symbol, if, else
|
14146
14348
|
|
14349
|
+
context.consumeSpaces();
|
14147
14350
|
var nextToken = context.future();
|
14148
14351
|
|
14149
14352
|
if (args[0].length === 1 && args[0][0].text === nextToken.text) {
|
@@ -14256,74 +14459,6 @@ defineMacro("\\char", function (context) {
|
|
14256
14459
|
}
|
14257
14460
|
|
14258
14461
|
return "\\@char{" + number + "}";
|
14259
|
-
}); // Basic support for macro definitions:
|
14260
|
-
// \def\macro{expansion}
|
14261
|
-
// \def\macro#1{expansion}
|
14262
|
-
// \def\macro#1#2{expansion}
|
14263
|
-
// \def\macro#1#2#3#4#5#6#7#8#9{expansion}
|
14264
|
-
// Also the \gdef and \global\def equivalents
|
14265
|
-
|
14266
|
-
var macros_def = function def(context, global) {
|
14267
|
-
var arg = context.consumeArgs(1)[0];
|
14268
|
-
|
14269
|
-
if (arg.length !== 1) {
|
14270
|
-
throw new src_ParseError("\\gdef's first argument must be a macro name");
|
14271
|
-
}
|
14272
|
-
|
14273
|
-
var name = arg[0].text; // Count argument specifiers, and check they are in the order #1 #2 ...
|
14274
|
-
|
14275
|
-
var numArgs = 0;
|
14276
|
-
arg = context.consumeArgs(1)[0];
|
14277
|
-
|
14278
|
-
while (arg.length === 1 && arg[0].text === "#") {
|
14279
|
-
arg = context.consumeArgs(1)[0];
|
14280
|
-
|
14281
|
-
if (arg.length !== 1) {
|
14282
|
-
throw new src_ParseError("Invalid argument number length \"" + arg.length + "\"");
|
14283
|
-
}
|
14284
|
-
|
14285
|
-
if (!/^[1-9]$/.test(arg[0].text)) {
|
14286
|
-
throw new src_ParseError("Invalid argument number \"" + arg[0].text + "\"");
|
14287
|
-
}
|
14288
|
-
|
14289
|
-
numArgs++;
|
14290
|
-
|
14291
|
-
if (parseInt(arg[0].text) !== numArgs) {
|
14292
|
-
throw new src_ParseError("Argument number \"" + arg[0].text + "\" out of order");
|
14293
|
-
}
|
14294
|
-
|
14295
|
-
arg = context.consumeArgs(1)[0];
|
14296
|
-
} // Final arg is the expansion of the macro
|
14297
|
-
|
14298
|
-
|
14299
|
-
context.macros.set(name, {
|
14300
|
-
tokens: arg,
|
14301
|
-
numArgs: numArgs
|
14302
|
-
}, global);
|
14303
|
-
return '';
|
14304
|
-
};
|
14305
|
-
|
14306
|
-
defineMacro("\\gdef", function (context) {
|
14307
|
-
return macros_def(context, true);
|
14308
|
-
});
|
14309
|
-
defineMacro("\\def", function (context) {
|
14310
|
-
return macros_def(context, false);
|
14311
|
-
});
|
14312
|
-
defineMacro("\\global", function (context) {
|
14313
|
-
var next = context.consumeArgs(1)[0];
|
14314
|
-
|
14315
|
-
if (next.length !== 1) {
|
14316
|
-
throw new src_ParseError("Invalid command after \\global");
|
14317
|
-
}
|
14318
|
-
|
14319
|
-
var command = next[0].text; // TODO: Should expand command
|
14320
|
-
|
14321
|
-
if (command === "\\def") {
|
14322
|
-
// \global\def is equivalent to \gdef
|
14323
|
-
return macros_def(context, true);
|
14324
|
-
} else {
|
14325
|
-
throw new src_ParseError("Invalid command '" + command + "' after \\global");
|
14326
|
-
}
|
14327
14462
|
}); // \newcommand{\macro}[args]{definition}
|
14328
14463
|
// \renewcommand{\macro}[args]{definition}
|
14329
14464
|
// TODO: Optional arguments: \newcommand{\macro}[args][default]{definition}
|
@@ -14383,6 +14518,30 @@ defineMacro("\\renewcommand", function (context) {
|
|
14383
14518
|
});
|
14384
14519
|
defineMacro("\\providecommand", function (context) {
|
14385
14520
|
return macros_newcommand(context, true, true);
|
14521
|
+
}); // terminal (console) tools
|
14522
|
+
|
14523
|
+
defineMacro("\\message", function (context) {
|
14524
|
+
var arg = context.consumeArgs(1)[0]; // eslint-disable-next-line no-console
|
14525
|
+
|
14526
|
+
console.log(arg.reverse().map(function (token) {
|
14527
|
+
return token.text;
|
14528
|
+
}).join(""));
|
14529
|
+
return '';
|
14530
|
+
});
|
14531
|
+
defineMacro("\\errmessage", function (context) {
|
14532
|
+
var arg = context.consumeArgs(1)[0]; // eslint-disable-next-line no-console
|
14533
|
+
|
14534
|
+
console.error(arg.reverse().map(function (token) {
|
14535
|
+
return token.text;
|
14536
|
+
}).join(""));
|
14537
|
+
return '';
|
14538
|
+
});
|
14539
|
+
defineMacro("\\show", function (context) {
|
14540
|
+
var tok = context.popToken();
|
14541
|
+
var name = tok.text; // eslint-disable-next-line no-console
|
14542
|
+
|
14543
|
+
console.log(tok, context.macros.get(name), src_functions[name], src_symbols.math[name], src_symbols.text[name]);
|
14544
|
+
return '';
|
14386
14545
|
}); //////////////////////////////////////////////////////////////////////
|
14387
14546
|
// Grouping
|
14388
14547
|
// \let\bgroup={ \let\egroup=}
|
@@ -14465,7 +14624,13 @@ defineMacro("\u231E", "\\llcorner");
|
|
14465
14624
|
defineMacro("\u231F", "\\lrcorner");
|
14466
14625
|
defineMacro("\xA9", "\\copyright");
|
14467
14626
|
defineMacro("\xAE", "\\textregistered");
|
14468
|
-
defineMacro("\uFE0F", "\\textregistered");
|
14627
|
+
defineMacro("\uFE0F", "\\textregistered"); // The KaTeX fonts have corners at codepoints that don't match Unicode.
|
14628
|
+
// For MathML purposes, use the Unicode code point.
|
14629
|
+
|
14630
|
+
defineMacro("\\ulcorner", "\\html@mathml{\\@ulcorner}{\\mathop{\\char\"231c}}");
|
14631
|
+
defineMacro("\\urcorner", "\\html@mathml{\\@urcorner}{\\mathop{\\char\"231d}}");
|
14632
|
+
defineMacro("\\llcorner", "\\html@mathml{\\@llcorner}{\\mathop{\\char\"231e}}");
|
14633
|
+
defineMacro("\\lrcorner", "\\html@mathml{\\@lrcorner}{\\mathop{\\char\"231f}}"); //////////////////////////////////////////////////////////////////////
|
14469
14634
|
// LaTeX_2ε
|
14470
14635
|
// \vdots{\vbox{\baselineskip4\p@ \lineskiplimit\z@
|
14471
14636
|
// \kern6\p@\hbox{.}\hbox{.}\hbox{.}}}
|
@@ -14834,7 +14999,9 @@ defineMacro("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{\u2289}");
|
|
14834
14999
|
defineMacro("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}");
|
14835
15000
|
defineMacro("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}");
|
14836
15001
|
defineMacro("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}");
|
14837
|
-
defineMacro("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}");
|
15002
|
+
defineMacro("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}");
|
15003
|
+
defineMacro("\\imath", "\\html@mathml{\\@imath}{\u0131}");
|
15004
|
+
defineMacro("\\jmath", "\\html@mathml{\\@jmath}{\u0237}"); //////////////////////////////////////////////////////////////////////
|
14838
15005
|
// stmaryrd and semantic
|
14839
15006
|
// The stmaryrd and semantic packages render the next four items by calling a
|
14840
15007
|
// glyph. Those glyphs do not exist in the KaTeX fonts. Hence the macros.
|
@@ -14852,7 +15019,11 @@ defineMacro("\u2983", "\\lBrace"); // blackboard bold {
|
|
14852
15019
|
defineMacro("\u2984", "\\rBrace"); // blackboard bold }
|
14853
15020
|
// TODO: Create variable sized versions of the last two items. I believe that
|
14854
15021
|
// will require new font glyphs.
|
14855
|
-
|
15022
|
+
// The stmaryrd function `\minuso` provides a "Plimsoll" symbol that
|
15023
|
+
// superimposes the characters \circ and \mathminus. Used in chemistry.
|
15024
|
+
|
15025
|
+
defineMacro("\\minuso", "\\mathbin{\\html@mathml{" + "{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}" + "{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}" + "{\\char`⦵}}");
|
15026
|
+
defineMacro("⦵", "\\minuso"); //////////////////////////////////////////////////////////////////////
|
14856
15027
|
// texvc.sty
|
14857
15028
|
// The texvc package contains macros available in mediawiki pages.
|
14858
15029
|
// We omit the functions deprecated at
|
@@ -14928,7 +15099,15 @@ defineMacro("\\Zeta", "\\mathrm{Z}"); //////////////////////////////////////////
|
|
14928
15099
|
|
14929
15100
|
defineMacro("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}");
|
14930
15101
|
defineMacro("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}");
|
14931
|
-
defineMacro("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits");
|
15102
|
+
defineMacro("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits"); //////////////////////////////////////////////////////////////////////
|
15103
|
+
// braket.sty
|
15104
|
+
// http://ctan.math.washington.edu/tex-archive/macros/latex/contrib/braket/braket.pdf
|
15105
|
+
|
15106
|
+
defineMacro("\\bra", "\\mathinner{\\langle{#1}|}");
|
15107
|
+
defineMacro("\\ket", "\\mathinner{|{#1}\\rangle}");
|
15108
|
+
defineMacro("\\braket", "\\mathinner{\\langle{#1}\\rangle}");
|
15109
|
+
defineMacro("\\Bra", "\\left\\langle#1\\right|");
|
15110
|
+
defineMacro("\\Ket", "\\left|#1\\right\\rangle"); // Custom Khan Academy colors, should be moved to an optional package
|
14932
15111
|
|
14933
15112
|
defineMacro("\\blue", "\\textcolor{##6495ed}{#1}");
|
14934
15113
|
defineMacro("\\orange", "\\textcolor{##ffa500}{#1}");
|
@@ -15188,18 +15367,22 @@ function () {
|
|
15188
15367
|
* At the moment, macro expansion doesn't handle delimited macros,
|
15189
15368
|
* i.e. things like those defined by \def\foo#1\end{…}.
|
15190
15369
|
* See the TeX book page 202ff. for details on how those should behave.
|
15370
|
+
*
|
15371
|
+
* If expandableOnly, only expandable tokens are expanded and
|
15372
|
+
* an undefined control sequence results in an error.
|
15191
15373
|
*/
|
15192
15374
|
;
|
15193
15375
|
|
15194
|
-
_proto.expandOnce = function expandOnce() {
|
15376
|
+
_proto.expandOnce = function expandOnce(expandableOnly) {
|
15195
15377
|
var topToken = this.popToken();
|
15196
15378
|
var name = topToken.text;
|
15379
|
+
var expansion = !topToken.noexpand ? this._getExpansion(name) : null;
|
15197
15380
|
|
15198
|
-
|
15381
|
+
if (expansion == null || expandableOnly && expansion.unexpandable) {
|
15382
|
+
if (expandableOnly && expansion == null && name[0] === "\\" && !this.isDefined(name)) {
|
15383
|
+
throw new src_ParseError("Undefined control sequence: " + name);
|
15384
|
+
}
|
15199
15385
|
|
15200
|
-
if (expansion == null) {
|
15201
|
-
// mainly checking for undefined here
|
15202
|
-
// Fully expanded
|
15203
15386
|
this.pushToken(topToken);
|
15204
15387
|
return topToken;
|
15205
15388
|
}
|
@@ -15270,7 +15453,9 @@ function () {
|
|
15270
15453
|
if (expanded instanceof Token_Token) {
|
15271
15454
|
// \relax stops the expansion, but shouldn't get returned (a
|
15272
15455
|
// null return value couldn't get implemented as a function).
|
15273
|
-
|
15456
|
+
// the token after \noexpand is interpreted as if its meaning
|
15457
|
+
// were ‘\relax’
|
15458
|
+
if (expanded.text === "\\relax" || expanded.treatAsRelax) {
|
15274
15459
|
this.stack.pop();
|
15275
15460
|
} else {
|
15276
15461
|
return this.stack.pop(); // === expanded
|
@@ -15289,18 +15474,29 @@ function () {
|
|
15289
15474
|
;
|
15290
15475
|
|
15291
15476
|
_proto.expandMacro = function expandMacro(name) {
|
15292
|
-
|
15293
|
-
|
15294
|
-
|
15477
|
+
return this.macros.has(name) ? this.expandTokens([new Token_Token(name)]) : undefined;
|
15478
|
+
}
|
15479
|
+
/**
|
15480
|
+
* Fully expand the given token stream and return the resulting list of tokens
|
15481
|
+
*/
|
15482
|
+
;
|
15295
15483
|
|
15484
|
+
_proto.expandTokens = function expandTokens(tokens) {
|
15296
15485
|
var output = [];
|
15297
15486
|
var oldStackLength = this.stack.length;
|
15298
|
-
this.
|
15487
|
+
this.pushTokens(tokens);
|
15299
15488
|
|
15300
15489
|
while (this.stack.length > oldStackLength) {
|
15301
|
-
var expanded = this.expandOnce(); //
|
15490
|
+
var expanded = this.expandOnce(true); // expand only expandable tokens
|
15491
|
+
// expandOnce returns Token if and only if it's fully expanded.
|
15302
15492
|
|
15303
15493
|
if (expanded instanceof Token_Token) {
|
15494
|
+
if (expanded.treatAsRelax) {
|
15495
|
+
// the expansion of \noexpand is the token itself
|
15496
|
+
expanded.noexpand = false;
|
15497
|
+
expanded.treatAsRelax = false;
|
15498
|
+
}
|
15499
|
+
|
15304
15500
|
output.push(this.stack.pop());
|
15305
15501
|
}
|
15306
15502
|
}
|
@@ -15381,700 +15577,24 @@ function () {
|
|
15381
15577
|
|
15382
15578
|
_proto.isDefined = function isDefined(name) {
|
15383
15579
|
return this.macros.has(name) || src_functions.hasOwnProperty(name) || src_symbols.math.hasOwnProperty(name) || src_symbols.text.hasOwnProperty(name) || implicitCommands.hasOwnProperty(name);
|
15580
|
+
}
|
15581
|
+
/**
|
15582
|
+
* Determine whether a command is expandable.
|
15583
|
+
*/
|
15584
|
+
;
|
15585
|
+
|
15586
|
+
_proto.isExpandable = function isExpandable(name) {
|
15587
|
+
var macro = this.macros.get(name);
|
15588
|
+
return macro != null ? typeof macro === "string" || typeof macro === "function" || !macro.unexpandable // TODO(ylem): #2085
|
15589
|
+
: src_functions.hasOwnProperty(name)
|
15590
|
+
/* && !functions[name].primitive*/
|
15591
|
+
;
|
15384
15592
|
};
|
15385
15593
|
|
15386
15594
|
return MacroExpander;
|
15387
15595
|
}();
|
15388
15596
|
|
15389
15597
|
|
15390
|
-
// CONCATENATED MODULE: ./src/unicodeAccents.js
|
15391
|
-
// Mapping of Unicode accent characters to their LaTeX equivalent in text and
|
15392
|
-
// math mode (when they exist).
|
15393
|
-
/* harmony default export */ var unicodeAccents = ({
|
15394
|
-
"\u0301": {
|
15395
|
-
text: "\\'",
|
15396
|
-
math: '\\acute'
|
15397
|
-
},
|
15398
|
-
"\u0300": {
|
15399
|
-
text: '\\`',
|
15400
|
-
math: '\\grave'
|
15401
|
-
},
|
15402
|
-
"\u0308": {
|
15403
|
-
text: '\\"',
|
15404
|
-
math: '\\ddot'
|
15405
|
-
},
|
15406
|
-
"\u0303": {
|
15407
|
-
text: '\\~',
|
15408
|
-
math: '\\tilde'
|
15409
|
-
},
|
15410
|
-
"\u0304": {
|
15411
|
-
text: '\\=',
|
15412
|
-
math: '\\bar'
|
15413
|
-
},
|
15414
|
-
"\u0306": {
|
15415
|
-
text: "\\u",
|
15416
|
-
math: '\\breve'
|
15417
|
-
},
|
15418
|
-
"\u030C": {
|
15419
|
-
text: '\\v',
|
15420
|
-
math: '\\check'
|
15421
|
-
},
|
15422
|
-
"\u0302": {
|
15423
|
-
text: '\\^',
|
15424
|
-
math: '\\hat'
|
15425
|
-
},
|
15426
|
-
"\u0307": {
|
15427
|
-
text: '\\.',
|
15428
|
-
math: '\\dot'
|
15429
|
-
},
|
15430
|
-
"\u030A": {
|
15431
|
-
text: '\\r',
|
15432
|
-
math: '\\mathring'
|
15433
|
-
},
|
15434
|
-
"\u030B": {
|
15435
|
-
text: '\\H'
|
15436
|
-
}
|
15437
|
-
});
|
15438
|
-
// CONCATENATED MODULE: ./src/unicodeSymbols.js
|
15439
|
-
// This file is GENERATED by unicodeMake.js. DO NOT MODIFY.
|
15440
|
-
/* harmony default export */ var unicodeSymbols = ({
|
15441
|
-
"\xE1": "a\u0301",
|
15442
|
-
// á = \'{a}
|
15443
|
-
"\xE0": "a\u0300",
|
15444
|
-
// à = \`{a}
|
15445
|
-
"\xE4": "a\u0308",
|
15446
|
-
// ä = \"{a}
|
15447
|
-
"\u01DF": "a\u0308\u0304",
|
15448
|
-
// ǟ = \"\={a}
|
15449
|
-
"\xE3": "a\u0303",
|
15450
|
-
// ã = \~{a}
|
15451
|
-
"\u0101": "a\u0304",
|
15452
|
-
// ā = \={a}
|
15453
|
-
"\u0103": "a\u0306",
|
15454
|
-
// ă = \u{a}
|
15455
|
-
"\u1EAF": "a\u0306\u0301",
|
15456
|
-
// ắ = \u\'{a}
|
15457
|
-
"\u1EB1": "a\u0306\u0300",
|
15458
|
-
// ằ = \u\`{a}
|
15459
|
-
"\u1EB5": "a\u0306\u0303",
|
15460
|
-
// ẵ = \u\~{a}
|
15461
|
-
"\u01CE": "a\u030C",
|
15462
|
-
// ǎ = \v{a}
|
15463
|
-
"\xE2": "a\u0302",
|
15464
|
-
// â = \^{a}
|
15465
|
-
"\u1EA5": "a\u0302\u0301",
|
15466
|
-
// ấ = \^\'{a}
|
15467
|
-
"\u1EA7": "a\u0302\u0300",
|
15468
|
-
// ầ = \^\`{a}
|
15469
|
-
"\u1EAB": "a\u0302\u0303",
|
15470
|
-
// ẫ = \^\~{a}
|
15471
|
-
"\u0227": "a\u0307",
|
15472
|
-
// ȧ = \.{a}
|
15473
|
-
"\u01E1": "a\u0307\u0304",
|
15474
|
-
// ǡ = \.\={a}
|
15475
|
-
"\xE5": "a\u030A",
|
15476
|
-
// å = \r{a}
|
15477
|
-
"\u01FB": "a\u030A\u0301",
|
15478
|
-
// ǻ = \r\'{a}
|
15479
|
-
"\u1E03": "b\u0307",
|
15480
|
-
// ḃ = \.{b}
|
15481
|
-
"\u0107": "c\u0301",
|
15482
|
-
// ć = \'{c}
|
15483
|
-
"\u010D": "c\u030C",
|
15484
|
-
// č = \v{c}
|
15485
|
-
"\u0109": "c\u0302",
|
15486
|
-
// ĉ = \^{c}
|
15487
|
-
"\u010B": "c\u0307",
|
15488
|
-
// ċ = \.{c}
|
15489
|
-
"\u010F": "d\u030C",
|
15490
|
-
// ď = \v{d}
|
15491
|
-
"\u1E0B": "d\u0307",
|
15492
|
-
// ḋ = \.{d}
|
15493
|
-
"\xE9": "e\u0301",
|
15494
|
-
// é = \'{e}
|
15495
|
-
"\xE8": "e\u0300",
|
15496
|
-
// è = \`{e}
|
15497
|
-
"\xEB": "e\u0308",
|
15498
|
-
// ë = \"{e}
|
15499
|
-
"\u1EBD": "e\u0303",
|
15500
|
-
// ẽ = \~{e}
|
15501
|
-
"\u0113": "e\u0304",
|
15502
|
-
// ē = \={e}
|
15503
|
-
"\u1E17": "e\u0304\u0301",
|
15504
|
-
// ḗ = \=\'{e}
|
15505
|
-
"\u1E15": "e\u0304\u0300",
|
15506
|
-
// ḕ = \=\`{e}
|
15507
|
-
"\u0115": "e\u0306",
|
15508
|
-
// ĕ = \u{e}
|
15509
|
-
"\u011B": "e\u030C",
|
15510
|
-
// ě = \v{e}
|
15511
|
-
"\xEA": "e\u0302",
|
15512
|
-
// ê = \^{e}
|
15513
|
-
"\u1EBF": "e\u0302\u0301",
|
15514
|
-
// ế = \^\'{e}
|
15515
|
-
"\u1EC1": "e\u0302\u0300",
|
15516
|
-
// ề = \^\`{e}
|
15517
|
-
"\u1EC5": "e\u0302\u0303",
|
15518
|
-
// ễ = \^\~{e}
|
15519
|
-
"\u0117": "e\u0307",
|
15520
|
-
// ė = \.{e}
|
15521
|
-
"\u1E1F": "f\u0307",
|
15522
|
-
// ḟ = \.{f}
|
15523
|
-
"\u01F5": "g\u0301",
|
15524
|
-
// ǵ = \'{g}
|
15525
|
-
"\u1E21": "g\u0304",
|
15526
|
-
// ḡ = \={g}
|
15527
|
-
"\u011F": "g\u0306",
|
15528
|
-
// ğ = \u{g}
|
15529
|
-
"\u01E7": "g\u030C",
|
15530
|
-
// ǧ = \v{g}
|
15531
|
-
"\u011D": "g\u0302",
|
15532
|
-
// ĝ = \^{g}
|
15533
|
-
"\u0121": "g\u0307",
|
15534
|
-
// ġ = \.{g}
|
15535
|
-
"\u1E27": "h\u0308",
|
15536
|
-
// ḧ = \"{h}
|
15537
|
-
"\u021F": "h\u030C",
|
15538
|
-
// ȟ = \v{h}
|
15539
|
-
"\u0125": "h\u0302",
|
15540
|
-
// ĥ = \^{h}
|
15541
|
-
"\u1E23": "h\u0307",
|
15542
|
-
// ḣ = \.{h}
|
15543
|
-
"\xED": "i\u0301",
|
15544
|
-
// í = \'{i}
|
15545
|
-
"\xEC": "i\u0300",
|
15546
|
-
// ì = \`{i}
|
15547
|
-
"\xEF": "i\u0308",
|
15548
|
-
// ï = \"{i}
|
15549
|
-
"\u1E2F": "i\u0308\u0301",
|
15550
|
-
// ḯ = \"\'{i}
|
15551
|
-
"\u0129": "i\u0303",
|
15552
|
-
// ĩ = \~{i}
|
15553
|
-
"\u012B": "i\u0304",
|
15554
|
-
// ī = \={i}
|
15555
|
-
"\u012D": "i\u0306",
|
15556
|
-
// ĭ = \u{i}
|
15557
|
-
"\u01D0": "i\u030C",
|
15558
|
-
// ǐ = \v{i}
|
15559
|
-
"\xEE": "i\u0302",
|
15560
|
-
// î = \^{i}
|
15561
|
-
"\u01F0": "j\u030C",
|
15562
|
-
// ǰ = \v{j}
|
15563
|
-
"\u0135": "j\u0302",
|
15564
|
-
// ĵ = \^{j}
|
15565
|
-
"\u1E31": "k\u0301",
|
15566
|
-
// ḱ = \'{k}
|
15567
|
-
"\u01E9": "k\u030C",
|
15568
|
-
// ǩ = \v{k}
|
15569
|
-
"\u013A": "l\u0301",
|
15570
|
-
// ĺ = \'{l}
|
15571
|
-
"\u013E": "l\u030C",
|
15572
|
-
// ľ = \v{l}
|
15573
|
-
"\u1E3F": "m\u0301",
|
15574
|
-
// ḿ = \'{m}
|
15575
|
-
"\u1E41": "m\u0307",
|
15576
|
-
// ṁ = \.{m}
|
15577
|
-
"\u0144": "n\u0301",
|
15578
|
-
// ń = \'{n}
|
15579
|
-
"\u01F9": "n\u0300",
|
15580
|
-
// ǹ = \`{n}
|
15581
|
-
"\xF1": "n\u0303",
|
15582
|
-
// ñ = \~{n}
|
15583
|
-
"\u0148": "n\u030C",
|
15584
|
-
// ň = \v{n}
|
15585
|
-
"\u1E45": "n\u0307",
|
15586
|
-
// ṅ = \.{n}
|
15587
|
-
"\xF3": "o\u0301",
|
15588
|
-
// ó = \'{o}
|
15589
|
-
"\xF2": "o\u0300",
|
15590
|
-
// ò = \`{o}
|
15591
|
-
"\xF6": "o\u0308",
|
15592
|
-
// ö = \"{o}
|
15593
|
-
"\u022B": "o\u0308\u0304",
|
15594
|
-
// ȫ = \"\={o}
|
15595
|
-
"\xF5": "o\u0303",
|
15596
|
-
// õ = \~{o}
|
15597
|
-
"\u1E4D": "o\u0303\u0301",
|
15598
|
-
// ṍ = \~\'{o}
|
15599
|
-
"\u1E4F": "o\u0303\u0308",
|
15600
|
-
// ṏ = \~\"{o}
|
15601
|
-
"\u022D": "o\u0303\u0304",
|
15602
|
-
// ȭ = \~\={o}
|
15603
|
-
"\u014D": "o\u0304",
|
15604
|
-
// ō = \={o}
|
15605
|
-
"\u1E53": "o\u0304\u0301",
|
15606
|
-
// ṓ = \=\'{o}
|
15607
|
-
"\u1E51": "o\u0304\u0300",
|
15608
|
-
// ṑ = \=\`{o}
|
15609
|
-
"\u014F": "o\u0306",
|
15610
|
-
// ŏ = \u{o}
|
15611
|
-
"\u01D2": "o\u030C",
|
15612
|
-
// ǒ = \v{o}
|
15613
|
-
"\xF4": "o\u0302",
|
15614
|
-
// ô = \^{o}
|
15615
|
-
"\u1ED1": "o\u0302\u0301",
|
15616
|
-
// ố = \^\'{o}
|
15617
|
-
"\u1ED3": "o\u0302\u0300",
|
15618
|
-
// ồ = \^\`{o}
|
15619
|
-
"\u1ED7": "o\u0302\u0303",
|
15620
|
-
// ỗ = \^\~{o}
|
15621
|
-
"\u022F": "o\u0307",
|
15622
|
-
// ȯ = \.{o}
|
15623
|
-
"\u0231": "o\u0307\u0304",
|
15624
|
-
// ȱ = \.\={o}
|
15625
|
-
"\u0151": "o\u030B",
|
15626
|
-
// ő = \H{o}
|
15627
|
-
"\u1E55": "p\u0301",
|
15628
|
-
// ṕ = \'{p}
|
15629
|
-
"\u1E57": "p\u0307",
|
15630
|
-
// ṗ = \.{p}
|
15631
|
-
"\u0155": "r\u0301",
|
15632
|
-
// ŕ = \'{r}
|
15633
|
-
"\u0159": "r\u030C",
|
15634
|
-
// ř = \v{r}
|
15635
|
-
"\u1E59": "r\u0307",
|
15636
|
-
// ṙ = \.{r}
|
15637
|
-
"\u015B": "s\u0301",
|
15638
|
-
// ś = \'{s}
|
15639
|
-
"\u1E65": "s\u0301\u0307",
|
15640
|
-
// ṥ = \'\.{s}
|
15641
|
-
"\u0161": "s\u030C",
|
15642
|
-
// š = \v{s}
|
15643
|
-
"\u1E67": "s\u030C\u0307",
|
15644
|
-
// ṧ = \v\.{s}
|
15645
|
-
"\u015D": "s\u0302",
|
15646
|
-
// ŝ = \^{s}
|
15647
|
-
"\u1E61": "s\u0307",
|
15648
|
-
// ṡ = \.{s}
|
15649
|
-
"\u1E97": "t\u0308",
|
15650
|
-
// ẗ = \"{t}
|
15651
|
-
"\u0165": "t\u030C",
|
15652
|
-
// ť = \v{t}
|
15653
|
-
"\u1E6B": "t\u0307",
|
15654
|
-
// ṫ = \.{t}
|
15655
|
-
"\xFA": "u\u0301",
|
15656
|
-
// ú = \'{u}
|
15657
|
-
"\xF9": "u\u0300",
|
15658
|
-
// ù = \`{u}
|
15659
|
-
"\xFC": "u\u0308",
|
15660
|
-
// ü = \"{u}
|
15661
|
-
"\u01D8": "u\u0308\u0301",
|
15662
|
-
// ǘ = \"\'{u}
|
15663
|
-
"\u01DC": "u\u0308\u0300",
|
15664
|
-
// ǜ = \"\`{u}
|
15665
|
-
"\u01D6": "u\u0308\u0304",
|
15666
|
-
// ǖ = \"\={u}
|
15667
|
-
"\u01DA": "u\u0308\u030C",
|
15668
|
-
// ǚ = \"\v{u}
|
15669
|
-
"\u0169": "u\u0303",
|
15670
|
-
// ũ = \~{u}
|
15671
|
-
"\u1E79": "u\u0303\u0301",
|
15672
|
-
// ṹ = \~\'{u}
|
15673
|
-
"\u016B": "u\u0304",
|
15674
|
-
// ū = \={u}
|
15675
|
-
"\u1E7B": "u\u0304\u0308",
|
15676
|
-
// ṻ = \=\"{u}
|
15677
|
-
"\u016D": "u\u0306",
|
15678
|
-
// ŭ = \u{u}
|
15679
|
-
"\u01D4": "u\u030C",
|
15680
|
-
// ǔ = \v{u}
|
15681
|
-
"\xFB": "u\u0302",
|
15682
|
-
// û = \^{u}
|
15683
|
-
"\u016F": "u\u030A",
|
15684
|
-
// ů = \r{u}
|
15685
|
-
"\u0171": "u\u030B",
|
15686
|
-
// ű = \H{u}
|
15687
|
-
"\u1E7D": "v\u0303",
|
15688
|
-
// ṽ = \~{v}
|
15689
|
-
"\u1E83": "w\u0301",
|
15690
|
-
// ẃ = \'{w}
|
15691
|
-
"\u1E81": "w\u0300",
|
15692
|
-
// ẁ = \`{w}
|
15693
|
-
"\u1E85": "w\u0308",
|
15694
|
-
// ẅ = \"{w}
|
15695
|
-
"\u0175": "w\u0302",
|
15696
|
-
// ŵ = \^{w}
|
15697
|
-
"\u1E87": "w\u0307",
|
15698
|
-
// ẇ = \.{w}
|
15699
|
-
"\u1E98": "w\u030A",
|
15700
|
-
// ẘ = \r{w}
|
15701
|
-
"\u1E8D": "x\u0308",
|
15702
|
-
// ẍ = \"{x}
|
15703
|
-
"\u1E8B": "x\u0307",
|
15704
|
-
// ẋ = \.{x}
|
15705
|
-
"\xFD": "y\u0301",
|
15706
|
-
// ý = \'{y}
|
15707
|
-
"\u1EF3": "y\u0300",
|
15708
|
-
// ỳ = \`{y}
|
15709
|
-
"\xFF": "y\u0308",
|
15710
|
-
// ÿ = \"{y}
|
15711
|
-
"\u1EF9": "y\u0303",
|
15712
|
-
// ỹ = \~{y}
|
15713
|
-
"\u0233": "y\u0304",
|
15714
|
-
// ȳ = \={y}
|
15715
|
-
"\u0177": "y\u0302",
|
15716
|
-
// ŷ = \^{y}
|
15717
|
-
"\u1E8F": "y\u0307",
|
15718
|
-
// ẏ = \.{y}
|
15719
|
-
"\u1E99": "y\u030A",
|
15720
|
-
// ẙ = \r{y}
|
15721
|
-
"\u017A": "z\u0301",
|
15722
|
-
// ź = \'{z}
|
15723
|
-
"\u017E": "z\u030C",
|
15724
|
-
// ž = \v{z}
|
15725
|
-
"\u1E91": "z\u0302",
|
15726
|
-
// ẑ = \^{z}
|
15727
|
-
"\u017C": "z\u0307",
|
15728
|
-
// ż = \.{z}
|
15729
|
-
"\xC1": "A\u0301",
|
15730
|
-
// Á = \'{A}
|
15731
|
-
"\xC0": "A\u0300",
|
15732
|
-
// À = \`{A}
|
15733
|
-
"\xC4": "A\u0308",
|
15734
|
-
// Ä = \"{A}
|
15735
|
-
"\u01DE": "A\u0308\u0304",
|
15736
|
-
// Ǟ = \"\={A}
|
15737
|
-
"\xC3": "A\u0303",
|
15738
|
-
// Ã = \~{A}
|
15739
|
-
"\u0100": "A\u0304",
|
15740
|
-
// Ā = \={A}
|
15741
|
-
"\u0102": "A\u0306",
|
15742
|
-
// Ă = \u{A}
|
15743
|
-
"\u1EAE": "A\u0306\u0301",
|
15744
|
-
// Ắ = \u\'{A}
|
15745
|
-
"\u1EB0": "A\u0306\u0300",
|
15746
|
-
// Ằ = \u\`{A}
|
15747
|
-
"\u1EB4": "A\u0306\u0303",
|
15748
|
-
// Ẵ = \u\~{A}
|
15749
|
-
"\u01CD": "A\u030C",
|
15750
|
-
// Ǎ = \v{A}
|
15751
|
-
"\xC2": "A\u0302",
|
15752
|
-
// Â = \^{A}
|
15753
|
-
"\u1EA4": "A\u0302\u0301",
|
15754
|
-
// Ấ = \^\'{A}
|
15755
|
-
"\u1EA6": "A\u0302\u0300",
|
15756
|
-
// Ầ = \^\`{A}
|
15757
|
-
"\u1EAA": "A\u0302\u0303",
|
15758
|
-
// Ẫ = \^\~{A}
|
15759
|
-
"\u0226": "A\u0307",
|
15760
|
-
// Ȧ = \.{A}
|
15761
|
-
"\u01E0": "A\u0307\u0304",
|
15762
|
-
// Ǡ = \.\={A}
|
15763
|
-
"\xC5": "A\u030A",
|
15764
|
-
// Å = \r{A}
|
15765
|
-
"\u01FA": "A\u030A\u0301",
|
15766
|
-
// Ǻ = \r\'{A}
|
15767
|
-
"\u1E02": "B\u0307",
|
15768
|
-
// Ḃ = \.{B}
|
15769
|
-
"\u0106": "C\u0301",
|
15770
|
-
// Ć = \'{C}
|
15771
|
-
"\u010C": "C\u030C",
|
15772
|
-
// Č = \v{C}
|
15773
|
-
"\u0108": "C\u0302",
|
15774
|
-
// Ĉ = \^{C}
|
15775
|
-
"\u010A": "C\u0307",
|
15776
|
-
// Ċ = \.{C}
|
15777
|
-
"\u010E": "D\u030C",
|
15778
|
-
// Ď = \v{D}
|
15779
|
-
"\u1E0A": "D\u0307",
|
15780
|
-
// Ḋ = \.{D}
|
15781
|
-
"\xC9": "E\u0301",
|
15782
|
-
// É = \'{E}
|
15783
|
-
"\xC8": "E\u0300",
|
15784
|
-
// È = \`{E}
|
15785
|
-
"\xCB": "E\u0308",
|
15786
|
-
// Ë = \"{E}
|
15787
|
-
"\u1EBC": "E\u0303",
|
15788
|
-
// Ẽ = \~{E}
|
15789
|
-
"\u0112": "E\u0304",
|
15790
|
-
// Ē = \={E}
|
15791
|
-
"\u1E16": "E\u0304\u0301",
|
15792
|
-
// Ḗ = \=\'{E}
|
15793
|
-
"\u1E14": "E\u0304\u0300",
|
15794
|
-
// Ḕ = \=\`{E}
|
15795
|
-
"\u0114": "E\u0306",
|
15796
|
-
// Ĕ = \u{E}
|
15797
|
-
"\u011A": "E\u030C",
|
15798
|
-
// Ě = \v{E}
|
15799
|
-
"\xCA": "E\u0302",
|
15800
|
-
// Ê = \^{E}
|
15801
|
-
"\u1EBE": "E\u0302\u0301",
|
15802
|
-
// Ế = \^\'{E}
|
15803
|
-
"\u1EC0": "E\u0302\u0300",
|
15804
|
-
// Ề = \^\`{E}
|
15805
|
-
"\u1EC4": "E\u0302\u0303",
|
15806
|
-
// Ễ = \^\~{E}
|
15807
|
-
"\u0116": "E\u0307",
|
15808
|
-
// Ė = \.{E}
|
15809
|
-
"\u1E1E": "F\u0307",
|
15810
|
-
// Ḟ = \.{F}
|
15811
|
-
"\u01F4": "G\u0301",
|
15812
|
-
// Ǵ = \'{G}
|
15813
|
-
"\u1E20": "G\u0304",
|
15814
|
-
// Ḡ = \={G}
|
15815
|
-
"\u011E": "G\u0306",
|
15816
|
-
// Ğ = \u{G}
|
15817
|
-
"\u01E6": "G\u030C",
|
15818
|
-
// Ǧ = \v{G}
|
15819
|
-
"\u011C": "G\u0302",
|
15820
|
-
// Ĝ = \^{G}
|
15821
|
-
"\u0120": "G\u0307",
|
15822
|
-
// Ġ = \.{G}
|
15823
|
-
"\u1E26": "H\u0308",
|
15824
|
-
// Ḧ = \"{H}
|
15825
|
-
"\u021E": "H\u030C",
|
15826
|
-
// Ȟ = \v{H}
|
15827
|
-
"\u0124": "H\u0302",
|
15828
|
-
// Ĥ = \^{H}
|
15829
|
-
"\u1E22": "H\u0307",
|
15830
|
-
// Ḣ = \.{H}
|
15831
|
-
"\xCD": "I\u0301",
|
15832
|
-
// Í = \'{I}
|
15833
|
-
"\xCC": "I\u0300",
|
15834
|
-
// Ì = \`{I}
|
15835
|
-
"\xCF": "I\u0308",
|
15836
|
-
// Ï = \"{I}
|
15837
|
-
"\u1E2E": "I\u0308\u0301",
|
15838
|
-
// Ḯ = \"\'{I}
|
15839
|
-
"\u0128": "I\u0303",
|
15840
|
-
// Ĩ = \~{I}
|
15841
|
-
"\u012A": "I\u0304",
|
15842
|
-
// Ī = \={I}
|
15843
|
-
"\u012C": "I\u0306",
|
15844
|
-
// Ĭ = \u{I}
|
15845
|
-
"\u01CF": "I\u030C",
|
15846
|
-
// Ǐ = \v{I}
|
15847
|
-
"\xCE": "I\u0302",
|
15848
|
-
// Î = \^{I}
|
15849
|
-
"\u0130": "I\u0307",
|
15850
|
-
// İ = \.{I}
|
15851
|
-
"\u0134": "J\u0302",
|
15852
|
-
// Ĵ = \^{J}
|
15853
|
-
"\u1E30": "K\u0301",
|
15854
|
-
// Ḱ = \'{K}
|
15855
|
-
"\u01E8": "K\u030C",
|
15856
|
-
// Ǩ = \v{K}
|
15857
|
-
"\u0139": "L\u0301",
|
15858
|
-
// Ĺ = \'{L}
|
15859
|
-
"\u013D": "L\u030C",
|
15860
|
-
// Ľ = \v{L}
|
15861
|
-
"\u1E3E": "M\u0301",
|
15862
|
-
// Ḿ = \'{M}
|
15863
|
-
"\u1E40": "M\u0307",
|
15864
|
-
// Ṁ = \.{M}
|
15865
|
-
"\u0143": "N\u0301",
|
15866
|
-
// Ń = \'{N}
|
15867
|
-
"\u01F8": "N\u0300",
|
15868
|
-
// Ǹ = \`{N}
|
15869
|
-
"\xD1": "N\u0303",
|
15870
|
-
// Ñ = \~{N}
|
15871
|
-
"\u0147": "N\u030C",
|
15872
|
-
// Ň = \v{N}
|
15873
|
-
"\u1E44": "N\u0307",
|
15874
|
-
// Ṅ = \.{N}
|
15875
|
-
"\xD3": "O\u0301",
|
15876
|
-
// Ó = \'{O}
|
15877
|
-
"\xD2": "O\u0300",
|
15878
|
-
// Ò = \`{O}
|
15879
|
-
"\xD6": "O\u0308",
|
15880
|
-
// Ö = \"{O}
|
15881
|
-
"\u022A": "O\u0308\u0304",
|
15882
|
-
// Ȫ = \"\={O}
|
15883
|
-
"\xD5": "O\u0303",
|
15884
|
-
// Õ = \~{O}
|
15885
|
-
"\u1E4C": "O\u0303\u0301",
|
15886
|
-
// Ṍ = \~\'{O}
|
15887
|
-
"\u1E4E": "O\u0303\u0308",
|
15888
|
-
// Ṏ = \~\"{O}
|
15889
|
-
"\u022C": "O\u0303\u0304",
|
15890
|
-
// Ȭ = \~\={O}
|
15891
|
-
"\u014C": "O\u0304",
|
15892
|
-
// Ō = \={O}
|
15893
|
-
"\u1E52": "O\u0304\u0301",
|
15894
|
-
// Ṓ = \=\'{O}
|
15895
|
-
"\u1E50": "O\u0304\u0300",
|
15896
|
-
// Ṑ = \=\`{O}
|
15897
|
-
"\u014E": "O\u0306",
|
15898
|
-
// Ŏ = \u{O}
|
15899
|
-
"\u01D1": "O\u030C",
|
15900
|
-
// Ǒ = \v{O}
|
15901
|
-
"\xD4": "O\u0302",
|
15902
|
-
// Ô = \^{O}
|
15903
|
-
"\u1ED0": "O\u0302\u0301",
|
15904
|
-
// Ố = \^\'{O}
|
15905
|
-
"\u1ED2": "O\u0302\u0300",
|
15906
|
-
// Ồ = \^\`{O}
|
15907
|
-
"\u1ED6": "O\u0302\u0303",
|
15908
|
-
// Ỗ = \^\~{O}
|
15909
|
-
"\u022E": "O\u0307",
|
15910
|
-
// Ȯ = \.{O}
|
15911
|
-
"\u0230": "O\u0307\u0304",
|
15912
|
-
// Ȱ = \.\={O}
|
15913
|
-
"\u0150": "O\u030B",
|
15914
|
-
// Ő = \H{O}
|
15915
|
-
"\u1E54": "P\u0301",
|
15916
|
-
// Ṕ = \'{P}
|
15917
|
-
"\u1E56": "P\u0307",
|
15918
|
-
// Ṗ = \.{P}
|
15919
|
-
"\u0154": "R\u0301",
|
15920
|
-
// Ŕ = \'{R}
|
15921
|
-
"\u0158": "R\u030C",
|
15922
|
-
// Ř = \v{R}
|
15923
|
-
"\u1E58": "R\u0307",
|
15924
|
-
// Ṙ = \.{R}
|
15925
|
-
"\u015A": "S\u0301",
|
15926
|
-
// Ś = \'{S}
|
15927
|
-
"\u1E64": "S\u0301\u0307",
|
15928
|
-
// Ṥ = \'\.{S}
|
15929
|
-
"\u0160": "S\u030C",
|
15930
|
-
// Š = \v{S}
|
15931
|
-
"\u1E66": "S\u030C\u0307",
|
15932
|
-
// Ṧ = \v\.{S}
|
15933
|
-
"\u015C": "S\u0302",
|
15934
|
-
// Ŝ = \^{S}
|
15935
|
-
"\u1E60": "S\u0307",
|
15936
|
-
// Ṡ = \.{S}
|
15937
|
-
"\u0164": "T\u030C",
|
15938
|
-
// Ť = \v{T}
|
15939
|
-
"\u1E6A": "T\u0307",
|
15940
|
-
// Ṫ = \.{T}
|
15941
|
-
"\xDA": "U\u0301",
|
15942
|
-
// Ú = \'{U}
|
15943
|
-
"\xD9": "U\u0300",
|
15944
|
-
// Ù = \`{U}
|
15945
|
-
"\xDC": "U\u0308",
|
15946
|
-
// Ü = \"{U}
|
15947
|
-
"\u01D7": "U\u0308\u0301",
|
15948
|
-
// Ǘ = \"\'{U}
|
15949
|
-
"\u01DB": "U\u0308\u0300",
|
15950
|
-
// Ǜ = \"\`{U}
|
15951
|
-
"\u01D5": "U\u0308\u0304",
|
15952
|
-
// Ǖ = \"\={U}
|
15953
|
-
"\u01D9": "U\u0308\u030C",
|
15954
|
-
// Ǚ = \"\v{U}
|
15955
|
-
"\u0168": "U\u0303",
|
15956
|
-
// Ũ = \~{U}
|
15957
|
-
"\u1E78": "U\u0303\u0301",
|
15958
|
-
// Ṹ = \~\'{U}
|
15959
|
-
"\u016A": "U\u0304",
|
15960
|
-
// Ū = \={U}
|
15961
|
-
"\u1E7A": "U\u0304\u0308",
|
15962
|
-
// Ṻ = \=\"{U}
|
15963
|
-
"\u016C": "U\u0306",
|
15964
|
-
// Ŭ = \u{U}
|
15965
|
-
"\u01D3": "U\u030C",
|
15966
|
-
// Ǔ = \v{U}
|
15967
|
-
"\xDB": "U\u0302",
|
15968
|
-
// Û = \^{U}
|
15969
|
-
"\u016E": "U\u030A",
|
15970
|
-
// Ů = \r{U}
|
15971
|
-
"\u0170": "U\u030B",
|
15972
|
-
// Ű = \H{U}
|
15973
|
-
"\u1E7C": "V\u0303",
|
15974
|
-
// Ṽ = \~{V}
|
15975
|
-
"\u1E82": "W\u0301",
|
15976
|
-
// Ẃ = \'{W}
|
15977
|
-
"\u1E80": "W\u0300",
|
15978
|
-
// Ẁ = \`{W}
|
15979
|
-
"\u1E84": "W\u0308",
|
15980
|
-
// Ẅ = \"{W}
|
15981
|
-
"\u0174": "W\u0302",
|
15982
|
-
// Ŵ = \^{W}
|
15983
|
-
"\u1E86": "W\u0307",
|
15984
|
-
// Ẇ = \.{W}
|
15985
|
-
"\u1E8C": "X\u0308",
|
15986
|
-
// Ẍ = \"{X}
|
15987
|
-
"\u1E8A": "X\u0307",
|
15988
|
-
// Ẋ = \.{X}
|
15989
|
-
"\xDD": "Y\u0301",
|
15990
|
-
// Ý = \'{Y}
|
15991
|
-
"\u1EF2": "Y\u0300",
|
15992
|
-
// Ỳ = \`{Y}
|
15993
|
-
"\u0178": "Y\u0308",
|
15994
|
-
// Ÿ = \"{Y}
|
15995
|
-
"\u1EF8": "Y\u0303",
|
15996
|
-
// Ỹ = \~{Y}
|
15997
|
-
"\u0232": "Y\u0304",
|
15998
|
-
// Ȳ = \={Y}
|
15999
|
-
"\u0176": "Y\u0302",
|
16000
|
-
// Ŷ = \^{Y}
|
16001
|
-
"\u1E8E": "Y\u0307",
|
16002
|
-
// Ẏ = \.{Y}
|
16003
|
-
"\u0179": "Z\u0301",
|
16004
|
-
// Ź = \'{Z}
|
16005
|
-
"\u017D": "Z\u030C",
|
16006
|
-
// Ž = \v{Z}
|
16007
|
-
"\u1E90": "Z\u0302",
|
16008
|
-
// Ẑ = \^{Z}
|
16009
|
-
"\u017B": "Z\u0307",
|
16010
|
-
// Ż = \.{Z}
|
16011
|
-
"\u03AC": "\u03B1\u0301",
|
16012
|
-
// ά = \'{α}
|
16013
|
-
"\u1F70": "\u03B1\u0300",
|
16014
|
-
// ὰ = \`{α}
|
16015
|
-
"\u1FB1": "\u03B1\u0304",
|
16016
|
-
// ᾱ = \={α}
|
16017
|
-
"\u1FB0": "\u03B1\u0306",
|
16018
|
-
// ᾰ = \u{α}
|
16019
|
-
"\u03AD": "\u03B5\u0301",
|
16020
|
-
// έ = \'{ε}
|
16021
|
-
"\u1F72": "\u03B5\u0300",
|
16022
|
-
// ὲ = \`{ε}
|
16023
|
-
"\u03AE": "\u03B7\u0301",
|
16024
|
-
// ή = \'{η}
|
16025
|
-
"\u1F74": "\u03B7\u0300",
|
16026
|
-
// ὴ = \`{η}
|
16027
|
-
"\u03AF": "\u03B9\u0301",
|
16028
|
-
// ί = \'{ι}
|
16029
|
-
"\u1F76": "\u03B9\u0300",
|
16030
|
-
// ὶ = \`{ι}
|
16031
|
-
"\u03CA": "\u03B9\u0308",
|
16032
|
-
// ϊ = \"{ι}
|
16033
|
-
"\u0390": "\u03B9\u0308\u0301",
|
16034
|
-
// ΐ = \"\'{ι}
|
16035
|
-
"\u1FD2": "\u03B9\u0308\u0300",
|
16036
|
-
// ῒ = \"\`{ι}
|
16037
|
-
"\u1FD1": "\u03B9\u0304",
|
16038
|
-
// ῑ = \={ι}
|
16039
|
-
"\u1FD0": "\u03B9\u0306",
|
16040
|
-
// ῐ = \u{ι}
|
16041
|
-
"\u03CC": "\u03BF\u0301",
|
16042
|
-
// ό = \'{ο}
|
16043
|
-
"\u1F78": "\u03BF\u0300",
|
16044
|
-
// ὸ = \`{ο}
|
16045
|
-
"\u03CD": "\u03C5\u0301",
|
16046
|
-
// ύ = \'{υ}
|
16047
|
-
"\u1F7A": "\u03C5\u0300",
|
16048
|
-
// ὺ = \`{υ}
|
16049
|
-
"\u03CB": "\u03C5\u0308",
|
16050
|
-
// ϋ = \"{υ}
|
16051
|
-
"\u03B0": "\u03C5\u0308\u0301",
|
16052
|
-
// ΰ = \"\'{υ}
|
16053
|
-
"\u1FE2": "\u03C5\u0308\u0300",
|
16054
|
-
// ῢ = \"\`{υ}
|
16055
|
-
"\u1FE1": "\u03C5\u0304",
|
16056
|
-
// ῡ = \={υ}
|
16057
|
-
"\u1FE0": "\u03C5\u0306",
|
16058
|
-
// ῠ = \u{υ}
|
16059
|
-
"\u03CE": "\u03C9\u0301",
|
16060
|
-
// ώ = \'{ω}
|
16061
|
-
"\u1F7C": "\u03C9\u0300",
|
16062
|
-
// ὼ = \`{ω}
|
16063
|
-
"\u038E": "\u03A5\u0301",
|
16064
|
-
// Ύ = \'{Υ}
|
16065
|
-
"\u1FEA": "\u03A5\u0300",
|
16066
|
-
// Ὺ = \`{Υ}
|
16067
|
-
"\u03AB": "\u03A5\u0308",
|
16068
|
-
// Ϋ = \"{Υ}
|
16069
|
-
"\u1FE9": "\u03A5\u0304",
|
16070
|
-
// Ῡ = \={Υ}
|
16071
|
-
"\u1FE8": "\u03A5\u0306",
|
16072
|
-
// Ῠ = \u{Υ}
|
16073
|
-
"\u038F": "\u03A9\u0301",
|
16074
|
-
// Ώ = \'{Ω}
|
16075
|
-
"\u1FFA": "\u03A9\u0300" // Ὼ = \`{Ω}
|
16076
|
-
|
16077
|
-
});
|
16078
15598
|
// CONCATENATED MODULE: ./src/Parser.js
|
16079
15599
|
/* eslint no-constant-condition:0 */
|
16080
15600
|
|
@@ -16086,10 +15606,373 @@ function () {
|
|
16086
15606
|
|
16087
15607
|
|
16088
15608
|
|
15609
|
+
// Pre-evaluate both modules as unicodeSymbols require String.normalize()
|
16089
15610
|
|
16090
|
-
|
16091
|
-
|
16092
|
-
|
15611
|
+
var unicodeAccents = {
|
15612
|
+
"́": {
|
15613
|
+
"text": "\\'",
|
15614
|
+
"math": "\\acute"
|
15615
|
+
},
|
15616
|
+
"̀": {
|
15617
|
+
"text": "\\`",
|
15618
|
+
"math": "\\grave"
|
15619
|
+
},
|
15620
|
+
"̈": {
|
15621
|
+
"text": "\\\"",
|
15622
|
+
"math": "\\ddot"
|
15623
|
+
},
|
15624
|
+
"̃": {
|
15625
|
+
"text": "\\~",
|
15626
|
+
"math": "\\tilde"
|
15627
|
+
},
|
15628
|
+
"̄": {
|
15629
|
+
"text": "\\=",
|
15630
|
+
"math": "\\bar"
|
15631
|
+
},
|
15632
|
+
"̆": {
|
15633
|
+
"text": "\\u",
|
15634
|
+
"math": "\\breve"
|
15635
|
+
},
|
15636
|
+
"̌": {
|
15637
|
+
"text": "\\v",
|
15638
|
+
"math": "\\check"
|
15639
|
+
},
|
15640
|
+
"̂": {
|
15641
|
+
"text": "\\^",
|
15642
|
+
"math": "\\hat"
|
15643
|
+
},
|
15644
|
+
"̇": {
|
15645
|
+
"text": "\\.",
|
15646
|
+
"math": "\\dot"
|
15647
|
+
},
|
15648
|
+
"̊": {
|
15649
|
+
"text": "\\r",
|
15650
|
+
"math": "\\mathring"
|
15651
|
+
},
|
15652
|
+
"̋": {
|
15653
|
+
"text": "\\H"
|
15654
|
+
}
|
15655
|
+
};
|
15656
|
+
var unicodeSymbols = {
|
15657
|
+
"á": "á",
|
15658
|
+
"à": "à",
|
15659
|
+
"ä": "ä",
|
15660
|
+
"ǟ": "ǟ",
|
15661
|
+
"ã": "ã",
|
15662
|
+
"ā": "ā",
|
15663
|
+
"ă": "ă",
|
15664
|
+
"ắ": "ắ",
|
15665
|
+
"ằ": "ằ",
|
15666
|
+
"ẵ": "ẵ",
|
15667
|
+
"ǎ": "ǎ",
|
15668
|
+
"â": "â",
|
15669
|
+
"ấ": "ấ",
|
15670
|
+
"ầ": "ầ",
|
15671
|
+
"ẫ": "ẫ",
|
15672
|
+
"ȧ": "ȧ",
|
15673
|
+
"ǡ": "ǡ",
|
15674
|
+
"å": "å",
|
15675
|
+
"ǻ": "ǻ",
|
15676
|
+
"ḃ": "ḃ",
|
15677
|
+
"ć": "ć",
|
15678
|
+
"č": "č",
|
15679
|
+
"ĉ": "ĉ",
|
15680
|
+
"ċ": "ċ",
|
15681
|
+
"ď": "ď",
|
15682
|
+
"ḋ": "ḋ",
|
15683
|
+
"é": "é",
|
15684
|
+
"è": "è",
|
15685
|
+
"ë": "ë",
|
15686
|
+
"ẽ": "ẽ",
|
15687
|
+
"ē": "ē",
|
15688
|
+
"ḗ": "ḗ",
|
15689
|
+
"ḕ": "ḕ",
|
15690
|
+
"ĕ": "ĕ",
|
15691
|
+
"ě": "ě",
|
15692
|
+
"ê": "ê",
|
15693
|
+
"ế": "ế",
|
15694
|
+
"ề": "ề",
|
15695
|
+
"ễ": "ễ",
|
15696
|
+
"ė": "ė",
|
15697
|
+
"ḟ": "ḟ",
|
15698
|
+
"ǵ": "ǵ",
|
15699
|
+
"ḡ": "ḡ",
|
15700
|
+
"ğ": "ğ",
|
15701
|
+
"ǧ": "ǧ",
|
15702
|
+
"ĝ": "ĝ",
|
15703
|
+
"ġ": "ġ",
|
15704
|
+
"ḧ": "ḧ",
|
15705
|
+
"ȟ": "ȟ",
|
15706
|
+
"ĥ": "ĥ",
|
15707
|
+
"ḣ": "ḣ",
|
15708
|
+
"í": "í",
|
15709
|
+
"ì": "ì",
|
15710
|
+
"ï": "ï",
|
15711
|
+
"ḯ": "ḯ",
|
15712
|
+
"ĩ": "ĩ",
|
15713
|
+
"ī": "ī",
|
15714
|
+
"ĭ": "ĭ",
|
15715
|
+
"ǐ": "ǐ",
|
15716
|
+
"î": "î",
|
15717
|
+
"ǰ": "ǰ",
|
15718
|
+
"ĵ": "ĵ",
|
15719
|
+
"ḱ": "ḱ",
|
15720
|
+
"ǩ": "ǩ",
|
15721
|
+
"ĺ": "ĺ",
|
15722
|
+
"ľ": "ľ",
|
15723
|
+
"ḿ": "ḿ",
|
15724
|
+
"ṁ": "ṁ",
|
15725
|
+
"ń": "ń",
|
15726
|
+
"ǹ": "ǹ",
|
15727
|
+
"ñ": "ñ",
|
15728
|
+
"ň": "ň",
|
15729
|
+
"ṅ": "ṅ",
|
15730
|
+
"ó": "ó",
|
15731
|
+
"ò": "ò",
|
15732
|
+
"ö": "ö",
|
15733
|
+
"ȫ": "ȫ",
|
15734
|
+
"õ": "õ",
|
15735
|
+
"ṍ": "ṍ",
|
15736
|
+
"ṏ": "ṏ",
|
15737
|
+
"ȭ": "ȭ",
|
15738
|
+
"ō": "ō",
|
15739
|
+
"ṓ": "ṓ",
|
15740
|
+
"ṑ": "ṑ",
|
15741
|
+
"ŏ": "ŏ",
|
15742
|
+
"ǒ": "ǒ",
|
15743
|
+
"ô": "ô",
|
15744
|
+
"ố": "ố",
|
15745
|
+
"ồ": "ồ",
|
15746
|
+
"ỗ": "ỗ",
|
15747
|
+
"ȯ": "ȯ",
|
15748
|
+
"ȱ": "ȱ",
|
15749
|
+
"ő": "ő",
|
15750
|
+
"ṕ": "ṕ",
|
15751
|
+
"ṗ": "ṗ",
|
15752
|
+
"ŕ": "ŕ",
|
15753
|
+
"ř": "ř",
|
15754
|
+
"ṙ": "ṙ",
|
15755
|
+
"ś": "ś",
|
15756
|
+
"ṥ": "ṥ",
|
15757
|
+
"š": "š",
|
15758
|
+
"ṧ": "ṧ",
|
15759
|
+
"ŝ": "ŝ",
|
15760
|
+
"ṡ": "ṡ",
|
15761
|
+
"ẗ": "ẗ",
|
15762
|
+
"ť": "ť",
|
15763
|
+
"ṫ": "ṫ",
|
15764
|
+
"ú": "ú",
|
15765
|
+
"ù": "ù",
|
15766
|
+
"ü": "ü",
|
15767
|
+
"ǘ": "ǘ",
|
15768
|
+
"ǜ": "ǜ",
|
15769
|
+
"ǖ": "ǖ",
|
15770
|
+
"ǚ": "ǚ",
|
15771
|
+
"ũ": "ũ",
|
15772
|
+
"ṹ": "ṹ",
|
15773
|
+
"ū": "ū",
|
15774
|
+
"ṻ": "ṻ",
|
15775
|
+
"ŭ": "ŭ",
|
15776
|
+
"ǔ": "ǔ",
|
15777
|
+
"û": "û",
|
15778
|
+
"ů": "ů",
|
15779
|
+
"ű": "ű",
|
15780
|
+
"ṽ": "ṽ",
|
15781
|
+
"ẃ": "ẃ",
|
15782
|
+
"ẁ": "ẁ",
|
15783
|
+
"ẅ": "ẅ",
|
15784
|
+
"ŵ": "ŵ",
|
15785
|
+
"ẇ": "ẇ",
|
15786
|
+
"ẘ": "ẘ",
|
15787
|
+
"ẍ": "ẍ",
|
15788
|
+
"ẋ": "ẋ",
|
15789
|
+
"ý": "ý",
|
15790
|
+
"ỳ": "ỳ",
|
15791
|
+
"ÿ": "ÿ",
|
15792
|
+
"ỹ": "ỹ",
|
15793
|
+
"ȳ": "ȳ",
|
15794
|
+
"ŷ": "ŷ",
|
15795
|
+
"ẏ": "ẏ",
|
15796
|
+
"ẙ": "ẙ",
|
15797
|
+
"ź": "ź",
|
15798
|
+
"ž": "ž",
|
15799
|
+
"ẑ": "ẑ",
|
15800
|
+
"ż": "ż",
|
15801
|
+
"Á": "Á",
|
15802
|
+
"À": "À",
|
15803
|
+
"Ä": "Ä",
|
15804
|
+
"Ǟ": "Ǟ",
|
15805
|
+
"Ã": "Ã",
|
15806
|
+
"Ā": "Ā",
|
15807
|
+
"Ă": "Ă",
|
15808
|
+
"Ắ": "Ắ",
|
15809
|
+
"Ằ": "Ằ",
|
15810
|
+
"Ẵ": "Ẵ",
|
15811
|
+
"Ǎ": "Ǎ",
|
15812
|
+
"Â": "Â",
|
15813
|
+
"Ấ": "Ấ",
|
15814
|
+
"Ầ": "Ầ",
|
15815
|
+
"Ẫ": "Ẫ",
|
15816
|
+
"Ȧ": "Ȧ",
|
15817
|
+
"Ǡ": "Ǡ",
|
15818
|
+
"Å": "Å",
|
15819
|
+
"Ǻ": "Ǻ",
|
15820
|
+
"Ḃ": "Ḃ",
|
15821
|
+
"Ć": "Ć",
|
15822
|
+
"Č": "Č",
|
15823
|
+
"Ĉ": "Ĉ",
|
15824
|
+
"Ċ": "Ċ",
|
15825
|
+
"Ď": "Ď",
|
15826
|
+
"Ḋ": "Ḋ",
|
15827
|
+
"É": "É",
|
15828
|
+
"È": "È",
|
15829
|
+
"Ë": "Ë",
|
15830
|
+
"Ẽ": "Ẽ",
|
15831
|
+
"Ē": "Ē",
|
15832
|
+
"Ḗ": "Ḗ",
|
15833
|
+
"Ḕ": "Ḕ",
|
15834
|
+
"Ĕ": "Ĕ",
|
15835
|
+
"Ě": "Ě",
|
15836
|
+
"Ê": "Ê",
|
15837
|
+
"Ế": "Ế",
|
15838
|
+
"Ề": "Ề",
|
15839
|
+
"Ễ": "Ễ",
|
15840
|
+
"Ė": "Ė",
|
15841
|
+
"Ḟ": "Ḟ",
|
15842
|
+
"Ǵ": "Ǵ",
|
15843
|
+
"Ḡ": "Ḡ",
|
15844
|
+
"Ğ": "Ğ",
|
15845
|
+
"Ǧ": "Ǧ",
|
15846
|
+
"Ĝ": "Ĝ",
|
15847
|
+
"Ġ": "Ġ",
|
15848
|
+
"Ḧ": "Ḧ",
|
15849
|
+
"Ȟ": "Ȟ",
|
15850
|
+
"Ĥ": "Ĥ",
|
15851
|
+
"Ḣ": "Ḣ",
|
15852
|
+
"Í": "Í",
|
15853
|
+
"Ì": "Ì",
|
15854
|
+
"Ï": "Ï",
|
15855
|
+
"Ḯ": "Ḯ",
|
15856
|
+
"Ĩ": "Ĩ",
|
15857
|
+
"Ī": "Ī",
|
15858
|
+
"Ĭ": "Ĭ",
|
15859
|
+
"Ǐ": "Ǐ",
|
15860
|
+
"Î": "Î",
|
15861
|
+
"İ": "İ",
|
15862
|
+
"Ĵ": "Ĵ",
|
15863
|
+
"Ḱ": "Ḱ",
|
15864
|
+
"Ǩ": "Ǩ",
|
15865
|
+
"Ĺ": "Ĺ",
|
15866
|
+
"Ľ": "Ľ",
|
15867
|
+
"Ḿ": "Ḿ",
|
15868
|
+
"Ṁ": "Ṁ",
|
15869
|
+
"Ń": "Ń",
|
15870
|
+
"Ǹ": "Ǹ",
|
15871
|
+
"Ñ": "Ñ",
|
15872
|
+
"Ň": "Ň",
|
15873
|
+
"Ṅ": "Ṅ",
|
15874
|
+
"Ó": "Ó",
|
15875
|
+
"Ò": "Ò",
|
15876
|
+
"Ö": "Ö",
|
15877
|
+
"Ȫ": "Ȫ",
|
15878
|
+
"Õ": "Õ",
|
15879
|
+
"Ṍ": "Ṍ",
|
15880
|
+
"Ṏ": "Ṏ",
|
15881
|
+
"Ȭ": "Ȭ",
|
15882
|
+
"Ō": "Ō",
|
15883
|
+
"Ṓ": "Ṓ",
|
15884
|
+
"Ṑ": "Ṑ",
|
15885
|
+
"Ŏ": "Ŏ",
|
15886
|
+
"Ǒ": "Ǒ",
|
15887
|
+
"Ô": "Ô",
|
15888
|
+
"Ố": "Ố",
|
15889
|
+
"Ồ": "Ồ",
|
15890
|
+
"Ỗ": "Ỗ",
|
15891
|
+
"Ȯ": "Ȯ",
|
15892
|
+
"Ȱ": "Ȱ",
|
15893
|
+
"Ő": "Ő",
|
15894
|
+
"Ṕ": "Ṕ",
|
15895
|
+
"Ṗ": "Ṗ",
|
15896
|
+
"Ŕ": "Ŕ",
|
15897
|
+
"Ř": "Ř",
|
15898
|
+
"Ṙ": "Ṙ",
|
15899
|
+
"Ś": "Ś",
|
15900
|
+
"Ṥ": "Ṥ",
|
15901
|
+
"Š": "Š",
|
15902
|
+
"Ṧ": "Ṧ",
|
15903
|
+
"Ŝ": "Ŝ",
|
15904
|
+
"Ṡ": "Ṡ",
|
15905
|
+
"Ť": "Ť",
|
15906
|
+
"Ṫ": "Ṫ",
|
15907
|
+
"Ú": "Ú",
|
15908
|
+
"Ù": "Ù",
|
15909
|
+
"Ü": "Ü",
|
15910
|
+
"Ǘ": "Ǘ",
|
15911
|
+
"Ǜ": "Ǜ",
|
15912
|
+
"Ǖ": "Ǖ",
|
15913
|
+
"Ǚ": "Ǚ",
|
15914
|
+
"Ũ": "Ũ",
|
15915
|
+
"Ṹ": "Ṹ",
|
15916
|
+
"Ū": "Ū",
|
15917
|
+
"Ṻ": "Ṻ",
|
15918
|
+
"Ŭ": "Ŭ",
|
15919
|
+
"Ǔ": "Ǔ",
|
15920
|
+
"Û": "Û",
|
15921
|
+
"Ů": "Ů",
|
15922
|
+
"Ű": "Ű",
|
15923
|
+
"Ṽ": "Ṽ",
|
15924
|
+
"Ẃ": "Ẃ",
|
15925
|
+
"Ẁ": "Ẁ",
|
15926
|
+
"Ẅ": "Ẅ",
|
15927
|
+
"Ŵ": "Ŵ",
|
15928
|
+
"Ẇ": "Ẇ",
|
15929
|
+
"Ẍ": "Ẍ",
|
15930
|
+
"Ẋ": "Ẋ",
|
15931
|
+
"Ý": "Ý",
|
15932
|
+
"Ỳ": "Ỳ",
|
15933
|
+
"Ÿ": "Ÿ",
|
15934
|
+
"Ỹ": "Ỹ",
|
15935
|
+
"Ȳ": "Ȳ",
|
15936
|
+
"Ŷ": "Ŷ",
|
15937
|
+
"Ẏ": "Ẏ",
|
15938
|
+
"Ź": "Ź",
|
15939
|
+
"Ž": "Ž",
|
15940
|
+
"Ẑ": "Ẑ",
|
15941
|
+
"Ż": "Ż",
|
15942
|
+
"ά": "ά",
|
15943
|
+
"ὰ": "ὰ",
|
15944
|
+
"ᾱ": "ᾱ",
|
15945
|
+
"ᾰ": "ᾰ",
|
15946
|
+
"έ": "έ",
|
15947
|
+
"ὲ": "ὲ",
|
15948
|
+
"ή": "ή",
|
15949
|
+
"ὴ": "ὴ",
|
15950
|
+
"ί": "ί",
|
15951
|
+
"ὶ": "ὶ",
|
15952
|
+
"ϊ": "ϊ",
|
15953
|
+
"ΐ": "ΐ",
|
15954
|
+
"ῒ": "ῒ",
|
15955
|
+
"ῑ": "ῑ",
|
15956
|
+
"ῐ": "ῐ",
|
15957
|
+
"ό": "ό",
|
15958
|
+
"ὸ": "ὸ",
|
15959
|
+
"ύ": "ύ",
|
15960
|
+
"ὺ": "ὺ",
|
15961
|
+
"ϋ": "ϋ",
|
15962
|
+
"ΰ": "ΰ",
|
15963
|
+
"ῢ": "ῢ",
|
15964
|
+
"ῡ": "ῡ",
|
15965
|
+
"ῠ": "ῠ",
|
15966
|
+
"ώ": "ώ",
|
15967
|
+
"ὼ": "ὼ",
|
15968
|
+
"Ύ": "Ύ",
|
15969
|
+
"Ὺ": "Ὺ",
|
15970
|
+
"Ϋ": "Ϋ",
|
15971
|
+
"Ῡ": "Ῡ",
|
15972
|
+
"Ῠ": "Ῠ",
|
15973
|
+
"Ώ": "Ώ",
|
15974
|
+
"Ὼ": "Ὼ"
|
15975
|
+
};
|
16093
15976
|
|
16094
15977
|
/**
|
16095
15978
|
* This file contains the parser used to parse out a TeX expression from the
|
@@ -16197,12 +16080,15 @@ function () {
|
|
16197
16080
|
;
|
16198
16081
|
|
16199
16082
|
_proto.parse = function parse() {
|
16200
|
-
|
16201
|
-
|
16202
|
-
|
16083
|
+
if (!this.settings.globalGroup) {
|
16084
|
+
// Create a group namespace for the math expression.
|
16085
|
+
// (LaTeX creates a new group for every $...$, $$...$$, \[...\].)
|
16086
|
+
this.gullet.beginGroup();
|
16087
|
+
} // Use old \color behavior (same as LaTeX's \textcolor) if requested.
|
16203
16088
|
// We do this within the group for the math expression, so it doesn't
|
16204
16089
|
// pollute settings.macros.
|
16205
16090
|
|
16091
|
+
|
16206
16092
|
if (this.settings.colorIsTextColor) {
|
16207
16093
|
this.gullet.macros.set("\\color", "\\textcolor");
|
16208
16094
|
} // Try to parse the input
|
@@ -16212,7 +16098,10 @@ function () {
|
|
16212
16098
|
|
16213
16099
|
this.expect("EOF"); // End the group namespace for the expression
|
16214
16100
|
|
16215
|
-
this.
|
16101
|
+
if (!this.settings.globalGroup) {
|
16102
|
+
this.gullet.endGroup();
|
16103
|
+
}
|
16104
|
+
|
16216
16105
|
return parse;
|
16217
16106
|
};
|
16218
16107
|
|
@@ -16244,6 +16133,8 @@ function () {
|
|
16244
16133
|
|
16245
16134
|
if (!atom) {
|
16246
16135
|
break;
|
16136
|
+
} else if (atom.type === "internal") {
|
16137
|
+
continue;
|
16247
16138
|
}
|
16248
16139
|
|
16249
16140
|
body.push(atom);
|
@@ -16269,15 +16160,13 @@ function () {
|
|
16269
16160
|
var funcName;
|
16270
16161
|
|
16271
16162
|
for (var i = 0; i < body.length; i++) {
|
16272
|
-
|
16273
|
-
|
16274
|
-
if (node) {
|
16163
|
+
if (body[i].type === "infix") {
|
16275
16164
|
if (overIndex !== -1) {
|
16276
|
-
throw new src_ParseError("only one infix operator per group",
|
16165
|
+
throw new src_ParseError("only one infix operator per group", body[i].token);
|
16277
16166
|
}
|
16278
16167
|
|
16279
16168
|
overIndex = i;
|
16280
|
-
funcName =
|
16169
|
+
funcName = body[i].replaceWith;
|
16281
16170
|
}
|
16282
16171
|
}
|
16283
16172
|
|
@@ -16307,15 +16196,15 @@ function () {
|
|
16307
16196
|
};
|
16308
16197
|
}
|
16309
16198
|
|
16310
|
-
var
|
16199
|
+
var node;
|
16311
16200
|
|
16312
16201
|
if (funcName === "\\\\abovefrac") {
|
16313
|
-
|
16202
|
+
node = this.callFunction(funcName, [numerNode, body[overIndex], denomNode], []);
|
16314
16203
|
} else {
|
16315
|
-
|
16204
|
+
node = this.callFunction(funcName, [numerNode, denomNode], []);
|
16316
16205
|
}
|
16317
16206
|
|
16318
|
-
return [
|
16207
|
+
return [node];
|
16319
16208
|
} else {
|
16320
16209
|
return body;
|
16321
16210
|
}
|
@@ -16393,22 +16282,16 @@ function () {
|
|
16393
16282
|
|
16394
16283
|
if (lex.text === "\\limits" || lex.text === "\\nolimits") {
|
16395
16284
|
// We got a limit control
|
16396
|
-
|
16397
|
-
|
16398
|
-
if (opNode) {
|
16285
|
+
if (base && base.type === "op") {
|
16399
16286
|
var limits = lex.text === "\\limits";
|
16400
|
-
|
16401
|
-
|
16402
|
-
} else {
|
16403
|
-
|
16287
|
+
base.limits = limits;
|
16288
|
+
base.alwaysHandleSupSub = true;
|
16289
|
+
} else if (base && base.type === "operatorname" && base.alwaysHandleSupSub) {
|
16290
|
+
var _limits = lex.text === "\\limits";
|
16404
16291
|
|
16405
|
-
|
16406
|
-
|
16407
|
-
|
16408
|
-
opNode.limits = _limits;
|
16409
|
-
} else {
|
16410
|
-
throw new src_ParseError("Limit controls must follow a math operator", lex);
|
16411
|
-
}
|
16292
|
+
base.limits = _limits;
|
16293
|
+
} else {
|
16294
|
+
throw new src_ParseError("Limit controls must follow a math operator", lex);
|
16412
16295
|
}
|
16413
16296
|
|
16414
16297
|
this.consume();
|
@@ -17326,7 +17209,7 @@ var katex_renderToHTMLTree = function renderToHTMLTree(expression, options) {
|
|
17326
17209
|
/**
|
17327
17210
|
* Current KaTeX version
|
17328
17211
|
*/
|
17329
|
-
version: "0.
|
17212
|
+
version: "0.12.0",
|
17330
17213
|
|
17331
17214
|
/**
|
17332
17215
|
* Renders the given LaTeX into an HTML+MathML combination, and adds
|