diff --git a/unpacked/jax/output/HTML-CSS/autoload/multiline.js b/unpacked/jax/output/HTML-CSS/autoload/multiline.js index d51af702c..dd534e3b4 100644 --- a/unpacked/jax/output/HTML-CSS/autoload/multiline.js +++ b/unpacked/jax/output/HTML-CSS/autoload/multiline.js @@ -366,15 +366,16 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { // if (state.last) {span.style.paddingRight = ""} if (state.first || state.nextIsFirst) { - delete state.nextIsFirst; span.style.paddingLeft = ""; if (color) {this.HTMLremoveColor(span); this.HTMLhandleColor(span)} } + if (state.first && span.bbox.w === 0) {state.nextIsFirst = true} + else {delete state.nextIsFirst} // // Update bounding box // this.HTMLcombineBBoxes(this,line.bbox); - } else if (state.first) {state.nextIsFirst = true} else {delete state.nextIsFirst} + } } }); diff --git a/unpacked/jax/output/SVG/autoload/multiline.js b/unpacked/jax/output/SVG/autoload/multiline.js index 415f13c5e..f35bdd601 100644 --- a/unpacked/jax/output/SVG/autoload/multiline.js +++ b/unpacked/jax/output/SVG/autoload/multiline.js @@ -328,14 +328,16 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { (state.last && values.linebreakstyle === MML.LINEBREAKSTYLE.AFTER)) { // // Recreate output - // Remove padding (if first, remove at right, if last remove at left) + // Remove padding (if first, remove at leftt, if last remove at right) // Add to line // var svg = this.toSVG(this.SVGdata.HW,this.SVGdata.D); - if (state.last) {svg.x = 0} - if (state.first || state.nextIsFirst) {delete state.nextIsFirst; if (svg.X) {svg.X = 0}} + if (state.first || state.nextIsFirst) {svg.x = 0} + if (state.last && svg.X) {svg.X = 0} line.Add(svg,line.w,0,true); - } else if (state.first) {state.nextIsFirst = true} else {delete state.nextIsFirst} + } + if (state.first && svg.w === 0) {state.nextIsFirst = true} + else {delete state.nextIsFirst} } });