commit 3d371041a60bdf16dac8c6a41cb31f4c86769615
parent 5d3508d830007a547b4ff85460484fb1fc4fe3f0
Author: Davide P. Cervone <dpvc@union.edu>
Date: Mon, 16 Mar 2015 09:43:19 -0400
Add ability to look up styles that have been removed from mstyle with a style attribute.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git 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
});