www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 12f969593d9c885caaa1252ab53c32e27cda2c2d
parent 283cff42892124f21f8aa7065a40a93f34988874
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Fri, 21 Mar 2014 06:58:46 -0400

Remove initial space after a linebreak properly.  Resolves #687.

Diffstat:
Munpacked/jax/output/HTML-CSS/autoload/multiline.js | 4++--
Munpacked/jax/output/SVG/autoload/multiline.js | 9+++++----
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/unpacked/jax/output/HTML-CSS/autoload/multiline.js b/unpacked/jax/output/HTML-CSS/autoload/multiline.js @@ -366,15 +366,15 @@ 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) {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 @@ -328,14 +328,15 @@ 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) {state.nextIsFirst = true} else {delete state.nextIsFirst} } });