diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty index 18e704e88cd..d3a64fcc10f 100644 --- a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty +++ b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty @@ -57,7 +57,7 @@ %% ----------------------------------------------------------------------- %% \RequirePackage{l3names} -\GetIdInfo$Id: xparse.dtx 1897 2010-04-26 05:56:56Z joseph $ +\GetIdInfo$Id: xparse.dtx 1905 2010-05-19 07:45:31Z joseph $ {Generic document command parser} \ProvidesExplPackage {\filename}{\filedate}{\fileversion}{\filedescription} @@ -687,7 +687,7 @@ { \exp_not:n {#2} } {#1} { \exp_not:n {#3} } } } - \tl_set:Nx \_l_xparse_tmp_tl + \tl_set:Nx \l_xparse_tmp_tl { \prg_replicate:nn { #1 + 1 } { \_xparse_split_argument_aux_i:w } @@ -697,7 +697,7 @@ \prg_replicate:nn {#1} { \exp_not:n {#2} \NoValue } \exp_not:n { #2 \q_stop } } - \_l_xparse_tmp_tl + \l_xparse_tmp_tl } \group_end: \cs_set_protected:Npn \_xparse_split_argument_aux_i:w { } @@ -708,6 +708,36 @@ { \_xparse_split_argument_aux_iii:w #2 \q_stop } } \cs_set_protected:Npn \_xparse_split_argument_aux_iii:w { } +\tl_new:N \_l_xparse_split_list_tl +\group_begin: + \char_make_active:N \@ + \cs_gset_protected:Npn \_xparse_split_list:nn #1#2 + { + \tl_set:Nn \_l_xparse_split_list_tl {#2} + \group_begin: + \char_set_lccode:nn { `\@ } { `#1 } + \tl_to_lowercase:n + { + \group_end: + \tl_replace_all_in:Nnn \_l_xparse_split_list_tl { @ } {#1} + } + \cs_set:Npn \_xparse_split_list_aux:w ##1 #1 + { + \quark_if_recursion_tail_stop:n {##1} + \tl_put_right:Nn \ProcessedArgument { {##1} } + \_xparse_split_list_aux:w + } + \tl_if_empty:NTF \_l_xparse_split_list_tl + { \tl_set:Nn \ProcessedArgument { { } } } + { + \tl_clear:N \ProcessedArgument + \exp_last_unbraced:NV \_xparse_split_list_aux:w + \_l_xparse_split_list_tl #1 + \q_recursion_tail #1 \q_recursion_stop + } + } +\group_end: +\cs_set:Npn \_xparse_split_list_aux:w { } \cs_new:Npn \xparse_exp_add_type_d:w #1#2 { \xparse_exp_add_type_D:w #1 #2 { \NoValue } } @@ -1089,6 +1119,7 @@ \cs_new:Npn \ProcessedArgument { } \cs_new_eq:NN \ReverseBoolean \_xparse_bool_reverse:N \cs_new_eq:NN \SplitArgument \_xparse_split_argument:nnn +\cs_new_eq:NN \SplitList \_xparse_split_list:nn \endinput %% %% End of file `xparse.sty'. |