From 803ec3bae0a2835e8f302308a683718fc39b4f94 Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Mon, 9 Dec 2024 13:33:50 +0000 Subject: [PATCH] Update l3kernel to 2024-12-09 --- base/testfiles/github-0944.tlg | 2 +- texmf/tex/latex/l3kernel/expl3-code.tex | 167 ++++++++++++++++----- texmf/tex/latex/l3kernel/expl3-generic.tex | 2 +- texmf/tex/latex/l3kernel/expl3.ltx | 2 +- texmf/tex/latex/l3kernel/expl3.sty | 2 +- texmf/tex/latex/l3kernel/l3debug.def | 2 +- texmf/tex/latex/l3kernel/l3doc.cls | 9 +- 7 files changed, 142 insertions(+), 44 deletions(-) diff --git a/base/testfiles/github-0944.tlg b/base/testfiles/github-0944.tlg index 089a3c956..216fa7aef 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 <2024-11-02> +L3 programming layer <2024-12-09> *********** *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 552e502f8..ee46de3b4 100644 --- a/texmf/tex/latex/l3kernel/expl3-code.tex +++ b/texmf/tex/latex/l3kernel/expl3-code.tex @@ -75,7 +75,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2024-11-02}% +\def\ExplFileDate{2024-12-09}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -3864,6 +3864,37 @@ \cs_new:Npn \__tl_replace_next_aux:w { \__tl_replace_next:w { } { } } \cs_new_eq:NN \__tl_replace_wrap:w ? \cs_new_eq:NN \__tl_replace_next:w ? +\cs_new_protected:Npn \tl_regex_replace_once:Nnn #1#2#3 + { \regex_replace_once:nnN {#2} {#3} #1 } +\cs_generate_variant:Nn \tl_regex_replace_once:Nnn { c } +\cs_new_protected:Npn \tl_regex_replace_once:NNn #1#2#3 + { \regex_replace_once:NnN #2 {#3} #1 } +\cs_generate_variant:Nn \tl_regex_replace_once:NNn { c } +\cs_new_protected:Npn \tl_regex_replace_all:Nnn #1#2#3 + { \regex_replace_all:nnN {#2} {#3} #1 } +\cs_generate_variant:Nn \tl_regex_replace_all:Nnn { c } +\cs_new_protected:Npn \tl_regex_replace_all:NNn #1#2#3 + { \regex_replace_all:NnN #2 {#3} #1 } +\cs_generate_variant:Nn \tl_regex_replace_all:NNn { c } +\group_begin: + \cs_set_protected:Npn \__tl_tmp:w #1#2#3 + { + \cs_new_protected:cpe { tl_regex_greplace_ #1 :N #2 n } ##1##2##3 + { + \group_begin: + \tl_set_eq:NN \exp_not:N \l__tl_internal_a_tl ##1 + \exp_not:c { regex_replace_ #1 :Nn #2 } + #3 {##2} {##3} \exp_not:N \l__tl_internal_a_tl + \tl_gset_eq:NN ##1 \exp_not:N \l__tl_internal_a_tl + \group_end: + } + \cs_generate_variant:cn { tl_regex_greplace_ #1 :N #2 n } { c } + } + \__tl_tmp:w { once } n { } + \__tl_tmp:w { once } N \use:n + \__tl_tmp:w { all } n { } + \__tl_tmp:w { all } N \use:n +\group_end: \cs_new_protected:Npn \tl_remove_once:Nn #1#2 { \tl_replace_once:Nnn #1 {#2} { } } \cs_new_protected:Npn \tl_gremove_once:Nn #1#2 @@ -4016,6 +4047,20 @@ \prg_return_false: \fi: } +\prg_new_protected_conditional:Npnn \tl_if_regex_match:nn #1#2 { TF , T , F } + { + \regex_match:nnTF {#2} {#1} + \prg_return_true: \prg_return_false: + } +\prg_generate_conditional_variant:Nnn \tl_if_regex_match:nn + { V } { TF , T , F } +\prg_new_protected_conditional:Npnn \tl_if_regex_match:nN #1#2 { TF , T , F } + { + \regex_match:nNTF {#2} #1 + \prg_return_true: \prg_return_false: + } +\prg_generate_conditional_variant:Nnn \tl_if_regex_match:nN + { V } { TF , T , F } \cs_new:Npn \tl_map_function:nN #1#2 { \__tl_map_function:Nnnnnnnnn #2 #1 @@ -5619,6 +5664,45 @@ #1 #2 { #3 } \__seq_pop_item_def: } +\cs_new_protected:Npn \seq_set_regex_extract_once:Nnn #1#2#3 + { \regex_extract_once:nnN {#2} {#3} #1 } +\cs_generate_variant:Nn \seq_set_regex_extract_once:Nnn { c } +\cs_new_protected:Npn \seq_set_regex_extract_once:NNn #1#2#3 + { \regex_extract_once:NnN #2 {#3} #1 } +\cs_generate_variant:Nn \seq_set_regex_extract_once:NNn { c } +\cs_new_protected:Npn \seq_set_regex_extract_all:Nnn #1#2#3 + { \regex_extract_all:nnN {#2} {#3} #1 } +\cs_generate_variant:Nn \seq_set_regex_extract_all:Nnn { c } +\cs_new_protected:Npn \seq_set_regex_extract_all:NNn #1#2#3 + { \regex_extract_all:NnN #2 {#3} #1 } +\cs_generate_variant:Nn \seq_set_regex_extract_all:NNn { c } +\cs_new_protected:Npn \seq_set_regex_split:Nnn #1#2#3 + { \regex_split:nnN {#2} {#3} #1 } +\cs_generate_variant:Nn \seq_set_regex_split:Nnn { c } +\cs_new_protected:Npn \seq_set_regex_split:NNn #1#2#3 + { \regex_split:NnN #2 {#3} #1 } +\cs_generate_variant:Nn \seq_set_regex_split:NNn { c } +\group_begin: + \cs_set_protected:Npn \__seq_tmp:w #1#2#3 + { + \cs_new_protected:cpe { seq_gset_regex_ #1 :N #2 n } ##1##2##3 + { + \group_begin: + \seq_set_eq:NN \exp_not:N \l__seq_tmp_seq ##1 + \exp_not:c { regex_ #1 :Nn #2 } + #3 {##2} {##3} \exp_not:N \l__seq_tmp_seq + \seq_gset_eq:NN ##1 \exp_not:N \l__seq_tmp_seq + \group_end: + } + \cs_generate_variant:cn { seq_gset_regex_ #1 :N #2 n } { c } + } + \__seq_tmp:w { extract_once } n { } + \__seq_tmp:w { extract_once } N \use:n + \__seq_tmp:w { extract_all } n { } + \__seq_tmp:w { extract_all } N \use:n + \__seq_tmp:w { split } n { } + \__seq_tmp:w { split } N \use:n +\group_end: \cs_new_protected:Npn \seq_concat:NNN #1#2#3 { \tl_set:Nf #1 { \exp_after:wN \use_i:nn \exp_after:wN #2 #3 } } \cs_new_protected:Npn \seq_gconcat:NNN #1#2#3 @@ -5659,20 +5743,20 @@ \cs_generate_variant:Nn \seq_gput_right:Nn { NV , Nv , Ne , No , Nx } \cs_generate_variant:Nn \seq_gput_right:Nn { c , cV , cv , ce , co , cx } \cs_new:Npn \__seq_wrap_item:n #1 { \exp_not:n { \__seq_item:n {#1} } } -\seq_new:N \l__seq_remove_seq +\seq_new:N \l__seq_tmp_seq \cs_new_protected:Npn \seq_remove_duplicates:N { \__seq_remove_duplicates:NN \seq_set_eq:NN } \cs_new_protected:Npn \seq_gremove_duplicates:N { \__seq_remove_duplicates:NN \seq_gset_eq:NN } \cs_new_protected:Npn \__seq_remove_duplicates:NN #1#2 { - \seq_clear:N \l__seq_remove_seq + \seq_clear:N \l__seq_tmp_seq \seq_map_inline:Nn #2 { - \seq_if_in:NnF \l__seq_remove_seq {##1} - { \seq_put_right:Nn \l__seq_remove_seq {##1} } + \seq_if_in:NnF \l__seq_tmp_seq {##1} + { \seq_put_right:Nn \l__seq_tmp_seq {##1} } } - #1 #2 \l__seq_remove_seq + #1 #2 \l__seq_tmp_seq } \cs_generate_variant:Nn \seq_remove_duplicates:N { c } \cs_generate_variant:Nn \seq_gremove_duplicates:N { c } @@ -6470,6 +6554,30 @@ { \tex_global:D #1 = \__int_eval:w #2 \__int_eval_end: } \cs_generate_variant:Nn \int_set:Nn { NV , c , cV } \cs_generate_variant:Nn \int_gset:Nn { NV , c , cV } +\cs_new_protected:Npn \int_set_regex_count:Nnn #1#2#3 + { \regex_count:nnN {#2} {#3} #1 } +\cs_generate_variant:Nn \int_set_regex_count:Nnn { c } +\cs_new_protected:Npn \int_gset_regex_count:Nnn #1#2#3 + { + \group_begin: + \int_set_eq:NN \l__int_internal_a_int #1 + \regex_count:nnN {#2} {#3} \l__int_internal_a_int + \int_gset_eq:NN #1 \l__int_internal_a_int + \group_end: + } +\cs_generate_variant:Nn \int_gset_regex_count:Nnn { c } +\cs_new_protected:Npn \int_set_regex_count:NNn #1#2#3 + { \regex_count:NnN #2 {#3} #1 } +\cs_generate_variant:Nn \int_set_regex_count:Nnn { c } +\cs_new_protected:Npn \int_gset_regex_count:NNn #1#2#3 + { + \group_begin: + \int_set_eq:NN \l__int_internal_a_int #1 + \regex_count:NnN #2 {#3} \l__int_internal_a_int + \int_gset_eq:NN #1 \l__int_internal_a_int + \group_end: + } +\cs_generate_variant:Nn \int_gset_regex_count:NNn { c } \cs_new_eq:NN \int_use:N \tex_the:D \cs_new:Npn \int_use:c #1 { \tex_the:D \cs:w #1 \cs_end: } \cs_new_protected:Npn \__int_compare_error: @@ -7582,6 +7690,9 @@ \__sys_const:nn { sys_if_engine_ #1 } { \str_if_eq_p:Vn \c_sys_engine_str {#1} } } +\__sys_const:nn + { sys_if_engine_opentype } + { \cs_if_exist_p:N \tex_Umathcode:D } \group_begin: \cs_set_eq:NN \lua_now:e \tex_directlua:D \str_const:Ne \c_sys_engine_exec_str @@ -8638,6 +8749,8 @@ \cs_new:Npn \clist_use:Nn #1#2 { \clist_use:Nnnn #1 {#2} {#2} {#2} } \cs_generate_variant:Nn \clist_use:Nn { c } +\cs_new_eq:NN \clist_use:N \tl_use:N +\cs_generate_variant:Nn \clist_use:N { c } \cs_new:Npn \clist_use:nnnn #1#2#3#4 { \__clist_use:Nw \__clist_use_none_delimit_by_s_stop:w @@ -9072,7 +9185,7 @@ \group_end: \group_begin: \char_set_catcode_active:N \* - \tl_const:Nn \c_catcode_active_tl { \exp_not:N * } + \tl_const:Nn \c__token_active_tl { \exp_not:N * } \group_end: \prg_new_conditional:Npnn \token_if_group_begin:N #1 { p , T , F , TF } { @@ -9130,7 +9243,7 @@ } \prg_new_conditional:Npnn \token_if_active:N #1 { p , T , F , TF } { - \if_catcode:w \exp_not:N #1 \c_catcode_active_tl + \if_catcode:w \exp_not:N #1 \c__token_active_tl \prg_return_true: \else: \prg_return_false: \fi: } \prg_new_eq_conditional:NNn \token_if_eq_meaning:NN \cs_if_eq:NN @@ -9932,7 +10045,7 @@ \exp_after:wN { \tl_to_str:n {#2} } } } - { \exp_after:wN \__prop_get_linked:w #1 {#2} \use:n { } { } } + { \exp_after:wN \__prop_get_linked:w #1 {#2} \exp_not:n { } { } } } \cs_new:Npn \__prop_item:nnn #1#2#3 { @@ -22285,6 +22398,8 @@ } \cs_generate_variant:Nn \bitset_to_arabic:N { c } \cs_generate_variant:Nn \bitset_to_bin:N { c } +\cs_new_eq:NN \bitset_use:N \tl_use:N +\cs_generate_variant:Nn \bitset_use:N { c } \cs_new:Npn \bitset_item:Nn #1#2 { \prop_if_in:cnTF { g__bitset_ \cs_to_str:N #1 _name_prop } {#2} @@ -22667,8 +22782,7 @@ \group_begin: \int_set:Nn \tex_endlinechar:D { 32 } \char_set_catcode_invalid:n { 0 } - \bool_lazy_or:nnTF - { \sys_if_engine_xetex_p: } { \sys_if_engine_luatex_p: } + \sys_if_engine_opentype:TF { \int_step_function:nN { 31 } \char_set_catcode_invalid:n } { \int_step_function:nN { 31 } \char_set_catcode_active:n } \int_step_function:nnN { 33 } { 64 } \char_set_catcode_other:n @@ -22693,8 +22807,7 @@ \char_set_catcode_group_end:n { 125 } % right brace \char_set_catcode_space:n { 126 } % tilde \char_set_catcode_invalid:n { 127 } % ^^? - \bool_lazy_or:nnF - { \sys_if_engine_xetex_p: } { \sys_if_engine_luatex_p: } + \sys_if_engine_opentype:F { \int_step_function:nnN { 128 } { 255 } \char_set_catcode_active:n } \__cctab_gset:n { \c_code_cctab } \group_end: @@ -24473,9 +24586,7 @@ \exp_args:Ne \tl_to_str:n { \str_map_function:nN {#1} \__str_convert_pdfname:n } } -\bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\sys_if_engine_opentype:TF { \cs_new:Npn \__str_convert_pdfname:n #1 { @@ -33360,9 +33471,7 @@ \prop_gput:Nnn \g_msg_module_name_prop { luatex } { LaTeX } \prop_gput:Nnn \g_msg_module_type_prop { luatex } { } %% File: l3unicode.dtx -\bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\sys_if_engine_opentype:TF { \cs_new:Npn \codepoint_str_generate:n #1 { @@ -33540,9 +33649,7 @@ { \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: } +\sys_if_engine_opentype:F { \cs_gset:Npn \__codepoint_to_nfd:n #1 { @@ -34130,9 +34237,7 @@ } { \prg_return_false: } } -\bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\sys_if_engine_opentype:TF { \cs_new:Npn \__text_codepoint_process:nN #1#2 { #1 {#2} } } @@ -34170,9 +34275,7 @@ \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: } - { \sys_if_engine_xetex_p: } +\sys_if_engine_opentype:TF { \prg_new_conditional:Npnn \__text_codepoint_compare:nNn #1#2#3 { TF , p } @@ -35164,9 +35267,7 @@ } } } -\bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\sys_if_engine_opentype:TF { \cs_new:Npn \__text_change_case_catcode:nn #1#2 { \__text_char_catcode:N #1 } @@ -36280,9 +36381,7 @@ } } } -\bool_lazy_or:nnF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\sys_if_engine_opentype:F { \text_declare_uppercase_mapping:nn { "01F0 } { \v { J } } } diff --git a/texmf/tex/latex/l3kernel/expl3-generic.tex b/texmf/tex/latex/l3kernel/expl3-generic.tex index c0871d0da..3e221f842 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{2024-11-02}% +\def\ExplFileDate{2024-12-09}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 diff --git a/texmf/tex/latex/l3kernel/expl3.ltx b/texmf/tex/latex/l3kernel/expl3.ltx index 3eb3a3d63..704ecfd2f 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{2024-11-02}% +\def\ExplFileDate{2024-12-09}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 diff --git a/texmf/tex/latex/l3kernel/expl3.sty b/texmf/tex/latex/l3kernel/expl3.sty index 15c04cee8..aa6217f3f 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{2024-11-02}% +\def\ExplFileDate{2024-12-09}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% diff --git a/texmf/tex/latex/l3kernel/l3debug.def b/texmf/tex/latex/l3kernel/l3debug.def index 78d830462..6361b7c36 100644 --- a/texmf/tex/latex/l3kernel/l3debug.def +++ b/texmf/tex/latex/l3kernel/l3debug.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: l3debug.dtx -\ProvidesExplFile{l3debug.def}{2024-11-02}{}{L3 Debugging support} +\ProvidesExplFile{l3debug.def}{2024-12-09}{}{L3 Debugging support} \scan_new:N \s__debug_stop \cs_new:Npn \__debug_use_i_delimit_by_s_stop:nw #1 #2 \s__debug_stop {#1} \quark_new:N \q__debug_recursion_tail diff --git a/texmf/tex/latex/l3kernel/l3doc.cls b/texmf/tex/latex/l3kernel/l3doc.cls index 8edacf2f0..33d0a1c40 100644 --- a/texmf/tex/latex/l3kernel/l3doc.cls +++ b/texmf/tex/latex/l3kernel/l3doc.cls @@ -20,7 +20,7 @@ %% %% File: l3doc.dtx \RequirePackage{calc} -\ProvidesExplClass{l3doc}{2024-11-02}{} +\ProvidesExplClass{l3doc}{2024-12-09}{} {L3 Experimental documentation class} \clist_new:N \g_docinput_clist \seq_new:N \g_doc_functions_seq @@ -439,8 +439,7 @@ \raggedbottom \bool_if:NT \g__codedoc_lmodern_bool { - \bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: }{ \sys_if_engine_xetex_p: } + \sys_if_engine_opentype:TF { \group_begin: \ttfamily @@ -1720,7 +1719,7 @@ \AddToHook{env/variable/begin}{\def\footnote{\__codedoc_fn_footnote:nn{variable}}} \newenvironment{TemplateInterfaceDescription}[1] { - \subsection{The~object~type~`#1'} + \subsection{The~template~type~`#1'} \begingroup \@beginparpenalty\@M \description @@ -1736,7 +1735,7 @@ } \newenvironment{TemplateDescription}[2] { - \subsection{The~template~`#2'~(object~type~#1)} + \subsection{The~template~`#2'~(template~type~#1)} \subsubsection*{Attributes:} \begingroup \@beginparpenalty\@M