Skip to content

Commit

Permalink
Merge pull request #1623 from basvandertol/FIX_AMSmath_ID_initilization
Browse files Browse the repository at this point in the history
Fix for minor bug in fix for issue #240
  • Loading branch information
dpvc committed Sep 27, 2016
2 parents e1810fe + e891f23 commit 33bcd33
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions unpacked/extensions/TeX/AMSmath.js
Expand Up @@ -603,7 +603,9 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
TEX.prefilterHooks.Add(function (data) { TEX.prefilterHooks.Add(function (data) {
AMS.display = data.display; AMS.display = data.display;
AMS.number = AMS.startNumber; // reset equation numbers (in case the equation restarted) AMS.number = AMS.startNumber; // reset equation numbers (in case the equation restarted)
AMS.eqlabels = AMS.eqIDs = {}; AMS.badref = false; AMS.eqlabels = {};
AMS.eqIDs = {};
AMS.badref = false;
if (AMS.refUpdate) {AMS.number = data.script.MathJax.startNumber} if (AMS.refUpdate) {AMS.number = data.script.MathJax.startNumber}
}); });
TEX.postfilterHooks.Add(function (data) { TEX.postfilterHooks.Add(function (data) {
Expand Down Expand Up @@ -637,7 +639,10 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
// //
TEX.resetEquationNumbers = function (n,keepLabels) { TEX.resetEquationNumbers = function (n,keepLabels) {
AMS.startNumber = (n || 0); AMS.startNumber = (n || 0);
if (!keepLabels) {AMS.labels = AMS.IDs = {}} if (!keepLabels) {
AMS.labels = {};
AMS.IDs = {};
}
} }


/******************************************************************************/ /******************************************************************************/
Expand Down

0 comments on commit 33bcd33

Please sign in to comment.