You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
\enclose{roundedbox} mis-sized and vertically misaligned for \frac / tall content (regression or incomplete fix of #1697) #3043
\enclose{roundedbox}{…} does not correctly wrap tall math (especially \frac with nested \sqrt). The border is not vertically centered, and the box size does not match the laid-out content.
Reproducible with convertLatexToMarkup() and <math-field> on MathLive 0.110.0 (npm). Same LaTeX looks correct in MathJax (MathML menclose).
Steps to reproduce
Paste into the MathLive demo or any math-field:
\enclose{roundedbox}[shadow="none",1px dotted #cd0030]{\frac{x^2+y^2}{\sqrt{x^2+y^2}}}
Simpler case:
\enclose{roundedbox}[mathcolor=red]{\frac{a}{b}}
More cases:
\displaylines{\enclose{updiagonalstrike roundedbox}[mathbackground="#fbc0bd",shadow="none", solid red]{x=0}\\\enclose{circle}[mathbackground="#fbc0bd",shadow="none", solid currentColor]{\frac{1}{x}}\\\enclose{roundedbox}[shadow="none",1px dotted #cd0030]{\frac{x^2+y^2}{\sqrt{x^2+y^2}}}\\
}
Actual behavior
Content sits too high inside the box (top-aligned).
Border box is wider than the inner math box (default fboxsep padding ≈ 0.3em).
For the fraction+sqrt example (0.110.0): host 3.08em tall / 7.92em wide; body 2.49em tall; .ML__notation ~8.52em wide.
Expected behavior
Content centered in the border; border tightly wraps content + uniform padding.
Technical notes
In EncloseAtom.render (0.110.0): .ML__notation is position:absolute; top:0; body child is not vertically centered; default padding from fboxsep when padding is unset.
Partial workaround: padding="0" — reduces horizontal overflow, does not fix vertical centering for \frac.
Related
#1697 (\enclose + padding + \frac, closed but fraction cases still look wrong)
#2919 (GenfracAtom / tall content sizing since 0.108)
Environment
MathLive 0.110.0
Windows 10
Activity
kevin1078 commentedon Jun 18, 2026
Zahara-Nour commentedon Oct 13, 2026
I have proposed the PR #3108 to fix this.