Look at the following document:
\Umathlimitbelowbgap\displaystyle0pt
\Umathlimitbelowvgap\displaystyle0pt
$$
\sum_a^b
$$
\bye
Here the `a` subscript gets lost. In mlist.c, make_op, line 3324 the
subscript (stored in variable `z`) is never coupled with the previous
node if `shift_down` is smaller or equal to 0. This can be fixed by
---
source/texk/web2c/luatexdir/tex/mlist.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/source/texk/web2c/luatexdir/tex/mlist.c b/source/texk/web2c/luatexdir/tex/mlist.c
index 43db6adbb..570a54052 100644
--- a/source/texk/web2c/luatexdir/tex/mlist.c
+++ b/source/texk/web2c/luatexdir/tex/mlist.c
@@ -3321,7 +3321,9 @@ static scaled make_op(pointer q, int cur_style)
shift_down = limit_below_bgap(cur_style) - height(z);
if (shift_down < limit_below_vgap(cur_style))
shift_down = limit_below_vgap(cur_style);
- if (shift_down > 0) {
+ if (shift_down == 0) {
+ couple_nodes(y, z);
+ } else {
p = new_kern(shift_down);
reset_attributes(p, node_attr(q));
couple_nodes(y,p);
--
2.26.1
This also allows shift_down to be negative. While a negative shift_down
is kind of odd, it is already allowed for the superscript so it makes
sense from a consistency point of view. Also it can't happen except when
it is explicitly requested though a negative limit_below_vgap, so it
doesn't have any effect if it isn't requested by the user.