www

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

commit 1f013d76b32f7ef6f7b95cb05cef99cb257b474b
parent 6448c0ce914cae81bf4a1d3f54ff7cd6fec66d9e
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Wed, 30 Oct 2013 10:03:01 -0700

Merge pull request #644 from dpvc/issue523

Resolves issue #523
Diffstat:
Munpacked/jax/output/HTML-CSS/autoload/multiline.js | 19++++++++++++++-----
Munpacked/jax/output/SVG/autoload/multiline.js | 20+++++++++++++++-----
2 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/unpacked/jax/output/HTML-CSS/autoload/multiline.js b/unpacked/jax/output/HTML-CSS/autoload/multiline.js @@ -160,13 +160,18 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { if (this.data[i]) { if (this.data[i].HTMLbetterBreak(info,state)) { better = true; index = [i].concat(info.index); W = info.W; w = info.w; - if (info.penalty === PENALTY.newline) {info.index = index; info.nest--; return true} + if (info.penalty === PENALTY.newline) { + info.index = index; + if (info.nest) {info.nest--} + return true; + } } scanW = (broken ? info.scanW : this.HTMLaddWidth(i,info,scanW)); } info.index = []; i++; broken = false; } - info.nest--; info.index = index; + if (info.nest) {info.nest--} + info.index = index; if (better) {info.W = W; info.w = w} return better; }, @@ -407,13 +412,17 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { if (this.data[k]) { if (this.data[k].HTMLbetterBreak(info,state)) { better = true; index = [i].concat(info.index); W = info.W; w = info.w; - if (info.penalty === PENALTY.newline) {info.index = index; info.nest--; return true} + if (info.penalty === PENALTY.newline) { + info.index = index; + if (info.nest) {info.nest--} + return true} } scanW = (broken ? info.scanW : this.HTMLaddWidth(i,info,scanW)); } info.index = []; i++; broken = false; } - info.nest--; info.index = index; + if (info.nest) {info.nest--} + info.index = index; if (better) {info.W = W; info.w = w} return better; }, @@ -542,7 +551,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { // mrows for nesting, but can leave these unbalanced. // if (values.texClass === MML.TEXCLASS.OPEN) {info.nest++} - if (values.texClass === MML.TEXCLASS.CLOSE) {info.nest--} + if (values.texClass === MML.TEXCLASS.CLOSE && info.nest) {info.nest--} // // Get the default penalty for this location // diff --git a/unpacked/jax/output/SVG/autoload/multiline.js b/unpacked/jax/output/SVG/autoload/multiline.js @@ -163,13 +163,18 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { if (this.data[i]) { if (this.data[i].SVGbetterBreak(info,state)) { better = true; index = [i].concat(info.index); W = info.W; w = info.w; - if (info.penalty === PENALTY.newline) {info.index = index; info.nest--; return true} + if (info.penalty === PENALTY.newline) { + info.index = index; + if (info.nest) {info.nest--} + return true; + } } scanW = (broken ? info.scanW : this.SVGaddWidth(i,info,scanW)); } info.index = []; i++; broken = false; } - info.nest--; info.index = index; + if (info.nest) {info.nest--} + info.index = index; if (better) {info.W = W} return better; }, @@ -365,13 +370,18 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { if (this.data[k]) { if (this.data[k].SVGbetterBreak(info,state)) { better = true; index = [i].concat(info.index); W = info.W; w = info.w; - if (info.penalty === PENALTY.newline) {info.index = index; info.nest--; return true} + if (info.penalty === PENALTY.newline) { + info.index = index; + if (info.nest) {info.nest--} + return true; + } } scanW = (broken ? info.scanW : this.SVGaddWidth(i,info,scanW)); } info.index = []; i++; broken = false; } - info.nest--; info.index = index; + if (info.nest) {info.nest--} + info.index = index; if (better) {info.W = W; info.w = w} return better; }, @@ -490,7 +500,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { // mrows for nesting, but can leave these unbalanced. // if (values.texClass === MML.TEXCLASS.OPEN) {info.nest++} - if (values.texClass === MML.TEXCLASS.CLOSE) {info.nest--} + if (values.texClass === MML.TEXCLASS.CLOSE && info.nest) {info.nest--} // // Get the default penalty for this location //