www

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

commit 2a931136f46382b41c8408a9e198ac0930912d1b
parent 23781aa8d658d09fb4248d1337615042d1b66160
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Thu, 20 Feb 2014 10:18:07 -0500

Merge branch 'issue746' into develop.  Issue #746.

Diffstat:
Munpacked/jax/element/mml/jax.js | 26++++++++++++++++++++++----
Munpacked/jax/input/TeX/jax.js | 3+--
2 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/unpacked/jax/element/mml/jax.js b/unpacked/jax/element/mml/jax.js @@ -751,10 +751,27 @@ MathJax.ElementJax.mml.Augment({ return this.SUPER(arguments).toString.call(this); }, setTeXclass: function (prev) { - for (var i = 0, m = this.data.length; i < m; i++) - {if (this.data[i]) {prev = this.data[i].setTeXclass(prev)}} - if (this.data[0]) {this.updateTeXclass(this.data[0])} - return prev; + var i, m = this.data.length; + if (this.open || this.close) { + // + // <mrow> came from \left...\right + // so treat as subexpression (tex class INNER) + // + this.getPrevClass(prev); + for (i = 0; i < m; i++) + {if (this.data[i]) {prev = this.data[i].setTeXclass(prev)}} + this.texClass = MML.TEXCLASS.INNER; + return this; + } else { + // + // Normal <mrow>, so treat as + // thorugh mrow is not there + // + for (i = 0; i < m; i++) + {if (this.data[i]) {prev = this.data[i].setTeXclass(prev)}} + if (this.data[0]) {this.updateTeXclass(this.data[0])} + return prev; + } }, getAnnotation: function (name) { if (this.data.length != 1) return null; @@ -947,6 +964,7 @@ MathJax.ElementJax.mml.Augment({ } // get the data from the open item this.updateTeXclass(this.data.open); + this.texClass = MML.TEXCLASS.INNER; return prev; } }); diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js @@ -2130,8 +2130,7 @@ * Create an mrow that has stretchy delimiters at either end, as needed */ fenced: function (open,mml,close) { - var mrow = MML.mrow(); - mrow.open = open; mrow.close = close; + var mrow = MML.mrow().With({open:open, close:close, texClass:MML.TEXCLASS.INNER}); if (open) {mrow.Append(MML.mo(open).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.OPEN}))} if (mml.type === "mrow") {mrow.Append.apply(mrow,mml.data)} else {mrow.Append(mml)} if (close) {mrow.Append(MML.mo(close).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.CLOSE}))}