On Wed, Feb 5, 2025 at 10:57 PM Udicoudco <udifog...@gmail.com> wrote:

> I attached a patch.

Sorry, three are important parenthesis missing
from this patch.

I attached a new one.

Udi
diff --git a/source/texk/web2c/luatexdir/tex/texmath.c b/source/texk/web2c/luatexdir/tex/texmath.c
index 3c069a5d6..6ae84e378 100644
--- a/source/texk/web2c/luatexdir/tex/texmath.c
+++ b/source/texk/web2c/luatexdir/tex/texmath.c
@@ -2542,7 +2542,10 @@ static void finish_displayed_math(boolean l, pointer eqno_box, pointer p)
         g2 = below_display_short_skip_code;
        }
     } else {
-      if ((d + line_s <= pre_display_size_par) || ((! dir_math_save && l) || (dir_math_save && ! l))) {
+      boolean math_and_par_reversed = math_and_text_reversed_p();
+      if ((d + line_s <= pre_display_size_par) || (eqno_box != null
+              && ((! math_and_par_reversed && l)
+              || (math_and_par_reversed && ! l)))) {
         /*tex not enough clearance */
         g1 = above_display_skip_code;
         g2 = below_display_skip_code;
_______________________________________________
dev-luatex mailing list -- dev-luatex@ntg.nl
To unsubscribe send an email to dev-luatex-le...@ntg.nl

Reply via email to