www

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

commit e72aa9951319d369aa824360e7bd2fd625a7384c
parent 8c2ed0c91c2cda869121b9063f4e5fd4a3dc08f6
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Mon,  3 Aug 2015 18:07:14 -0400

Handle spacing of trailing binary operators properly.

Diffstat:
Munpacked/jax/element/mml/jax.js | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/unpacked/jax/element/mml/jax.js b/unpacked/jax/element/mml/jax.js @@ -684,6 +684,17 @@ MathJax.ElementJax.mml.Augment({ this.texClass === MML.TEXCLASS.CLOSE || this.texClass === MML.TEXCLASS.PUNCT)) { prev.texClass = this.prevClass = MML.TEXCLASS.ORD; + } else if (this.texClass === MML.TEXCLASS.BIN) { + // + // Check if node is the last one in its container since the rule + // above only takes effect if there is a node that follows. + // + var child = this, parent = this.parent; + while (parent && parent.parent && parent.isEmbellished() && + (parent.data.length === 1 || + (parent.type !== "mrow" && parent.Core() === child))) // handles msubsup and munderover + {child = parent; parent = parent.parent} + if (parent.data[parent.data.length-1] === child) this.texClass = MML.TEXCLASS.ORD; } return this; }