From 92e5defdf7e42cbc5216dc67a3841eb095805099 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Wed, 22 Feb 2023 10:04:01 +0000 Subject: [PATCH 1/2] Update l3kernel to 2023-02-22 --- base/testfiles/github-0944.tlg | 2 +- texmf/tex/latex/l3kernel/expl3-code.tex | 188 +++++++++++---------- texmf/tex/latex/l3kernel/expl3-generic.tex | 2 +- texmf/tex/latex/l3kernel/expl3.ltx | 2 +- texmf/tex/latex/l3kernel/expl3.sty | 2 +- 5 files changed, 104 insertions(+), 92 deletions(-) diff --git a/base/testfiles/github-0944.tlg b/base/testfiles/github-0944.tlg index 54c203407..fb1c923d1 100644 --- a/base/testfiles/github-0944.tlg +++ b/base/testfiles/github-0944.tlg @@ -22,7 +22,7 @@ LaTeX Warning: Reference `unknown' on page 1 undefined on input line .... ] (github-0944.aux) *********** -formatname- <-formatversion-> pre-release-2 (-release-version-test- branch) -L3 programming layer <2023-02-07> +L3 programming layer <2023-02-22> *********** *File List* -show the file list here- diff --git a/texmf/tex/latex/l3kernel/expl3-code.tex b/texmf/tex/latex/l3kernel/expl3-code.tex index 7327e2085..8f2c6f05d 100644 --- a/texmf/tex/latex/l3kernel/expl3-code.tex +++ b/texmf/tex/latex/l3kernel/expl3-code.tex @@ -71,7 +71,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2023-02-07}% +\def\ExplFileDate{2023-02-22}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -5495,22 +5495,33 @@ \cs_new:Npn \__str_change_case_codepoint:nN #1#2 { \__str_change_case_char:fnn { \int_eval:n {`#2} } {#1} {#2} } \else: - \cs_new:Npn \__str_change_case_codepoint:nN #1#2 + \cs_new:Npx \__str_change_case_codepoint:nN #1#2 { - \int_compare:nNnTF {`#2} > { "80 } + \exp_not:N \int_compare:nNnTF {`#2} > { "80 } { - \int_compare:nNnTF {`#2} < { "E0 } - { \__str_change_case_codepoint:nNN } + \cs_if_exist:NTF \tex_pdftexversion:D + { \exp_not:N \__str_change_case_char_auxi:nN } { - \int_compare:nNnTF {`#2} < { "F0 } - { \__str_change_case_codepoint:nNNN } - { \__str_change_case_codepoint:nNNNNN } + \exp_not:N \int_compare:nNnTF {`#2} > { "FF } + { \exp_not:N \__str_change_case_char_auxii:nN } + { \exp_not:N \__str_change_case_char_auxi:nN } } } - { \__str_change_case_char_aux:nN } + { \exp_not:N \__str_change_case_char_auxii:nN } {#1} #2 } - \cs_new:Npn \__str_change_case_char_aux:nN #1#2 + \cs_new:Npn \__str_change_case_char_auxi:nN #1#2 + { + \int_compare:nNnTF {`#2} < { "E0 } + { \__str_change_case_codepoint:nNN } + { + \int_compare:nNnTF {`#2} < { "F0 } + { \__str_change_case_codepoint:nNNN } + { \__str_change_case_codepoint:nNNNNN } + } + {#1} #2 + } + \cs_new:Npn \__str_change_case_char_auxii:nN #1#2 { \__str_change_case_char:fnn { \int_eval:n {`#2} } {#1} {#2} } \cs_new:Npn \__str_change_case_codepoint:nNN #1#2#3 { @@ -8757,9 +8768,7 @@ \group_begin: \char_set_catcode_active:N \^^L \cs_set:Npn ^^L { } - \if_int_odd:w 0 - \sys_if_engine_luatex:T { 1 } - \sys_if_engine_xetex:T { 1 } \exp_stop_f: + \if_cs_exist:N \tex_Ucharcat:D \cs_new:Npn \__char_generate_aux:nnw #1#2#3 \exp_end: { #3 @@ -28473,7 +28482,6 @@ { \use:c { __color_backend_select_ #1 :n } {#2} } \tl_new:N \l__color_current_tl \tl_set:Nn \l__color_current_tl { { gray } { 0 } } - \int_new:N \l__color_internal_int \tl_new:N \l__color_internal_tl \scan_new:N \s__color_mark @@ -31838,7 +31846,20 @@ \cs_generate_variant:Nn \__codepoint_to_bytes_output:nnn { f } \cs_new:Npn \__codepoint_to_bytes_end: { } \cs_new:Npn \codepoint_to_nfd:n #1 + { \exp_args:Ne \__codepoint_to_nfd:n { \int_eval:n {#1} } } +\cs_new:Npn \__codepoint_to_nfd:n #1 { \__codepoint_to_nfd:nn {#1} { \char_value_catcode:n {#1} } } +\bool_lazy_or:nnF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } + { + \cs_gset:Npn \__codepoint_to_nfd:n #1 + { + \int_compare:nNnTF {#1} > { "80 } + { \__codepoint_to_nfd:nn {#1} { 12 } } + { \__codepoint_to_nfd:nn {#1} { \char_value_catcode:n {#1} } } + } + } \cs_new:Npn \__codepoint_to_nfd:nn #1#2 { \exp_args:Ne \__codepoint_to_nfd:nnn @@ -32393,43 +32414,38 @@ \cs_new:Npn \__text_codepoint_process:nN #1#2 { #1 {#2} } } { - \cs_new:Npn \__text_codepoint_process:nN #1#2 + \cs_new:Npx \__text_codepoint_process:nN #1#2 { - \int_compare:nNnTF { `#2 } > { "80 } + \exp_not:N \int_compare:nNnTF {`#2} > { "80 } { - \int_compare:nNnTF { `#2 } < { "E0 } - { \__text_codepoint_process:nNN } + \sys_if_engine_pdftex:TF + { \exp_not:N \__text_codepoint_process_aux:nN } { - \int_compare:nNnTF { `#2 } < { "F0 } - { \__text_codepoint_process:nNNN } - { \__text_codepoint_process:nNNNN } + \exp_not:N \int_compare:nNnTF {`#2} > { "FF } + { \exp_not:N \use:n } + { \exp_not:N \__text_codepoint_process_aux:nN } } } - { \use:n } + { \exp_not:N \use:n } {#1} #2 } - \cs_new:Npn \__text_codepoint_process:nNN #1#2#3 - { #1 {#2#3} } - \sys_if_engine_ptex:TF + \cs_new:Npn \__text_codepoint_process_aux:nN #1#2 { - \cs_gset:Npn \__text_codepoint_process:nN #1#2 + \int_compare:nNnTF { `#2 } < { "E0 } + { \__text_codepoint_process:nNN } { - \int_compare:nNnTF { `#2 } > { "80 } - { - \int_compare:nNnTF { `#2 } < { "E0 } - { \__text_codepoint_process:nNN } - { \use:n } - } - { \use:n } + \int_compare:nNnTF { `#2 } < { "F0 } + { \__text_codepoint_process:nNNN } + { \__text_codepoint_process:nNNNN } + } {#1} #2 } - } - { - \cs_new:Npn \__text_codepoint_process:nNNN #1#2#3#4 - { #1 {#2#3#4} } - \cs_new:Npn \__text_codepoint_process:nNNNN #1#2#3#4#5 - { #1 {#2#3#4#5} } - } + \cs_new:Npn \__text_codepoint_process:nNN #1#2#3 + { #1 {#2#3} } + \cs_new:Npn \__text_codepoint_process:nNNN #1#2#3#4 + { #1 {#2#3#4} } + \cs_new:Npn \__text_codepoint_process:nNNNN #1#2#3#4#5 + { #1 {#2#3#4#5} } } \bool_lazy_or:nnTF { \sys_if_engine_luatex_p: } @@ -32451,62 +32467,56 @@ #2 {#3} \prg_return_true: \prg_return_false: } - \cs_new:Npn \__text_codepoint_from_chars:Nw #1 + \cs_new:Npx \__text_codepoint_from_chars:Nw #1 { - \if_int_compare:w `#1 > "80 \exp_stop_f: - \if_int_compare:w `#1 < "E0 \exp_stop_f: + \exp_not:N \if_int_compare:w `#1 > "80 \exp_not:N \exp_stop_f: + \sys_if_engine_pdftex:TF + { + \exp_not:N \exp_after:wN + \exp_not:N \__text_codepoint_from_chars_aux:Nw + } + { + \exp_not:N \if_int_compare:w `#1 > "FF \exp_not:N \exp_stop_f: + \exp_not:N \exp_after:wN \exp_not:N \exp_after:wN + \exp_not:N \exp_after:wN + \exp_not:N \__text_codepoint_from_chars:N + \exp_not:N \else: + \exp_not:N \exp_after:wN \exp_not:N \exp_after:wN + \exp_not:N \exp_after:wN + \exp_not:N \__text_codepoint_from_chars_aux:Nw + \exp_not:N \fi: + } + \exp_not:N \else: + \exp_not:N \exp_after:wN \exp_not:N \__text_codepoint_from_chars:N + \exp_not:N \fi: + #1 + } + \cs_new:Npn \__text_codepoint_from_chars_aux:Nw #1 + { + \if_int_compare:w `#1 < "E0 \exp_stop_f: + \exp_after:wN \__text_codepoint_from_chars:NN + \else: + \if_int_compare:w `#1 < "F0 \exp_stop_f: \exp_after:wN \exp_after:wN \exp_after:wN - \__text_codepoint_from_chars:NN + \__text_codepoint_from_chars:NNN \else: - \if_int_compare:w `#1 < "F0 \exp_stop_f: - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_after:wN \__text_codepoint_from_chars:NNN - \else: - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_after:wN \__text_codepoint_from_chars:NNNN - \fi: + \exp_after:wN \exp_after:wN \exp_after:wN + \__text_codepoint_from_chars:NNNN \fi: - \else: - \exp_after:wN \__text_codepoint_from_chars:N \fi: #1 } - \cs_new:Npn \__text_codepoint_from_chars:N #1 { `#1 } + \cs_new:Npn \__text_codepoint_from_chars:N #1 {`#1} \cs_new:Npn \__text_codepoint_from_chars:NN #1#2 { (`#1 - "C0) * "40 + `#2 - "80 } - % \end{macrocode} - % Avoid high chars with p\TeX{}. - % \begin{macrocode} - \sys_if_engine_ptex:TF + \cs_new:Npn \__text_codepoint_from_chars:NNN #1#2#3 + { (`#1 - "E0) * "1000 + (`#2 - "80) * "40 + `#3 - "80 } + \cs_new:Npn \__text_codepoint_from_chars:NNNN #1#2#3#4 { - \cs_gset:Npn \__text_codepoint_from_chars:Nw #1 - { - \if_int_compare:w `#1 > "80 \exp_stop_f: - \if_int_compare:w `#1 < "E0 \exp_stop_f: - \exp_after:wN \exp_after:wN \exp_after:wN - \__text_codepoint_from_chars:NN - \else: - \exp_after:wN \exp_after:wN \exp_after:wN - \__text_codepoint_from_chars:N - \fi: - \else: - \exp_after:wN \__text_codepoint_from_chars:N - \fi: - #1 - } - } - { - \cs_new:Npn \__text_codepoint_from_chars:NNN #1#2#3 - { (`#1 - "E0) * "1000 + (`#2 - "80) * "40 + `#3 - "80 } - \cs_new:Npn \__text_codepoint_from_chars:NNNN #1#2#3#4 - { - (`#1 - "F0) * "40000 - + (`#2 - "80) * "1000 - + (`#3 - "80) * "40 - + `#4 - "80 - } + (`#1 - "F0) * "40000 + + (`#2 - "80) * "1000 + + (`#3 - "80) * "40 + + `#4 - "80 } } \tl_new:N \l_text_accents_tl @@ -33491,7 +33501,9 @@ { __text_change_case_upper_de-x-eszett:nnnn } \cs_new:Npn \__text_change_case_upper_el:nnnn #1#2#3#4 { - \__text_change_case_if_greek:nTF {#4} + \bool_lazy_and:nnTF + { \__text_change_case_if_greek_p:n {#4} } + { ! \__text_codepoint_compare_p:nNn {#4} = { "0374 } } { \exp_args:Ne \__text_change_case_upper_el:nnn { @@ -33731,7 +33743,7 @@ { \__text_change_case_upper_el_gobble:nnw {#1} {#2} } { \__text_change_case_loop:nnw {#1} {#2} #3 } } -\prg_new_conditional:Npnn \__text_change_case_if_greek:n #1 { TF } +\prg_new_conditional:Npnn \__text_change_case_if_greek:n #1 { p , TF } { \exp_args:Nf \__text_change_case_if_greek:n { \int_eval:n { \__text_codepoint_from_chars:Nw #1 } } diff --git a/texmf/tex/latex/l3kernel/expl3-generic.tex b/texmf/tex/latex/l3kernel/expl3-generic.tex index 6850f31a4..336d9a994 100644 --- a/texmf/tex/latex/l3kernel/expl3-generic.tex +++ b/texmf/tex/latex/l3kernel/expl3-generic.tex @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2023-02-07}% +\def\ExplFileDate{2023-02-22}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 diff --git a/texmf/tex/latex/l3kernel/expl3.ltx b/texmf/tex/latex/l3kernel/expl3.ltx index f257bdb30..e94af3111 100644 --- a/texmf/tex/latex/l3kernel/expl3.ltx +++ b/texmf/tex/latex/l3kernel/expl3.ltx @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2023-02-07}% +\def\ExplFileDate{2023-02-22}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 diff --git a/texmf/tex/latex/l3kernel/expl3.sty b/texmf/tex/latex/l3kernel/expl3.sty index 510ab3a59..84451c969 100644 --- a/texmf/tex/latex/l3kernel/expl3.sty +++ b/texmf/tex/latex/l3kernel/expl3.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2023-02-07}% +\def\ExplFileDate{2023-02-22}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% From 2b5bc572433ce91c0fde86f5fd1f90343b05a6d9 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Thu, 23 Feb 2023 10:20:21 +0000 Subject: [PATCH 2/2] Remove Lua callback line numbers (track l3build change) --- base/testfiles/tlb-callbacks-002.luatex.tlg | 2 +- base/testfiles/tlb-ltluatex-001.luatex.tlg | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/base/testfiles/tlb-callbacks-002.luatex.tlg b/base/testfiles/tlb-callbacks-002.luatex.tlg index dad7bb388..f2748a646 100644 --- a/base/testfiles/tlb-callbacks-002.luatex.tlg +++ b/base/testfiles/tlb-callbacks-002.luatex.tlg @@ -10,5 +10,5 @@ First try: fifth second third forth first Second try: fifth third forth second first Third try: fifth forth third second first Cycle: -./ltluatex.lua:334: Cycle occured at second -> forth -> third -> second +./ltluatex.lua:...: Cycle occured at second -> forth -> third -> second Recovered: fifth second forth third first diff --git a/base/testfiles/tlb-ltluatex-001.luatex.tlg b/base/testfiles/tlb-ltluatex-001.luatex.tlg index f0e91fd6c..b5e883199 100644 --- a/base/testfiles/tlb-ltluatex-001.luatex.tlg +++ b/base/testfiles/tlb-ltluatex-001.luatex.tlg @@ -1,13 +1,13 @@ This is a generated file for the LaTeX2e validation system. Don't change this file in any respect. -./ltluatex.lua:109: +./ltluatex.lua:...: Module luatexbase Error: Unable to create callback: (luatexbase) valid callback name and type required on input line ... stack traceback: ^^I[C]: in function 'error' -^^I./ltluatex.lua:109: in upvalue 'module_error' -^^I./ltluatex.lua:116: in upvalue 'luatexbase_error' -^^I./ltluatex.lua:529: in field 'create_callback' +^^I./ltluatex.lua:...: in upvalue 'module_error' +^^I./ltluatex.lua:...: in upvalue 'luatexbase_error' +^^I./ltluatex.lua:...: in field 'create_callback' ^^I[\directlua]:1: in main chunk. l. ...} The lua interpreter ran into a problem, so the