|
726 | 726 | postTranslate: function (state,partial) {
|
727 | 727 | var scripts = state.jax[this.id], script, jax, i, m;
|
728 | 728 | //
|
729 |
| - // Merasure the math in this chunk (toHTML phase II) |
| 729 | + // Remove the processed markers so that measuring can occur, |
| 730 | + // and remove the preview, if any, since the math will now be visible. |
| 731 | + // |
| 732 | + for (i = state.HTMLCSSlast, m = state.HTMLCSSeqn; i < m; i++) { |
| 733 | + script = scripts[i]; |
| 734 | + if (script && script.MathJax.elementJax) { |
| 735 | + script.previousSibling.className = script.previousSibling.className.split(/ /)[0]; |
| 736 | + if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""} |
| 737 | + } |
| 738 | + } |
| 739 | + // |
| 740 | + // Measure the math in this chunk (toHTML phase II) |
730 | 741 | //
|
731 | 742 | for (i = state.HTMLCSSlast, m = state.HTMLCSSeqn; i < m; i++) {
|
732 | 743 | script = scripts[i];
|
|
752 | 763 | //
|
753 | 764 | script.MathJax.state = jax.STATE.PROCESSED;
|
754 | 765 | HUB.signal.Post(["New Math",script.MathJax.elementJax.inputID]); // FIXME: wait for this? (i.e., restart if returns uncalled callback)
|
755 |
| - // |
756 |
| - // Remove the processed marker |
757 |
| - // |
758 |
| - script.previousSibling.className = script.previousSibling.className.split(/ /)[0]; |
759 |
| - // |
760 |
| - // Remove the preview, if any |
761 |
| - // |
762 |
| - if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""} |
763 | 766 | }
|
764 | 767 | }
|
765 | 768 | if (this.forceReflow) {
|
|
2865 | 2868 | MML.mbase.prototype.displayIndent = HUB.config.displayIndent;
|
2866 | 2869 | if (String(HUB.config.displayIndent).match(/^0($|[a-z%])/i))
|
2867 | 2870 | MML.mbase.prototype.displayIndent = "0";
|
2868 |
| - html = this.data[0].toHTML(box); html.bbox.exactW = true; // force remeasure just to be sure |
| 2871 | + html = this.data[0].toHTML(box); html.bbox.exactW = false; // force remeasure just to be sure |
2869 | 2872 | }
|
2870 | 2873 | } else {
|
2871 | 2874 | span = span.firstChild.firstChild;
|
|
0 commit comments