From 19b673bcbee6071004a25ead706b82caf7f20a0e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 27 Sep 2010 23:22:46 +0000 Subject: xpackages update git-svn-id: svn://tug.org/texlive/trunk@19922 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/xpackages/xbase/xparse.sty | 66 +++++++++++----------- .../tex/latex/xpackages/xbase/xtemplate.sty | 34 +++++------ .../tex/latex/xpackages/xtras/l3keys2e.sty | 2 +- 3 files changed, 51 insertions(+), 51 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty index 2b3f8cd388b..5936b52059b 100644 --- a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty +++ b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty @@ -23,7 +23,7 @@ %% David Carlisle %% (C) Copyright 2004-2008 Frank Mittelbach, %% LaTeX3 Project -%% (C) Copyright 2009 LaTeX3 Project +%% (C) Copyright 2009-2010 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 @@ -57,7 +57,7 @@ %% ----------------------------------------------------------------------- %% \RequirePackage{l3names} -\GetIdInfo$Id: xparse.dtx 1927 2010-05-23 11:00:21Z joseph $ +\GetIdInfo$Id: xparse.dtx 2037 2010-09-20 21:22:45Z joseph $ {Generic document command parser} \ProvidesExplPackage {\filename}{\filedate}{\fileversion}{\filedescription} @@ -82,7 +82,6 @@ \tl_new:N \l_xparse_signature_tl \tl_new:N \l_xparse_tmp_tl \int_new:N \l_xparse_total_args_int -\quark_new:N \q_xparse_stop \cs_new_nopar:Npn \xparse_add_grabber_mandatory:N #1 { \tl_put_right:Nx \l_xparse_signature_tl { \exp_not:c { @@ -346,7 +345,7 @@ \bool_set_false:N \l_xparse_m_only_bool } \prg_new_conditional:Nnn \xparse_if_no_value:n { TF,T,F } { - \tl_if_eq:nnTF {#1} { \NoValue } { + \str_if_eq:nnTF {#1} { \NoValue } { \prg_return_true: }{ \prg_return_false: @@ -468,23 +467,23 @@ } \tl_new:N \_l_xparse_nesting_a_tl \tl_new:N \_l_xparse_nesting_b_tl -\quark_new:N \_q_xparse +\quark_new:N \q_xparse \cs_new_protected:Npn \xparse_grab_D_nested:NNNnn #1#2#3#4#5 { \tl_clear:N \_l_xparse_nesting_a_tl \tl_clear:N \_l_xparse_nesting_b_tl - #5 \xparse_grab_arg:w ##1 #1 ##2 \_q_xparse ##3 #2 + #5 \xparse_grab_arg:w ##1 #1 ##2 \q_xparse ##3 #2 { \tl_put_right:Nn \_l_xparse_nesting_a_tl { ##1 #1 } \tl_put_right:Nn \_l_xparse_nesting_b_tl { #2 ##3 } \tl_if_in:nnTF {##2} {#1} - { \xparse_grab_arg:w ##2 \_q_xparse } + { \xparse_grab_arg:w ##2 \q_xparse } { \tl_if_in:NnTF \_l_xparse_nesting_b_tl {#1} { \tl_set_eq:NN \l_xparse_tmp_tl \_l_xparse_nesting_b_tl \tl_clear:N \_l_xparse_nesting_b_tl \exp_last_unbraced:NV \xparse_grab_arg:w - \l_xparse_tmp_tl \_q_xparse + \l_xparse_tmp_tl \q_xparse } { \tl_put_right:Nn \_l_xparse_nesting_a_tl {##2} @@ -495,7 +494,7 @@ } } } - \xparse_grab_arg:w #3 \_q_xparse + \xparse_grab_arg:w #3 \q_xparse } \cs_new:Npn \xparse_grab_G:w #1#2 \l_xparse_args_tl { \xparse_grab_G_aux:nnNn {#1} {#2} \cs_set_nopar:Npn { _ignore_spaces } @@ -673,10 +672,10 @@ \tl_replace_all_in:Nnn \_l_xparse_split_argument_tl { @ } {#2} } \cs_set_protected:Npn \_xparse_split_argument_aux_i:w - ##1 \q_nil ##2 #2 ##3 \q_stop + ##1 \q_mark ##2 #2 ##3 \q_stop { \tl_put_right:Nn \ProcessedArgument { {##2} } - ##1 \q_nil ##3 \q_stop + ##1 \q_mark ##3 \q_stop } \cs_set_protected:Npn \_xparse_split_argument_aux_iii:w ##1 #2 ##2 \q_stop @@ -692,7 +691,7 @@ \prg_replicate:nn { #1 + 1 } { \_xparse_split_argument_aux_i:w } \_xparse_split_argument_aux_ii:w - \exp_not:N \q_nil + \exp_not:N \q_mark \exp_not:V \_l_xparse_split_argument_tl \prg_replicate:nn {#1} { \exp_not:n {#2} \NoValue } \exp_not:n { #2 \q_stop } @@ -702,7 +701,7 @@ \group_end: \cs_set_protected:Npn \_xparse_split_argument_aux_i:w { } \cs_set_protected:Npn \_xparse_split_argument_aux_ii:w - #1 \q_nil #2 \q_stop + #1 \q_mark #2 \q_stop { \tl_if_empty:nF {#2} { \_xparse_split_argument_aux_iii:w #2 \q_stop } @@ -746,21 +745,20 @@ \exp_after:wN \token_to_str:N \l_xparse_function_tl \int_use:N \l_xparse_total_args_int } - \xparse_exp_set:cpx { \l_xparse_tmp_tl } ##1 \q_xparse_stop ##2 { + \xparse_exp_set:cpx { \l_xparse_tmp_tl } ##1 \q_xparse ##2 { \exp_not:N \tl_if_head_eq_charcode:nNTF {##2} #1 { \exp_not:c { \l_xparse_tmp_tl aux } - ##1 \exp_not:N \q_xparse_stop + ##1 \exp_not:N \q_xparse }{ \exp_not:c { \l_xparse_tmp_tl aux } - ##1 \exp_not:N \q_xparse_stop #3 #2 {##2} + ##1 \exp_not:N \q_xparse #3 #2 {##2} } } - \xparse_exp_set:cpx { \l_xparse_tmp_tl aux} - ##1 \q_xparse_stop ##2 #2 { + \xparse_exp_set:cpx { \l_xparse_tmp_tl aux} ##1 \q_xparse ##2 #2 { \exp_not:c { \exp_after:wN \token_to_str:N \l_xparse_function_tl \intexpr_eval:n { \l_xparse_total_args_int + 1 } - } ##1 {##2} \exp_not:N \q_xparse_stop + } ##1 {##2} \exp_not:N \q_xparse } \xparse_exp_prepare_function:N } @@ -768,12 +766,12 @@ \xparse_exp_set:cpx { \exp_after:wN \token_to_str:N \l_xparse_function_tl \int_use:N \l_xparse_total_args_int - } ##1 \q_xparse_stop ##2## { + } ##1 \q_xparse ##2## { \exp_not:c { \exp_after:wN \token_to_str:N \l_xparse_function_tl \intexpr_eval:n { \l_xparse_total_args_int + 1 } } - ##1 {##2} \exp_not:N \q_xparse_stop + ##1 {##2} \exp_not:N \q_xparse } \xparse_exp_prepare_function:N } @@ -782,12 +780,12 @@ \xparse_exp_set:cpx { \exp_after:wN \token_to_str:N \l_xparse_function_tl \int_use:N \l_xparse_total_args_int - } ##1 \q_xparse_stop ##2 { + } ##1 \q_xparse ##2 { \exp_not:c { \exp_after:wN \token_to_str:N \l_xparse_function_tl \intexpr_eval:n { \l_xparse_total_args_int + 1 } } - ##1 {##2} \exp_not:N \q_xparse_stop + ##1 {##2} \exp_not:N \q_xparse } \xparse_exp_prepare_function:N } @@ -799,13 +797,13 @@ \xparse_exp_set:cpx { \exp_after:wN \token_to_str:N \l_xparse_function_tl \int_use:N \l_xparse_total_args_int - } ##1 \q_xparse_stop ##2 { + } ##1 \q_xparse ##2 { \exp_not:N \tl_if_head_eq_charcode:nNTF {##2} #1 { \exp_not:c { \l_xparse_tmp_tl } - ##1 \exp_not:n { { \BooleanTrue } \q_xparse_stop } + ##1 \exp_not:n { { \BooleanTrue } \q_xparse } }{ \exp_not:c { \l_xparse_tmp_tl } - ##1 \exp_not:n { { \BooleanFalse } \q_xparse_stop {##2} } + ##1 \exp_not:n { { \BooleanFalse } \q_xparse {##2} } } } \xparse_exp_prepare_function:N @@ -814,12 +812,12 @@ \xparse_exp_set:cpx { \exp_after:wN \token_to_str:N \l_xparse_function_tl \int_use:N \l_xparse_total_args_int - } ##1 \q_xparse_stop ##2 #1 { + } ##1 \q_xparse ##2 #1 { \exp_not:c { \exp_after:wN \token_to_str:N \l_xparse_function_tl \intexpr_eval:n { \l_xparse_total_args_int + 1 } } - ##1 {##2} \exp_not:N \q_xparse_stop + ##1 {##2} \exp_not:N \q_xparse } \xparse_exp_prepare_function:N } @@ -871,11 +869,11 @@ } \cs_new:Npn \xparse_exp_declare_cmd_mixed_aux:Nn #1#2 { \cs_set_nopar:Npx #1 { - \exp_not:c { \token_to_str:N #1 1 } x \exp_not:N \q_xparse_stop + \exp_not:c { \token_to_str:N #1 1 } x \exp_not:N \q_xparse } \cs_set_nopar:cpx { \token_to_str:N #1 \intexpr_eval:n { \l_xparse_total_args_int + 1 } - } x ##1 \q_xparse_stop { + } x ##1 \q_xparse { \exp_not:c { \token_to_str:N #1 } ##1 } \cs_generate_from_arg_count:cNnn @@ -922,7 +920,7 @@ } \cs_new:Npn \xparse_exp_prepare_function_long:N #1 { \quark_if_nil:NF #1 { - \tl_if_eq:nnTF {#1} { + } { + \str_if_eq:nnTF {#1} { + } { \xparse_exp_prepare_function_short:N }{ \msg_kernel_error:nn { xparse } { expandable-inconsistent-long } @@ -991,7 +989,7 @@ } { The~arguments~for~an~expandable~command~must~either~all~be \\ - short~or~all~be~long.~You~have~tried~to mix~the~two~types. + short~or~all~be~long.~You~have~tried~to~mix~the~two~types. } \msg_kernel_new:nnnn { xparse } { grouped-in-expandable } {% @@ -1060,7 +1058,9 @@ } \cs_new_protected:Npn \RenewDocumentCommand #1#2#3 { \cs_if_exist:NTF #1 { - \xparse_declare_cmd:Nnn #1 {#2} {#3} + \xparse_declare_cmd_aux:Nnn #1 {#2} {#3} + \msg_kernel_info:nnxx { xparse } { redefine-command } + { \token_to_str:N #1 } { \exp_not:n {#2} } }{ \msg_kernel_error:nnx { xparse } { command-not-yet-defined } { \token_to_str:N #1 } diff --git a/Master/texmf-dist/tex/latex/xpackages/xbase/xtemplate.sty b/Master/texmf-dist/tex/latex/xpackages/xbase/xtemplate.sty index 6ff224fff23..c94419b3351 100644 --- a/Master/texmf-dist/tex/latex/xpackages/xbase/xtemplate.sty +++ b/Master/texmf-dist/tex/latex/xpackages/xbase/xtemplate.sty @@ -54,7 +54,7 @@ %% ----------------------------------------------------------------------- %% \RequirePackage{l3names} -\GetIdInfo$Id: xtemplate.dtx 1896 2010-04-14 17:40:38Z joseph $ +\GetIdInfo$Id: xtemplate.dtx 2037 2010-09-20 21:22:45Z joseph $ {Prototype document functions} @@ -134,7 +134,7 @@ } } \prg_set_conditional:Nnn \xtemplate_if_key_value:n { T } { - \tl_if_eq:noTF { \KeyValue } { \tl_head:w #1 \q_nil } { + \str_if_eq:noTF { \KeyValue } { \tl_head:w #1 \q_stop } { \prg_return_true: }{ \prg_return_false: @@ -142,7 +142,7 @@ } \cs_generate_variant:Nn \xtemplate_if_key_value:nT { V } \prg_new_conditional:Nnn \xtemplate_if_eval_now:n { TF } { - \tl_if_eq:noTF { \EvaluateNow } { \tl_head:w #1 \q_nil } { + \str_if_eq:noTF { \EvaluateNow } { \tl_head:w #1 \q_stop } { \prg_return_true: }{ \prg_return_false: @@ -156,7 +156,7 @@ } } \prg_new_conditional:Nnn \xtemplate_if_use_template:n { TF } { - \tl_if_eq:noTF { \UseTemplate } { \tl_head:w #1 \q_nil } { + \str_if_eq:noTF { \UseTemplate } { \tl_head:w #1 \q_stop } { \prg_return_true: }{ \prg_return_false: @@ -293,7 +293,7 @@ } } \cs_new_nopar:Npn \xtemplate_parse_keys_elt_aux:n #1 { - \tl_if_eq:VnT \l_xtemplate_keytype_tl {#1} { + \str_if_eq:VnT \l_xtemplate_keytype_tl {#1} { \tl_if_empty:NT \l_xtemplate_keytype_arg_tl { \msg_kernel_error:nnx { xtemplate } { keytype-requires-argument } {#1} @@ -310,7 +310,7 @@ \prop_put:NVV \l_xtemplate_keytypes_prop \l_xtemplate_key_name_tl \l_xtemplate_tmp_tl \seq_put_right:NV \l_xtemplate_key_seq \l_xtemplate_key_name_tl - \tl_if_eq:VnT \l_xtemplate_keytype_tl { choice } { + \str_if_eq:VnT \l_xtemplate_keytype_tl { choice } { \clist_if_in:NnT \l_xtemplate_keytype_arg_tl { unknown } { \msg_kernel_error:nn { xtemplate } { choice-unknown-reserved } } @@ -318,7 +318,7 @@ } \cs_new:Npn \xtemplate_parse_keys_elt:nn #1#2 { \xtemplate_parse_keys_elt:n {#1} - \tl_if_eq:VnTF \l_xtemplate_keytype_tl { choice } { + \str_if_eq:VnTF \l_xtemplate_keytype_tl { choice } { \xtemplate_store_value_choice_name:n {#2} }{ \use:c { xtemplate_store_value_ \l_xtemplate_keytype_tl :n } {#2} @@ -511,16 +511,16 @@ } } \cs_new:Npn \xtemplate_parse_vars_elt_aux:n #1 { - \tl_if_eq:VnTF \l_xtemplate_keytype_tl { choice } + \str_if_eq:VnTF \l_xtemplate_keytype_tl { choice } { \xtemplate_implement_choices:n {#1} } { - \tl_if_eq:VnTF \l_xtemplate_keytype_tl { code } + \str_if_eq:VnTF \l_xtemplate_keytype_tl { code } { \prop_put:NVn \l_xtemplate_vars_prop \l_xtemplate_key_name_tl {#1} } { - \tl_if_eq:noTF {#1} { \tl_head:w #1 \q_nil } + \str_if_eq:noTF {#1} { \tl_head:w #1 \q_stop } { \cs_if_exist:NTF #1 { @@ -535,7 +535,7 @@ } { \tl_if_in:nnTF {#1} { global } - { \xtemplate_parse_vars_elt_aux:w #1 \q_nil } + { \xtemplate_parse_vars_elt_aux:w #1 \q_stop } { \msg_kernel_error:nnx { xtemplate } { bad-variable } { \exp_not:n {#1} } @@ -544,10 +544,10 @@ } } } -\cs_new:Npn \xtemplate_parse_vars_elt_aux:w #1 global #2 \q_nil { +\cs_new:Npn \xtemplate_parse_vars_elt_aux:w #1 global #2 \q_stop { \tl_if_empty:nTF {#1} { - \tl_if_eq:noTF {#2} { \tl_head:w #2 \q_nil } + \str_if_eq:noTF {#2} { \tl_head:w #2 \q_stop } { \cs_if_exist:NTF #2 { @@ -593,7 +593,7 @@ } \cs_new:Npn \xtemplate_implement_choice_elt:n #1 { \clist_if_empty:NTF \l_xtemplate_tmp_clist { - \tl_if_eq:nnF {#1} { unknown } { + \str_if_eq:nnF {#1} { unknown } { \prop_get:NVN \l_xtemplate_keytypes_prop \l_xtemplate_key_name_tl \l_xtemplate_tmp_tl \xtemplate_split_keytype_arg:V \l_xtemplate_tmp_tl @@ -752,8 +752,8 @@ \prop_get:NnN \l_xtemplate_values_prop {#1} \l_xtemplate_value_tl \prop_get:NnN \l_xtemplate_vars_prop {#1} \l_xtemplate_var_tl \xtemplate_split_keytype_arg:n {#2} - \tl_if_eq:VnF \l_xtemplate_keytype_tl { choice } { - \tl_if_eq:VnF \l_xtemplate_keytype_tl { code } { + \str_if_eq:VnF \l_xtemplate_keytype_tl { choice } { + \str_if_eq:VnF \l_xtemplate_keytype_tl { code } { \xtemplate_find_global: } } @@ -909,7 +909,7 @@ } } \cs_new:Npn \xtemplate_use_instance_aux:nNnnn #1#2#3#4#5 { - \tl_if_eq:nnTF {#1} {#3} { + \str_if_eq:nnTF {#1} {#3} { \xtemplate_use_template:nnn {#3} {#4} {#5} }{ \msg_kernel_error:nnxx { xtemplate } { type-mismatch } {#1} {#3} diff --git a/Master/texmf-dist/tex/latex/xpackages/xtras/l3keys2e.sty b/Master/texmf-dist/tex/latex/xpackages/xtras/l3keys2e.sty index 6c18e8ba3f0..bae23bd05fd 100644 --- a/Master/texmf-dist/tex/latex/xpackages/xtras/l3keys2e.sty +++ b/Master/texmf-dist/tex/latex/xpackages/xtras/l3keys2e.sty @@ -59,7 +59,7 @@ \keys_if_exist:nnF {#1} { unknown } { \keys_define:nn {#1} { unknown .code:n = { - \msg_warning:nnxx { Option~Processing } { unknown-option } + \msg_error:nnxx { Option~Processing } { unknown-option } { \l_keys_key_tl } { \@currname } } } -- cgit v1.2.3