diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel')
4 files changed, 86 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index be777b6ab07..3a967c71daa 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -70,7 +70,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2021-05-07}% +\def\ExplFileDate{2021-05-11}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -7303,8 +7303,11 @@ { \if_mode_inner: \prg_return_true: \else: \prg_return_false: \fi: } \prg_new_conditional:Npnn \mode_if_math: { p , T , F , TF } { \if_mode_math: \prg_return_true: \else: \prg_return_false: \fi: } +\group_begin: +\tex_catcode:D `\^^@ = 2 \exp_stop_f: \cs_new:Npn \group_align_safe_begin: - { \if_int_compare:w \if_false: { \fi: `} = \c_zero_int \fi: } + { \exp:w \if_false: { \fi: `^^@ \exp_stop_f: } +\group_end: \cs_new:Npn \group_align_safe_end: { \if_int_compare:w `{ = \c_zero_int } \fi: } \int_new:N \g__kernel_prg_map_int @@ -7710,6 +7713,7 @@ \tl_new:N \l__clist_internal_clist \scan_new:N \s__clist_mark \scan_new:N \s__clist_stop +\cs_new:Npn \__clist_use_none_delimit_by_s_mark:w #1 \s__clist_mark { } \cs_new:Npn \__clist_use_none_delimit_by_s_stop:w #1 \s__clist_stop { } \cs_new:Npn \__clist_use_i_delimit_by_s_stop:nw #1 #2 \s__clist_stop {#1} \quark_new:N \q__clist_recursion_tail @@ -8232,6 +8236,39 @@ \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:Npn \clist_use:nnnn #1#2#3#4 + { + \__clist_use:Nw \__clist_use_none_delimit_by_s_stop:w + \__clist_use:Nw \__clist_use_one:w + \__clist_use:Nw \__clist_use_end:w + \__clist_use_more:w ; + {#2} {#3} {#4} ; + \prg_do_nothing: #1 , \s__clist_mark , + \s__clist_stop + } +\cs_new:Npn \__clist_use:Nw #1#2 ; #3 ; #4 , + { + \tl_if_empty:oTF { \use_none:nn #4 ? } + { \__clist_use:Nw #1#2 ; } + { + \__clist_use_none_delimit_by_s_mark:w #4 #1 \s__clist_mark + \tl_trim_spaces_apply:oN {#4} \__clist_use_ii_i:nn + \__clist_map_unbrace:wn , { #2 ; } + } + #3 ; \prg_do_nothing: + } +\cs_new:Npn \__clist_use_one:w \s__clist_mark #1 , #2#3#4 \s__clist_stop + { \exp_not:n {#3} } +\cs_new:Npn \__clist_use_end:w + \s__clist_mark #1 , #2#3#4#5#6 \s__clist_stop + { \exp_not:n { #4 #5 #3 } } +\cs_new:Npn \__clist_use_more:w ; #1#2#3#4#5#6 ; + { + \exp_not:n { #3 #5 } + \__clist_use:Nw \__clist_use_end:w \__clist_use_more:w ; + {#1} {#2} {#6} {#5} {#6} ; + } +\cs_new:Npn \clist_use:nn #1#2 { \clist_use:nnnn {#1} {#2} {#2} {#2} } \cs_new:Npn \clist_item:Nn #1#2 { \__clist_item:ffoN @@ -12655,7 +12692,10 @@ \cs_set_protected:Npn \__keyval_tmp:NN #1#2 { \cs_new:Npn \keyval_parse:nnn ##1 ##2 ##3 - { \__keyval_loop_active:nnw {##1} {##2} \s__keyval_mark ##3 #1 \s__keyval_tail #1 } + { + \group_align_safe_begin: + \__keyval_loop_active:nnw {##1} {##2} \s__keyval_mark ##3 #1 \s__keyval_tail #1 + } \cs_new_eq:NN \keyval_parse:NNn \keyval_parse:nnn \cs_new:Npn \__keyval_loop_active:nnw ##1 ##2 ##3 #1 { @@ -12764,7 +12804,7 @@ \cs_new:Npn \__keyval_end_loop_active:w \s__keyval_tail \__keyval_loop_other:nnw ##1 \s__keyval_mark \s__keyval_tail , \s__keyval_tail , - { } + { \group_align_safe_end: } } \char_set_catcode_active:n { `\, } \char_set_catcode_active:n { `\= } @@ -12774,14 +12814,18 @@ { \__keyval_if_blank:w \s__keyval_mark #2 \s__keyval_nil \s__keyval_stop \__keyval_blank_key_error:w \s__keyval_mark \s__keyval_stop + \group_align_safe_end: \exp_not:n { #4 { #2 } { #1 } } + \group_align_safe_begin: \__keyval_loop_other:nnw {#3} {#4} } \cs_new:Npn \__keyval_key:nn #1 #2 { \__keyval_if_blank:w \s__keyval_mark #1 \s__keyval_nil \s__keyval_stop \__keyval_blank_key_error:w \s__keyval_mark \s__keyval_stop + \group_align_safe_end: \exp_not:n { #2 { #1 } } + \group_align_safe_begin: \__keyval_loop_other:nnw {#2} } \cs_new:Npn \__keyval_if_empty:w #1 \s__keyval_mark \s__keyval_stop { } @@ -12789,7 +12833,8 @@ \cs_new:Npn \__keyval_if_recursion_tail:w \s__keyval_mark #1 \s__keyval_tail { } \cs_new:Npn \__keyval_blank_true:w \s__keyval_mark \s__keyval_stop \__keyval_trim:nN #1 \__keyval_key:nn { \__keyval_loop_other:nnw } -\cs_new:Npn \__keyval_blank_key_error:w \s__keyval_mark \s__keyval_stop \exp_not:n #1 +\cs_new:Npn \__keyval_blank_key_error:w + \s__keyval_mark \s__keyval_stop \group_align_safe_end: \exp_not:n #1 { \__kernel_msg_expandable_error:nn { keyval } { blank-key-name } @@ -20723,6 +20768,22 @@ { \__kernel_msg_error:nn { cctab } { missing-end } } } } +\cs_new:Npn \cctab_item:Nn #1#2 + { \exp_args:Nf \__cctab_item:nN { \int_eval:n {#2} } #1 } +\sys_if_engine_luatex:TF + { + \cs_new:Npn \__cctab_item:nN #1#2 + { \lua_now:e { tex.print(-2, tex.getcatcode(\int_use:N #2, #1)) } } + } + { + \cs_new:Npn \__cctab_item:nN #1#2 + { + \int_compare:nNnTF {#1} < { 256 } + { \intarray_item:Nn #2 { #1 + 1 } } + { \char_value_catcode:n {#1} } + } + } +\cs_generate_variant:Nn \cctab_item:Nn { c } \prg_new_eq_conditional:NNn \cctab_if_exist:N \cs_if_exist:N { TF , T , F , p } \prg_new_eq_conditional:NNn \cctab_if_exist:c \cs_if_exist:c @@ -25864,17 +25925,21 @@ { \tl_build_put_right:Nn \l__regex_build_tl } \cs_new_protected:Npn \__regex_replacement_normal:n #1 { - \tl_if_empty:NTF \l__regex_replacement_category_tl - { \__regex_replacement_normal_aux:N #1 } - { % ( - \token_if_eq_charcode:NNTF #1 ) - { - \seq_pop:NN \l__regex_replacement_category_seq - \l__regex_replacement_category_tl - } - { - \use:c { __regex_replacement_c_ \l__regex_replacement_category_tl :w } - ? #1 + \int_compare:nNnTF { \l__regex_replacement_csnames_int } > 0 + { \exp_args:No \__regex_replacement_put:n { \token_to_str:N #1 } } + { + \tl_if_empty:NTF \l__regex_replacement_category_tl + { \__regex_replacement_normal_aux:N #1 } + { % ( + \token_if_eq_charcode:NNTF #1 ) + { + \seq_pop:NN \l__regex_replacement_category_seq + \l__regex_replacement_category_tl + } + { + \use:c { __regex_replacement_c_ \l__regex_replacement_category_tl :w } + ? #1 + } } } } diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index 76f651b6d5c..1652be55250 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex +++ b/Master/texmf-dist/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{2021-05-07}% +\def\ExplFileDate{2021-05-11}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 @@ -93,6 +93,8 @@ \tex_input:D #1 .def \scan_stop: } \sys_everyjob: +\bool_new:N \g__kernel_backend_header_bool +\bool_gset_true:N \g__kernel_backend_header_bool \sys_load_backend:n { } \ExplSyntaxOff \l@expl@tidy@tl diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx b/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx index 48e75787828..b1ec76b53f3 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2021-05-07}% +\def\ExplFileDate{2021-05-11}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index f83cbbea278..d78fd024f70 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2021-05-07}% +\def\ExplFileDate{2021-05-11}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% |