mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-19 17:48:41 +00:00
Improve MathML for \genfrac barline (#1925)
This commit is contained in:
@@ -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 = [];
|
||||
|
||||
|
Reference in New Issue
Block a user