Fixed initilization of AMS.IDs and AMS.eqIDs

This commit is contained in:
Sebastiaan van der Tol 2016-09-23 10:45:25 +02:00
parent e1810fe2a9
commit e891f238f7

View File

@ -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) {
@ -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 = {};
}
} }
/******************************************************************************/ /******************************************************************************/