Improve MathML for \hphantom and \vphantom (#1883)

* Improve MathML for \phantom

* Add mpadded
This commit is contained in:
Ron Kok
2019-03-23 21:17:54 -07:00
committed by ylemkimon
parent cb477ca01a
commit 8da1377c08

View File

@@ -76,8 +76,10 @@ defineFunction({
},
mathmlBuilder: (group, options) => {
const inner = mml.buildExpression(ordargument(group.body), options);
const node = new mathMLTree.MathNode("mphantom", inner);
const phantom = new mathMLTree.MathNode("mphantom", inner);
const node = new mathMLTree.MathNode("mpadded", [phantom]);
node.setAttribute("height", "0px");
node.setAttribute("depth", "0px");
return node;
},
});
@@ -107,7 +109,8 @@ defineFunction({
},
mathmlBuilder: (group, options) => {
const inner = mml.buildExpression(ordargument(group.body), options);
const node = new mathMLTree.MathNode("mphantom", inner);
const phantom = new mathMLTree.MathNode("mphantom", inner);
const node = new mathMLTree.MathNode("mpadded", [phantom]);
node.setAttribute("width", "0px");
return node;
},