diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3expan.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3expan.sty | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty b/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty index b0fded9bb79..f3bf00e9997 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3expan.sty @@ -13,7 +13,7 @@ %% %% Do not distribute a modified version of this file. %% -%% File: l3expan.dtx Copyright (C) 1990-2011 The LaTeX3 project +%% File: l3expan.dtx Copyright (C) 1990-2012 The LaTeX3 project %% %% It may be distributed and/or modified under the conditions of the %% LaTeX Project Public License (LPPL), either version 1.3c of this @@ -46,19 +46,19 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3expan.dtx 3086 2011-12-22 17:55:46Z bruno $ +\GetIdInfo$Id: l3expan.dtx 3196 2012-01-15 09:44:05Z joseph $ {L3 Experimental argument expansion} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \package_check_loaded_expl: -\cs_new_nopar:Npn \l_exp_tl { } +\cs_new_nopar:Npn \l_exp_internal_tl { } \cs_new:Npn \exp_arg_next:nnn #1#2#3 { #2 \::: { #3 {#1} } } -\cs_new:Npn \exp_arg_next_nobrace:nnn #1#2#3 { #2 \::: { #3 #1 } } +\cs_new:Npn \exp_arg_next:Nnn #1#2#3 { #2 \::: { #3 #1 } } \cs_new:Npn \::: #1 {#1} \cs_new:Npn \::n #1 \::: #2#3 { #1 \::: { #2 {#3} } } \cs_new:Npn \::N #1 \::: #2#3 { #1 \::: {#2#3} } \cs_new:Npn \::c #1 \::: #2#3 - { \exp_after:wN \exp_arg_next_nobrace:nnn \cs:w #3 \cs_end: {#1} {#2} } + { \exp_after:wN \exp_arg_next:Nnn \cs:w #3 \cs_end: {#1} {#2} } \cs_new:Npn \::o #1 \::: #2#3 { \exp_after:wN \exp_arg_next:nnn \exp_after:wN {#3} {#1} {#2} } \cs_new:Npn \::f #1 \::: #2#3 @@ -70,8 +70,8 @@ \use:nn { \cs_new_eq:NN \exp_stop_f: } { ~ } \cs_new_protected:Npn \::x #1 \::: #2#3 { - \cs_set_nopar:Npx \l_exp_tl { {#3} } - \exp_after:wN \exp_arg_next:nnn \l_exp_tl {#1} {#2} + \cs_set_nopar:Npx \l_exp_internal_tl { {#3} } + \exp_after:wN \exp_arg_next:nnn \l_exp_internal_tl {#1} {#2} } \cs_new:Npn \::V #1 \::: #2#3 { @@ -207,8 +207,9 @@ \cs_new_nopar:Npn \exp_args:Nnf { \::n \::f \::: } \cs_new_nopar:Npn \exp_args:Nno { \::n \::o \::: } \cs_new_nopar:Npn \exp_args:NnV { \::n \::V \::: } -\cs_new_nopar:Npn \exp_args:Noc { \::o \::c \::: } \cs_new_nopar:Npn \exp_args:Noo { \::o \::o \::: } +\cs_new_nopar:Npn \exp_args:Nof { \::o \::f \::: } +\cs_new_nopar:Npn \exp_args:Noc { \::o \::c \::: } \cs_new_protected_nopar:Npn \exp_args:NNx { \::N \::x \::: } \cs_new_protected_nopar:Npn \exp_args:Ncx { \::c \::x \::: } \cs_new_protected_nopar:Npn \exp_args:Nnx { \::n \::x \::: } @@ -247,8 +248,8 @@ } \cs_new_protected:Npn \::x_unbraced \::: #1#2 { - \cs_set_nopar:Npx \l_exp_tl { \exp_not:n {#1} #2 } - \l_exp_tl + \cs_set_nopar:Npx \l_exp_internal_tl { \exp_not:n {#1} #2 } + \l_exp_internal_tl } \cs_new:Npn \exp_last_unbraced:NV #1#2 { \exp_after:wN #1 \tex_romannumeral:D \exp_eval_register:N #2 } @@ -291,6 +292,7 @@ \cs_new:Npn \exp_last_two_unbraced_aux:noN #1#2#3 { \exp_after:wN #3 #2 #1 } \cs_new:Npn \exp_not:o #1 { \etex_unexpanded:D \exp_after:wN {#1} } +\cs_new:Npn \exp_not:c #1 { \exp_after:wN \exp_not:N \cs:w #1 \cs_end: } \cs_new:Npn \exp_not:f #1 { \etex_unexpanded:D \exp_after:wN { \tex_romannumeral:D -`0 #1 } } \cs_new:Npn \exp_not:V #1 @@ -303,7 +305,6 @@ \etex_unexpanded:D \exp_after:wN { \tex_romannumeral:D \exp_eval_register:c {#1} } } -\cs_new:Npn \exp_not:c #1 { \exp_after:wN \exp_not:N \cs:w #1 \cs_end: } \cs_new_protected:Npn \cs_generate_variant:Nn #1 { \chk_if_exist_cs:N #1 @@ -311,9 +312,9 @@ \cs_split_function:NN #1 \cs_generate_variant_aux:nnNNn #1 } -\cs_new:Npn \cs_generate_variant_aux:nnNNn #1#2#3#4#5 +\cs_new_protected:Npn \cs_generate_variant_aux:nnNNn #1#2#3#4#5 { \cs_generate_variant_aux:Nnnw #4 {#1}{#2} #5 , ? , \q_recursion_stop } -\cs_new:Npn \cs_generate_variant_aux:Nnnw #1#2#3#4 , +\cs_new_protected:Npn \cs_generate_variant_aux:Nnnw #1#2#3#4 , { \if:w ? #4 \exp_after:wN \use_none_delimit_by_q_recursion_stop:w @@ -340,7 +341,7 @@ {#4} \cs_generate_variant_aux:Nnnw #1 {#2} {#3} } -\cs_new:Npn \cs_generate_variant_aux:NNn #1 #2 #3 +\cs_new_protected:Npn \cs_generate_variant_aux:NNn #1 #2 #3 { \cs_if_free:NTF #2 { @@ -369,7 +370,7 @@ \tex_lowercase:D { \group_end: - \cs_new:Npn \cs_generate_variant_aux:N #1 + \cs_new_protected:Npn \cs_generate_variant_aux:N #1 { \exp_after:wN \cs_generate_variant_aux:w \token_to_meaning:N #1 @@ -378,7 +379,7 @@ \q_mark \cs_new_nopar:Npx \q_stop } - \cs_new:Npn \cs_generate_variant_aux:w + \cs_new_protected:Npn \cs_generate_variant_aux:w #1 ? PROTECTEZ #2 \q_mark #3 #4 \q_stop { \cs_set_eq:NN \cs_tmp:w #3 |