temml 0.10.10 → 0.10.12
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.cjs +11 -3
- package/dist/temml.js +11 -3
- package/dist/temml.min.js +1 -1
- package/dist/temml.mjs +11 -3
- package/dist/temmlPostProcess.js +1 -1
- package/package.json +2 -2
- package/src/Settings.js +1 -0
- package/src/buildMathML.js +1 -1
- package/src/functions/mclass.js +4 -1
- package/src/functions/symbolsOrd.js +2 -0
- package/src/postProcess.js +1 -1
- package/src/symbols.js +3 -0
package/dist/temml.cjs
CHANGED
@@ -188,6 +188,7 @@ class Settings {
|
|
188
188
|
this.displayMode = utils.deflt(options.displayMode, false); // boolean
|
189
189
|
this.annotate = utils.deflt(options.annotate, false); // boolean
|
190
190
|
this.leqno = utils.deflt(options.leqno, false); // boolean
|
191
|
+
this.throwOnError = utils.deflt(options.throwOnError, false); // boolean
|
191
192
|
this.errorColor = utils.deflt(options.errorColor, "#b22222"); // string
|
192
193
|
this.macros = options.macros || {};
|
193
194
|
this.wrap = utils.deflt(options.wrap, "tex"); // "tex" | "="
|
@@ -865,6 +866,9 @@ defineSymbol(math, rel, "\u225e", "\\measeq", true);
|
|
865
866
|
defineSymbol(math, rel, "\u225f", "\\questeq", true);
|
866
867
|
defineSymbol(math, rel, "\u2260", "\\ne", true);
|
867
868
|
defineSymbol(math, rel, "\u2260", "\\neq");
|
869
|
+
// unicodemath
|
870
|
+
defineSymbol(math, rel, "\u2a75", "\\eqeq", true);
|
871
|
+
defineSymbol(math, rel, "\u2a76", "\\eqeqeq", true);
|
868
872
|
// mathtools.sty
|
869
873
|
defineSymbol(math, rel, "\u2237", "\\dblcolon", true);
|
870
874
|
defineSymbol(math, rel, "\u2254", "\\coloneqq", true);
|
@@ -2130,7 +2134,7 @@ function buildMathML(tree, texExpression, style, settings) {
|
|
2130
2134
|
math.setAttribute("display", "block");
|
2131
2135
|
math.style.display = math.children.length === 1 && math.children[0].type === "mtable"
|
2132
2136
|
? "inline"
|
2133
|
-
: "
|
2137
|
+
: "block math";
|
2134
2138
|
}
|
2135
2139
|
return math;
|
2136
2140
|
}
|
@@ -6001,7 +6005,9 @@ defineFunction({
|
|
6001
6005
|
const arr = (body.body) ? body.body : [body];
|
6002
6006
|
for (const arg of arr) {
|
6003
6007
|
if (textAtomTypes.includes(arg.type)) {
|
6004
|
-
if (arg.text) {
|
6008
|
+
if (symbols[parser.mode][arg.text]) {
|
6009
|
+
mord.text += symbols[parser.mode][arg.text].replace;
|
6010
|
+
} else if (arg.text) {
|
6005
6011
|
mord.text += arg.text;
|
6006
6012
|
} else if (arg.body) {
|
6007
6013
|
arg.body.map(e => { mord.text += e.text; });
|
@@ -7748,6 +7754,8 @@ defineFunctionBuilders({
|
|
7748
7754
|
node = new mathMLTree.MathNode("mi", [text]);
|
7749
7755
|
if (text.text === origText && latinRegEx.test(origText)) {
|
7750
7756
|
node.setAttribute("mathvariant", "italic");
|
7757
|
+
} else if (text.text === "∇" && variant === "normal") {
|
7758
|
+
node.setAttribute("mathvariant", "normal");
|
7751
7759
|
}
|
7752
7760
|
}
|
7753
7761
|
return node
|
@@ -12869,7 +12877,7 @@ class Style {
|
|
12869
12877
|
* https://mit-license.org/
|
12870
12878
|
*/
|
12871
12879
|
|
12872
|
-
const version = "0.10.
|
12880
|
+
const version = "0.10.12";
|
12873
12881
|
|
12874
12882
|
function postProcess(block) {
|
12875
12883
|
const labelMap = {};
|
package/dist/temml.js
CHANGED
@@ -189,6 +189,7 @@ var temml = (function () {
|
|
189
189
|
this.displayMode = utils.deflt(options.displayMode, false); // boolean
|
190
190
|
this.annotate = utils.deflt(options.annotate, false); // boolean
|
191
191
|
this.leqno = utils.deflt(options.leqno, false); // boolean
|
192
|
+
this.throwOnError = utils.deflt(options.throwOnError, false); // boolean
|
192
193
|
this.errorColor = utils.deflt(options.errorColor, "#b22222"); // string
|
193
194
|
this.macros = options.macros || {};
|
194
195
|
this.wrap = utils.deflt(options.wrap, "tex"); // "tex" | "="
|
@@ -866,6 +867,9 @@ var temml = (function () {
|
|
866
867
|
defineSymbol(math, rel, "\u225f", "\\questeq", true);
|
867
868
|
defineSymbol(math, rel, "\u2260", "\\ne", true);
|
868
869
|
defineSymbol(math, rel, "\u2260", "\\neq");
|
870
|
+
// unicodemath
|
871
|
+
defineSymbol(math, rel, "\u2a75", "\\eqeq", true);
|
872
|
+
defineSymbol(math, rel, "\u2a76", "\\eqeqeq", true);
|
869
873
|
// mathtools.sty
|
870
874
|
defineSymbol(math, rel, "\u2237", "\\dblcolon", true);
|
871
875
|
defineSymbol(math, rel, "\u2254", "\\coloneqq", true);
|
@@ -2131,7 +2135,7 @@ var temml = (function () {
|
|
2131
2135
|
math.setAttribute("display", "block");
|
2132
2136
|
math.style.display = math.children.length === 1 && math.children[0].type === "mtable"
|
2133
2137
|
? "inline"
|
2134
|
-
: "
|
2138
|
+
: "block math";
|
2135
2139
|
}
|
2136
2140
|
return math;
|
2137
2141
|
}
|
@@ -6002,7 +6006,9 @@ var temml = (function () {
|
|
6002
6006
|
const arr = (body.body) ? body.body : [body];
|
6003
6007
|
for (const arg of arr) {
|
6004
6008
|
if (textAtomTypes.includes(arg.type)) {
|
6005
|
-
if (arg.text) {
|
6009
|
+
if (symbols[parser.mode][arg.text]) {
|
6010
|
+
mord.text += symbols[parser.mode][arg.text].replace;
|
6011
|
+
} else if (arg.text) {
|
6006
6012
|
mord.text += arg.text;
|
6007
6013
|
} else if (arg.body) {
|
6008
6014
|
arg.body.map(e => { mord.text += e.text; });
|
@@ -7749,6 +7755,8 @@ var temml = (function () {
|
|
7749
7755
|
node = new mathMLTree.MathNode("mi", [text]);
|
7750
7756
|
if (text.text === origText && latinRegEx.test(origText)) {
|
7751
7757
|
node.setAttribute("mathvariant", "italic");
|
7758
|
+
} else if (text.text === "∇" && variant === "normal") {
|
7759
|
+
node.setAttribute("mathvariant", "normal");
|
7752
7760
|
}
|
7753
7761
|
}
|
7754
7762
|
return node
|
@@ -10970,7 +10978,7 @@ var temml = (function () {
|
|
10970
10978
|
* https://mit-license.org/
|
10971
10979
|
*/
|
10972
10980
|
|
10973
|
-
const version = "0.10.
|
10981
|
+
const version = "0.10.12";
|
10974
10982
|
|
10975
10983
|
function postProcess(block) {
|
10976
10984
|
const labelMap = {};
|