diff --git a/test/localization.html b/test/localization.html new file mode 100644 index 000000000..1fc54c21c --- /dev/null +++ b/test/localization.html @@ -0,0 +1,332 @@ + + + +Localization + + + + + + + + +

MathJax Localization

+ +
+

+ Language: + +

+
+ + + + + diff --git a/unpacked/extensions/TeX/newcommand.js b/unpacked/extensions/TeX/newcommand.js index 8c25ca60c..7f25e0aa6 100644 --- a/unpacked/extensions/TeX/newcommand.js +++ b/unpacked/extensions/TeX/newcommand.js @@ -141,8 +141,8 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { GetCSname: function (cmd) { var c = this.GetNext(); if (c !== "\\") { - TEX.Error(["DoubleBackSlash", - "\\ must be followed by a control sequence"]) + TEX.Error(["MissingCS", + "%1 must be followed by a control sequence", cmd]) } var cs = this.trimSpaces(this.GetArgument(cmd)); return cs.substr(1); diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js index 8d99241dd..cc75287b4 100644 --- a/unpacked/jax/input/TeX/jax.js +++ b/unpacked/jax/input/TeX/jax.js @@ -158,7 +158,7 @@ type: "subsup", stopError: /*_()*/ ["MissingScript","Missing superscript or subscript argument"], supError: /*_()*/ ["MissingOpenForSup","Missing open brace for superscript"], - subError: /*_()*/ ["MissingOpenForSup","Missing open brace for subscript"], + subError: /*_()*/ ["MissingOpenForSub","Missing open brace for subscript"], checkItem: function (item) { if (item.type === "open" || item.type === "left") {return true} if (item.type === "mml") { @@ -240,7 +240,7 @@ STACKITEM.position = STACKITEM.Subclass({ type: "position", checkItem: function (item) { - if (item.isClose) {TEX.Error(["MissingBoxFor","Missing box for %1",name])} + if (item.isClose) {TEX.Error(["MissingBoxFor","Missing box for %1",this.name])} if (item.isNotStack) { var mml = item.mmlData(); switch (this.move) { @@ -1848,7 +1848,6 @@ case '\\': this.i++; break; case '{': parens++; break; case '}': - if (parens == 0) {TEX.Error(["ExtraClose","Extra close brace"])} if (--parens == 0) {return this.string.slice(j,this.i-1)} break; }