|
100 | 100 | "min-height": 0, "max-height":"none",
|
101 | 101 | padding:0, border: 0, margin: 0
|
102 | 102 | },
|
103 |
| - ".MathJax_SVG_LineBox": { |
| 103 | + ".MathJax_SVG_LineBox": {display: "table!important"}, |
| 104 | + ".MathJax_SVG_LineBox span": { |
104 | 105 | display: "table-cell!important",
|
105 | 106 | width: "10000em!important",
|
106 | 107 | "min-width":0, "max-width":"none",
|
|
179 | 180 | );
|
180 | 181 |
|
181 | 182 | // Used in preTranslate to get linebreak width
|
182 |
| - this.linebreakSpan = HTML.Element("span",{className:"MathJax_SVG_LineBox"}); |
| 183 | + this.linebreakSpan = HTML.Element("span",{className:"MathJax_SVG_LineBox"},[["span"]]); |
183 | 184 |
|
184 | 185 | // Set up styles
|
185 | 186 | return AJAX.Styles(this.config.styles,["InitializeSVG",this]);
|
|
195 | 196 | document.body.appendChild(this.ExSpan);
|
196 | 197 | document.body.appendChild(this.linebreakSpan);
|
197 | 198 | this.defaultEx = this.ExSpan.firstChild.offsetHeight/60;
|
198 |
| - this.defaultWidth = this.linebreakSpan.offsetWidth; |
| 199 | + this.defaultWidth = this.linebreakSpan.firstChild.offsetWidth; |
199 | 200 | document.body.removeChild(this.linebreakSpan);
|
200 | 201 | document.body.removeChild(this.ExSpan);
|
201 | 202 | },
|
|
261 | 262 | test = script.previousSibling; div = test.previousSibling;
|
262 | 263 | jax = script.MathJax.elementJax; if (!jax) continue;
|
263 | 264 | ex = test.firstChild.offsetHeight/60;
|
264 |
| - cwidth = Math.max(0,(div.previousSibling.offsetWidth-2) / this.config.scale * 100); |
| 265 | + cwidth = Math.max(0,(div.previousSibling.firstChild.offsetWidth-2) / this.config.scale * 100); |
265 | 266 | if (ex === 0 || ex === "NaN") {
|
266 | 267 | // can't read width, so move to hidden div for processing
|
267 | 268 | // (this will cause a reflow for each math element that is hidden)
|
|
0 commit comments