On Sat, Nov 12, 2022 at 12:26:28PM +0100, Vincent Lefevre wrote: > The first comment in > > https://tex.stackexchange.com/a/1932/58921 > > says "\begingroup...\endgroup also behaves differently in math mode, > in which {...} or \bgroup...\egroup create a subformulae with > different spacing. A good rule of thumb would be to avoid using > \bgroup...\egroup unless you know you need them." > > So the "subformulae with different spacing" from \bgroup...\egroup > seems to be the issue. Indeed, the attached patch fixes the issue > on my test file.
That's great! I'll test it and make this change.