diff --git a/src/functions/phantom.js b/src/functions/phantom.js index e098f66a..9d54a0e6 100644 --- a/src/functions/phantom.js +++ b/src/functions/phantom.js @@ -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; },