texlive[73730] Build/source/texk/web2c: Sync with upstream luatex.

commits+lscarso at tug.org commits+lscarso at tug.org
Wed Feb 5 01:01:04 CET 2025


Revision: 73730
          https://tug.org/svn/texlive?view=revision&revision=73730
Author:   lscarso
Date:     2025-02-05 01:01:04 +0100 (Wed, 05 Feb 2025)
Log Message:
-----------
Sync with upstream luatex.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/doc/luatex/luatex-callbacks.tex
    trunk/Build/source/texk/web2c/doc/luatex/luatex-enhancements.tex
    trunk/Build/source/texk/web2c/doc/luatex/luatex-modifications.tex
    trunk/Build/source/texk/web2c/doc/luatex/luatex.pdf
    trunk/Build/source/texk/web2c/doc/luatex/luatex.tex
    trunk/Build/source/texk/web2c/luatexdir/ChangeLog
    trunk/Build/source/texk/web2c/luatexdir/NEWS
    trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
    trunk/Build/source/texk/web2c/luatexdir/tex/commands.c
    trunk/Build/source/texk/web2c/luatexdir/tex/equivalents.h
    trunk/Build/source/texk/web2c/luatexdir/tex/maincontrol.c
    trunk/Build/source/texk/web2c/luatexdir/tex/texmath.c

Modified: trunk/Build/source/texk/web2c/doc/luatex/luatex-callbacks.tex
===================================================================
--- trunk/Build/source/texk/web2c/doc/luatex/luatex-callbacks.tex	2025-02-04 22:55:50 UTC (rev 73729)
+++ trunk/Build/source/texk/web2c/doc/luatex/luatex-callbacks.tex	2025-02-05 00:01:04 UTC (rev 73730)
@@ -933,6 +933,21 @@
 This callback replaces the code that prints the error message. The usual
 interaction after the message is not affected.
 
+\subsection{\cbk {show_ignored_error_message}}
+
+\topicindex{callbacks+errors}
+
+\startfunctioncall
+function()
+end
+\stopfunctioncall
+
+This callback replaces the code that prints the error message
+when \prm {ignoreprimitiveerror} is enabled.
+As before, the usual
+interaction after the message is not affected.
+
+
 \subsection{\cbk {show_lua_error_hook}}
 
 \topicindex{callbacks+errors}

Modified: trunk/Build/source/texk/web2c/doc/luatex/luatex-enhancements.tex
===================================================================
--- trunk/Build/source/texk/web2c/doc/luatex/luatex-enhancements.tex	2025-02-04 22:55:50 UTC (rev 73729)
+++ trunk/Build/source/texk/web2c/doc/luatex/luatex-enhancements.tex	2025-02-05 00:01:04 UTC (rev 73730)
@@ -1161,6 +1161,9 @@
 The \prm {vsplit} primitive has to be followed by a specification of the required
 height. As alternative for the \type {to} keyword you can use \type {upto} to get
 a split of the given size but result has the natural dimensions then.
+If \prm {ignoreprimitiveerror} = 1 , the error
+"Infinite glue shrinkage found in box being split" that occurs
+when vsplit-ting a box containing infinite negative glue is turned into a warning.
 
 \stopsubsection
 

Modified: trunk/Build/source/texk/web2c/doc/luatex/luatex-modifications.tex
===================================================================
--- trunk/Build/source/texk/web2c/doc/luatex/luatex-modifications.tex	2025-02-04 22:55:50 UTC (rev 73729)
+++ trunk/Build/source/texk/web2c/doc/luatex/luatex-modifications.tex	2025-02-05 00:01:04 UTC (rev 73730)
@@ -1164,6 +1164,10 @@
 an box, paragraphs with only an indent and directions are handled as paragraphs
 with content.
 
+By default paragraphs before a display equation containing dir nodes are never ignored.
+Changing that could break existing documents, but when you set \lpr {mathemptydisplaymode}
+to~\type {1} empty paragraphs before a display equation will be ignored.
+
 \stopsubsection
 
 \startsubsection[title={Controlling glue with \lpr {breakafterdirmode}}]

