commit 86388a5965a18758c6f5814bc90d70c8e0c98535
parent bb8c8991e1c0ee5bddcc8b9e24b5b1c4271710e7
Author: Davide P. Cervone <dpvc@union.edu>
Date: Wed, 19 Mar 2014 12:32:48 -0400
Clear \label even if there is no \tag or equation number. Resolves issue #691.
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/unpacked/extensions/TeX/AMSmath.js b/unpacked/extensions/TeX/AMSmath.js
@@ -448,9 +448,13 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
tag.id = ID; if (global.label) {AMS.eqlabels[global.label].id = ID}
}
AMS.eqIDs[tag.id] = 1;
- delete global.tag; delete global.tagID; delete global.label;
+ this.clearTag();
return tag;
},
+ clearTag: function () {
+ var global = this.global;
+ delete global.tag; delete global.tagID; delete global.label;
+ },
/*
* Set the initial <mo> to have form="infix" and lspace="0",
@@ -541,7 +545,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
if (this.global.tag && !this.global.notags) {
this.row = [this.getTag()].concat(this.row);
mtr = MML.mlabeledtr;
- }
+ } else {this.clearTag()}
if (this.numbered) {delete this.global.notag}
this.table.push(mtr.apply(MML,this.row)); this.row = [];
},