diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js
index 5023fb849..a0434c3cd 100644
--- a/unpacked/jax/output/CommonHTML/jax.js
+++ b/unpacked/jax/output/CommonHTML/jax.js
@@ -411,6 +411,7 @@
prev = script.previousSibling;
if (prev && prev.className && String(prev.className).substr(0,9) === "mjx-chtml")
prev.parentNode.removeChild(prev);
+ if (script.MathJax.preview) script.MathJax.preview.style.display = "none";
//
// Add the node for the math and mark it as being processed
//
@@ -472,11 +473,12 @@
//
for (i = 0; i < m; i++) {
script = scripts[i]; if (!script.parentNode) continue;
- test = scripts[i].previousSibling;
+ test = scripts.previousSibling;
span = test.previousSibling;
- jax = scripts[i].MathJax.elementJax; if (!jax) continue;
+ jax = scripts.MathJax.elementJax; if (!jax) continue;
span.parentNode.removeChild(span);
test.parentNode.removeChild(test);
+ if (script.MathJax.preview) script.MathJax.preview.style.display = "";
}
state.CHTMLeqn = state.CHTMLlast = 0; state.CHTMLi = -1;
state.CHTMLchunk = this.config.EqnChunk;
diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js
index 3f4dac9ce..23a111c0b 100644
--- a/unpacked/jax/output/HTML-CSS/jax.js
+++ b/unpacked/jax/output/HTML-CSS/jax.js
@@ -580,6 +580,7 @@
prev = script.previousSibling;
if (prev && String(prev.className).match(/^MathJax(_Display)?( MathJax_Processing)?$/))
{prev.parentNode.removeChild(prev)}
+ if (script.MathJax.preview) script.MathJax.preview.style.display = "none";
//
// Add the span, and a div if in display mode,
// then mark it as being processed
@@ -655,6 +656,7 @@
if (!jax.HTMLCSS.isHidden) {span = span.previousSibling}
span.parentNode.removeChild(span);
test.parentNode.removeChild(test);
+ if (script.MathJax.preview) script.MathJax.preview.style.display = "";
}
//
// Set state variables used for displaying equations in chunks
diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js
index 7b2765f15..3e6475a09 100644
--- a/unpacked/jax/output/SVG/jax.js
+++ b/unpacked/jax/output/SVG/jax.js
@@ -222,6 +222,7 @@
prev = script.previousSibling;
if (prev && String(prev.className).match(/^MathJax(_SVG)?(_Display)?( MathJax(_SVG)?_Process(ing|ed))?$/))
{prev.parentNode.removeChild(prev)}
+ if (script.MathJax.preview) script.MathJax.preview.style.display = "none";
//
// Add the span, and a div if in display mode,
// then set the role and mark it as being processed
@@ -286,6 +287,7 @@
if (!jax.SVG.isHidden) {span = span.previousSibling}
span.parentNode.removeChild(span);
test.parentNode.removeChild(test);
+ if (script.MathJax.preview) script.MathJax.preview.style.display = "";
}
//
// Set state variables used for displaying equations in chunks