Skip to content

Commit

Permalink
Work around big operator vertical alignment bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ronkok committed Aug 22, 2024
1 parent ebc80ed commit f44cf3f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/functions/op.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ const mathmlBuilder = (group, style) => {
node = new mathMLTree.MathNode("mo", [mml.makeText(group.name, group.mode)]);
if (noSuccessor.includes(group.name)) {
node.setAttribute("largeop", "false")
} else if (group.limits) {
// This is a workaround for a MathML/Chromium bug.
// This is being applied to singleCharBigOps, which are not really stretchy.
// But by setting the stretchy attribute, Chromium will vertically center
// big ops around the math axis. This is needed since STIX TWO does not do so.
// TODO: Remove this hack when MathML & Chromium fix their problem.
node.setAttribute("stretchy", "true")
} else {
node.setAttribute("movablelimits", "false")
}
Expand Down

0 comments on commit f44cf3f

Please sign in to comment.