Improve MathML for \genfrac barline (#1925)

This commit is contained in:
Ron Kok
2019-04-04 22:36:30 -07:00
committed by ylemkimon
parent ec777b8f34
commit ac4c6271d4

View File

@@ -190,6 +190,13 @@ const mathmlBuilder = (group, options) => {
mml.buildGroup(group.denom, options),
]);
if (!group.hasBarLine) {
node.setAttribute("linethickness", "0px");
} else if (group.barSize) {
const ruleWidth = calculateSize(group.barSize, options);
node.setAttribute("linethickness", ruleWidth + "em");
}
const style = adjustStyle(group.size, options.style);
if (style.size !== options.style.size) {
node = new mathMLTree.MathNode("mstyle", [node]);
@@ -198,13 +205,6 @@ const mathmlBuilder = (group, options) => {
node.setAttribute("scriptlevel", "0");
}
if (!group.hasBarLine) {
node.setAttribute("linethickness", "0px");
} else if (group.barSize) {
const ruleWidth = calculateSize(group.barSize, options);
node.setAttribute("linethickness", ruleWidth + "em");
}
if (group.leftDelim != null || group.rightDelim != null) {
const withDelims = [];