From 86388a5965a18758c6f5814bc90d70c8e0c98535 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 19 Mar 2014 12:32:48 -0400 Subject: [PATCH] Clear \label even if there is no \tag or equation number. Resolves issue #691. --- unpacked/extensions/TeX/AMSmath.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/unpacked/extensions/TeX/AMSmath.js b/unpacked/extensions/TeX/AMSmath.js index eb591db2f..46ae2d192 100644 --- 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 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 = []; },