Skip to content

Commit

Permalink
synchronized texlive 73732.
Browse files Browse the repository at this point in the history
  • Loading branch information
clerkma committed Feb 5, 2025
1 parent 03865d0 commit ee006e8
Show file tree
Hide file tree
Showing 15 changed files with 171 additions and 81 deletions.
21 changes: 16 additions & 5 deletions texlive/build-aux/ar-lib
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Wrapper for Microsoft lib.exe

me=ar-lib
scriptversion=2024-06-19.01; # UTC
scriptversion=2025-02-03.05; # UTC

# Copyright (C) 2010-2025 Free Software Foundation, Inc.
# Written by Peter Rosin <[email protected]>.
Expand Down Expand Up @@ -51,9 +51,20 @@ func_file_conv ()
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then
# MSYS2 environment.
file_conv=cygwin
else
# Original MinGW environment.
file_conv=mingw
fi
;;
CYGWIN* | MSYS*)
MSYS*)
# Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell.
file_conv=cygwin
;;
CYGWIN*)
# Cygwin environment.
file_conv=cygwin
;;
*)
Expand All @@ -65,8 +76,8 @@ func_file_conv ()
mingw)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin | msys)
file=`cygpath -m "$file" || echo "$file"`
cygwin)
file=`cygpath -w "$file" || echo "$file"`
;;
wine)
file=`winepath -w "$file" || echo "$file"`
Expand Down
29 changes: 21 additions & 8 deletions texlive/build-aux/compile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.

scriptversion=2024-12-03.03; # UTC
scriptversion=2025-02-03.05; # UTC

# Copyright (C) 1999-2025 Free Software Foundation, Inc.
# Written by Tom Tromey <[email protected]>.
Expand Down Expand Up @@ -37,11 +37,11 @@ IFS=" "" $nl"

file_conv=

# func_file_conv build_file lazy
# func_file_conv build_file unneeded_conversions
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
# type is listed in (the comma separated) UNNEEDED_CONVERSIONS, no
# conversion will take place.
func_file_conv ()
{
file=$1
Expand All @@ -51,9 +51,20 @@ func_file_conv ()
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then
# MSYS2 environment.
file_conv=cygwin
else
# Original MinGW environment.
file_conv=mingw
fi
;;
CYGWIN* | MSYS*)
MSYS*)
# Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell.
file_conv=cygwin
;;
CYGWIN*)
# Cygwin environment.
file_conv=cygwin
;;
*)
Expand All @@ -63,12 +74,14 @@ func_file_conv ()
fi
case $file_conv/,$2, in
*,$file_conv,*)
# This is the optimization mentioned above:
# If UNNEEDED_CONVERSIONS contains $file_conv, don't convert.
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"`
cygwin/*)
file=`cygpath -w "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
Expand Down
15 changes: 15 additions & 0 deletions texlive/texk/web2c/doc/luatex/luatex-callbacks.tex
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,21 @@ \subsection{\cbk {show_error_message}}
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}
Expand Down
3 changes: 3 additions & 0 deletions texlive/texk/web2c/doc/luatex/luatex-enhancements.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions texlive/texk/web2c/doc/luatex/luatex-modifications.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}}]
Expand Down
Binary file modified texlive/texk/web2c/doc/luatex/luatex.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion texlive/texk/web2c/doc/luatex/luatex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
\startdocument
[manual=Lua\TeX,
status=stable,
version=1.20]
version=1.21]

\startnotmode[*export]
\component luatex-titlepage
Expand Down
9 changes: 9 additions & 0 deletions texlive/texk/web2c/luatexdir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2025-02-05 Luigi Scarso <[email protected]>
* add mathemptydisplaymode primitive,
* fix nodes leak in end_graf (thanks to [email protected])


2025-02-02 Luigi Scarso <[email protected]>
* Fixed subtype of beforedisplaypenalty (thanks to [email protected])


2025-02-01 Luigi Scarso <[email protected]>
* LuaJIT 2.1.1736781742 (work in progress)
* LuaTeX 1.21.0
Expand Down
25 changes: 25 additions & 0 deletions texlive/texk/web2c/luatexdir/NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
==============================================================
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
==============================================================
Expand Down
2 changes: 1 addition & 1 deletion texlive/texk/web2c/luatexdir/luatex_svnversion.h
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions texlive/texk/web2c/luatexdir/tex/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ void initialize_commands(void)
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
Expand Down
6 changes: 5 additions & 1 deletion texlive/texk/web2c/luatexdir/tex/equivalents.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ the |number_regs| \.{\\dimen} registers.

# 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 */
Expand Down Expand Up @@ -830,6 +832,8 @@ extern halfword last_cs_name;

#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
Expand Down
2 changes: 1 addition & 1 deletion texlive/texk/web2c/luatexdir/tex/maincontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1964,7 +1964,7 @@ void end_graf(int line_break_context)
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);
Expand Down
104 changes: 48 additions & 56 deletions texlive/texk/web2c/luatexdir/tex/texmath.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,18 @@ static boolean math_and_text_reversed_p(void)
*/

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| */
Expand All @@ -1101,19 +1113,21 @@ void enter_display_math(void)
\.{\$\${ }\$\$}
*/
if (head == tail ||
(vlink(head) == tail &&
type(tail) == local_par_node && vlink(tail) == null)) {
if (vlink(head) == tail) {
/*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.
*/
flush_node(tail);
}
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
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_list(vlink(head));
pop_nest();
w = -max_dimen;
} else {
Expand Down Expand Up @@ -2510,7 +2524,7 @@ static void finish_displayed_math(boolean l, pointer eqno_box, pointer p)
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
Expand Down Expand Up @@ -2561,54 +2575,32 @@ static void finish_displayed_math(boolean l, pointer eqno_box, pointer p)
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);
Expand Down
Loading

0 comments on commit ee006e8

Please sign in to comment.