temml 0.12.2 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/temml.mjs CHANGED
@@ -3874,7 +3874,6 @@ const dotsByToken = {
3874
3874
  "\\iint": "\\dotsi",
3875
3875
  "\\iiint": "\\dotsi",
3876
3876
  "\\iiiint": "\\dotsi",
3877
- "\\idotsint": "\\dotsi",
3878
3877
  // Symbols whose definition starts with \DOTSX:
3879
3878
  "\\DOTSX": "\\dotsx"
3880
3879
  };
@@ -3956,7 +3955,7 @@ defineMacro("\\cdots", function(context) {
3956
3955
  defineMacro("\\dotsb", "\\cdots");
3957
3956
  defineMacro("\\dotsm", "\\cdots");
3958
3957
  defineMacro("\\dotsi", "\\!\\cdots");
3959
- defineMacro("\\idotsint", "\\dotsi");
3958
+ defineMacro("\\idotsint", "\\int\\!\\cdots\\!\\int");
3960
3959
  // amsmath doesn't actually define \dotsx, but \dots followed by a macro
3961
3960
  // starting with \DOTSX implies \dotso, and then \extra@ detects this case
3962
3961
  // and forces the added `\,`.
@@ -13676,6 +13675,12 @@ class Parser {
13676
13675
  result = this.parseFunction(breakOnTokenText, name) || this.parseSymbol();
13677
13676
  if (result == null && text[0] === "\\" &&
13678
13677
  !Object.prototype.hasOwnProperty.call(implicitCommands, text )) {
13678
+ if (this.settings.throwOnError) {
13679
+ throw new ParseError("Unsupported function name: " + text, firstToken);
13680
+ }
13681
+ // For people getting dyanamically rendered math, it's better to
13682
+ // show the unsupported command in red rather than panicking for every
13683
+ // partially written expression.
13679
13684
  result = this.formatUnsupportedCmd(text);
13680
13685
  this.consume();
13681
13686
  }
@@ -14061,7 +14066,7 @@ class Style {
14061
14066
  * https://mit-license.org/
14062
14067
  */
14063
14068
 
14064
- const version = "0.12.02";
14069
+ const version = "0.13.01";
14065
14070
 
14066
14071
  function postProcess(block) {
14067
14072
  const labelMap = {};
@@ -11,7 +11,7 @@
11
11
  * https://mit-license.org/
12
12
  */
13
13
 
14
- const version = "0.12.02";
14
+ const version = "0.13.01";
15
15
 
16
16
  function postProcess(block) {
17
17
  const labelMap = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "temml",
3
- "version": "0.12.02",
3
+ "version": "0.13.01",
4
4
  "description": "TeX to MathML conversion in JavaScript.",
5
5
  "main": "dist/temml.js",
6
6
  "engines": {
package/src/Parser.js CHANGED
@@ -816,6 +816,12 @@ export default class Parser {
816
816
  result = this.parseFunction(breakOnTokenText, name) || this.parseSymbol();
817
817
  if (result == null && text[0] === "\\" &&
818
818
  !Object.prototype.hasOwnProperty.call(implicitCommands, text )) {
819
+ if (this.settings.throwOnError) {
820
+ throw new ParseError("Unsupported function name: " + text, firstToken);
821
+ }
822
+ // For people getting dyanamically rendered math, it's better to
823
+ // show the unsupported command in red rather than panicking for every
824
+ // partially written expression.
819
825
  result = this.formatUnsupportedCmd(text);
820
826
  this.consume();
821
827
  }
package/src/macros.js CHANGED
@@ -318,7 +318,6 @@ const dotsByToken = {
318
318
  "\\iint": "\\dotsi",
319
319
  "\\iiint": "\\dotsi",
320
320
  "\\iiiint": "\\dotsi",
321
- "\\idotsint": "\\dotsi",
322
321
  // Symbols whose definition starts with \DOTSX:
323
322
  "\\DOTSX": "\\dotsx"
324
323
  };
@@ -400,7 +399,7 @@ defineMacro("\\cdots", function(context) {
400
399
  defineMacro("\\dotsb", "\\cdots");
401
400
  defineMacro("\\dotsm", "\\cdots");
402
401
  defineMacro("\\dotsi", "\\!\\cdots");
403
- defineMacro("\\idotsint", "\\dotsi");
402
+ defineMacro("\\idotsint", "\\int\\!\\cdots\\!\\int");
404
403
  // amsmath doesn't actually define \dotsx, but \dots followed by a macro
405
404
  // starting with \DOTSX implies \dotso, and then \extra@ detects this case
406
405
  // and forces the added `\,`.
@@ -5,7 +5,7 @@
5
5
  * https://mit-license.org/
6
6
  */
7
7
 
8
- export const version = "0.12.02";
8
+ export const version = "0.13.01";
9
9
 
10
10
  export function postProcess(block) {
11
11
  const labelMap = {}