temml 0.11.2 → 0.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Temml-NotoSans.css +2 -2
- package/dist/Temml-STIX2.css +2 -2
- package/dist/temml.cjs +54 -18
- package/dist/temml.d.ts +2 -2
- package/dist/temml.js +54 -18
- package/dist/temml.min.js +1 -1
- package/dist/temml.mjs +54 -18
- package/dist/temmlPostProcess.js +1 -1
- package/package.json +1 -1
- package/src/environments/borderTree.js +4 -4
- package/src/functions/font.js +3 -3
- package/src/functions/op.js +6 -1
- package/src/functions/symbolsOrd.js +0 -1
- package/src/postProcess.js +1 -1
- package/src/symbols.js +40 -8
package/dist/Temml-NotoSans.css
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
Noto Math fonts are released under the SIL OPEN FONT LICENSE Version 1.1.
|
3
3
|
|
4
4
|
The NotoMath font has been obtained from
|
5
|
-
https://
|
5
|
+
https://github.com/notofonts/math
|
6
6
|
*/
|
7
7
|
|
8
8
|
@font-face {
|
9
9
|
font-family: NotoSans Math;
|
10
|
-
src: url('
|
10
|
+
src: url('NotoSansMath-Regular.ttf');
|
11
11
|
}
|
12
12
|
|
13
13
|
math {
|
package/dist/Temml-STIX2.css
CHANGED
package/dist/temml.cjs
CHANGED
@@ -1183,9 +1183,6 @@ defineSymbol(math, textord, "\u29eb", "\\blacklozenge");
|
|
1183
1183
|
defineSymbol(math, textord, "\u2605", "\\bigstar");
|
1184
1184
|
defineSymbol(math, textord, "\u2222", "\\sphericalangle", true);
|
1185
1185
|
defineSymbol(math, textord, "\u2201", "\\complement", true);
|
1186
|
-
// unicode-math maps U+F0 to \matheth. We map to AMS function \eth
|
1187
|
-
defineSymbol(math, textord, "\u00f0", "\\eth", true);
|
1188
|
-
defineSymbol(text, textord, "\u00f0", "\u00f0");
|
1189
1186
|
defineSymbol(math, textord, "\u2571", "\\diagup");
|
1190
1187
|
defineSymbol(math, textord, "\u2572", "\\diagdown");
|
1191
1188
|
defineSymbol(math, textord, "\u25a1", "\\square");
|
@@ -1545,6 +1542,46 @@ defineSymbol(math, mathord, "\u03e1", "\\sampi", true);
|
|
1545
1542
|
defineSymbol(math, mathord, "\u03da", "\\Stigma", true);
|
1546
1543
|
defineSymbol(math, mathord, "\u03db", "\\stigma", true);
|
1547
1544
|
defineSymbol(math, mathord, "\u2aeb", "\\Bot");
|
1545
|
+
|
1546
|
+
// unicode-math maps U+F0 to \matheth. We map to AMS function \eth
|
1547
|
+
defineSymbol(math, textord, "\u00f0", "\\eth", true); // ð
|
1548
|
+
defineSymbol(text, textord, "\u00f0", "\u00f0");
|
1549
|
+
// Extended ASCII and non-ASCII Letters
|
1550
|
+
defineSymbol(math, textord, "\u00C5", "\\AA"); // Å
|
1551
|
+
defineSymbol(text, textord, "\u00C5", "\\AA", true);
|
1552
|
+
defineSymbol(math, textord, "\u00C6", "\\AE", true); // Æ
|
1553
|
+
defineSymbol(text, textord, "\u00C6", "\\AE", true);
|
1554
|
+
defineSymbol(math, textord, "\u00D0", "\\DH", true); // Ð
|
1555
|
+
defineSymbol(text, textord, "\u00D0", "\\DH", true);
|
1556
|
+
defineSymbol(math, textord, "\u00DE", "\\TH", true); // Þ
|
1557
|
+
defineSymbol(text, textord, "\u00DE", "\\TH", true);
|
1558
|
+
defineSymbol(math, textord, "\u00DF", "\\ss", true); // ß
|
1559
|
+
defineSymbol(text, textord, "\u00DF", "\\ss", true);
|
1560
|
+
defineSymbol(math, textord, "\u00E5", "\\aa"); // å
|
1561
|
+
defineSymbol(text, textord, "\u00E5", "\\aa", true);
|
1562
|
+
defineSymbol(math, textord, "\u00E6", "\\ae", true); // æ
|
1563
|
+
defineSymbol(text, textord, "\u00E6", "\\ae", true);
|
1564
|
+
defineSymbol(math, textord, "\u00F0", "\\dh"); // ð
|
1565
|
+
defineSymbol(text, textord, "\u00F0", "\\dh", true);
|
1566
|
+
defineSymbol(math, textord, "\u00FE", "\\th", true); // þ
|
1567
|
+
defineSymbol(text, textord, "\u00FE", "\\th", true);
|
1568
|
+
defineSymbol(math, textord, "\u0110", "\\DJ", true); // Đ
|
1569
|
+
defineSymbol(text, textord, "\u0110", "\\DJ", true);
|
1570
|
+
defineSymbol(math, textord, "\u0111", "\\dj", true); // đ
|
1571
|
+
defineSymbol(text, textord, "\u0111", "\\dj", true);
|
1572
|
+
defineSymbol(math, textord, "\u0141", "\\L", true); // Ł
|
1573
|
+
defineSymbol(text, textord, "\u0141", "\\L", true);
|
1574
|
+
defineSymbol(math, textord, "\u0141", "\\l", true); // ł
|
1575
|
+
defineSymbol(text, textord, "\u0141", "\\l", true);
|
1576
|
+
defineSymbol(math, textord, "\u014A", "\\NG", true); // Ŋ
|
1577
|
+
defineSymbol(text, textord, "\u014A", "\\NG", true);
|
1578
|
+
defineSymbol(math, textord, "\u014B", "\\ng", true); // ŋ
|
1579
|
+
defineSymbol(text, textord, "\u014B", "\\ng", true);
|
1580
|
+
defineSymbol(math, textord, "\u0152", "\\OE", true); // Œ
|
1581
|
+
defineSymbol(text, textord, "\u0152", "\\OE", true);
|
1582
|
+
defineSymbol(math, textord, "\u0153", "\\oe", true); // œ
|
1583
|
+
defineSymbol(text, textord, "\u0153", "\\oe", true);
|
1584
|
+
|
1548
1585
|
defineSymbol(math, bin, "\u2217", "\u2217", true);
|
1549
1586
|
defineSymbol(math, bin, "+", "+");
|
1550
1587
|
defineSymbol(math, bin, "\u2217", "*");
|
@@ -1753,13 +1790,8 @@ defineSymbol(math, textord, "\u0131", "\u0131");
|
|
1753
1790
|
defineSymbol(math, textord, "\u0237", "\u0237");
|
1754
1791
|
defineSymbol(text, textord, "\u0131", "\\i", true);
|
1755
1792
|
defineSymbol(text, textord, "\u0237", "\\j", true);
|
1756
|
-
defineSymbol(text, textord, "\u00df", "\\ss", true);
|
1757
|
-
defineSymbol(text, textord, "\u00e6", "\\ae", true);
|
1758
|
-
defineSymbol(text, textord, "\u0153", "\\oe", true);
|
1759
1793
|
defineSymbol(text, textord, "\u00f8", "\\o", true);
|
1760
1794
|
defineSymbol(math, mathord, "\u00f8", "\\o", true);
|
1761
|
-
defineSymbol(text, textord, "\u00c6", "\\AE", true);
|
1762
|
-
defineSymbol(text, textord, "\u0152", "\\OE", true);
|
1763
1795
|
defineSymbol(text, textord, "\u00d8", "\\O", true);
|
1764
1796
|
defineSymbol(math, mathord, "\u00d8", "\\O", true);
|
1765
1797
|
defineSymbol(text, accent, "\u02ca", "\\'"); // acute
|
@@ -3347,7 +3379,7 @@ const bordermatrixParseTree = (matrix, delimiters) => {
|
|
3347
3379
|
// A vphantom with contents from the pmatrix, to set minimum cell height
|
3348
3380
|
const phantomBody = [];
|
3349
3381
|
for (let j = 0; j < body[i].length; j++) {
|
3350
|
-
phantomBody.push(
|
3382
|
+
phantomBody.push(body[i][j]);
|
3351
3383
|
}
|
3352
3384
|
leftColumnBody[i - 1].push(phantom(phantomBody, "vphantom"));
|
3353
3385
|
}
|
@@ -3355,18 +3387,18 @@ const bordermatrixParseTree = (matrix, delimiters) => {
|
|
3355
3387
|
// Create an array for the top row
|
3356
3388
|
const topRowBody = new Array(body.length).fill().map(() => []);
|
3357
3389
|
for (let j = 0; j < body[0].length; j++) {
|
3358
|
-
topRowBody[0].push(
|
3390
|
+
topRowBody[0].push(body[0][j]);
|
3359
3391
|
}
|
3360
3392
|
// Copy the rest of the pmatrix, but squashed via \hphantom
|
3361
3393
|
for (let i = 1; i < body.length; i++) {
|
3362
3394
|
for (let j = 0; j < body[0].length; j++) {
|
3363
|
-
topRowBody[i].push(phantom(
|
3395
|
+
topRowBody[i].push(phantom(body[i][j].body, "hphantom"));
|
3364
3396
|
}
|
3365
3397
|
}
|
3366
3398
|
|
3367
3399
|
// Squash the top row of the main {pmatrix}
|
3368
3400
|
for (let j = 0; j < body[0].length; j++) {
|
3369
|
-
body[0][j] = phantom(
|
3401
|
+
body[0][j] = phantom(body[0][j].body, "hphantom");
|
3370
3402
|
}
|
3371
3403
|
|
3372
3404
|
// Now wrap the arrays in the proper parse nodes.
|
@@ -8447,9 +8479,9 @@ const mathmlBuilder$6 = (group, style) => {
|
|
8447
8479
|
const mi = mathGroup.children[0].children[0];
|
8448
8480
|
delete mi.attributes.mathvariant;
|
8449
8481
|
for (let i = 1; i < mathGroup.children.length; i++) {
|
8450
|
-
mi.children[0].text += mathGroup.children[i].
|
8451
|
-
? mathGroup.children[i].children[0].text
|
8452
|
-
: mathGroup.children[i].children[0].
|
8482
|
+
mi.children[0].text += mathGroup.children[i].children[0].children
|
8483
|
+
? mathGroup.children[i].children[0].children[0].text
|
8484
|
+
: mathGroup.children[i].children[0].text;
|
8453
8485
|
}
|
8454
8486
|
// Wrap in a <mrow> to prevent the same Firefox bug.
|
8455
8487
|
const bogus = new mathMLTree.MathNode("mtext", new mathMLTree.TextNode("\u200b"));
|
@@ -9943,8 +9975,13 @@ defineFunction({
|
|
9943
9975
|
"\u2a00",
|
9944
9976
|
"\u2a01",
|
9945
9977
|
"\u2a02",
|
9978
|
+
"\u2a03",
|
9946
9979
|
"\u2a04",
|
9947
|
-
"\
|
9980
|
+
"\u2a05",
|
9981
|
+
"\u2a06",
|
9982
|
+
"\u2a07",
|
9983
|
+
"\u2a08",
|
9984
|
+
"\u2a09"
|
9948
9985
|
],
|
9949
9986
|
props: {
|
9950
9987
|
numArgs: 0
|
@@ -11365,7 +11402,6 @@ defineFunctionBuilders({
|
|
11365
11402
|
// A Firefox bug will apply spacing here, but there should be none. Fix it.
|
11366
11403
|
node = new mathMLTree.MathNode("mpadded", [node]);
|
11367
11404
|
node.setAttribute("lspace", "0");
|
11368
|
-
node.setAttribute("rspace", "0");
|
11369
11405
|
}
|
11370
11406
|
}
|
11371
11407
|
return node
|
@@ -13917,7 +13953,7 @@ class Style {
|
|
13917
13953
|
* https://mit-license.org/
|
13918
13954
|
*/
|
13919
13955
|
|
13920
|
-
const version = "0.11.
|
13956
|
+
const version = "0.11.03";
|
13921
13957
|
|
13922
13958
|
function postProcess(block) {
|
13923
13959
|
const labelMap = {};
|
package/dist/temml.d.ts
CHANGED
@@ -4,7 +4,7 @@ export interface Options {
|
|
4
4
|
leqno?: boolean;
|
5
5
|
throwOnError?: boolean;
|
6
6
|
errorColor?: string;
|
7
|
-
macros?: Record<string,
|
7
|
+
macros?: Record<string, any>;
|
8
8
|
wrap?: "tex" | "=" | "none";
|
9
9
|
xml?: boolean;
|
10
10
|
colorIsTextColor?: boolean;
|
@@ -16,7 +16,7 @@ export interface Options {
|
|
16
16
|
|
17
17
|
export function render(
|
18
18
|
expression: string,
|
19
|
-
baseNode: HTMLElement,
|
19
|
+
baseNode: HTMLElement | MathMLElement,
|
20
20
|
options?: Options,
|
21
21
|
): void;
|
22
22
|
|
package/dist/temml.js
CHANGED
@@ -1184,9 +1184,6 @@ var temml = (function () {
|
|
1184
1184
|
defineSymbol(math, textord, "\u2605", "\\bigstar");
|
1185
1185
|
defineSymbol(math, textord, "\u2222", "\\sphericalangle", true);
|
1186
1186
|
defineSymbol(math, textord, "\u2201", "\\complement", true);
|
1187
|
-
// unicode-math maps U+F0 to \matheth. We map to AMS function \eth
|
1188
|
-
defineSymbol(math, textord, "\u00f0", "\\eth", true);
|
1189
|
-
defineSymbol(text, textord, "\u00f0", "\u00f0");
|
1190
1187
|
defineSymbol(math, textord, "\u2571", "\\diagup");
|
1191
1188
|
defineSymbol(math, textord, "\u2572", "\\diagdown");
|
1192
1189
|
defineSymbol(math, textord, "\u25a1", "\\square");
|
@@ -1546,6 +1543,46 @@ var temml = (function () {
|
|
1546
1543
|
defineSymbol(math, mathord, "\u03da", "\\Stigma", true);
|
1547
1544
|
defineSymbol(math, mathord, "\u03db", "\\stigma", true);
|
1548
1545
|
defineSymbol(math, mathord, "\u2aeb", "\\Bot");
|
1546
|
+
|
1547
|
+
// unicode-math maps U+F0 to \matheth. We map to AMS function \eth
|
1548
|
+
defineSymbol(math, textord, "\u00f0", "\\eth", true); // ð
|
1549
|
+
defineSymbol(text, textord, "\u00f0", "\u00f0");
|
1550
|
+
// Extended ASCII and non-ASCII Letters
|
1551
|
+
defineSymbol(math, textord, "\u00C5", "\\AA"); // Å
|
1552
|
+
defineSymbol(text, textord, "\u00C5", "\\AA", true);
|
1553
|
+
defineSymbol(math, textord, "\u00C6", "\\AE", true); // Æ
|
1554
|
+
defineSymbol(text, textord, "\u00C6", "\\AE", true);
|
1555
|
+
defineSymbol(math, textord, "\u00D0", "\\DH", true); // Ð
|
1556
|
+
defineSymbol(text, textord, "\u00D0", "\\DH", true);
|
1557
|
+
defineSymbol(math, textord, "\u00DE", "\\TH", true); // Þ
|
1558
|
+
defineSymbol(text, textord, "\u00DE", "\\TH", true);
|
1559
|
+
defineSymbol(math, textord, "\u00DF", "\\ss", true); // ß
|
1560
|
+
defineSymbol(text, textord, "\u00DF", "\\ss", true);
|
1561
|
+
defineSymbol(math, textord, "\u00E5", "\\aa"); // å
|
1562
|
+
defineSymbol(text, textord, "\u00E5", "\\aa", true);
|
1563
|
+
defineSymbol(math, textord, "\u00E6", "\\ae", true); // æ
|
1564
|
+
defineSymbol(text, textord, "\u00E6", "\\ae", true);
|
1565
|
+
defineSymbol(math, textord, "\u00F0", "\\dh"); // ð
|
1566
|
+
defineSymbol(text, textord, "\u00F0", "\\dh", true);
|
1567
|
+
defineSymbol(math, textord, "\u00FE", "\\th", true); // þ
|
1568
|
+
defineSymbol(text, textord, "\u00FE", "\\th", true);
|
1569
|
+
defineSymbol(math, textord, "\u0110", "\\DJ", true); // Đ
|
1570
|
+
defineSymbol(text, textord, "\u0110", "\\DJ", true);
|
1571
|
+
defineSymbol(math, textord, "\u0111", "\\dj", true); // đ
|
1572
|
+
defineSymbol(text, textord, "\u0111", "\\dj", true);
|
1573
|
+
defineSymbol(math, textord, "\u0141", "\\L", true); // Ł
|
1574
|
+
defineSymbol(text, textord, "\u0141", "\\L", true);
|
1575
|
+
defineSymbol(math, textord, "\u0141", "\\l", true); // ł
|
1576
|
+
defineSymbol(text, textord, "\u0141", "\\l", true);
|
1577
|
+
defineSymbol(math, textord, "\u014A", "\\NG", true); // Ŋ
|
1578
|
+
defineSymbol(text, textord, "\u014A", "\\NG", true);
|
1579
|
+
defineSymbol(math, textord, "\u014B", "\\ng", true); // ŋ
|
1580
|
+
defineSymbol(text, textord, "\u014B", "\\ng", true);
|
1581
|
+
defineSymbol(math, textord, "\u0152", "\\OE", true); // Œ
|
1582
|
+
defineSymbol(text, textord, "\u0152", "\\OE", true);
|
1583
|
+
defineSymbol(math, textord, "\u0153", "\\oe", true); // œ
|
1584
|
+
defineSymbol(text, textord, "\u0153", "\\oe", true);
|
1585
|
+
|
1549
1586
|
defineSymbol(math, bin, "\u2217", "\u2217", true);
|
1550
1587
|
defineSymbol(math, bin, "+", "+");
|
1551
1588
|
defineSymbol(math, bin, "\u2217", "*");
|
@@ -1754,13 +1791,8 @@ var temml = (function () {
|
|
1754
1791
|
defineSymbol(math, textord, "\u0237", "\u0237");
|
1755
1792
|
defineSymbol(text, textord, "\u0131", "\\i", true);
|
1756
1793
|
defineSymbol(text, textord, "\u0237", "\\j", true);
|
1757
|
-
defineSymbol(text, textord, "\u00df", "\\ss", true);
|
1758
|
-
defineSymbol(text, textord, "\u00e6", "\\ae", true);
|
1759
|
-
defineSymbol(text, textord, "\u0153", "\\oe", true);
|
1760
1794
|
defineSymbol(text, textord, "\u00f8", "\\o", true);
|
1761
1795
|
defineSymbol(math, mathord, "\u00f8", "\\o", true);
|
1762
|
-
defineSymbol(text, textord, "\u00c6", "\\AE", true);
|
1763
|
-
defineSymbol(text, textord, "\u0152", "\\OE", true);
|
1764
1796
|
defineSymbol(text, textord, "\u00d8", "\\O", true);
|
1765
1797
|
defineSymbol(math, mathord, "\u00d8", "\\O", true);
|
1766
1798
|
defineSymbol(text, accent, "\u02ca", "\\'"); // acute
|
@@ -3348,7 +3380,7 @@ var temml = (function () {
|
|
3348
3380
|
// A vphantom with contents from the pmatrix, to set minimum cell height
|
3349
3381
|
const phantomBody = [];
|
3350
3382
|
for (let j = 0; j < body[i].length; j++) {
|
3351
|
-
phantomBody.push(
|
3383
|
+
phantomBody.push(body[i][j]);
|
3352
3384
|
}
|
3353
3385
|
leftColumnBody[i - 1].push(phantom(phantomBody, "vphantom"));
|
3354
3386
|
}
|
@@ -3356,18 +3388,18 @@ var temml = (function () {
|
|
3356
3388
|
// Create an array for the top row
|
3357
3389
|
const topRowBody = new Array(body.length).fill().map(() => []);
|
3358
3390
|
for (let j = 0; j < body[0].length; j++) {
|
3359
|
-
topRowBody[0].push(
|
3391
|
+
topRowBody[0].push(body[0][j]);
|
3360
3392
|
}
|
3361
3393
|
// Copy the rest of the pmatrix, but squashed via \hphantom
|
3362
3394
|
for (let i = 1; i < body.length; i++) {
|
3363
3395
|
for (let j = 0; j < body[0].length; j++) {
|
3364
|
-
topRowBody[i].push(phantom(
|
3396
|
+
topRowBody[i].push(phantom(body[i][j].body, "hphantom"));
|
3365
3397
|
}
|
3366
3398
|
}
|
3367
3399
|
|
3368
3400
|
// Squash the top row of the main {pmatrix}
|
3369
3401
|
for (let j = 0; j < body[0].length; j++) {
|
3370
|
-
body[0][j] = phantom(
|
3402
|
+
body[0][j] = phantom(body[0][j].body, "hphantom");
|
3371
3403
|
}
|
3372
3404
|
|
3373
3405
|
// Now wrap the arrays in the proper parse nodes.
|
@@ -6534,9 +6566,9 @@ var temml = (function () {
|
|
6534
6566
|
const mi = mathGroup.children[0].children[0];
|
6535
6567
|
delete mi.attributes.mathvariant;
|
6536
6568
|
for (let i = 1; i < mathGroup.children.length; i++) {
|
6537
|
-
mi.children[0].text += mathGroup.children[i].
|
6538
|
-
? mathGroup.children[i].children[0].text
|
6539
|
-
: mathGroup.children[i].children[0].
|
6569
|
+
mi.children[0].text += mathGroup.children[i].children[0].children
|
6570
|
+
? mathGroup.children[i].children[0].children[0].text
|
6571
|
+
: mathGroup.children[i].children[0].text;
|
6540
6572
|
}
|
6541
6573
|
// Wrap in a <mrow> to prevent the same Firefox bug.
|
6542
6574
|
const bogus = new mathMLTree.MathNode("mtext", new mathMLTree.TextNode("\u200b"));
|
@@ -8030,8 +8062,13 @@ var temml = (function () {
|
|
8030
8062
|
"\u2a00",
|
8031
8063
|
"\u2a01",
|
8032
8064
|
"\u2a02",
|
8065
|
+
"\u2a03",
|
8033
8066
|
"\u2a04",
|
8034
|
-
"\
|
8067
|
+
"\u2a05",
|
8068
|
+
"\u2a06",
|
8069
|
+
"\u2a07",
|
8070
|
+
"\u2a08",
|
8071
|
+
"\u2a09"
|
8035
8072
|
],
|
8036
8073
|
props: {
|
8037
8074
|
numArgs: 0
|
@@ -9452,7 +9489,6 @@ var temml = (function () {
|
|
9452
9489
|
// A Firefox bug will apply spacing here, but there should be none. Fix it.
|
9453
9490
|
node = new mathMLTree.MathNode("mpadded", [node]);
|
9454
9491
|
node.setAttribute("lspace", "0");
|
9455
|
-
node.setAttribute("rspace", "0");
|
9456
9492
|
}
|
9457
9493
|
}
|
9458
9494
|
return node
|
@@ -12004,7 +12040,7 @@ var temml = (function () {
|
|
12004
12040
|
* https://mit-license.org/
|
12005
12041
|
*/
|
12006
12042
|
|
12007
|
-
const version = "0.11.
|
12043
|
+
const version = "0.11.03";
|
12008
12044
|
|
12009
12045
|
function postProcess(block) {
|
12010
12046
|
const labelMap = {};
|