Skip to content

Commit 19906b9

Browse files
Omikhleiaalerque
authored andcommitted
fix(math): Wrong condition on moveable limits (workaround)
This is not a proper fix, see in-code comment, but one has to move forward and the workaround does the trick until we can do better.
1 parent d579096 commit 19906b9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/math/base-elements.lua

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,16 @@ function elements.underOver:styleChildren ()
663663
end
664664

665665
function elements.underOver:shape ()
666-
if not (self.mode == mathMode.display or self.mode == mathMode.displayCramped) then
666+
if not (self.mode == mathMode.display or self.mode == mathMode.displayCramped) and self.base.largeop then
667+
-- FIXME
668+
-- Added the self.base.largeop condition, but it's kind of a workaround:
669+
-- It should rather be the "moveablelimits" propery in MathML, but we do not have that yet.
670+
-- When the base is a moveable limit, the under/over scripts are not placed under/over the base,
671+
-- but ather to the right of it, when display mode is not used.
672+
-- Notable effects:
673+
-- Mozilla MathML test 19 (on "k times" > overbrace > base)
674+
-- Maxwell's Equations in MathML3 Test Suite "complex1" (on the vectors in fractions)
675+
-- For now, go with the "largeop" property, but this is not correct.
667676
self.isUnderOver = true
668677
elements.subscript.shape(self)
669678
return

0 commit comments

Comments
 (0)