mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-10 05:28:41 +00:00
Improve MathML for \hphantom and \vphantom (#1883)
* Improve MathML for \phantom * Add mpadded
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
Reference in New Issue
Block a user