diff --git a/lib/expression/node/Node.js b/lib/expression/node/Node.js index 9f1d5d4f6..5f596fac2 100644 --- a/lib/expression/node/Node.js +++ b/lib/expression/node/Node.js @@ -232,6 +232,11 @@ Node.prototype.toString = function() { */ Node.prototype.toTex = function(customFunctions) { var customTex; + if (this.type === 'ArrayNode') { + //FIXME this is only a workaround for a breaking change, + //remove this in version2 + delete this.latexType; + } if (typeof customFunctions === 'object') { //if customFunctions is a map of callback functions if (customFunctions.hasOwnProperty(this.type)) { diff --git a/lib/util/latex.js b/lib/util/latex.js index a16683370..ed6afd33d 100644 --- a/lib/util/latex.js +++ b/lib/util/latex.js @@ -468,7 +468,9 @@ exports.toArgs = function(that, customFunctions) { if (that.args[0] instanceof ArrayNode) { //FIXME passing 'vmatrix' like that is really ugly that.args[0].latexType = 'vmatrix'; - return that.args[0].toTex(customFunctions); + var latex = that.args[0].toTex(customFunctions); + delete that.args[0].latexType; + return latex; } brace = 'vmatrix';