diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3packages/xparse/xparse-generic.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3packages/xparse/xparse-generic.tex | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse-generic.tex b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse-generic.tex index 22296b4fbae..7263475814c 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse-generic.tex +++ b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse-generic.tex @@ -6,7 +6,7 @@ %% %% xparse.dtx (with options: `core') %% -%% Copyright (C) 2009-2020 The LaTeX3 Project +%% Copyright (C) 2009-2021 The LaTeX Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -232,6 +232,7 @@ \cs_new_protected:Npn \__xparse_start_env:nnnnn #1#2 { \cs_if_exist_use:N \conditionally@traceoff + \group_align_safe_begin: \str_set:Nn \l__xparse_environment_str {#2} \bool_set_true:N \l__xparse_environment_bool \__xparse_start_aux:ccnnnn @@ -241,8 +242,9 @@ } \cs_new_protected:Npx \__xparse_start:nNNnnn #1#2#3 { - \exp_not:n { \cs_if_exist_use:N \conditionally@traceoff } \exp_not:c { xparse~function~is~not~expandable } + \exp_not:n { \cs_if_exist_use:N \conditionally@traceoff } + \exp_not:N \group_align_safe_begin: \exp_not:n { \bool_set_false:N \l__xparse_environment_bool } \exp_not:N \__xparse_start_aux:NNnnnn #2 #3 {#1} @@ -261,6 +263,7 @@ { \tl_if_empty:NF \l__xparse_defaults_tl { \__xparse_defaults: } \tl_if_empty:NF \l__xparse_process_all_tl { \__xparse_args_process: } + \group_align_safe_end: \cs_if_exist_use:N \conditionally@traceon \exp_after:wN \l__xparse_fn_code_tl \l__xparse_args_tl } @@ -342,7 +345,10 @@ { \ProcessedArgument } } \cs_new:Npn \__xparse_start_expandable:nNNNNn #1#2#3#4#5#6 - { #6 \__xparse_end_expandable:NNw #5 #4 \q__xparse #2#3 } + { + \group_align_safe_begin: + #6 \__xparse_end_expandable:NNw #5 #4 \q__xparse #2#3 + } \cs_new:Npn \__xparse_end_expandable:NNw #1#2 { \__xparse_end_expandable_aux:w #1#2 \prg_do_nothing: } \cs_new:Npn \__xparse_end_expandable_aux:w #1#2#3 \q__xparse @@ -364,7 +370,7 @@ { #6 \str_if_eq:nnTF {#1} {#2} - { \use_i_delimit_by_q_stop:nw { #5 #1 } } + { \use_i_delimit_by_q_stop:nw { \group_align_safe_end: #5 #1 } } { \exp_args:No \__xparse_tl_mapthread_function:nnN { #4 #1 } {#3} @@ -1278,26 +1284,24 @@ { \tl_set:Nn \l__xparse_signature_tl {#1} \group_begin: - \group_align_safe_begin: - \tex_escapechar:D = 92 \scan_stop: - \tl_clear:N \l__xparse_v_arg_tl - \peek_remove_spaces:n - { - \peek_meaning_remove:NTF \c_group_begin_token - { - \group_align_safe_end: - \__xparse_grab_v_bgroup: - } - { - \peek_N_type:TF - { \__xparse_grab_v_aux_test:N } - { \__xparse_grab_v_aux_abort:n { } } - } - } + \tex_escapechar:D = 92 \scan_stop: + \tl_clear:N \l__xparse_v_arg_tl + \peek_remove_spaces:n + { + \peek_meaning_remove:NTF \c_group_begin_token + { + \group_align_safe_end: + \__xparse_grab_v_bgroup: + } + { + \peek_N_type:TF + { \__xparse_grab_v_aux_test:N } + { \__xparse_grab_v_aux_abort:n { } } + } + } } \cs_new_protected:Npn \__xparse_grab_v_group_end: { - \group_align_safe_end: \exp_args:NNNo \group_end: \tl_set:Nn \l__xparse_v_arg_tl { \l__xparse_v_arg_tl } @@ -1610,7 +1614,6 @@ { #3 { \BooleanTrue } \q__xparse #4 #5 } { #3 { \BooleanFalse } \q__xparse #4 #5 {#6} } } -\cs_new_eq:NN \__xparse_expandable_grab_u:w \prg_do_nothing: \cs_new:Npn \__xparse_put_arg_expandable:nw #1#2 \q__xparse { #2 {#1} \q__xparse } \cs_generate_variant:Nn \__xparse_put_arg_expandable:nw { o } \cs_new_protected:Npn \__xparse_bool_reverse:N #1 |