diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex | 1095 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3.ltx | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3debug.def | 28 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3doc.cls | 40 |
6 files changed, 850 insertions, 319 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index 2265d35488d..0f14a42eb44 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/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-01-22}% +\def\ExplFileDate{2024-02-13}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -1878,75 +1878,133 @@ Type H <return> for immediate help}\def~{\errmessage{% \prg_set_conditional:Npnn \cs_if_exist:N #1 { p , T , F , TF } { \if_meaning:w #1 \scan_stop: - \prg_return_false: + \use_i:nnnn \else: - \if_cs_exist:N #1 - \prg_return_true: - \else: - \prg_return_false: - \fi: \fi: - } -\prg_set_conditional:Npnn \cs_if_exist:c #1 { p , T , F , TF } - { - \if_cs_exist:w #1 \cs_end: - \exp_after:wN \use_i:nn + \if_cs_exist:N #1 + \prg_return_true: \else: - \exp_after:wN \use_ii:nn + \prg_return_false: \fi: - { - \exp_after:wN \if_meaning:w \cs:w #1 \cs_end: \scan_stop: - \prg_return_false: - \else: - \prg_return_true: - \fi: - } - \prg_return_false: + } +\cs_if_exist:NTF \tex_lastnamedcs:D + { + \prg_set_conditional:Npnn \cs_if_exist:c #1 { p , T , F , TF } + { + \if_cs_exist:w #1 \cs_end: + \__cs_if_exist_c_aux: + \prg_return_true: + \else: + \prg_return_false: + \fi: + } + \cs_set:Npn \__cs_if_exist_c_aux: + { \fi: \exp_after:wN \if_meaning:w \tex_lastnamedcs:D \scan_stop: \else: } + } + { + \prg_set_conditional:Npnn \cs_if_exist:c #1 { p , T , F , TF } + { + \if_cs_exist:w #1 \cs_end: + \__cs_if_exist_c_aux:w + \fi: + \use_none:n {#1} + \if_false: + \prg_return_true: + \else: + \prg_return_false: + \fi: + } + \cs_set:Npn \__cs_if_exist_c_aux:w \fi: \use_none:n #1 \if_false: + { \fi: \exp_after:wN \if_meaning:w \cs:w #1 \cs_end: \scan_stop: \else: } } \prg_set_conditional:Npnn \cs_if_free:N #1 { p , T , F , TF } { + \if_cs_exist:N #1 + \else: + \use_none:nnnn + \fi: \if_meaning:w #1 \scan_stop: \prg_return_true: \else: - \if_cs_exist:N #1 - \prg_return_false: - \else: - \prg_return_true: - \fi: + \prg_return_false: \fi: } -\prg_set_conditional:Npnn \cs_if_free:c #1 { p , T , F , TF } +\cs_if_exist:NTF \tex_lastnamedcs:D { - \if_cs_exist:w #1 \cs_end: - \exp_after:wN \use_i:nn - \else: - \exp_after:wN \use_ii:nn - \fi: + \prg_set_conditional:Npnn \cs_if_free:c #1 { p , T , F , TF } { - \exp_after:wN \if_meaning:w \cs:w #1 \cs_end: \scan_stop: + \if_cs_exist:w #1 \cs_end: + \__cs_if_free_c_aux:w + \fi: + \if_true: \prg_return_true: \else: \prg_return_false: \fi: } - { \prg_return_true: } + \cs_set:Npn \__cs_if_free_c_aux:w \fi: \if_true: + { \fi: \exp_after:wN \if_meaning:w \tex_lastnamedcs:D \scan_stop: } + } + { + \prg_set_conditional:Npnn \cs_if_free:c #1 { p , T , F , TF } + { + \if_cs_exist:w #1 \cs_end: + \__cs_if_free_c_aux:w + \fi: + \use_none:n {#1} + \if_true: + \prg_return_true: + \else: + \prg_return_false: + \fi: + } + \cs_set:Npn \__cs_if_free_c_aux:w \fi: \use_none:n #1 \if_true: + { \fi: \exp_after:wN \if_meaning:w \cs:w #1 \cs_end: \scan_stop: } } \cs_set:Npn \cs_if_exist_use:NTF #1#2 { \cs_if_exist:NTF #1 { #1 #2 } } \cs_set:Npn \cs_if_exist_use:NF #1 - { \cs_if_exist:NTF #1 { #1 } } + { \cs_if_exist:NTF #1 #1 } \cs_set:Npn \cs_if_exist_use:NT #1 #2 - { \cs_if_exist:NTF #1 { #1 #2 } { } } + { \cs_if_exist:NT #1 { #1 #2 } } \cs_set:Npn \cs_if_exist_use:N #1 - { \cs_if_exist:NTF #1 { #1 } { } } -\cs_set:Npn \cs_if_exist_use:cTF #1#2 - { \cs_if_exist:cTF {#1} { \use:c {#1} #2 } } + { \cs_if_exist:NT #1 #1 } +\cs_if_exist:NTF \tex_lastnamedcs:D + { + \cs_set:Npn \cs_if_exist_use:cTF #1 + { + \if_cs_exist:w #1 \cs_end: + \__cs_if_exist_use_aux:w + \fi: + \use_ii:nn + } + \cs_set:Npn \__cs_if_exist_use_aux:w \fi: \use_ii:nn + { \fi: \exp_after:wN \__cs_if_exist_use_aux:Nnn \tex_lastnamedcs:D } + } + { + \cs_set:Npn \cs_if_exist_use:cTF #1 + { + \if_cs_exist:w #1 \cs_end: + \__cs_if_exist_use_aux:w + \fi: + \use_iii:nnn {#1} + } + \cs_set:Npn \__cs_if_exist_use_aux:w \fi: \use_iii:nnn #1 + { \fi: \exp_after:wN \__cs_if_exist_use_aux:Nnn \cs:w #1 \cs_end: } + } +\cs_set:Npn \__cs_if_exist_use_aux:Nnn #1#2 + { + \if_meaning:w #1 \scan_stop: + \exp_after:wN \use_iii:nnn + \fi: + \use_i:nn { #1 #2 } + } \cs_set:Npn \cs_if_exist_use:cF #1 - { \cs_if_exist:cTF {#1} { \use:c {#1} } } + { \cs_if_exist_use:cTF {#1} {} } \cs_set:Npn \cs_if_exist_use:cT #1#2 - { \cs_if_exist:cTF {#1} { \use:c {#1} #2 } { } } + { \cs_if_exist_use:cTF {#1} {#2} {} } \cs_set:Npn \cs_if_exist_use:c #1 - { \cs_if_exist:cTF {#1} { \use:c {#1} } { } } + { \cs_if_exist_use:cTF {#1} {} {} } \cs_set_protected:Npn \msg_error:nnee #1#2#3#4 { \tex_newlinechar:D = `\^^J \scan_stop: @@ -2304,7 +2362,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new_protected:Npn \group_show_list: { \__kernel_group_show:NN \use_none:n 1 } \cs_new_protected:Npn \group_log_list: - { \__kernel_group_show:NN \int_zero:N 0 } + { \__kernel_group_show:NN \int_gzero:N 0 } \cs_new_protected:Npn \__kernel_group_show:NN #1#2 { \use:e @@ -2314,7 +2372,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_set:Nn \tex_errorcontextlines:D { -1 } \exp_not:N \exp_after:wN \scan_stop: \tex_showgroups:D - \int_set:Nn \tex_interactionmode:D + \int_gset:Nn \tex_interactionmode:D { \int_use:N \tex_interactionmode:D } \int_set:Nn \tex_tracingonline:D { \int_use:N \tex_tracingonline:D } @@ -2634,6 +2692,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp:w \exp_end_continue_f:w #4 } \cs_new:Npn \exp_last_unbraced:Nno { \::n \::o_unbraced \::: } +\cs_new:Npn \exp_last_unbraced:Nnf { \::n \::f_unbraced \::: } \cs_new:Npn \exp_last_unbraced:Noo { \::o \::o_unbraced \::: } \cs_new:Npn \exp_last_unbraced:Nfo { \::f \::o_unbraced \::: } \cs_new:Npn \exp_last_unbraced:NnNo { \::n \::N \::o_unbraced \::: } @@ -9397,163 +9456,366 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new_protected:Npn \peek_N_type:F { \__peek_token_generic:NNF \__peek_execute_branches_N_type: \scan_stop: } %% File: l3prop.dtx -\scan_new:N \s__prop -\cs_new:Npn \__prop_pair:wn #1 \s__prop #2 - { \msg_expandable_error:nn { prop } { misused } } +\cs_new_eq:NN \__prop_tmp:w ? \tl_new:N \l__prop_internal_tl -\tl_const:Nn \c_empty_prop { \s__prop } \scan_new:N \s__prop_mark \scan_new:N \s__prop_stop \quark_new:N \q__prop_recursion_tail \quark_new:N \q__prop_recursion_stop \__kernel_quark_new_test:N \__prop_if_recursion_tail_stop:n \cs_generate_variant:Nn \__prop_if_recursion_tail_stop:n { o } +\scan_new:N \s__prop +\cs_new_protected:Npn \__prop_chk:w { \__prop_chk_loop:nw { } } +\cs_new_protected:Npn \__prop_chk_loop:nw #1 + { + \peek_meaning:NTF \__prop_pair:wn + { \__prop_chk_get:nw {#1} } + { \msg_error:nne { prop } { misused } {#1} } + } +\cs_new_protected:Npn \__prop_chk_get:nw #1 \__prop_pair:wn #2 \s__prop #3 + { \__prop_chk_loop:nw { #1 , ~ {#2} = { \tl_to_str:n {#3} } } } +\cs_new:Npn \__prop_pair:wn #1 \s__prop #2 { } +\cs_new_protected:Npn \__prop_flatten:w #1 \s__prop #2#3 + { \use:e { \__prop_flatten_aux:N #3 } } +\cs_new:Npn \__prop_flatten:N #1 + { \exp_after:wN \__prop_flatten_aux:w #1 } +\cs_new:Npn \__prop_flatten_aux:w #1 \s__prop #2 { \__prop_flatten_aux:N } +\cs_new:Npn \__prop_flatten_aux:N #1 + { + \s__prop \__prop_chk:w + \exp_after:wN \__prop_flatten_loop:w #1 + \use_none:nnnn \__prop_pair:wn \s__prop { } + } +\cs_new:Npn \__prop_flatten_loop:w #1#2#3 \__prop_pair:wn #4 \s__prop #5 + { + #3 + \exp_not:n { \__prop_pair:wn #4 \s__prop {#5} } + \exp_after:wN \__prop_flatten_loop:w + } +\int_new:N \g__prop_prefix_int +\int_const:Nn \c__prop_basis_int { \c_max_char_int - `\! } +\cs_new_protected:Npn \__prop_next_prefix: + { + \tl_set:Ne \l__prop_internal_tl + { \__prop_to_prefix:n { \g__prop_prefix_int } } + \int_gincr:N \g__prop_prefix_int + } +\cs_new:Npn \__prop_to_prefix:n #1 + { + \int_compare:nNnTF {#1} > \c__prop_basis_int + { + \exp_args:Nf \__prop_to_prefix:n + { \int_div_truncate:nn {#1} \c__prop_basis_int } + \exp_args:Nf \__prop_to_prefix:n + { \int_mod:nn {#1} \c__prop_basis_int } + } + { \char_generate:nn { `\! + #1 } { 12 } } + } +\cs_new:Npn \__prop_if_flat:NTF #1 + { + \exp_after:wN \__prop_if_flat_aux:w #1 + \s__prop_mark \use_ii:nn + \__prop_flatten:w \s__prop_mark \use_i:nn \s__prop_stop + } +\cs_new:Npn \__prop_if_flat_aux:w + #1 \__prop_flatten:w #2 \s__prop_mark #3 #4 \s__prop_stop {#3} +\tl_const:Nn \c_empty_prop { \s__prop \__prop_chk:w } \cs_new_protected:Npn \prop_new:N #1 { \__kernel_chk_if_free_cs:N #1 \cs_gset_eq:NN #1 \c_empty_prop } \cs_generate_variant:Nn \prop_new:N { c } -\cs_new_protected:Npn \prop_clear:N #1 - { \prop_set_eq:NN #1 \c_empty_prop } +\cs_new_protected:Npn \prop_new_linked:N #1 + { + \__kernel_chk_if_free_cs:N #1 + \__prop_new_linked:N #1 + } +\cs_new_protected:Npn \__prop_new_linked:N #1 + { + \__prop_next_prefix: + \cs_gset_nopar:Npe #1 + { + \__prop_flatten:w + \exp_not:c { __prop ~ \l__prop_internal_tl } + \s__prop { \l__prop_internal_tl } + \exp_not:c { __prop ~ \l__prop_internal_tl } + } + \cs_gset_nopar:cpe { __prop ~ \l__prop_internal_tl } + { + \exp_not:N \use_none:n + \exp_not:N #1 + } + } +\cs_generate_variant:Nn \prop_new_linked:N { c } +\cs_new_protected:Npn \prop_clear:N + { \__prop_clear:NNN \cs_set_eq:NN \cs_set_nopar:Npe } \cs_generate_variant:Nn \prop_clear:N { c } -\cs_new_protected:Npn \prop_gclear:N #1 - { \prop_gset_eq:NN #1 \c_empty_prop } +\cs_new_protected:Npn \prop_gclear:N + { \__prop_clear:NNN \cs_gset_eq:NN \cs_gset_nopar:Npe } \cs_generate_variant:Nn \prop_gclear:N { c } +\cs_new_protected:Npn \__prop_clear:NNN #1#2#3 + { + \__prop_if_flat:NTF #3 + { #1 #3 \c_empty_prop } + { \exp_after:wN \__prop_clear:wNNN #3 #1 #2 #3 } + } +\cs_new_protected:Npn \__prop_clear:wNNN + \__prop_flatten:w #1 \s__prop #2#3#4#5#6 + { + \__prop_clear_entries:NN #4 #3 + #5 #6 { \exp_not:n { \__prop_flatten:w #1 \s__prop {#2} #1 } } + #5 #1 { \exp_not:n { \use_none:n #6 } } + } +\cs_new_protected:Npn \__prop_clear_entries:NN #1#2 + { + \exp_after:wN \__prop_clear_loop:Nw \exp_after:wN #1 #2 + \use_none:nnnn \__prop_pair:wn \s__prop { } + } +\cs_new_protected:Npn \__prop_clear_loop:Nw + #1#2#3#4 \__prop_pair:wn #5 \s__prop #6 + { + #1 #3 \tex_undefined:D + #4 + \exp_after:wN \__prop_clear_loop:Nw + \exp_after:wN #1 + } \cs_new_protected:Npn \prop_clear_new:N #1 { \prop_if_exist:NTF #1 { \prop_clear:N #1 } { \prop_new:N #1 } } \cs_generate_variant:Nn \prop_clear_new:N { c } \cs_new_protected:Npn \prop_gclear_new:N #1 { \prop_if_exist:NTF #1 { \prop_gclear:N #1 } { \prop_new:N #1 } } \cs_generate_variant:Nn \prop_gclear_new:N { c } -\cs_new_eq:NN \prop_set_eq:NN \tl_set_eq:NN -\cs_new_eq:NN \prop_set_eq:Nc \tl_set_eq:Nc -\cs_new_eq:NN \prop_set_eq:cN \tl_set_eq:cN -\cs_new_eq:NN \prop_set_eq:cc \tl_set_eq:cc -\cs_new_eq:NN \prop_gset_eq:NN \tl_gset_eq:NN -\cs_new_eq:NN \prop_gset_eq:Nc \tl_gset_eq:Nc -\cs_new_eq:NN \prop_gset_eq:cN \tl_gset_eq:cN -\cs_new_eq:NN \prop_gset_eq:cc \tl_gset_eq:cc +\cs_new_protected:Npn \prop_clear_new_linked:N #1 + { \prop_if_exist:NTF #1 { \prop_clear:N #1 } { \prop_new_linked:N #1 } } +\cs_generate_variant:Nn \prop_clear_new_linked:N { c } +\cs_new_protected:Npn \prop_gclear_new_linked:N #1 + { \prop_if_exist:NTF #1 { \prop_gclear:N #1 } { \prop_new_linked:N #1 } } +\cs_generate_variant:Nn \prop_gclear_new_linked:N { c } +\cs_new_protected:Npn \prop_set_eq:NN + { \__prop_set_eq:NNNN \cs_set_eq:NN \cs_set_nopar:Npe } +\cs_generate_variant:Nn \prop_set_eq:NN { Nc , cN , cc } +\cs_new_protected:Npn \prop_gset_eq:NN + { \__prop_set_eq:NNNN \cs_gset_eq:NN \cs_gset_nopar:Npe } +\cs_generate_variant:Nn \prop_gset_eq:NN { Nc , cN , cc } +\cs_new_protected:Npn \__prop_set_eq:NNNN #1#2#3#4 + { + \cs_if_eq:NNF #3#4 + { + \__prop_if_flat:NTF #3 + { + \__prop_if_flat:NTF #4 + { #1 #3 #4 } + { #2 #3 { \__prop_flatten:N #4 } } + } + { \exp_after:wN \__prop_set_eq:wNNNN #3 #1#2#3#4 } + } + } +\cs_new_protected:Npn \__prop_set_eq:wNNNN + \__prop_flatten:w #1 \s__prop #2#3#4#5#6#7 + { + \__prop_clear_entries:NN #4 #3 + \exp_args:Nf \__prop_set_eq:nNnNN {#7} #1 {#2} #5 #6 + } +\cs_new_protected:Npn \__prop_set_eq:nNnNN #1#2#3#4#5 + { + \use_i:nnn + { + \__prop_set_eq_loop:NNnw #5 #4 {#3} + \__prop_flatten:w #2 \s__prop {#3} + } + #1 + \use_none:n \__prop_pair:wn ? \s__prop + } +\cs_new_protected:Npn \__prop_set_eq_loop:NNnw + #1#2#3#4 \s__prop #5#6 \__prop_pair:wn #7 \s__prop + { + \tl_set:Ne \l__prop_internal_tl { \exp_not:c { __prop ~ #3 #6 ~ #7 } } + #2 #1 { \exp_not:n { #4 \s__prop {#5} } \exp_not:o \l__prop_internal_tl } + \use_none:n #6 \__prop_set_eq_end:w + \exp_after:wN \__prop_set_eq_loop:NNnw \l__prop_internal_tl #2 {#3} + \use_none:n #1 \__prop_pair:wn #7 \s__prop + } +\cs_new_protected:Npn \__prop_set_eq_end:w + \exp_after:wN \__prop_set_eq_loop:NNnw #1#2#3 + \use_none:n #4#5 \s__prop + { + \exp_after:wN #2 \l__prop_internal_tl { \exp_not:n { \use_none:n #4 } } + } +\cs_new_protected:Npn \prop_make_flat:N #1 + { + \int_compare:nNnTF { \tex_currentgrouplevel:D } = 0 + { + \__prop_if_flat:NTF #1 { } + { \exp_args:NNf \__prop_make_flat:Nn #1 {#1} } + } + { + \msg_error:nnee { prop } { inner-make } + { \token_to_str:N \prop_make_flat:N } { \token_to_str:N #1 } + } + } +\cs_generate_variant:Nn \prop_make_flat:N { c } +\cs_new_protected:Npn \__prop_make_flat:Nn #1#2 + { + \exp_after:wN \__prop_clear:wNNN #1 \cs_set_eq:NN \cs_set_nopar:Npe #1 + \cs_set_nopar:Npe #1 { \exp_not:n {#2} } + } +\cs_new_protected:Npn \prop_make_linked:N #1 + { + \int_compare:nNnTF { \tex_currentgrouplevel:D } = 0 + { + \__prop_if_flat:NTF #1 + { \exp_args:NNo \__prop_make_linked:Nn #1 {#1} } { } + } + { + \msg_error:nnee { prop } { inner-make } + { \token_to_str:N \prop_make_linked:N } { \token_to_str:N #1 } + } + } +\cs_generate_variant:Nn \prop_make_linked:N { c } +\cs_new_protected:Npn \__prop_make_linked:Nn #1#2 + { + \__prop_new_linked:N #1 + \tl_set:Nn \l__prop_internal_tl {#2} + \exp_after:wN \__prop_set_eq:wNNNN #1 + \cs_set_eq:NN \cs_set_nopar:Npe #1 \l__prop_internal_tl + } \prop_new:N \l_tmpa_prop \prop_new:N \l_tmpb_prop \prop_new:N \g_tmpa_prop \prop_new:N \g_tmpb_prop -\prop_new:N \l__prop_internal_prop \cs_new_protected:Npn \prop_concat:NNN - { \__prop_concat:NNNN \prop_set_eq:NN } + { \__prop_concat:NNNNN \cs_set_eq:NN \cs_set_nopar:Npe } \cs_generate_variant:Nn \prop_concat:NNN { ccc } \cs_new_protected:Npn \prop_gconcat:NNN - { \__prop_concat:NNNN \prop_gset_eq:NN } + { \__prop_concat:NNNNN \cs_gset_eq:NN \cs_gset_nopar:Npe } \cs_generate_variant:Nn \prop_gconcat:NNN { ccc } -\cs_new_protected:Npn \__prop_concat:NNNN #1#2#3#4 +\cs_new_protected:Npn \__prop_concat:NNNNN #1#2#3#4#5 { - \prop_set_eq:NN \l__prop_internal_prop #3 - \prop_map_inline:Nn #4 { \prop_put:Nnn \l__prop_internal_prop {##1} {##2} } - #1 #2 \l__prop_internal_prop - } -\cs_new_protected:Npn \prop_set_from_keyval:Nn #1 - { - \prop_clear:N #1 - \prop_put_from_keyval:Nn #1 + \cs_if_eq:NNTF #3 #5 + { \__prop_concat:nNNN \use_none:nnn #2 #3 #4 } + { + \__prop_set_eq:NNNN #1 #2 #3 #4 + \__prop_concat:nNNN { } #2 #3 #5 + } } -\cs_generate_variant:Nn \prop_set_from_keyval:Nn { c } -\cs_new_protected:Npn \prop_gset_from_keyval:Nn #1 +\cs_new_protected:Npn \__prop_concat:nNNN #1#2#3#4 { - \prop_gclear:N #1 - \prop_gput_from_keyval:Nn #1 + \cs_gset_eq:NN \__prop_tmp:w \__prop_pair:wn + \cs_gset_protected:Npn \__prop_pair:wn ##1 \s__prop + { \__prop_put:nNNnn {#1} #2 #3 {##1} } + \exp_last_unbraced:Nf \use_none:nn #4 + \cs_gset_eq:NN \__prop_pair:wn \__prop_tmp:w } -\cs_generate_variant:Nn \prop_gset_from_keyval:Nn { c } -\cs_new_protected:Npn \prop_const_from_keyval:Nn #1#2 - { - \prop_set_from_keyval:Nn \l__prop_internal_prop {#2} - \tl_const:Ne #1 { \exp_not:o \l__prop_internal_prop } - \prop_clear:N \l__prop_internal_prop - } -\cs_generate_variant:Nn \prop_const_from_keyval:Nn { c } -\cs_new_protected:Npn \prop_put_from_keyval:Nn +\cs_new_protected:Npn \prop_put_from_keyval:Nn #1 + { \__prop_from_keyval:nn { \__prop_put:nNNnn { } \cs_set_nopar:Npe #1 } } +\cs_generate_variant:Nn \prop_put_from_keyval:Nn { c } +\cs_new_protected:Npn \prop_gput_from_keyval:Nn #1 + { \__prop_from_keyval:nn { \__prop_put:nNNnn { } \cs_gset_nopar:Npe #1 } } +\cs_generate_variant:Nn \prop_gput_from_keyval:Nn { c } +\cs_new_protected:Npn \__prop_from_keyval:nn { \bool_if:NTF \l__kernel_keyval_allow_blank_keys_bool - { \__prop_keyval_parse:NNNn \c_true_bool } - { \__prop_keyval_parse:NNNn \c_false_bool } - \prop_put:Nnn + { \__prop_from_keyval:Nnn \c_true_bool } + { \__prop_from_keyval:Nnn \c_false_bool } } -\cs_generate_variant:Nn \prop_put_from_keyval:Nn { c } -\cs_new_protected:Npn \prop_gput_from_keyval:Nn +\cs_new_protected:Npn \__prop_from_keyval:Nnn #1#2#3 { - \bool_if:NTF \l__kernel_keyval_allow_blank_keys_bool - { \__prop_keyval_parse:NNNn \c_true_bool } - { \__prop_keyval_parse:NNNn \c_false_bool } - \prop_gput:Nnn + \bool_set_eq:NN \l__kernel_keyval_allow_blank_keys_bool \c_true_bool + \keyval_parse:nnn \__prop_missing_eq:n {#2} {#3} + \bool_set_eq:NN \l__kernel_keyval_allow_blank_keys_bool #1 } -\cs_generate_variant:Nn \prop_gput_from_keyval:Nn { c } \cs_new_protected:Npn \__prop_missing_eq:n { \msg_error:nnn { prop } { prop-keyval } } -\cs_new_protected:Npn \__prop_keyval_parse:NNNn #1#2#3#4 +\cs_new_protected:Npn \prop_set_from_keyval:Nn #1 { - \bool_set_eq:NN \l__kernel_keyval_allow_blank_keys_bool \c_true_bool - \keyval_parse:nnn \__prop_missing_eq:n { #2 #3 } {#4} - \bool_set_eq:NN \l__kernel_keyval_allow_blank_keys_bool #1 + \__prop_clear:NNN \cs_set_eq:NN \cs_set_nopar:Npe #1 + \prop_put_from_keyval:Nn #1 } -\cs_new_protected:Npn \__prop_split:NnTF #1#2 - { \exp_args:NNo \__prop_split_aux:NnTF #1 { \tl_to_str:n {#2} } } -\cs_new_protected:Npn \__prop_split_aux:NnTF #1#2#3#4 +\cs_generate_variant:Nn \prop_set_from_keyval:Nn { c } +\cs_new_protected:Npn \prop_gset_from_keyval:Nn #1 { - \cs_set:Npn \__prop_split_aux:w ##1 - \__prop_pair:wn #2 \s__prop ##2 ##3 \s__prop_mark ##4 ##5 \s__prop_stop - { ##4 {#3} {#4} } - \exp_after:wN \__prop_split_aux:w #1 \s__prop_mark \use_i:nn - \__prop_pair:wn #2 \s__prop { } \s__prop_mark \use_ii:nn \s__prop_stop + \__prop_clear:NNN \cs_gset_eq:NN \cs_gset_nopar:Npe #1 + \prop_gput_from_keyval:Nn #1 } -\cs_new:Npn \__prop_split_aux:w { } -\cs_new_protected:Npn \prop_remove:Nn #1#2 +\cs_generate_variant:Nn \prop_gset_from_keyval:Nn { c } +\cs_new_protected:Npn \prop_const_from_keyval:Nn #1 { - \__prop_split:NnTF #1 {#2} - { \tl_set:Nn #1 { ##1 ##3 } } - { } + \prop_new:N #1 + \__prop_from_keyval:nn { \__prop_put:nNNnn { } \cs_gset_nopar:Npe #1 } } -\cs_new_protected:Npn \prop_gremove:Nn #1#2 +\cs_generate_variant:Nn \prop_const_from_keyval:Nn { c } +\cs_new_protected:Npn \prop_const_linked_from_keyval:Nn #1 { - \__prop_split:NnTF #1 {#2} - { \tl_gset:Nn #1 { ##1 ##3 } } - { } + \prop_new_linked:N #1 + \__prop_from_keyval:nn { \__prop_put:nNNnn { } \cs_gset_nopar:Npe #1 } + } +\cs_generate_variant:Nn \prop_const_linked_from_keyval:Nn { c } +\cs_new_protected:Npn \__prop_split:NnTFn #1#2 + { \exp_args:NNo \__prop_split_aux:NnTFn #1 { \tl_to_str:n {#2} } } +\cs_new_protected:Npn \__prop_split_aux:NnTFn #1#2#3 + { + \cs_set:Npn \__prop_split_aux:w ##1 \__prop_chk:w ##2 + \__prop_pair:wn #2 \s__prop ##3 ##4 \s__prop_mark ##5 ##6 \s__prop_stop + { ##5 {#3} } + \exp_after:wN \__prop_split_aux:w #1 \s__prop_mark \use_i:nnn + \__prop_pair:wn #2 \s__prop { } \s__prop_mark \use_ii:nnn + \__prop_chk:w + \__prop_pair:wn #2 \s__prop { } \s__prop_mark \use_iii:nnn + \s__prop_stop } -\cs_generate_variant:Nn \prop_remove:Nn { NV , Ne , c , cV , ce } -\cs_generate_variant:Nn \prop_gremove:Nn { NV , Ne , c , cV , ce } \cs_new_protected:Npn \prop_get:NnN #1#2#3 { - \__prop_split:NnTF #1 {#2} - { \tl_set:Nn #3 {##2} } - { \tl_set:Nn #3 { \q_no_value } } + \__prop_get:NnnTF #1 {#2} + { \tl_set:Nn #3 } { } { \tl_set:Nn #3 { \q_no_value } } } \cs_generate_variant:Nn \prop_get:NnN { NV , Nv , Ne , c , cV , cv , ce } \cs_generate_variant:Nn \prop_get:NnN { No , Nx , co , cx } \cs_generate_variant:Nn \prop_get:NnN { cnc } -\cs_new_protected:Npn \prop_pop:NnN #1#2#3 +\prg_new_protected_conditional:Npnn \prop_get:NnN #1#2#3 { T , F , TF } { - \__prop_split:NnTF #1 {#2} - { - \tl_set:Nn #3 {##2} - \tl_set:Nn #1 { ##1 ##3 } - } - { \tl_set:Nn #3 { \q_no_value } } + \__prop_get:NnnTF #1 {#2} + { \tl_set:Nn #3 } \prg_return_true: \prg_return_false: } -\cs_new_protected:Npn \prop_gpop:NnN #1#2#3 +\prg_generate_conditional_variant:Nnn \prop_get:NnN + { NV , Nv , Ne , c , cV , cv , ce } { T , F , TF } +\prg_generate_conditional_variant:Nnn \prop_get:NnN + { No , Nx , co , cx } { T , F , TF } +\prg_generate_conditional_variant:Nnn \prop_get:NnN + { cnc } { T , F , TF } +\cs_new_protected:Npn \__prop_get:NnnTF #1#2#3#4#5 { - \__prop_split:NnTF #1 {#2} - { - \tl_set:Nn #3 {##2} - \tl_gset:Nn #1 { ##1 ##3 } - } - { \tl_set:Nn #3 { \q_no_value } } + \__prop_split:NnTFn #1 {#2} + { #3 {##3} #4 } + {#5} + { \exp_after:wN \__prop_get_linked:w #1 {#2} {#3} {#4} {#5} } } -\cs_generate_variant:Nn \prop_pop:NnN { NV , No } -\cs_generate_variant:Nn \prop_pop:NnN { c , cV , co } -\cs_generate_variant:Nn \prop_gpop:NnN { NV , No } -\cs_generate_variant:Nn \prop_gpop:NnN { c , cV , co } +\cs_new:Npn \__prop_get_linked:w + \__prop_flatten:w #1 \s__prop #2#3#4#5#6#7 + { + \if_cs_exist:w __prop ~ #2 ~ \tl_to_str:n {#4} \cs_end: + \exp_after:wN \exp_after:wN \exp_after:wN \__prop_get_linked_aux:w + \cs:w __prop ~ #2 ~ \tl_to_str:n {#4} \exp_after:wN \cs_end: + \else: + \exp_after:wN \__prop_get_linked_aux:w + \fi: + \s__prop_mark {#5} {#6} + \s__prop { } \s__prop_mark \use_none:n {#7} + \s__prop_stop + } +\cs_new:Npn \__prop_get_linked_aux:w + #1 \s__prop #2 #3 \s__prop_mark #4 #5 #6 \s__prop_stop { #4 {#2} #5 } \cs_new:Npn \prop_item:Nn #1#2 { - \exp_args:NNo \prop_map_tokens:Nn #1 - { \exp_after:wN \__prop_item:nnn \exp_after:wN { \tl_to_str:n {#2} } } + \__prop_if_flat:NTF #1 + { + \exp_args:NNo \prop_map_tokens:Nn #1 + { + \exp_after:wN \__prop_item:nnn + \exp_after:wN { \tl_to_str:n {#2} } + } + } + { \exp_after:wN \__prop_get_linked:w #1 {#2} \use:n { } { } } } \cs_new:Npn \__prop_item:nnn #1#2#3 { @@ -9561,69 +9823,113 @@ Type H <return> for immediate help}\def~{\errmessage{% { \prop_map_break:n { \exp_not:n {#3} } } } \cs_generate_variant:Nn \prop_item:Nn { NV , No , Ne , c , cV , co , ce } -\cs_new:Npn \prop_count:N #1 +\cs_new_protected:Npn \__prop_pop:NnNNnTF #1#2#3#4#5#6#7 { - \int_eval:n + \__prop_split:NnTFn #1 {#2} { - 0 - \prop_map_function:NN #1 \__prop_count:nn + #4 #1 { \exp_not:n { \s__prop \__prop_chk:w ##2 ##4 } } + #5 {##3} + #6 + } + {#7} + { + \exp_after:wN \__prop_pop_linked:wnNNnTF #1 {#2} + #3 #4 {#5} {#6} {#7} } } -\cs_new:Npn \__prop_count:nn #1#2 { + 1 } -\cs_generate_variant:Nn \prop_count:N { c } -\cs_new:Npn \prop_to_keyval:N #1 +\cs_new_protected:Npn \__prop_pop_linked:wnNNnTF + \__prop_flatten:w #1 \s__prop #2#3#4#5#6#7 { - \__kernel_exp_not:w - \prop_if_empty:NTF #1 - { {} } - { - \exp_after:wN \exp_after:wN \exp_after:wN - { - \tex_expanded:D - { - \__kernel_exp_not:w { \use_none:n } - \prop_map_function:NN #1 \__prop_to_keyval:nn - } - } - } + \if_cs_exist:w __prop ~ #2 ~ \tl_to_str:n {#4} \cs_end: + \exp_after:wN \__prop_pop_linked:NNNn + \cs:w __prop ~ #2 ~ \tl_to_str:n {#4} \cs_end: + #5 #6 {#7} + \else: + \exp_after:wN \use_iii:nnn + \fi: + \use_i:nn } -\cs_new:Npn \__prop_to_keyval:nn #1#2 - { , ~ {#1} =~ { \__kernel_exp_not:w {#2} } } -\prg_new_protected_conditional:Npnn \prop_pop:NnN #1#2#3 { T , F , TF } +\cs_new_protected:Npn \__prop_pop_linked:NNNn #1#2#3#4 { - \__prop_split:NnTF #1 {#2} - { - \tl_set:Nn #3 {##2} - \tl_set:Nn #1 { ##1 ##3 } - \prg_return_true: - } - { \prg_return_false: } + \if_meaning:w \scan_stop: #1 + \exp_after:wN \exp_after:wN \exp_after:wN \use_iii:nnn + \else: + \exp_after:wN \__prop_pop_linked:w #1 #1 #2 #3 {#4} + \fi: } -\prg_new_protected_conditional:Npnn \prop_gpop:NnN #1#2#3 { T , F , TF } +\cs_new_protected:Npn \__prop_pop_linked:w + \use_none:n #1#2 \s__prop #3#4#5#6#7#8 { - \__prop_split:NnTF #1 {#2} + #6 #5 \tex_undefined:D + #7 #1 { - \tl_set:Nn #3 {##2} - \tl_gset:Nn #1 { ##1 ##3 } - \prg_return_true: + \exp_after:wN \__prop_pop_linked_prev:w #1 + \exp_not:N #4 } - { \prg_return_false: } - } -\prg_generate_conditional_variant:Nnn \prop_pop:NnN { NV , c , cV } { T , F , TF } -\prg_generate_conditional_variant:Nnn \prop_gpop:NnN { NV , c , cV } { T , F , TF } -\cs_new_protected:Npn \prop_put:Nnn { \__prop_put:NNnn \__kernel_tl_set:Nx } -\cs_new_protected:Npn \prop_gput:Nnn { \__prop_put:NNnn \__kernel_tl_gset:Nx } -\cs_new_protected:Npn \__prop_put:NNnn #1#2#3#4 - { - \tl_set:Nn \l__prop_internal_tl + #7 #4 { - \exp_not:N \__prop_pair:wn \tl_to_str:n {#3} - \s__prop { \exp_not:n {#4} } + \exp_not:n { \use_none:n #1 } + \exp_not:f { \exp_after:wN \__prop_pop_linked_next:w #4 } } - \__prop_split:NnTF #2 {#3} - { #1 #2 { \exp_not:n {##1} \l__prop_internal_tl \exp_not:n {##3} } } - { #1 #2 { \exp_not:o {#2} \l__prop_internal_tl } } + #8 {#3} + } +\cs_new:Npn \__prop_pop_linked_prev:w #1 \s__prop #2#3 + { \exp_not:n { #1 \s__prop {#2} } } +\cs_new:Npn \__prop_pop_linked_next:w \use_none:n #1 { \exp_stop_f: } +\cs_new_protected:Npn \prop_remove:Nn #1#2 + { + \__prop_pop:NnNNnTF #1 {#2} + \cs_set_eq:NN \cs_set_nopar:Npe + \use_none:n { } { } + } +\cs_new_protected:Npn \prop_gremove:Nn #1#2 + { + \__prop_pop:NnNNnTF #1 {#2} + \cs_gset_eq:NN \cs_gset_nopar:Npe + \use_none:n { } { } + } +\cs_generate_variant:Nn \prop_remove:Nn { NV , Ne , c , cV , ce } +\cs_generate_variant:Nn \prop_gremove:Nn { NV , Ne , c , cV , ce } +\cs_new_protected:Npn \prop_pop:NnN #1#2#3 + { + \__prop_pop:NnNNnTF #1 {#2} + \cs_set_eq:NN \cs_set_nopar:Npe + { \tl_set:Nn #3 } { } { \tl_set:Nn #3 { \q_no_value } } } +\cs_new_protected:Npn \prop_gpop:NnN #1#2#3 + { + \__prop_pop:NnNNnTF #1 {#2} + \cs_gset_eq:NN \cs_gset_nopar:Npe + { \tl_set:Nn #3 } { } { \tl_set:Nn #3 { \q_no_value } } + } +\cs_generate_variant:Nn \prop_pop:NnN { NV , No } +\cs_generate_variant:Nn \prop_pop:NnN { c , cV , co } +\cs_generate_variant:Nn \prop_gpop:NnN { NV , No } +\cs_generate_variant:Nn \prop_gpop:NnN { c , cV , co } +\prg_new_protected_conditional:Npnn \prop_pop:NnN #1#2#3 { T , F , TF } + { + \__prop_pop:NnNNnTF #1 {#2} + \cs_set_eq:NN \cs_set_nopar:Npe + { \tl_set:Nn #3 } \prg_return_true: \prg_return_false: + } +\prg_new_protected_conditional:Npnn \prop_gpop:NnN #1#2#3 { T , F , TF } + { + \__prop_pop:NnNNnTF #1 {#2} + \cs_gset_eq:NN \cs_gset_nopar:Npe + { \tl_set:Nn #3 } \prg_return_true: \prg_return_false: + } +\prg_generate_conditional_variant:Nnn \prop_pop:NnN + { NV , No , c , cV , co } { T , F , TF } +\prg_generate_conditional_variant:Nnn \prop_gpop:NnN + { NV , No , c , cV , co } { T , F , TF } +\cs_new_protected:Npn \prop_put:Nnn + { \__prop_put:nNNnn { } \cs_set_nopar:Npe } +\cs_new_protected:Npn \prop_gput:Nnn + { \__prop_put:nNNnn { } \cs_gset_nopar:Npe } +\cs_new_protected:Npn \prop_put_if_new:Nnn + { \__prop_put:nNNnn \use_none:nnn \cs_set_nopar:Npe } +\cs_new_protected:Npn \prop_gput_if_new:Nnn + { \__prop_put:nNNnn \use_none:nnn \cs_gset_nopar:Npe } \cs_generate_variant:Nn \prop_put:Nnn { NnV , Nnv , Nne , NV , NVV , NVv , NVe , @@ -9652,70 +9958,120 @@ Type H <return> for immediate help}\def~{\errmessage{% } \cs_generate_variant:Nn \prop_gput:Nnn { cno , co , coo , cnx , cVx , cxV , cxx } -\cs_new_protected:Npn \prop_put_if_new:Nnn - { \__prop_put_if_new:NNnn \__kernel_tl_set:Nx } -\cs_new_protected:Npn \prop_gput_if_new:Nnn - { \__prop_put_if_new:NNnn \__kernel_tl_gset:Nx } -\cs_new_protected:Npn \__prop_put_if_new:NNnn #1#2#3#4 +\cs_generate_variant:Nn \prop_put_if_new:Nnn + { NnV , NV , cnV , cV } +\cs_generate_variant:Nn \prop_gput_if_new:Nnn + { NnV , NV , cnV , cV } +\cs_new_protected:Npn \__prop_put:nNNnn #1#2#3#4#5 { \tl_set:Nn \l__prop_internal_tl { - \exp_not:N \__prop_pair:wn \tl_to_str:n {#3} - \s__prop \exp_not:n { {#4} } + \exp_not:N \__prop_pair:wn \tl_to_str:n {#4} + \s__prop { \exp_not:n {#5} } + } + \__prop_split:NnTFn #3 {#4} + { + #1 #2 #3 + { + \s__prop \__prop_chk:w \exp_not:n {##2} + \l__prop_internal_tl \exp_not:n {##4} + } + } + { #2 #3 { \exp_not:o {#3} \l__prop_internal_tl } } + { \exp_after:wN \__prop_put_linked:wnnN #3 {#4} {#1} #2 } + } +\cs_new_protected:Npn \__prop_put_linked:wnnN + \__prop_flatten:w #1 \s__prop #2#3#4 + { + \exp_after:wN \__prop_put_linked:NNnN + \cs:w __prop ~ #2 ~ \tl_to_str:n {#4} \cs_end: + #1 + } +\cs_new_protected:Npn \__prop_put_linked:NNnN #1#2#3#4 + { + \if_meaning:w \scan_stop: #1 + \exp_after:wN \__prop_put_linked_new:w #2 #1 #2 #4 + \else: + \exp_after:wN \__prop_put_linked_old:w #1 { #3 #4 #1 } + \fi: + } +\cs_new_protected:Npn \__prop_put_linked_new:w + \use_none:n #1#2#3#4 + { + #4 #1 + { + \exp_after:wN \__prop_pop_linked_prev:w #1 + \exp_not:N #2 + } + #4 #2 + { + \exp_not:n { \use_none:n #1 } + \l__prop_internal_tl + \exp_not:N #3 + } + #4 #3 { \exp_not:n { \use_none:n #2 } } + } +\cs_new_protected:Npn \__prop_put_linked_old:w + \use_none:n #1#2 \s__prop #3#4#5 + { + #5 + { + \exp_not:n { \use_none:n #1 } + \l__prop_internal_tl + \exp_not:N #4 } - \__prop_split:NnTF #2 {#3} - { } - { #1 #2 { \exp_not:o {#2} \l__prop_internal_tl } } } -\cs_generate_variant:Nn \prop_put_if_new:Nnn - { NnV , NV , cnV , cV } -\cs_generate_variant:Nn \prop_gput_if_new:Nnn - { NnV , NV , cnV , cV } \prg_new_eq_conditional:NNn \prop_if_exist:N \cs_if_exist:N { TF , T , F , p } \prg_new_eq_conditional:NNn \prop_if_exist:c \cs_if_exist:c { TF , T , F , p } \prg_new_conditional:Npnn \prop_if_empty:N #1 { p , T , F , TF } { - \tl_if_eq:NNTF #1 \c_empty_prop - \prg_return_true: \prg_return_false: + \if_meaning:w #1 \c_empty_prop + \prg_return_true: + \else: + \exp_after:wN \__prop_if_empty_return:w #1 + \__prop_flatten:w 2 \s__prop 34 \s__prop_stop + \fi: + } +\cs_new:Npn \__prop_if_empty_return:w + #1 \__prop_flatten:w #2 \s__prop #3#4#5 \s__prop_stop + { + \if_meaning:w #2 #4 + \prg_return_true: + \else: + \prg_return_false: + \fi: } \prg_generate_conditional_variant:Nnn \prop_if_empty:N { c } { p , T , F , TF } \prg_new_conditional:Npnn \prop_if_in:Nn #1#2 { p , T , F , TF } { - \exp_args:NNo \prop_map_tokens:Nn #1 - { \exp_after:wN \__prop_if_in:nnn \exp_after:wN { \tl_to_str:n {#2} } } - \prg_return_false: + \__prop_if_flat:NTF #1 + { + \exp_after:wN \prop_map_tokens:Nn \exp_after:wN #1 + { + \exp_after:wN \__prop_if_in_flat:nnn + \exp_after:wN { \tl_to_str:n {#2} } + } + \prg_return_false: + } + { + \exp_after:wN \__prop_get_linked:w #1 {#2} + \use_none:n \prg_return_true: \prg_return_false: + } } -\cs_new:Npn \__prop_if_in:nnn #1#2#3 +\cs_new:Npn \__prop_if_in_flat:nnn #1#2#3 { \str_if_eq:eeT {#1} {#2} { \prop_map_break:n { \use_i:nn \prg_return_true: } } } \prg_generate_conditional_variant:Nnn \prop_if_in:Nn { NV , Ne , No , c , cV , ce , co } { p , T , F , TF } -\prg_new_protected_conditional:Npnn \prop_get:NnN #1#2#3 { T , F , TF } - { - \__prop_split:NnTF #1 {#2} - { - \tl_set:Nn #3 {##2} - \prg_return_true: - } - { \prg_return_false: } - } -\prg_generate_conditional_variant:Nnn \prop_get:NnN - { NV , Nv , Ne , c , cV , cv , ce } { T , F , TF } -\prg_generate_conditional_variant:Nnn \prop_get:NnN - { No , Nx , co , cx } { T , F , TF } -\prg_generate_conditional_variant:Nnn \prop_get:NnN - { cnc } { T , F , TF } \cs_new:Npn \prop_map_function:NN #1#2 { - \exp_after:wN \use_i_ii:nnn - \exp_after:wN \__prop_map_function:Nw - \exp_after:wN #2 - #1 + \exp_last_unbraced:Nnf + \use_i:nnn { \__prop_map_function:Nw #2 } #1 \__prop_pair:wn \fi: \prop_map_break: \s__prop { } \__prop_pair:wn \fi: \prop_map_break: \s__prop { } \__prop_pair:wn \fi: \prop_map_break: \s__prop { } @@ -9741,7 +10097,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { __prop_map_ \int_use:N \g__kernel_prg_map_int :wn } \__prop_pair:wn \int_gincr:N \g__kernel_prg_map_int \cs_gset_protected:Npn \__prop_pair:wn ##1 \s__prop ##2 {#2} - #1 + \exp_last_unbraced:Nf \use_none:nn #1 \prg_break_point:Nn \prop_map_break: { \int_gdecr:N \g__kernel_prg_map_int @@ -9752,8 +10108,8 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_generate_variant:Nn \prop_map_inline:Nn { c } \cs_new:Npn \prop_map_tokens:Nn #1#2 { - \exp_last_unbraced:Nno - \use_i:nn { \__prop_map_tokens:nw {#2} } #1 + \exp_last_unbraced:Nnf + \use_i:nnn { \__prop_map_tokens:nw {#2} } #1 \__prop_pair:wn \fi: \prop_map_break: \s__prop { } \__prop_pair:wn \fi: \prop_map_break: \s__prop { } \__prop_pair:wn \fi: \prop_map_break: \s__prop { } @@ -9777,6 +10133,34 @@ Type H <return> for immediate help}\def~{\errmessage{% { \prg_map_break:Nn \prop_map_break: { } } \cs_new:Npn \prop_map_break:n { \prg_map_break:Nn \prop_map_break: } +\cs_new:Npn \prop_count:N #1 + { + \int_eval:n + { + 0 + \prop_map_function:NN #1 \__prop_count:nn + } + } +\cs_new:Npn \__prop_count:nn #1#2 { + 1 } +\cs_generate_variant:Nn \prop_count:N { c } +\cs_new:Npn \prop_to_keyval:N #1 + { + \__kernel_exp_not:w + \prop_if_empty:NTF #1 + { {} } + { + \exp_after:wN \exp_after:wN \exp_after:wN + { + \tex_expanded:D + { + \exp_not:N \use_none:n + \prop_map_function:NN #1 \__prop_to_keyval:nn + } + } + } + } +\cs_new:Npn \__prop_to_keyval:nn #1#2 + { , ~ {#1} =~ { \__kernel_exp_not:w {#2} } } \cs_new_protected:Npn \prop_show:N { \__prop_show:NN \msg_show:nneeee } \cs_generate_variant:Nn \prop_show:N { c } \cs_new_protected:Npn \prop_log:N { \__prop_show:NN \msg_log:nneeee } @@ -9785,22 +10169,104 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__kernel_chk_tl_type:NnnT #2 { prop } { - \s__prop - \exp_after:wN \use_i:nn \exp_after:wN \__prop_show_validate:w #2 - \__prop_pair:wn \q_recursion_tail \s__prop { } \q_recursion_stop + \__prop_if_flat:NTF #2 + { + \s__prop \__prop_chk:w + \exp_after:wN \__prop_show_flat:w #2 + \s__prop { } + \__prop_pair:wn \q__prop_recursion_tail \s__prop { } + \q__prop_recursion_stop + } + { \exp_after:wN \__prop_show_linked:w #2 \s__prop ! ? \s__prop_stop } } { - #1 { prop } { show } - { \token_to_str:N #2 } - { \prop_map_function:NN #2 \msg_show_item:nn } - { } { } + \__prop_if_flat:NTF #2 + { \__prop_show_finally:NNn #1 #2 { flat } } + { + \tl_set:Nn \l__prop_internal_tl { #1 #2 } + \exp_after:wN \__prop_show_prepare:w #2 #2 + } } } -\cs_new:Npn \__prop_show_validate:w #1 \__prop_pair:wn #2 \s__prop #3 +\cs_new:Npn \__prop_show_flat:w #1 \__prop_pair:wn #2 \s__prop #3 { - \quark_if_recursion_tail_stop:n {#2} + \__prop_if_recursion_tail_stop:n {#2} \exp_not:N \__prop_pair:wn \tl_to_str:n {#2} \s__prop \exp_not:n { {#3} } - \__prop_show_validate:w + \__prop_show_flat:w + } +\cs_new:Npn \__prop_show_linked:w #1 \s__prop #2#3#4 \s__prop_stop + { + \exp_not:N \__prop_flatten:w + \exp_not:c { __prop ~ \tl_to_str:n {#2} } + \s__prop { \tl_to_str:n {#2} } + \exp_not:n {#3} + } +\cs_new_protected:Npn \__prop_show_finally:NNn #1#2#3 + { + #1 { prop } { show } + { \token_to_str:N #2 } + { \prop_map_function:NN #2 \msg_show_item:nn } + {#3} { } + } +\cs_new_protected:Npn \__prop_show_prepare:w + \__prop_flatten:w #1 \s__prop #2#3#4 + { + \use:e + { + \cs_set_nopar:Npn \exp_not:N \__prop_tmp:w + ##1 \token_to_str:N #1 ##2 \s__prop_mark ##3 \s__prop_stop + { + \exp_not:N \tl_if_empty:nTF {##1} + { + \exp_not:N \tl_if_head_is_space:nTF {##2} + { \exp_not:N \exp_args:Nf \__prop_show_loop_key:wNNN } + { \exp_not:N \tl_if_empty:nTF } + {##2} + } + { \exp_not:N \use_ii:nn } + \__prop_show_end:NNN + \__prop_show_bad_name:NNN + } + } + \exp_last_unbraced:NNNo \__prop_show_loop:NNw #1 #4 #4 + } +\cs_new_protected:Npn \__prop_show_loop:NNw #1#2 #3 \s__prop #4#5 + { + \exp_last_two_unbraced:Noo \__prop_tmp:w + { \token_to_str:N #5 \s__prop_mark } + { \token_to_str:N #1 \s__prop_mark \s__prop_stop } + #1 #2 #5 + } +\cs_new_protected:Npn \__prop_show_bad_name:NNN #1#2#3 + { + \msg_error:nneeee { prop } { bad-link } + { \tl_tail:N \l__prop_internal_tl } + { \token_to_str:N #2 } + { \token_to_str:N #3 } + { \token_to_str:N #1 } + } +\cs_new_protected:Npn \__prop_show_end:NNN #1#2#3 + { + \__kernel_chk_tl_type:NnnT #3 + { \tl_tail:N \l__prop_internal_tl prop~entry } + { \exp_not:n { \use_none:n #2 } } + { + \exp_after:wN \__prop_show_finally:NNn + \l__prop_internal_tl { linked } + } + } +\cs_new_protected:Npn \__prop_show_loop_key:wNNN #1#2#3#4#5#6 + { + \__kernel_chk_tl_type:NnnT #6 + { \tl_tail:N \l__prop_internal_tl prop~entry } + { + \exp_not:n { \use_none:n #5 } + \exp_after:wN \__prop_show_flat:w #6 \s__prop { } + \__prop_pair:wn \q__prop_recursion_tail \s__prop { } + \q__prop_recursion_stop + \tl_item:Nn #6 { -1 } + } + { \exp_last_unbraced:NNNo \__prop_show_loop:NNw #4 #6 #6 } } %% File: l3msg.dtx \tl_new:N \l__msg_internal_tl @@ -9824,10 +10290,13 @@ Type H <return> for immediate help}\def~{\errmessage{% {#1} {#2} } } -\cs_new_protected:Npn \msg_new:nnnn #1#2 +\cs_new_protected:Npn \msg_new:nnnn #1#2#3#4 { \__msg_chk_free:nn {#1} {#2} - \msg_gset:nnnn {#1} {#2} + \cs_gset:cpn { \c__msg_text_prefix_tl #1 / #2 } + ##1##2##3##4 {#3} + \cs_gset:cpn { \c__msg_more_text_prefix_tl #1 / #2 } + ##1##2##3##4 {#4} } \cs_generate_variant:Nn \msg_new:nnnn { nnee , nnxx } \cs_new_protected:Npn \msg_new:nnn #1#2#3 @@ -9842,15 +10311,6 @@ Type H <return> for immediate help}\def~{\errmessage{% } \cs_new_protected:Npn \msg_set:nnn #1#2#3 { \msg_set:nnnn {#1} {#2} {#3} { } } -\cs_new_protected:Npn \msg_gset:nnnn #1#2#3#4 - { - \cs_gset:cpn { \c__msg_text_prefix_tl #1 / #2 } - ##1##2##3##4 {#3} - \cs_gset:cpn { \c__msg_more_text_prefix_tl #1 / #2 } - ##1##2##3##4 {#4} - } -\cs_new_protected:Npn \msg_gset:nnn #1#2#3 - { \msg_gset:nnnn {#1} {#2} {#3} { } } \tl_const:Nn \c__msg_coding_error_text_tl { This~is~a~coding~error. @@ -10608,6 +11068,14 @@ Type H <return> for immediate help}\def~{\errmessage{% { internal~structure:\\\\\iow_indent:n {#4} } } } +\msg_new:nnnn { prop } { bad-link } + { Variable~'#1'~is~not~a~valid~(linked)~prop. } + { + \c__msg_coding_error_text_tl + The~variable~'#1'~has~an~incorrect~internal~structure.~ + Its~internal~entry~'#2'~points~to~'#3',~whose~name~is~not~of~the~ + form~'#4~<key>'. + } \msg_new:nnnn { clist } { non-clist } { Variable~'#1'~is~not~a~valid~clist. } { @@ -10617,14 +11085,30 @@ Type H <return> for immediate help}\def~{\errmessage{% should~be~a~clist~variable,~but~it~includes~empty~or~blank~items~ without~braces. } +\msg_new:nnnn { prop } { misused } + { A~property~list~was~misused. } + { + \c__msg_coding_error_text_tl + A~property~list~variable~was~used~without~an~accessor~function.~ + It~ + \tl_if_empty:nTF {#1} + { is~empty. } + { contains~the~key-value~pairs \use_none:n #1 . } + } +\msg_new:nnnn { prop } { inner-make } + { '#1'~ cannot~ be~ used~ in~ a~ group. } + { + \c__msg_coding_error_text_tl + The~ command~ '#1'~ was~ applied~ to~ the~ property~ list~ + variable~ '#2', but~ the~ storage~ type~ can~ only~ be~ changed~ + at~ the~ outermost~ group~ level. + } \msg_new:nnn { kernel } { bad-exp-end-f } { Misused~\exp_end_continue_f:w or~:nw } \msg_new:nnn { kernel } { bad-variable } { Erroneous~variable~#1 used! } \msg_new:nnn { seq } { misused } { A~sequence~was~misused. } -\msg_new:nnn { prop } { misused } - { A~property~list~was~misused. } \msg_new:nnn { prg } { negative-replication } { Negative~argument~for~\iow_char:N\\prg_replicate:nn. } \msg_new:nnn { prop } { prop-keyval } @@ -10644,7 +11128,8 @@ Type H <return> for immediate help}\def~{\errmessage{% { The~integer~array~#1~contains~#2~items: \\ #3 . } \msg_new:nnn { prop } { show } { - The~property~list~#1~ + The~ \str_if_eq:nnF {#3} { flat } { #3~ } + property~list~#1~ \tl_if_empty:nTF {#2} { is~empty \\>~ . } { contains~the~pairs~(without~outer~braces): #2 . } @@ -14221,7 +14706,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \prg_return_true: } { \prg_return_false: } } -\prg_generate_conditional_variant:Nnn \keys_if_exist:nn { ne } { T , F , TF } +\prg_generate_conditional_variant:Nnn \keys_if_exist:nn { ne } { p , T , F , TF } \prg_new_conditional:Npnn \keys_if_choice_exist:nnn #1#2#3 { p , T , F , TF } { @@ -23882,7 +24367,6 @@ Type H <return> for immediate help}\def~{\errmessage{% \scan_new:N \s__tl \cs_new_eq:NN \l__tl_analysis_token ? \cs_new_eq:NN \l__tl_analysis_char_token ? -\cs_new_eq:NN \l__tl_analysis_next_token ? \tl_new:N \l__tl_peek_code_tl \group_begin: \char_set_active_eq:NN \ \scan_stop: @@ -24373,7 +24857,10 @@ Type H <return> for immediate help}\def~{\errmessage{% #1 \__tl_peek_analysis_loop:NNn \prg_break_point:Nn \peek_analysis_map_break: - { \group_align_safe_end: } + { + \int_gdecr:N \g__kernel_prg_map_int + \group_align_safe_end: + } } \__tl_peek_analysis_loop:NNn ? ? ? } @@ -24500,21 +24987,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \if_meaning:w \l__tl_analysis_token \scan_stop: \exp_after:wN \__tl_peek_analysis_normal:N \else: - \exp_after:wN \__tl_peek_analysis_next: + \exp_after:wN \__tl_peek_analysis_str: \fi: } -\cs_new_protected:Npn \__tl_peek_analysis_next: - { - \tl_if_empty:oT { \tex_the:D \tex_everyeof:D } - { \tex_everyeof:D { \scan_stop: } } - \tex_afterassignment:D \__tl_peek_analysis_nextii: - \tex_futurelet:D \l__tl_analysis_next_token - } -\cs_new_protected:Npn \__tl_peek_analysis_nextii: - { - \tex_afterassignment:D \__tl_peek_analysis_str: - \tex_futurelet:D \l__tl_analysis_next_token - } \cs_new_protected:Npn \__tl_peek_analysis_str: { \exp_after:wN \tex_futurelet:D @@ -24590,21 +25065,23 @@ Type H <return> for immediate help}\def~{\errmessage{% } \cs_new_protected:Npn \__tl_peek_analysis_collect_loop: { - \tex_futurelet:D \l__tl_analysis_token - \__tl_peek_analysis_collect_test: - } -\cs_new_protected:Npn \__tl_peek_analysis_collect_test: - { - \if_meaning:w \l__tl_analysis_token \l__tl_analysis_next_token - \exp_after:wN \if_meaning:w \cs:w \l__tl_internal_a_tl \cs_end: \l_peek_token - \__tl_peek_analysis_collect_end:NNN + \exp_after:wN \if_meaning:w + \cs:w + \if_cs_exist:w \l__tl_internal_a_tl \cs_end: + \l__tl_internal_a_tl + \else: + c_one % anything short \fi: + \cs_end: + \l_peek_token + \__tl_peek_analysis_collect_end:NNNN \fi: - \__tl_peek_analysis_collect:w + \tex_futurelet:D \l__tl_analysis_token + \__tl_peek_analysis_collect:w } -\cs_new_protected:Npn \__tl_peek_analysis_collect_end:NNN #1#2#3 +\cs_new_protected:Npn \__tl_peek_analysis_collect_end:NNNN #1#2#3#4 { - #1 #2 + #1 \tl_put_right:Ne \l__tl_peek_code_tl { { \exp_not:N \exp_not:n { \exp_not:c { \l__tl_internal_a_tl } } } @@ -28756,9 +29233,9 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_args:No \__box_log:nNnn { \tex_the:D \tex_interactionmode:D } } \cs_new_protected:Npn \__box_log:nNnn #1#2#3#4 { - \int_set:Nn \tex_interactionmode:D { 0 } + \int_gset:Nn \tex_interactionmode:D { 0 } \__box_show:NNff 0 #2 { \int_eval:n {#3} } { \int_eval:n {#4} } - \int_set:Nn \tex_interactionmode:D {#1} + \int_gset:Nn \tex_interactionmode:D {#1} } \cs_generate_variant:Nn \box_log:Nnn { c } \cs_new_protected:Npn \__box_show:NNnn #1#2#3#4 @@ -29248,7 +29725,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_generate_variant:Nn \box_autosize_to_wd_and_ht:Nnn { c } \cs_new_protected:Npn \box_gautosize_to_wd_and_ht:Nnn #1#2#3 { \__box_autosize:NnnnN #1 {#2} {#3} { \box_ht:N #1 } \hbox_gset:Nn } -\cs_generate_variant:Nn \box_autosize_to_wd_and_ht:Nnn { c } +\cs_generate_variant:Nn \box_gautosize_to_wd_and_ht:Nnn { c } \cs_new_protected:Npn \box_autosize_to_wd_and_ht_plus_dp:Nnn #1#2#3 { \__box_autosize:NnnnN #1 {#2} {#3} { \box_ht:N #1 + \box_dp:N #1 } @@ -31430,17 +31907,17 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_generate_variant:Nn \hcoffin_gset:Nn { c } \cs_new_protected:Npn \vcoffin_set:Nnn #1#2#3 { - \__coffin_set_vertical:NnnNN #1 {#2} {#3} - \vbox_set:Nn \coffin_reset_poles:N + \__coffin_set_vertical:NnnNNN #1 {#2} {#3} + \vbox_set:Nn \coffin_reset_poles:N \__coffin_set_pole:Nnn } \cs_generate_variant:Nn \vcoffin_set:Nnn { c } \cs_new_protected:Npn \vcoffin_gset:Nnn #1#2#3 { - \__coffin_set_vertical:NnnNN #1 {#2} {#3} - \vbox_gset:Nn \coffin_greset_poles:N + \__coffin_set_vertical:NnnNNN #1 {#2} {#3} + \vbox_gset:Nn \coffin_greset_poles:N \__coffin_gset_pole:Nnn } \cs_generate_variant:Nn \vcoffin_gset:Nnn { c } -\cs_new_protected:Npn \__coffin_set_vertical:NnnNN #1#2#3#4#5 +\cs_new_protected:Npn \__coffin_set_vertical:NnnNNN #1#2#3#4#5#6 { \__coffin_if_exist:NT #1 { @@ -31452,7 +31929,7 @@ Type H <return> for immediate help}\def~{\errmessage{% } #5 #1 \vbox_set_top:Nn \l__coffin_internal_box { \vbox_unpack:N #1 } - \__coffin_set_pole:Nne #1 { T } + #6 #1 { T } { { 0pt } { @@ -31505,19 +31982,19 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new_protected:Npn \hcoffin_gset_end: { } \cs_new_protected:Npn \vcoffin_set:Nnw #1#2 { - \__coffin_set_vertical:NnNNNNw #1 {#2} \vbox_set:Nw + \__coffin_set_vertical:NnNNNNNw #1 {#2} \vbox_set:Nw \vcoffin_set_end: - \vbox_set_end: \coffin_reset_poles:N + \vbox_set_end: \coffin_reset_poles:N \__coffin_set_pole:Nnn } \cs_generate_variant:Nn \vcoffin_set:Nnw { c } \cs_new_protected:Npn \vcoffin_gset:Nnw #1#2 { - \__coffin_set_vertical:NnNNNNw #1 {#2} \vbox_gset:Nw + \__coffin_set_vertical:NnNNNNNw #1 {#2} \vbox_gset:Nw \vcoffin_gset_end: - \vbox_gset_end: \coffin_greset_poles:N + \vbox_gset_end: \coffin_greset_poles:N \__coffin_gset_pole:Nnn } \cs_generate_variant:Nn \vcoffin_gset:Nnw { c } -\cs_new_protected:Npn \__coffin_set_vertical:NnNNNNw #1#2#3#4#5#6 +\cs_new_protected:Npn \__coffin_set_vertical:NnNNNNNw #1#2#3#4#5#6#7 { \__coffin_if_exist:NT #1 { @@ -31529,7 +32006,7 @@ Type H <return> for immediate help}\def~{\errmessage{% #5 #6 #1 \vbox_set_top:Nn \l__coffin_internal_box { \vbox_unpack:N #1 } - \__coffin_set_pole:Nne #1 { T } + #7 #1 { T } { { 0pt } { @@ -31644,10 +32121,14 @@ Type H <return> for immediate help}\def~{\errmessage{% } \cs_new_protected:Npn \__coffin_set_pole:Nnn #1#2#3 { - \prop_put:cnn { coffin ~ \__coffin_to_value:N #1 ~ poles } + \prop_put:cne { coffin ~ \__coffin_to_value:N #1 ~ poles } + {#2} {#3} + } +\cs_new_protected:Npn \__coffin_gset_pole:Nnn #1#2#3 + { + \prop_gput:cne { coffin ~ \__coffin_to_value:N #1 ~ poles } {#2} {#3} } -\cs_generate_variant:Nn \__coffin_set_pole:Nnn { Nne } \cs_new_protected:Npn \coffin_reset_poles:N #1 { \__coffin_reset_structure:N #1 @@ -32235,7 +32716,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \tl_if_in:nnTF {#2} { - } { \tl_set:Nn \l__coffin_internal_tl { {#2} } } { \tl_set:Nn \l__coffin_internal_tl { { #1 - #2 } } } - \exp_last_unbraced:NNo \__coffin_set_pole:Nne \l__coffin_aligned_coffin + \exp_last_unbraced:NNo \__coffin_set_pole:Nnn \l__coffin_aligned_coffin { \l__coffin_internal_tl } { { \dim_use:N \l__coffin_x_dim } { \dim_use:N \l__coffin_y_dim } @@ -32275,11 +32756,11 @@ Type H <return> for immediate help}\def~{\errmessage{% { \dim_compare:nNnTF {#2} < {#6} { - \__coffin_set_pole:Nne #9 { T } + \__coffin_set_pole:Nnn #9 { T } { { 0pt } {#6} { 1000pt } { 0pt } } } { - \__coffin_set_pole:Nne #9 { T } + \__coffin_set_pole:Nnn #9 { T } { { 0pt } {#2} { 1000pt } { 0pt } } } } @@ -32287,11 +32768,11 @@ Type H <return> for immediate help}\def~{\errmessage{% { \dim_compare:nNnTF {#2} < {#6} { - \__coffin_set_pole:Nne #9 { B } + \__coffin_set_pole:Nnn #9 { B } { { 0pt } {#2} { 1000pt } { 0pt } } } { - \__coffin_set_pole:Nne #9 { B } + \__coffin_set_pole:Nnn #9 { B } { { 0pt } {#6} { 1000pt } { 0pt } } } } @@ -36596,6 +37077,10 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno } \cs_set_protected:Npn \keys_set_filter:nnnnN { \keys_set_exclude_groups:nnnnN } \cs_generate_variant:Nn \keys_set_filter:nnnnN { nnV , nnv , nno } +\__kernel_patch_deprecation:nnNNpn { 2024-01-17 } { \msg_set:nnnn } +\cs_new_protected:Npn \msg_gset:nnnn { \msg_set:nnnn } +\__kernel_patch_deprecation:nnNNpn { 2024-01-17 } { \msg_set:nnn } +\cs_new_protected:Npn \msg_gset:nnn { \msg_set:nnn } \prop_new:N \g__pdf_object_prop \__kernel_patch_deprecation:nnNNpn { 2022-08-30 } { [\pdf_object_new:n] } \cs_new_protected:Npn \pdf_object_new:nn #1#2 diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index 3a05b2b303e..b783e600b2c 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{2024-01-22}% +\def\ExplFileDate{2024-02-13}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx b/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx index 016df8683d9..9b673e3bd8f 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{2024-01-22}% +\def\ExplFileDate{2024-02-13}% \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 230e5567dd5..85f75c70d9b 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{2024-01-22}% +\def\ExplFileDate{2024-02-13}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3debug.def b/Master/texmf-dist/tex/latex/l3kernel/l3debug.def index c988bf2bd80..2fcf1d4300f 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3debug.def +++ b/Master/texmf-dist/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-01-22}{}{L3 Debugging support} +\ProvidesExplFile{l3debug.def}{2024-02-13}{}{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 @@ -417,6 +417,8 @@ { \clist_concat:NNN \clist_gconcat:NNN + \prop_concat:NNN + \prop_gconcat:NNN \seq_concat:NNN \seq_gconcat:NNN \str_concat:NNN @@ -461,6 +463,17 @@ \muskip_add:Nn \muskip_sub:Nn \muskip_set_eq:NN + \prop_clear:N + \prop_concat:NNN + \prop_pop:NnN + \prop_pop:NnNT + \prop_pop:NnNF + \prop_pop:NnNTF + \prop_put:Nnn + \prop_put_if_new:Nnn + \prop_put_from_keyval:Nn + \prop_remove:Nn + \prop_set_eq:NN \seq_set_eq:NN \skip_zero:N \skip_set:Nn @@ -530,6 +543,17 @@ \muskip_gadd:Nn \muskip_gsub:Nn \muskip_gset_eq:NN + \prop_gclear:N + \prop_gconcat:NNN + \prop_gpop:NnN + \prop_gpop:NnNT + \prop_gpop:NnNF + \prop_gpop:NnNTF + \prop_gput:Nnn + \prop_gput_if_new:Nnn + \prop_gput_from_keyval:Nn + \prop_gremove:Nn + \prop_gset_eq:NN \seq_gset_eq:NN \skip_gzero:N \skip_gset:Nn @@ -573,6 +597,8 @@ \int_const:Nn \intarray_const_from_clist:Nn \muskip_const:Nn + \prop_const_from_keyval:Nn + \prop_const_linked_from_keyval:Nn \skip_const:Nn \str_const:Nn \tl_const:Nn diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls index a77b2476789..a9f94bc73a1 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls +++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls @@ -20,7 +20,7 @@ %% %% File: l3doc.dtx \RequirePackage{calc} -\ProvidesExplClass{l3doc}{2024-01-22}{} +\ProvidesExplClass{l3doc}{2024-02-13}{} {L3 Experimental documentation class} \clist_new:N \g_docinput_clist \seq_new:N \g_doc_functions_seq @@ -534,7 +534,7 @@ { \c_backslash_str #2 } } \DeclareDocumentCommand \meta { m } - { \__codedoc_meta:n {#1} } + { \texttt{ \__codedoc_meta:n {#1} } } \DeclareExpandableDocumentCommand { \__codedoc_pdfstring_cmd:w } { o m } { \token_to_str:N #2 } \DeclareExpandableDocumentCommand @@ -543,16 +543,17 @@ { < \tl_to_str:n {#1} > } \pdfstringdefDisableCommands { - \cs_set_eq:NN \cmd \__codedoc_pdfstring_cmd:w - \cs_set_eq:NN \cs \__codedoc_pdfstring_cs:w - \cs_set_eq:NN \tn \__codedoc_pdfstring_cs:w - \cs_set_eq:NN \meta \__codedoc_pdfstring_meta:w + \cs_set_eq:NN \cmd \__codedoc_pdfstring_cmd:w + \cs_set_eq:NN \cs \__codedoc_pdfstring_cs:w + \cs_set_eq:NN \tn \__codedoc_pdfstring_cs:w + \cs_set_eq:NN \meta \__codedoc_pdfstring_meta:w + \cs_set_eq:NN \__codedoc_meta:n \__codedoc_pdfstring_meta:w } \newcommand\Arg[1] - { \texttt{\char`\{} \meta{#1} \texttt{\char`\}} } + { \texttt{\char`\{} \__codedoc_meta:n {#1} \texttt{\char`\}} } \providecommand\marg[1]{ \Arg{#1} } -\providecommand\oarg[1]{ \texttt[ \meta{#1} \texttt] } -\providecommand\parg[1]{ \texttt( \meta{#1} \texttt) } +\providecommand\oarg[1]{ \texttt[ \__codedoc_meta:n {#1} \texttt] } +\providecommand\parg[1]{ \texttt( \__codedoc_meta:n {#1} \texttt) } \DeclareRobustCommand \file {\nolinkurl} \DeclareRobustCommand \env {\texttt} \DeclareRobustCommand \pkg {\textsf} @@ -1796,6 +1797,18 @@ } \DeclareDocumentCommand \DocInputAgain { } { \clist_map_function:NN \g_docinput_clist \__codedoc_input:n } +\msg_new:nnn { l3doc } { missing-endgroup } + { + \str_if_eq:VnTF \@currenvir { document } + { + There~are~\int_use:N \tex_currentgrouplevel:D + \c_space_tl unclosed~groups~in~#1. + } + { + The~\@currenvir \c_space_tl environment~on~line~\@currenvline + \c_space_tl doesn't~have~a~matching~\iow_char:N\\end{\@currenvir}. + } + } \NewDocumentCommand \DocInclude { m } { \relax\clearpage @@ -1806,6 +1819,13 @@ \int_compare:nNnTF \@auxout = \@partaux { \@latexerr{\string\include\space cannot~be~nested}\@eha } { \@docinclude {#1} } + % check missing \endgroup, e.g., missing "\end{macro}" in time + \int_compare:nNnF { \tex_currentgrouplevel:D } = { 0 } + { + \int_compare:nNnT { \tex_interactionmode:D } = { 0 } + { \int_gset:Nn \tex_interactionmode:D { 1 } } + \msg_fatal:nne { l3doc } { missing-endgroup } { \currentfile } + } } \cs_gset:Npn \@docinclude #1 { @@ -2086,7 +2106,7 @@ \int_set:Nn \l__codedoc_tmpa_int { \tex_interactionmode:D } \errorstopmode \ClassError { l3doc } { \l__codedoc_tmpa_tl } { } - \int_set:Nn \tex_interactionmode:D { \l__codedoc_tmpa_int } + \int_gset:Nn \tex_interactionmode:D { \l__codedoc_tmpa_int } } } } |