diff options
author | Karl Berry <karl@freefriends.org> | 2020-08-07 21:37:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-08-07 21:37:39 +0000 |
commit | d6a7e0e5536b4924edec286797ed38021b94509d (patch) | |
tree | 04407161e6a03a0698d3029183d3959a762a0bb2 /Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex | |
parent | 5a14bab00bc59f46bdb92dcfc08ca2d331e3c3ec (diff) |
l3 (7aug20)
git-svn-id: svn://tug.org/texlive/trunk@56067 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex | 391 |
1 files changed, 216 insertions, 175 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index 6779946f1f0..007e6bbfaad 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -69,7 +69,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2020-07-17}% +\def\ExplFileDate{2020-08-07}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -241,10 +241,9 @@ \fi \expandafter\endgroup \next -\protected\def\ExplSyntaxOff{}% \protected\edef\ExplSyntaxOff {% - \protected\def\ExplSyntaxOff{}% + \protected\def\noexpand\ExplSyntaxOff{}% \catcode 9 = \the\catcode 9\relax \catcode 32 = \the\catcode 32\relax \catcode 34 = \the\catcode 34\relax @@ -306,9 +305,7 @@ \let \tex_let:D \let \begingroup \long \def \__kernel_primitive:NN #1#2 - { - \tex_global:D \tex_let:D #2 #1 - } + { \tex_global:D \tex_let:D #2 #1 } \__kernel_primitive:NN \ \tex_space:D \__kernel_primitive:NN \/ \tex_italiccorrection:D \__kernel_primitive:NN \- \tex_hyphen:D @@ -9509,6 +9506,7 @@ } } } +\int_gset:Nn \tex_errorcontextlines:D { -1 } \cs_new:Npn \msg_fatal_text:n #1 { Fatal ~ @@ -9897,6 +9895,7 @@ { \exp_not:c { #1 :nnxxxx } {##1} {##2} {##3} { } { } { } } } \__msg_kernel_class_new:nN { fatal } \__msg_fatal_code:nnnnnn + \__msg_kernel_class_new:nN { critical } \__msg_critical_code:nnnnnn \cs_undefine:N \__kernel_msg_error:nnxx \cs_undefine:N \__kernel_msg_error:nnx \cs_undefine:N \__kernel_msg_error:nn @@ -10135,13 +10134,13 @@ } { . } } \__kernel_msg_new:nnnn { kernel } { enable-debug } - { To~use~'#1'~load~expl3~with~the~'enable-debug'~option. } + { To~use~'#1'~set~the~'enable-debug'~option. } { - The~function~'#1'~will~be~ignored~because~it~can~only~work~if~ + The~function~'#1'~will~be~ignored~because~it~can~only~work~if~ some~internal~functions~in~expl3~have~been~appropriately~ defined.~This~only~happens~if~one~of~the~options~ - 'enable-debug',~'check-declarations'~or~'log-functions'~was~ - given~when~loading~expl3. + 'enable-debug',~'check-declarations'~or~'log-functions'~was~ + given~as~an~option:~see~the~main~expl3~documentation. } \__kernel_msg_new:nnn { kernel } { bad-exp-end-f } { Misused~\exp_end_continue_f:w or~:nw } @@ -11737,20 +11736,6 @@ #1 \\ ............. } -\__kernel_msg_new:nnnn { kernel } { input-streams-exhausted } - { Input~streams~exhausted } - { - TeX~can~only~open~up~to~16~input~streams~at~one~time.\\ - All~16~are~currently~in~use,~and~something~wanted~to~open~ - another~one. - } -\__kernel_msg_new:nnnn { kernel } { output-streams-exhausted } - { Output~streams~exhausted } - { - TeX~can~only~open~up~to~16~output~streams~at~one~time.\\ - All~16~are~currently~in~use,~and~something~wanted~to~open~ - another~one. - } \__kernel_msg_new:nnnn { kernel } { unbalanced-quote-in-filename } { Unbalanced~quotes~in~file~name~'#1'. } { @@ -12513,14 +12498,11 @@ \bool_new:N \l__keys_tmp_bool \tl_new:N \l__keys_tmpa_tl \tl_new:N \l__keys_tmpb_tl +\scan_new:N \s__keys_nil +\scan_new:N \s__keys_mark \scan_new:N \s__keys_stop -\quark_new:N \q__keys_nil \quark_new:N \q__keys_no_value -\__kernel_quark_new_conditional:Nn \__keys_quark_if_nil:n { TF } \__kernel_quark_new_conditional:Nn \__keys_quark_if_no_value:N { TF } -\quark_new:N \q__keys_recursion_tail -\quark_new:N \q__keys_recursion_stop -\__kernel_quark_new_test:N \__keys_if_recursion_tail_stop:n \cs_new_protected:Npn \keys_define:nn { \__keys_define:onn \l__keys_module_str } \cs_new_protected:Npn \__keys_define:nnn #1#2#3 @@ -12549,52 +12531,49 @@ \str_if_empty:NF \l__keys_property_str { \__kernel_msg_error:nnxx { kernel } { key-property-unknown } - { \l__keys_property_str } { \l_keys_path_str } + \l__keys_property_str \l_keys_path_str } } } \cs_new_protected:Npn \__keys_property_find:n #1 { - \str_set:Nx \l__keys_property_str { \__keys_trim_spaces:n {#1} } - \exp_after:wN \__keys_property_find:w \l__keys_property_str . . - \s__keys_stop {#1} + \cs_set_nopar:Npx \l__keys_property_str { \__keys_trim_spaces:n { #1 } } + \exp_after:wN \__keys_property_find_auxi:w \l__keys_property_str + \s__keys_nil \__keys_property_find_auxii:w + . \s__keys_nil \__keys_property_find_err:w } -\cs_new_protected:Npn \__keys_property_find:w #1 . #2 . #3 \s__keys_stop #4 +\cs_new_protected:Npn \__keys_property_find_auxi:w #1 . #2 \s__keys_nil #3 { - \tl_if_blank:nTF {#3} - { - \str_clear:N \l__keys_property_str - \__kernel_msg_error:nnn { kernel } { key-no-property } {#4} - } - { - \str_if_eq:nnTF {#3} { . } - { - \str_set:Nx \l_keys_path_str - { - \str_if_empty:NF \l__keys_module_str - { \l__keys_module_str / } - \tl_trim_spaces:n {#1} - } - \str_set:Nn \l__keys_property_str { . #2 } - } - { - \str_set:Nx \l_keys_path_str { \l__keys_module_str / #1 . #2 } - \__keys_property_search:w #3 \s__keys_stop - } - \tl_set_eq:NN \l_keys_path_tl \l_keys_path_str - } + #3 #1 \s__keys_mark #2 \s__keys_nil #3 } -\cs_new_protected:Npn \__keys_property_search:w #1 . #2 \s__keys_stop +\cs_new_protected:Npn \__keys_property_find_auxii:w + #1 \s__keys_mark #2 \s__keys_nil \__keys_property_find_auxii:w . \s__keys_nil + \__keys_property_find_err:w { - \str_if_eq:nnTF {#2} { . } - { - \str_set:Nx \l_keys_path_str { \l_keys_path_str } - \str_set:Nn \l__keys_property_str { . #1 } - } - { - \str_set:Nx \l_keys_path_str { \l_keys_path_str . #1 } - \__keys_property_search:w #2 \s__keys_stop - } + \cs_set_nopar:Npx \l_keys_path_str + { \str_if_empty:NF \l__keys_module_str { \l__keys_module_str / } #1 } + \__keys_property_find_auxi:w #2 \s__keys_nil \__keys_property_find_auxiii:w . \s__keys_nil + \__keys_property_find_auxiv:w + } +\cs_new_protected:Npn \__keys_property_find_auxiii:w #1 \s__keys_mark + { + \cs_set_nopar:Npx \l_keys_path_str { \l_keys_path_str . #1 } + \__keys_property_find_auxi:w + } +\cs_new_protected:Npn \__keys_property_find_auxiv:w + #1 \s__keys_nil \__keys_property_find_auxiii:w + \s__keys_mark \s__keys_nil \__keys_property_find_auxiv:w + { + \cs_set_nopar:Npx \l__keys_property_str { . #1 } + \cs_set_nopar:Npx \l_keys_path_str + { \exp_after:wN \__keys_trim_spaces:n \exp_after:wN { \l_keys_path_str } } + \tl_set_eq:NN \l_keys_path_tl \l_keys_path_str + } +\cs_new_protected:Npn \__keys_property_find_err:w + #1 \s__keys_nil #2 \__keys_property_find_err:w + { + \str_clear:N \l__keys_property_str + \__kernel_msg_error:nnn { kernel } { key-no-property } {#1} } \cs_new_protected:Npn \__keys_define_code:n #1 { @@ -12604,9 +12583,8 @@ \l__keys_property_str \s__keys_stop { \use:c { \c__keys_props_root_str \l__keys_property_str } } { - \__kernel_msg_error:nnxx { kernel } - { key-property-requires-value } { \l__keys_property_str } - { \l_keys_path_str } + \__kernel_msg_error:nnxx { kernel } { key-property-requires-value } + \l__keys_property_str \l_keys_path_str } } { \use:c { \c__keys_props_root_str \l__keys_property_str } {#1} } @@ -12625,7 +12603,7 @@ \__keys_cmd_set:nn { \l_keys_path_str / unknown } { \__kernel_msg_error:nnx { kernel } { boolean-values-only } - { \l_keys_key_str } + \l_keys_key_str } \__keys_default_set:n { true } } @@ -12641,7 +12619,7 @@ \__keys_cmd_set:nn { \l_keys_path_str / unknown } { \__kernel_msg_error:nnx { kernel } { boolean-values-only } - { \l_keys_key_str } + \l_keys_key_str } \__keys_default_set:n { true } } @@ -12660,7 +12638,7 @@ { choice } { \__kernel_msg_error:nnxx { kernel } { nested-choice-key } - { \l_keys_path_tl } { \__keys_parent:o \l_keys_path_str } + \l_keys_path_tl { \__keys_parent:o \l_keys_path_str } } { \__keys_choice_make_aux:N #1 } } @@ -12670,11 +12648,11 @@ { \cs_set_nopar:cpn { \c__keys_type_root_str \l_keys_path_str } { choice } - \__keys_cmd_set:nn { \l_keys_path_str } { #1 {##1} } + \__keys_cmd_set:nn \l_keys_path_str { #1 {##1} } \__keys_cmd_set:nn { \l_keys_path_str / unknown } { \__kernel_msg_error:nnxx { kernel } { key-choice-unknown } - { \l_keys_path_str } {##1} + \l_keys_path_str {##1} } } \cs_new_protected:Npn \__keys_choices_make:nn @@ -12748,15 +12726,15 @@ { \__keys_execute_inherit: } { \str_clear:N \l__keys_inherit_str - \cs_if_exist_use:cT { \c__keys_code_root_str \l_keys_path_str } { {#1} } + \cs_if_exist:cT { \c__keys_code_root_str \l_keys_path_str } + { \__keys_execute:nn \l_keys_path_str {#1} } } } \cs_new_protected:Npn \__keys_meta_make:n #1 { \__keys_cmd_set:Vo \l_keys_path_str { - \exp_after:wN \keys_set:nn - \exp_after:wN { \l__keys_module_str } {#1} + \exp_after:wN \keys_set:nn \exp_after:wN { \l__keys_module_str } {#1} } } \cs_new_protected:Npn \__keys_meta_make:nn #1#2 @@ -12764,11 +12742,9 @@ \cs_new_protected:Npn \__keys_prop_put:Nn #1#2 { \prop_if_exist:NF #1 { \prop_new:N #1 } - \exp_after:wN \__keys_find_key_module:NNw - \exp_after:wN \l__keys_tmpa_tl - \exp_after:wN \l__keys_tmpb_tl - \l_keys_path_str / \s__keys_stop - \__keys_cmd_set:nx { \l_keys_path_str } + \exp_after:wN \__keys_find_key_module:wNN \l_keys_path_str \s__keys_stop + \l__keys_tmpa_tl \l__keys_tmpb_tl + \__keys_cmd_set:nx \l_keys_path_str { \exp_not:c { prop_ #2 put:Nnn } \exp_not:N #1 @@ -12820,8 +12796,8 @@ \bool_if:NF \l__keys_no_value_bool { \__kernel_msg_error:nnxx { kernel } { value-forbidden } - { \l_keys_path_str } { \l_keys_value_tl } - \__keys_validate_cleanup:w + \l_keys_path_str \l_keys_value_tl + \use_none:nnn } } \cs_new_protected:Npn \__keys_validate_required: @@ -12829,15 +12805,14 @@ \bool_if:NT \l__keys_no_value_bool { \__kernel_msg_error:nnx { kernel } { value-required } - { \l_keys_path_str } - \__keys_validate_cleanup:w + \l_keys_path_str + \use_none:nnn } } -\cs_new_protected:Npn \__keys_validate_cleanup:w #1 \cs_end: #2#3 { } \cs_new_protected:Npn \__keys_variable_set:NnnN #1#2#3#4 { \use:c { #2_if_exist:NF } #1 { \use:c { #2 _new:N } #1 } - \__keys_cmd_set:nx { \l_keys_path_str } + \__keys_cmd_set:nx \l_keys_path_str { \exp_not:c { #2 _ #3 set:N #4 } \exp_not:N #1 @@ -12878,7 +12853,7 @@ \cs_new_protected:cpn { \c__keys_props_root_str .choices:xn } #1 { \exp_args:Nx \__keys_choices_make:nn #1 } \cs_new_protected:cpn { \c__keys_props_root_str .code:n } #1 - { \__keys_cmd_set:nn { \l_keys_path_str } {#1} } + { \__keys_cmd_set:nn \l_keys_path_str {#1} } \cs_new_protected:cpn { \c__keys_props_root_str .clist_set:N } #1 { \__keys_variable_set:NnnN #1 { clist } { } n } \cs_new_protected:cpn { \c__keys_props_root_str .clist_set:c } #1 @@ -13039,7 +13014,7 @@ \cs_new_protected:Npn \keys_set_known:nnN #1#2#3 { \exp_args:No \__keys_set_known:nnnnN - \l__keys_unused_clist { \q__keys_no_value } {#1} {#2} #3 + \l__keys_unused_clist \q__keys_no_value {#1} {#2} #3 } \cs_generate_variant:Nn \keys_set_known:nnN { nV , nv , no } \cs_new_protected:Npn \keys_set_known:nnnN #1#2#3#4 @@ -13052,11 +13027,11 @@ { \clist_clear:N \l__keys_unused_clist \__keys_set_known:nnn {#2} {#3} {#4} - \tl_set:Nx #5 { \exp_not:o { \l__keys_unused_clist } } + \tl_set:Nx #5 { \exp_not:o \l__keys_unused_clist } \tl_set:Nn \l__keys_unused_clist {#1} } \cs_new_protected:Npn \keys_set_known:nn #1#2 - { \__keys_set_known:nnn { \q__keys_no_value } {#1} {#2} } + { \__keys_set_known:nnn \q__keys_no_value {#1} {#2} } \cs_generate_variant:Nn \keys_set_known:nn { nV , nv , no } \cs_new_protected:Npn \__keys_set_known:nnn #1#2#3 { @@ -13081,7 +13056,7 @@ { \exp_args:No \__keys_set_filter:nnnnnN \l__keys_unused_clist - { \q__keys_no_value } {#1} {#2} {#3} #4 + \q__keys_no_value {#1} {#2} {#3} #4 } \cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno } \cs_new_protected:Npn \keys_set_filter:nnnnN #1#2#3#4#5 @@ -13094,11 +13069,11 @@ { \clist_clear:N \l__keys_unused_clist \__keys_set_filter:nnnn {#2} {#3} {#4} {#5} - \tl_set:Nx #6 { \exp_not:o { \l__keys_unused_clist } } + \tl_set:Nx #6 { \exp_not:o \l__keys_unused_clist } \tl_set:Nn \l__keys_unused_clist {#1} } \cs_new_protected:Npn \keys_set_filter:nnn #1#2#3 - {\__keys_set_filter:nnnn { \q__keys_no_value } {#1} {#2} {#3} } + {\__keys_set_filter:nnnn \q__keys_no_value {#1} {#2} {#3} } \cs_generate_variant:Nn \keys_set_filter:nnn { nnV , nnv , nno } \cs_new_protected:Npn \__keys_set_filter:nnnn #1#2#3#4 { @@ -13168,30 +13143,41 @@ } \str_clear:N \l__keys_module_str \str_clear:N \l__keys_inherit_str - \exp_after:wN \__keys_find_key_module:NNw - \exp_after:wN \l__keys_module_str - \exp_after:wN \l_keys_key_str - \l_keys_path_str / \s__keys_stop + \exp_after:wN \__keys_find_key_module:wNN \l_keys_path_str \s__keys_stop + \l__keys_module_str \l_keys_key_str \tl_set_eq:NN \l_keys_key_tl \l_keys_key_str \__keys_value_or_default:n {#3} \bool_if:NTF \l__keys_selective_bool - { \__keys_set_selective: } - { \__keys_execute: } + \__keys_set_selective: + \__keys_execute: \str_set:Nn \l__keys_module_str {#1} } \cs_generate_variant:Nn \__keys_set_keyval:nnn { o } -\cs_new_protected:Npn \__keys_find_key_module:NNw #1#2#3 / #4 \s__keys_stop +\cs_new_protected:Npn \__keys_find_key_module:wNN #1 \s__keys_stop #2 #3 { - \tl_if_blank:nTF {#4} - { \str_set:Nn #2 {#3} } - { - \str_put_right:Nx #1 - { - \str_if_empty:NF #1 { / } - #3 - } - \__keys_find_key_module:NNw #1#2 #4 \s__keys_stop - } + \__keys_find_key_module_auxi:Nw #2 #1 \s__keys_nil \__keys_find_key_module_auxii:Nw + / \s__keys_nil \__keys_find_key_module_auxiv:Nw #3 + } +\cs_new_protected:Npn \__keys_find_key_module_auxi:Nw #1 #2 / #3 \s__keys_nil #4 + { + #4 #1 #2 \s__keys_mark #3 \s__keys_nil #4 + } +\cs_new_protected:Npn \__keys_find_key_module_auxii:Nw + #1 #2 \s__keys_mark #3 \s__keys_nil \__keys_find_key_module_auxii:Nw + { + \cs_set_nopar:Npx #1 { \tl_if_empty:NF #1 { #1 / } #2 } + \__keys_find_key_module_auxi:Nw #1 #3 \s__keys_nil \__keys_find_key_module_auxiii:Nw + } +\cs_new_protected:Npn \__keys_find_key_module_auxiii:Nw #1 #2 \s__keys_mark + { + \cs_set_nopar:Npx #1 { \tl_if_empty:NF #1 { #1 / } #2 } + \__keys_find_key_module_auxi:Nw #1 + } +\cs_new_protected:Npn \__keys_find_key_module_auxiv:Nw + #1 #2 \s__keys_nil #3 \s__keys_mark + \s__keys_nil \__keys_find_key_module_auxiv:Nw #4 + { + \cs_set_nopar:Npn #4 { #2 } } \cs_new_protected:Npn \__keys_set_selective: { @@ -13203,8 +13189,8 @@ } { \bool_if:NTF \l__keys_filtered_bool - { \__keys_execute: } - { \__keys_store_unused: } + \__keys_execute: + \__keys_store_unused: } } \cs_new_protected:Npn \__keys_check_groups: @@ -13217,20 +13203,20 @@ \str_if_eq:nnT {##1} {####1} { \bool_set_true:N \l__keys_tmp_bool - \clist_map_break:n { \seq_map_break: } + \clist_map_break:n \seq_map_break: } } } \bool_if:NTF \l__keys_tmp_bool { \bool_if:NTF \l__keys_filtered_bool - { \__keys_store_unused: } - { \__keys_execute: } + \__keys_store_unused: + \__keys_execute: } { \bool_if:NTF \l__keys_filtered_bool - { \__keys_execute: } - { \__keys_store_unused: } + \__keys_execute: + \__keys_store_unused: } } \cs_new_protected:Npn \__keys_value_or_default:n #1 @@ -13272,8 +13258,7 @@ \cs_if_exist:cTF { \c__keys_code_root_str \l_keys_path_str } { \cs_if_exist_use:c { \c__keys_validate_root_str \l_keys_path_str } - \cs:w \c__keys_code_root_str \l_keys_path_str \exp_after:wN \cs_end: - \exp_after:wN { \l_keys_value_tl } + \__keys_execute:no \l_keys_path_str \l_keys_value_tl } { \cs_if_exist:cTF @@ -13292,10 +13277,8 @@ { \str_set:Nn \l__keys_inherit_str {##1} \cs_if_exist_use:c { \c__keys_validate_root_str ##1 / \l_keys_key_str } - \cs:w \c__keys_code_root_str ##1 / \l_keys_key_str - \exp_after:wN \cs_end: \exp_after:wN - { \l_keys_value_tl } - \clist_map_break:n { \use_none:n } + \__keys_execute:no { ##1 / \l_keys_key_str } \l_keys_value_tl + \clist_map_break:n \use_none:n } } \__keys_execute_unknown: @@ -13307,24 +13290,22 @@ { \cs_if_exist:cTF { \c__keys_code_root_str \l__keys_module_str / unknown } - { - \cs:w \c__keys_code_root_str \l__keys_module_str / unknown - \exp_after:wN \cs_end: \exp_after:wN { \l_keys_value_tl } - } + { \__keys_execute:no { \l__keys_module_str / unknown } \l_keys_value_tl } { \__kernel_msg_error:nnxx { kernel } { key-unknown } - { \l_keys_path_str } { \l__keys_module_str } + \l_keys_path_str \l__keys_module_str } } } \cs_new:Npn \__keys_execute:nn #1#2 + { \__keys_execute:no {#1} { \prg_do_nothing: #2 } } +\cs_new:Npn \__keys_execute:no #1#2 { - \cs_if_exist:cTF { \c__keys_code_root_str #1 } + \exp_args:NNo \exp_args:No \use:n { \cs:w \c__keys_code_root_str #1 \exp_after:wN \cs_end: - \exp_after:wN { \l_keys_value_tl } + \exp_after:wN {#2} } - {#2} } \cs_new_protected:Npn \__keys_store_unused: { @@ -13332,7 +13313,7 @@ { \clist_put_right:Nx \l__keys_unused_clist { - \exp_not:o \l_keys_key_str + \l_keys_key_str \bool_if:NF \l__keys_no_value_bool { = { \exp_not:o \l_keys_value_tl } } } @@ -13342,7 +13323,7 @@ { \clist_put_right:Nx \l__keys_unused_clist { - \exp_not:o \l_keys_path_str + \l_keys_path_str \bool_if:NF \l__keys_no_value_bool { = { \exp_not:o \l_keys_value_tl } } } @@ -13386,7 +13367,7 @@ \cs_new:Npn \__keys_choice_find:n #1 { \str_if_empty:NTF \l__keys_inherit_str - { \__keys_choice_find:nn { \l_keys_path_str } {#1} } + { \__keys_choice_find:nn \l_keys_path_str {#1} } { \__keys_choice_find:nn { \l__keys_inherit_str / \l_keys_key_str } {#1} @@ -13395,46 +13376,63 @@ \cs_new:Npn \__keys_choice_find:nn #1#2 { \cs_if_exist:cTF { \c__keys_code_root_str #1 / \__keys_trim_spaces:n {#2} } - { \use:c { \c__keys_code_root_str #1 / \__keys_trim_spaces:n {#2} } {#2} } - { \use:c { \c__keys_code_root_str #1 / unknown } {#2} } + { \__keys_execute:nn { #1 / \__keys_trim_spaces:n {#2} } {#2} } + { \__keys_execute:nn { #1 / unknown } {#2} } } \cs_new:Npn \__keys_multichoice_find:n #1 { \clist_map_function:nN {#1} \__keys_choice_find:n } -\cs_new:Npn \__keys_parent:n #1 - { \__keys_parent:w #1 / / \s__keys_stop { } } -\cs_generate_variant:Nn \__keys_parent:n { o } -\cs_new:Npn \__keys_parent:w #1 / #2 / #3 \s__keys_stop #4 +\cs_new:Npn \__keys_parent:o #1 { - \tl_if_blank:nTF {#2} - { - \tl_if_blank:nF {#4} - { \use_none:n #4 } - } - { - \__keys_parent:w #2 / #3 \s__keys_stop { #4 / #1 } - } + \exp_after:wN \__keys_parent_auxi:w #1 \q_nil \__keys_parent_auxii:w + / \q_nil \__keys_parent_auxiv:w } -\cs_new:Npn \__keys_trim_spaces:n #1 +\cs_new:Npn \__keys_parent_auxi:w #1 / #2 \q_nil #3 { - \exp_after:wN \__keys_trim_spaces_auxi:w \tl_to_str:n {#1} - / \q__keys_nil \s__keys_stop + #3 { #1 } #2 \q_nil #3 } -\cs_new:Npn \__keys_trim_spaces_auxi:w #1 / #2 \s__keys_stop +\cs_new:Npn \__keys_parent_auxii:w #1 #2 \q_nil \__keys_parent_auxii:w + { + #1 \__keys_parent_auxi:w #2 \q_nil \__keys_parent_auxiii:n + } +\cs_new:Npn \__keys_parent_auxiii:n #1 + { + / #1 \__keys_parent_auxi:w + } +\cs_new:Npn \__keys_parent_auxiv:w #1 \q_nil \__keys_parent_auxiv:w { - \__keys_quark_if_nil:nTF {#2} - { \tl_trim_spaces:n {#1} } - { \__keys_trim_spaces_auxii:w #1 / #2 } } -\cs_new:Npn \__keys_trim_spaces_auxii:w #1 / #2 / \q__keys_nil +\group_begin: + \cs_set:Npn \__keys_tmp:n #1 + { + \cs_new:Npn \__keys_trim_spaces:n ##1 + { + \exp_after:wN \__keys_trim_spaces_auxi:w \tl_to_str:n { / ##1 } / + \s__keys_nil \__keys_trim_spaces_auxi:w + \s__keys_mark \__keys_trim_spaces_auxii:w + #1 / #1 + \s__keys_nil \__keys_trim_spaces_auxii:w + \s__keys_mark \__keys_trim_spaces_auxiii:w + } + } + \__keys_tmp:n { ~ } +\group_end: +\cs_new:Npn \__keys_trim_spaces_auxi:w #1 ~ / #2 \s__keys_nil #3 { - \tl_trim_spaces:n {#1} - \__keys_trim_spaces_auxiii:w #2 / \q__keys_recursion_tail / \q__keys_recursion_stop + #3 #1 / #2 \s__keys_nil #3 } -\cs_set:Npn \__keys_trim_spaces_auxiii:w #1 / +\cs_new:Npn \__keys_trim_spaces_auxii:w #1 / ~ #2 \s__keys_mark #3 { - \__keys_if_recursion_tail_stop:n {#1} - / \tl_trim_spaces:n { #1 } - \__keys_trim_spaces_auxiii:w + #3 #1 / #2 \s__keys_mark #3 + } +\cs_new:Npn \__keys_trim_spaces_auxiii:w + / #1 / + \s__keys_nil \__keys_trim_spaces_auxi:w + \s__keys_mark \__keys_trim_spaces_auxii:w + / + \s__keys_nil \__keys_trim_spaces_auxii:w + \s__keys_mark \__keys_trim_spaces_auxiii:w + { + #1 } \prg_new_conditional:Npnn \keys_if_exist:nn #1#2 { p , T , F , TF } { @@ -20124,7 +20122,11 @@ \__kernel_chk_if_free_cs:N #1 \__cctab_new:N #1 } - \cs_new_eq:NN \__cctab_new:N \newcatcodetable + \cs_new_protected:Npn \__cctab_new:N #1 + { + \newcatcodetable #1 + \tex_initcatcodetable:D #1 + } } { \cs_new_protected:Npn \__cctab_new:N #1 @@ -20348,6 +20350,13 @@ { \int_compare:nNnTF {#1-1} < { \e@alloc@ccodetable@count } } + \cs_if_exist:NT \c_syst_catcodes_n + { + \cs_gset_protected:Npn \__cctab_chk_if_valid_aux:NTF #1 + { + \int_compare:nTF { #1 <= \c_syst_catcodes_n } + } + } } { \cs_new_protected:Npn \__cctab_chk_if_valid_aux:NTF #1 @@ -26538,7 +26547,7 @@ \cs_new_protected:Npn \__color_select:N #1 { \exp_after:wN \__color_select:nn #1 } \cs_new_protected:Npn \__color_select:nn #1#2 - { \use:c { __color_backend_ #1 :n } {#2} } + { \use:c { __color_backend_select_ #1 :n } {#2} } \tl_new:N \l__color_current_tl \tl_set:Nn \l__color_current_tl { { gray } { 0 } } %% File: l3coffins.dtx @@ -26673,8 +26682,7 @@ #4 #1 { \dim_set:Nn \tex_hsize:D {#2} - \dim_set_eq:NN \linewidth \tex_hsize:D - \dim_set_eq:NN \columnwidth \tex_hsize:D + \__coffin_set_vertical_aux: #3 } #5 #1 @@ -26692,6 +26700,13 @@ \box_clear:N \l__coffin_internal_box } } +\cs_new_protected:Npx \__coffin_set_vertical_aux: + { + \cs_if_exist:NT \linewidth + { \dim_set_eq:NN \linewidth \tex_hsize:D } + \cs_if_exist:NT \columnwidth + { \dim_set_eq:NN \columnwidth \tex_hsize:D } + } \cs_new_protected:Npn \hcoffin_set:Nw #1 { \__coffin_if_exist:NT #1 @@ -26740,8 +26755,7 @@ { #3 #1 \dim_set:Nn \tex_hsize:D {#2} - \dim_set_eq:NN \linewidth \tex_hsize:D - \dim_set_eq:NN \columnwidth \tex_hsize:D + \__coffin_set_vertical_aux: \cs_set_protected:Npn #4 { #5 @@ -27571,15 +27585,42 @@ \dim_new:N \l__coffin_display_y_dim \prop_new:N \l__coffin_display_poles_prop \tl_new:N \l__coffin_display_font_tl -\tl_set:Nn \l__coffin_display_font_tl { \sffamily \tiny } -\cs_new_protected:Npn \__coffin_color:n #1 - { \cs_if_exist:NT \color { \color {#1} } } +\cs_if_exist:NTF \AtBeginDocument + { \AtBeginDocument } + { \use:n } + { + \tl_set:Nx \l__coffin_display_font_tl + { + \cs_if_exist:NT \sffamily { \exp_not:N \sffamily } + \cs_if_exist:NT \tiny { \exp_not:N \tiny } + } + } +\cs_if_exist:NTF \AtBeginDocument + { \AtBeginDocument } + { \use:n } + { + \cs_new_protected:Npx \__coffin_color:n #1 + { + \cs_if_exist:NTF \color_select:n + { \color_select:n {#1} } + { + \cs_if_exist:NT \color + { \exp_not:N \color {#1} } + } + } + } +\cs_new_protected:Npx \__coffin_rule:nn #1#2 + { + \cs_if_exist:NTF \rule + { \exp_not:N \rule {#1} {#2} } + { \hbox:n { \tex_vrule:D width #1 height #2 \scan_stop: } } + } \cs_new_protected:Npn \coffin_mark_handle:Nnnn #1#2#3#4 { \hcoffin_set:Nn \l__coffin_display_pole_coffin { \__coffin_color:n {#4} - \rule { 1pt } { 1pt } + \__coffin_rule:nn { 1pt } { 1pt } } \__coffin_attach_mark:NnnNnnnn #1 {#2} {#3} \l__coffin_display_pole_coffin { hc } { vc } { 0pt } { 0pt } @@ -27624,7 +27665,7 @@ \hcoffin_set:Nn \l__coffin_display_pole_coffin { \__coffin_color:n {#2} - \rule { 1pt } { 1pt } + \__coffin_rule:nn { 1pt } { 1pt } } \prop_set_eq:Nc \l__coffin_display_poles_prop { coffin ~ \__coffin_to_value:N #1 ~ poles } |