Modified: trunk/Build/source/texk/web2c/doc/luatex/luatex.pdf
===================================================================
(Binary files differ)

Modified: trunk/Build/source/texk/web2c/doc/luatex/luatex.tex
===================================================================
--- trunk/Build/source/texk/web2c/doc/luatex/luatex.tex	2025-02-04 22:55:50 UTC (rev 73729)
+++ trunk/Build/source/texk/web2c/doc/luatex/luatex.tex	2025-02-05 00:01:04 UTC (rev 73730)
@@ -73,7 +73,7 @@
 \startdocument
   [manual=Lua\TeX,
    status=stable,
-   version=1.20]
+   version=1.21]
 
 \startnotmode[*export]
     \component luatex-titlepage

Modified: trunk/Build/source/texk/web2c/luatexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/ChangeLog	2025-02-04 22:55:50 UTC (rev 73729)
+++ trunk/Build/source/texk/web2c/luatexdir/ChangeLog	2025-02-05 00:01:04 UTC (rev 73730)
@@ -1,3 +1,12 @@
+2025-02-05 Luigi Scarso <luigi.scarso at gmail.com>
+	* add mathemptydisplaymode primitive, 
+	* fix nodes leak in end_graf (thanks to udifoglle at gmail.com)
+
+
+2025-02-02 Luigi Scarso <luigi.scarso at gmail.com>
+	* Fixed subtype of beforedisplaypenalty (thanks to udifoglle at gmail.com)
+
+
 2025-02-01 Luigi Scarso <luigi.scarso at gmail.com>
 	* LuaJIT 2.1.1736781742 (work in progress)
 	* LuaTeX 1.21.0

Modified: trunk/Build/source/texk/web2c/luatexdir/NEWS
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/NEWS	2025-02-04 22:55:50 UTC (rev 73729)
+++ trunk/Build/source/texk/web2c/luatexdir/NEWS	2025-02-05 00:01:04 UTC (rev 73730)
@@ -1,4 +1,29 @@
 ==============================================================
+LuaTeX 1.21.0 2025-02-13
+==============================================================
+
+- LuaJIT 2.1.1736781742
+- New luaffi lib, supporting aarch64
+- New primitive \mathemptydisplaymode. By default paragraphs
+  before a display equation containing dir nodes are never ignored.
+  Changing that could break existing documents, but when you set mathemptydisplaymode
+  to 1 empty paragraphs before a display equation will be ignored.
+- New primitve \ignoreprimitiveerror.
+  If \ignoreprimitiveerror=1, the error
+  "Infinite glue shrinkage found in box being split" that occurs
+  when vsplit-ting a box containing infinite negative glue is turned into a warning.
+- In output_name_tree, sort_dest_names now compares
+  literal strings or hexdecimal strings.
+- Increment tally in tprint also when doterm is true 
+- For PNG, we no longer set the attr on the mask. If we get a report about dropping this 
+  we could add a 'maskattr' feature, but one should consider
+  to include a correct pdf of the image instead, it's more robust.
+- Handle token combiners in immediate assignments (H.Hagen)
+
+For more details, see ChangeLog.
+
+
+==============================================================
 LuaTeX 1.18.0 2024-02-13
 ==============================================================
 

Modified: trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2025-02-04 22:55:50 UTC (rev 73729)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2025-02-05 00:01:04 UTC (rev 73730)
@@ -1,4 +1,4 @@
 #ifndef luatex_svn_revision_h
 #define luatex_svn_revision_h
-#define luatex_svn_revision 7653
+#define luatex_svn_revision 7657
 #endif

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/commands.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/commands.c	2025-02-04 22:55:50 UTC (rev 73729)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/commands.c	2025-02-05 00:01:04 UTC (rev 73730)
@@ -180,6 +180,7 @@
     primitive_luatex("mathdefaultsmode", assign_int_cmd, int_base + math_defaults_mode_code, int_base);
     primitive_luatex("discretionaryligaturemode", assign_int_cmd, int_base + discretionary_ligature_mode_code, int_base);
     primitive_etex("partokencontext", assign_int_cmd, int_base + partoken_context_code, int_base);
