From 3d371041a60bdf16dac8c6a41cb31f4c86769615 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Mon, 16 Mar 2015 09:43:19 -0400 Subject: [PATCH] Add ability to look up styles that have been removed from mstyle with a style attribute. --- unpacked/jax/element/mml/jax.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unpacked/jax/element/mml/jax.js b/unpacked/jax/element/mml/jax.js index 2cd3ab4ac..44a251399 100644 --- a/unpacked/jax/element/mml/jax.js +++ b/unpacked/jax/element/mml/jax.js @@ -264,6 +264,7 @@ MathJax.ElementJax.mml.Augment({ noInheritAttribute: { texClass: true }, + getRemoved: {}, linebreakContainer: false, Init: function () { @@ -312,6 +313,7 @@ MathJax.ElementJax.mml.Augment({ var obj = this.inherit; var root = obj; while (obj) { var value = obj[name]; if (value == null && obj.attr) {value = obj.attr[name]} + if (obj.removedStyles && obj.getRemoved[name] && value == null) value = obj.removedStyles[obj.getRemoved[name]]; if (value != null && obj.noInheritAttribute && !obj.noInheritAttribute[name]) { var noInherit = obj.noInherit[this.type]; if (!(noInherit && noInherit[name])) {return value} @@ -916,6 +918,7 @@ MathJax.ElementJax.mml.Augment({ mpadded: {width: true, height: true, depth: true, lspace: true, voffset: true}, mtable: {width: true, height: true, depth: true, align: true} }, + getRemoved: {fontfamily:"fontFamily", fontweight:"fontWeight", fontstyle:"fontStyle"}, setTeXclass: MML.mbase.setChildTeXclass });