+    primitive_luatex("mathemptydisplaymode", assign_int_cmd, int_base + math_empty_display_mode_code, int_base);
 
     /*tex
 

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/equivalents.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/equivalents.h	2025-02-04 22:55:50 UTC (rev 73729)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/equivalents.h	2025-02-05 00:01:04 UTC (rev 73730)
@@ -318,9 +318,11 @@
 
 #  define ignore_primitive_error_code 125 				/*ignore some primitive/engine errors*/
 
-#  define math_option_code 126
+#  define math_empty_display_mode_code 126
 
+#  define math_option_code 127
 
+
 #  define mathoption_int_base_code (math_option_code+1)                 /* one reserve */
 #  define mathoption_int_last_code (mathoption_int_base_code+8)
 
@@ -830,6 +832,8 @@
 
 #define show_stream_par                    int_par(show_stream_code)
 
+#define math_empty_display_mode_par        int_par(math_empty_display_mode_code)
+
 /* */
 
 #define math_use_current_family_code 7

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/maincontrol.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/maincontrol.c	2025-02-04 22:55:50 UTC (rev 73729)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/maincontrol.c	2025-02-05 00:01:04 UTC (rev 73730)
@@ -1964,7 +1964,7 @@
         if (head == tail) {
             pop_nest();
         } else if (only_dirs(vlink(head))) {
-            flush_node(vlink(head));
+            flush_node_list(vlink(head));
             pop_nest();
         } else {
             line_break(false, line_break_context);

Modified: trunk/Build/source/texk/web2c/luatexdir/tex/texmath.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/tex/texmath.c	2025-02-04 22:55:50 UTC (rev 73729)
+++ trunk/Build/source/texk/web2c/luatexdir/tex/texmath.c	2025-02-05 00:01:04 UTC (rev 73730)
@@ -1084,6 +1084,18 @@
 
 */
 
+static int only_dirs(halfword n)
+{
+    while (n) {
+        if (type(n) == local_par_node || type(n) == dir_node) {
+            n = vlink(n);
+        } else {
+            return 0;
+        }
+    }
+    return 1;
+}
+
 void enter_display_math(void)
 {
     /*tex new or partial |pre_display_size| */
@@ -1101,19 +1113,21 @@
         \.{\$\${ }\$\$}
 
     */
-    if (head == tail ||
-        (vlink(head) == tail &&
-         type(tail) == local_par_node && vlink(tail) == null)) {
-        if (vlink(head) == tail) {
-            /*tex
+    if (head == tail) {
+        pop_nest();
+        w = -max_dimen;
+    } else if ((vlink(head) == tail &&
+               type(tail) == local_par_node && vlink(tail) == null) ||
+               (math_empty_display_mode_par == 1 && only_dirs(vlink(head)))) {
+        /*tex
 
-                |resume_after_display| inserts a |local_par_node|, but if there
-                is another display immediately following, we have to get rid of
-                that node.
+            We ignore |null| paragraphs, that is those that only have a local par node,
+            for example because |resume_after_display| inserts a |local_par_node|.
+            If |\mathdisplayemptymode=1| paragraphs caontaining only local par node
+            and possibly a few dir nodes are ignored as well.
 
-            */
-            flush_node(tail);
-        }
+        */
+        flush_node_list(vlink(head));
         pop_nest();
         w = -max_dimen;
     } else {
@@ -2510,7 +2524,7 @@
                 if (type(p) == glue_node)
                     d = 0;
     }
-    tail_append(new_penalty(pre_display_penalty_par,after_display_penalty));
+    tail_append(new_penalty(pre_display_penalty_par,before_display_penalty));
 
     /* tex
        By default the short skip detection is not adapted to r2l typesetting and that
@@ -2561,54 +2575,32 @@
     if (eqno_w != 0) {
         r = new_kern(line_w - eq_w - eqno_w - d);
         if (l) {
-            if (swap_dir) {
-                if (math_direction_par==dir_TLT) {
-                    /*tex TRT + TLT + \eqno: (swap_dir=true,  math_direction_par=TLT, l=true) */
-                    s = new_kern(width(r) + eqno_w);
-                } else {
-                    /*tex TLT + TRT + \eqno: (swap_dir=true,  math_direction_par=TRT, l=true) */
-                    s = new_kern(d);
-                }
-                try_couple_nodes(eqno_box,r);
-                try_couple_nodes(r,eq_box);
-                try_couple_nodes(eq_box,s);
+            if (math_direction_par==dir_TLT) {
+                /*tex TRT + TLT + \eqno: (swap_dir=true, math_direction_par=TLT, l=true) */
+                /*tex TLT + TLT + \leqno: (swap_dir=false, math_direction_par=TLT, l=true) */
+                s = new_kern(width(r) + eqno_w);
             } else {
-                if (math_direction_par==dir_TLT) {
-                    /*tex TLT + TLT + \leqno: (swap_dir=false, math_direction_par=TLT, l=true) */
-                    s = new_kern(width(r) + eqno_w);
-                } else {
-                    /*tex TRT + TRT + \leqno: (swap_dir=false, math_direction_par=TRT, l=true) */
-                    s = new_kern(d);
-                }
-                try_couple_nodes(eqno_box,r);
-                try_couple_nodes(r,eq_box);
-                try_couple_nodes(eq_box,s);
+                /*tex TLT + TRT + \eqno: (swap_dir=true, math_direction_par=TRT, l=true) */
+                /*tex TRT + TRT + \leqno: (swap_dir=false, math_direction_par=TRT, l=true) */
+                s = new_kern(d);
             }
+            try_couple_nodes(eqno_box,r);
+            try_couple_nodes(r,eq_box);
+            try_couple_nodes(eq_box,s);
             eq_box = eqno_box;
         } else {
-            if (swap_dir) {
-                if (math_direction_par==dir_TLT) {
-                    /*tex TRT + TLT + \leqno: (swap_dir=true,  math_direction_par=TLT, l=false) */
-                    s = new_kern(d);
-                } else {
-                    /*tex TLT + TRT + \leqno: (swap_dir=true,  math_direction_par=TRT, l=false) */
-                    s = new_kern(width(r) + eqno_w);
-                }
-                try_couple_nodes(s,eq_box);
-                try_couple_nodes(eq_box,r);
-                try_couple_nodes(r,eqno_box);
+            if (math_direction_par==dir_TLT) {
+                /*tex TRT + TLT + \leqno: (swap_dir=true,  math_direction_par=TLT, l=false) */
+                /*tex TLT + TLT + \eqno: (swap_dir=false, math_direction_par=TLT, l=false) */
+                s = new_kern(d);
             } else {
-                if (math_direction_par==dir_TLT) {
-                    /*tex TLT + TLT + \eqno: (swap_dir=false, math_direction_par=TLT, l=false) */
-                    s = new_kern(d);
-                } else {
-                    /*tex TRT + TRT + \eqno: (swap_dir=false, math_direction_par=TRT, l=false) */
-                    s = new_kern(width(r) + eqno_w);
-                }
-                try_couple_nodes(s,eq_box);
-                try_couple_nodes(eq_box,r);
-                try_couple_nodes(r,eqno_box);
+                /*tex TLT + TRT + \leqno: (swap_dir=true,  math_direction_par=TRT, l=false) */
+                /*tex TRT + TRT + \eqno: (swap_dir=false, math_direction_par=TRT, l=false) */
+                s = new_kern(width(r) + eqno_w);
             }
+            try_couple_nodes(s,eq_box);
+            try_couple_nodes(eq_box,r);
+            try_couple_nodes(r,eqno_box);
             eq_box = s;
         }
         eq_box = hpack(eq_box, 0, additional, -1);



More information about the tex-live-commits mailing list.