summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty6
-rw-r--r--Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty180
-rw-r--r--Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty89
3 files changed, 199 insertions, 76 deletions
diff --git a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty
index 816facd6c01..0d5afd9ef36 100644
--- a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty
+++ b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty
@@ -47,11 +47,11 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{xparse}
-\GetIdInfo$Id: l3keys2e.dtx 2535 2011-08-10 18:26:57Z joseph $
+\GetIdInfo$Id: l3keys2e.dtx 2607 2011-08-17 16:43:25Z joseph $
{LaTeX2e option processing using LaTeX3 keys}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\@ifpackagelater { expl3 } { 2011/08/13 }
+\@ifpackagelater { expl3 } { 2011/08/17 }
{ }
{
\PackageError { l3keys2e } { Support~package~l3kernel~too~old. }
@@ -115,7 +115,7 @@
\keys_if_exist:nnT {#1} { \keys_latexe_remove_equals:n {##1} }
{
\clist_put_right:Nn \keys_latexe_options_clist {##1}
- \clist_remove_element:Nn \@unusedoptionlist {##1}
+ \clist_remove_all:Nn \@unusedoptionlist {##1}
}
}
}
diff --git a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
index d76b157392b..22172e020c6 100644
--- a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
+++ b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
@@ -51,12 +51,12 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{expl3}
-\GetIdInfo$Id: xparse.dtx 2535 2011-08-10 18:26:57Z joseph $
+\GetIdInfo$Id: xparse.dtx 2607 2011-08-17 16:43:25Z joseph $
{L3 Experimental document command parser}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
\RequirePackage{expl3}
-\@ifpackagelater { expl3 } { 2011/08/13 }
+\@ifpackagelater { expl3 } { 2011/08/17 }
{ }
{
\PackageError { xparse } { Support~package~l3kernel~too~old. }
@@ -71,7 +71,6 @@
\prop_put:Nnn \c_xparse_shorthands_prop { o } { d[] }
\prop_put:Nnn \c_xparse_shorthands_prop { O } { D[] }
\prop_put:Nnn \c_xparse_shorthands_prop { s } { t* }
- %\end{variable}
\tl_new:N \l_xparse_arg_tl
\tl_new:N \l_xparse_args_tl
\bool_new:N \l_xparse_environment_bool
@@ -176,6 +175,12 @@
\tl_put_right:Nn \l_xparse_signature_tl { {#1} }
\xparse_prepare_signature:N
}
+\cs_new_protected_nopar:Npn \xparse_add_type_v:w
+ {
+ \xparse_flush_m_args:
+ \xparse_add_grabber_mandatory:N v
+ \xparse_prepare_signature:N
+ }
\cs_new_protected_nopar:Npn \xparse_check_and_add:N #1
{
\cs_if_free:cTF { xparse_add_type_ #1 :w }
@@ -195,11 +200,8 @@
{
\quark_if_nil:NF #1
{
- \prop_if_in:NnTF \c_xparse_shorthands_prop {#1}
- {
- \prop_get:NnN \c_xparse_shorthands_prop {#1} \l_xparse_tmp_tl
- \exp_last_unbraced:NV \xparse_count_mandatory:N \l_xparse_tmp_tl
- }
+ \prop_get:NnNTF \c_xparse_shorthands_prop {#1} \l_xparse_tmp_tl
+ { \exp_last_unbraced:NV \xparse_count_mandatory:N \l_xparse_tmp_tl }
{ \xparse_count_mandatory_aux:N #1 }
}
}
@@ -238,6 +240,11 @@
\int_incr:N \l_xparse_mandatory_args_int
\xparse_count_mandatory:N
}
+\cs_new_protected_nopar:Npn \xparse_count_type_v:w
+ {
+ \int_incr:N \l_xparse_mandatory_args_int
+ \xparse_count_mandatory:N
+ }
\cs_new_protected:Npn \xparse_declare_cmd:Nnn #1#2
{
\cs_if_exist:NTF #1
@@ -395,11 +402,8 @@
\quark_if_nil:NTF #1
{ \bool_if:NF \l_xparse_m_only_bool { \xparse_flush_m_args: } }
{
- \prop_if_in:NnTF \c_xparse_shorthands_prop {#1}
- {
- \prop_get:NnN \c_xparse_shorthands_prop {#1} \l_xparse_tmp_tl
- \exp_after:wN \xparse_prepare_signature:N \l_xparse_tmp_tl
- }
+ \prop_get:NnNTF \c_xparse_shorthands_prop {#1} \l_xparse_tmp_tl
+ { \exp_after:wN \xparse_prepare_signature:N \l_xparse_tmp_tl }
{
\int_incr:N \l_xparse_total_args_int
\xparse_check_and_add:N #1
@@ -678,10 +682,10 @@
\xparse_grab_arg:w
}
\cs_new_protected:Npn \xparse_grab_u:w #1#2 \l_xparse_args_tl
- { \xparse_grab_u_aux:NnN {#1} {#2} \cs_set_protected_nopar:Npn }
+ { \xparse_grab_u_aux:nnN {#1} {#2} \cs_set_protected_nopar:Npn }
\cs_new_protected:Npn \xparse_grab_u_long:w #1#2 \l_xparse_args_tl
- { \xparse_grab_u_aux:NnN {#1} {#2} \cs_set_protected:Npn }
-\cs_new_protected:Npn \xparse_grab_u_aux:NnN #1#2#3
+ { \xparse_grab_u_aux:nnN {#1} {#2} \cs_set_protected:Npn }
+\cs_new_protected:Npn \xparse_grab_u_aux:nnN #1#2#3
{
#3 \xparse_grab_arg:w ##1 #1
{
@@ -690,6 +694,110 @@
}
\xparse_grab_arg:w
}
+\tl_new:N \l_xparse_v_rest_of_signature_tl
+\tl_new:N \l_xparse_v_arg_tl
+\cs_new_protected_nopar:Npn \xparse_grab_v:w
+ {
+ \bool_set_false:N \l_xparse_long_bool
+ \xparse_grab_v_aux:w
+ }
+\cs_new_protected_nopar:Npn \xparse_grab_v_long:w
+ {
+ \bool_set_true:N \l_xparse_long_bool
+ \xparse_grab_v_aux:w
+ }
+\cs_new_protected:Npn \xparse_grab_v_aux:w #1 \l_xparse_args_tl
+ {
+ \group_begin:
+ \group_align_safe_begin:
+ \tex_escapechar:D = 92 \scan_stop:
+ \tl_set:Nn \l_xparse_v_rest_of_signature_tl {#1}
+ \tl_clear:N \l_xparse_v_arg_tl
+ \peek_N_type:TF
+ { \xparse_grab_v_aux_test:N }
+ { \xparse_grab_v_aux_abort: }
+ }
+\cs_new_protected:Npn \xparse_grab_v_aux_test:N #1
+ {
+ \tl_put_right:Nn \l_xparse_v_arg_tl {#1}
+ \xparse_grab_v_token_if_char:NTF #1
+ {
+ \cs_set_eq:NN \do \char_set_catcode_other:N
+ \dospecials
+ \tex_endlinechar:D = `\^^M \scan_stop:
+ \bool_if:NTF \l_xparse_long_bool
+ { \char_set_catcode_other:n { \tex_endlinechar:D } }
+ { \char_set_catcode_parameter:n { \tex_endlinechar:D } }
+ \xparse_grab_v_aux_loop:N #1
+ }
+ { \xparse_grab_v_aux_abort: }
+ }
+\cs_new_protected:Npn \xparse_grab_v_aux_loop:N #1
+ {
+ \peek_N_type:TF
+ { \xparse_grab_v_aux_loop_ii:NN #1 }
+ { \xparse_grab_v_aux_abort: }
+ }
+\cs_new_protected:Npn \xparse_grab_v_aux_loop_ii:NN #1 #2
+ {
+ \xparse_grab_v_token_if_char:NTF #2
+ {
+ \token_if_eq_charcode:NNTF #1 #2
+ { \xparse_grab_v_aux_loop_end: }
+ {
+ \tl_put_right:Nn \l_xparse_v_arg_tl { #2 }
+ \xparse_grab_v_aux_loop:N #1
+ }
+ }
+ { \xparse_grab_v_aux_abort: #2 }
+ }
+\cs_new_protected_nopar:Npn \xparse_grab_v_aux_loop_end:
+ {
+ \xparse_grab_v_group_end:
+ \exp_args:Nx \xparse_add_arg:n
+ { \exp_args:No \str_tail:n { \l_xparse_v_arg_tl } }
+ \l_xparse_v_rest_of_signature_tl \l_xparse_args_tl
+ }
+\cs_new_protected_nopar:Npn \xparse_grab_v_aux_abort:
+ {
+ \xparse_grab_v_group_end:
+ \xparse_add_arg:n { \NoValue }
+ \exp_after:wN \xparse_grab_v_aux_abort_ii:w \l_xparse_args_tl \q_stop
+ }
+\cs_new_protected:Npn \xparse_grab_v_aux_abort_ii:w #1 #2 \q_stop
+ {
+ \group_begin:
+ \char_set_lccode:nn { `\# } { \tex_endlinechar:D }
+ \tl_to_lowercase:n
+ { \group_end: \peek_meaning_remove:NTF ## }
+ {
+ \msg_error:nnxx { xparse } { verbatim-newline }
+ { \cs_to_str:N #1 }
+ { \tl_to_str:N \l_xparse_v_arg_tl }
+ \l_xparse_v_rest_of_signature_tl \l_xparse_args_tl
+ }
+ {
+ \msg_error:nnxx { xparse } { verbatim-already-tokenized }
+ { \cs_to_str:N #1 }
+ { \tl_to_str:N \l_xparse_v_arg_tl }
+ \l_xparse_v_rest_of_signature_tl \l_xparse_args_tl
+ }
+ }
+\cs_new_protected_nopar:Npn \xparse_grab_v_group_end:
+ {
+ \tl_set:Nx \l_xparse_tmp_tl
+ {
+ \tl_set:Nn \exp_not:N \l_xparse_v_rest_of_signature_tl
+ { \exp_not:o \l_xparse_v_rest_of_signature_tl }
+ \tl_set:Nn \exp_not:N \l_xparse_v_arg_tl
+ { \exp_not:o \l_xparse_v_arg_tl }
+ }
+ \exp_after:wN \group_align_safe_end:
+ \exp_after:wN \group_end:
+ \l_xparse_tmp_tl
+ }
+\cs_new_protected:Npn \xparse_grab_v_token_if_char:NTF #1
+ { \str_if_eq:xxTF { } { \str_tail:n {#1} } }
\cs_new_protected:Npn \xparse_process_to_str:n #1
{ \tl_set:Nx \ProcessedArgument { \tl_to_str:n {#1} } }
\cs_new_protected:Npn \xparse_bool_reverse:N #1
@@ -709,7 +817,7 @@
\tl_to_lowercase:n
{
\group_end:
- \tl_replace_all_in:Nnn \l_xparse_split_argument_tl { @ } {#2}
+ \tl_replace_all:Nnn \l_xparse_split_argument_tl { @ } {#2}
}
\cs_set_protected:Npn \xparse_split_argument_aux_i:w
##1 \q_mark ##2 #2 ##3 \q_stop
@@ -759,7 +867,7 @@
\tl_to_lowercase:n
{
\group_end:
- \tl_replace_all_in:Nnn \l_xparse_split_list_tl { @ } {#1}
+ \tl_replace_all:Nnn \l_xparse_split_list_tl { @ } {#1}
}
\cs_set:Npn \xparse_split_list_aux:w ##1 #1
{
@@ -960,22 +1068,28 @@
\bool_set_false:N \l_xparse_error_bool
\tl_if_in:nnT {#1} { > }
{
- \msg_error:nnx { xparse } { processor-in-expandable }
+ \msg_error:nnxx { xparse } { processor-in-expandable }
{ \tl_to_str:n {#1} }
\bool_set_true:N \l_xparse_error_bool
}
\tl_if_in:nnT {#1} { g }
{
- \msg_error:nnx { xparse } { grouped-in-expandable }
+ \msg_error:nnxx { xparse } { grouped-in-expandable }
{ g } { \tl_to_str:n {#1} }
\bool_set_true:N \l_xparse_error_bool
}
\tl_if_in:nnT {#1} { G }
{
- \msg_error:nnx { xparse } { grouped-in-expandable }
+ \msg_error:nnxx { xparse } { grouped-in-expandable }
{ G } { \tl_to_str:n {#1} }
\bool_set_true:N \l_xparse_error_bool
}
+ \tl_if_in:nnT {#1} { v }
+ {
+ \msg_error:nnxx { xparse } { verbatim-in-expandable }
+ { v } { \tl_to_str:n {#1} }
+ \bool_set_true:N \l_xparse_error_bool
+ }
\bool_if:NF \l_xparse_error_bool
{ \xparse_exp_prepare_function_aux:n {#1} }
}
@@ -1015,9 +1129,8 @@
{
\quark_if_nil:NF #1
{
- \prop_if_in:NnTF \c_xparse_shorthands_prop {#1}
+ \prop_get:NnNTF \c_xparse_shorthands_prop {#1} \l_xparse_tmp_tl
{
- \prop_get:NnN \c_xparse_shorthands_prop {#1} \l_xparse_tmp_tl
\bool_if:NT \l_xparse_long_bool
{ \tl_put_left:Nn \l_xparse_tmp_tl { + } }
\exp_after:wN \xparse_exp_prepare_function:N \l_xparse_tmp_tl
@@ -1173,6 +1286,27 @@
You~have~asked~for~the~argument~specification~for~a~command~'#1',~
but~this~is~not~a~document~environment.
}
+\msg_new:nnnn { xparse } { verbatim-newline }
+ { Verbatim~argument~of~#1~ended~by~end~of~line. }
+ {
+ Short~verbatim~arguments~cannot~contain~newlines.~
+ I~suspect~you've~forgotten~the~closing~delimiter~of~#1.
+ I~will~ignore~'#2'.
+ }
+\msg_new:nnnn { xparse } { verbatim-already-tokenized }
+ { Verbatim~command~#1~illegal~in~command~argument. }
+ {
+ The~command~#1~takes~a~verbatim~argument.~It~may~not~appear~within~
+ the~argument~of~another~function.~I~will~ignore~'#2'.
+ }
+
+\msg_new:nnnn { xparse } { verbatim-in-expandable }
+ { Argument~specifier~'#1'~forbidden~in~expandable~commands. }
+ {
+ \c_msg_coding_error_text_tl
+ Argument~specification~'#2'~contains~the~verbatim~argument~'#1':~
+ this~is only~supported~for~standard~robust~functions.
+ }
\msg_new:nnn { xparse } { define-command }
{
Defining~document~command~#1~
diff --git a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
index cae62519790..4c6b140fd4a 100644
--- a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
+++ b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
@@ -51,11 +51,11 @@
%% -----------------------------------------------------------------------
%%
\RequirePackage{expl3}
-\GetIdInfo$Id: xtemplate.dtx 2535 2011-08-10 18:26:57Z joseph $
+\GetIdInfo$Id: xtemplate.dtx 2607 2011-08-17 16:43:25Z joseph $
{L3 Experimental prototype document functions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\@ifpackagelater { expl3 } { 2011/08/13 }
+\@ifpackagelater { expl3 } { 2011/08/17 }
{ }
{
\PackageError { xtemplate } { Support~package~l3kernel~too~old. }
@@ -102,6 +102,9 @@
\muskip_new:N \l_xtemplate_tmp_muskip
\skip_new:N \l_xtemplate_tmp_skip
\tl_new:N \l_xtemplate_tmp_tl
+\cs_generate_variant:Nn \prop_get:NnNTF { No }
+\cs_generate_variant:Nn \prop_get:NnNT { No }
+\cs_generate_variant:Nn \prop_get:NnNF { No }
\cs_new_protected:Npn \xtemplate_execute_if_arg_agree:nnT #1#2#3
{
\prop_get:NnN \g_xtemplate_object_type_prop {#1} \l_xtemplate_tmp_tl
@@ -487,13 +490,10 @@
\xtemplate_store_vars:n { #1 / #2 }
\clist_clear:N \l_xtemplate_restrict_clist
\xtemplate_store_restrictions:n { #1 / #2 }
- \prop_if_empty:NF \l_xtemplate_keytypes_prop
+ \prop_map_inline:Nn \l_xtemplate_keytypes_prop
{
- \prop_map_inline:Nn \l_xtemplate_keytypes_prop
- {
- \msg_error:nnxxx { xtemplate } { key-not-implemented }
- {##1} {#2} {#1}
- }
+ \msg_error:nnxxx { xtemplate } { key-not-implemented }
+ {##1} {#2} {#1}
}
}
\cs_new_protected:Npn \xtemplate_parse_vars_elt:n #1
@@ -502,10 +502,11 @@
{
\tl_set:Nx \l_xtemplate_key_name_tl { \tl_to_str:n {#1} }
\tl_remove_all:Nn \l_xtemplate_key_name_tl { ~ }
- \prop_if_in:NoTF \l_xtemplate_keytypes_prop \l_xtemplate_key_name_tl
+ \prop_get:NoNTF
+ \l_xtemplate_keytypes_prop
+ \l_xtemplate_key_name_tl
+ \l_xtemplate_keytype_tl
{
- \prop_get:NoN \l_xtemplate_keytypes_prop \l_xtemplate_key_name_tl
- \l_xtemplate_keytype_tl
\xtemplate_split_keytype_arg:o \l_xtemplate_keytype_tl
\xtemplate_parse_vars_elt_aux:n {#2}
\prop_del:NV \l_xtemplate_keytypes_prop \l_xtemplate_key_name_tl
@@ -580,7 +581,8 @@
\keyval_parse:NNn
\xtemplate_implement_choice_elt:n \xtemplate_implement_choice_elt:nn
{#1}
- \prop_if_in:NoT \l_xtemplate_values_prop \l_xtemplate_key_name_tl
+ \prop_get:NoNT \l_xtemplate_values_prop \l_xtemplate_key_name_tl
+ \l_xtemplate_tmp_tl
{ \xtemplate_implement_choices_default: }
\clist_if_empty:NF \l_xtemplate_tmp_clist
{
@@ -593,8 +595,6 @@
}
\cs_new_protected_nopar:Npn \xtemplate_implement_choices_default:
{
- \prop_get:NoN \l_xtemplate_values_prop \l_xtemplate_key_name_tl
- \l_xtemplate_tmp_tl
\tl_set:Nx \l_xtemplate_tmp_tl
{ \l_xtemplate_key_name_tl \c_space_tl \l_xtemplate_tmp_tl }
\prop_if_in:NoF \l_xtemplate_vars_prop \l_xtemplate_tmp_tl
@@ -630,7 +630,7 @@
}
{
\clist_if_in:NnTF \l_xtemplate_tmp_clist {#1}
- { \clist_remove_element:Nn \l_xtemplate_tmp_clist {#1} }
+ { \clist_remove_all:Nn \l_xtemplate_tmp_clist {#1} }
{
\prop_get:NoN \l_xtemplate_keytypes_prop \l_xtemplate_key_name_tl
\l_xtemplate_tmp_tl
@@ -689,32 +689,28 @@
{
\tl_set:Nx \l_xtemplate_key_name_tl { \tl_to_str:n {#1} }
\tl_remove_all:Nn \l_xtemplate_key_name_tl { ~ }
- \prop_if_in:NoTF \l_xtemplate_keytypes_prop \l_xtemplate_key_name_tl
+ \prop_get:NoNTF \l_xtemplate_keytypes_prop \l_xtemplate_key_name_tl
+ \l_xtemplate_tmp_tl
{
\bool_if:NTF \l_xtemplate_restrict_bool
{
\clist_if_in:NoF \l_xtemplate_restrict_clist
\l_xtemplate_key_name_tl
- {
- \xtemplate_parse_values_elt_aux:on
- \l_xtemplate_key_name_tl {#2}
- }
+ { \xtemplate_parse_values_elt_aux:n {#2} }
}
- { \xtemplate_parse_values_elt_aux:on \l_xtemplate_key_name_tl {#2} }
+ { \xtemplate_parse_values_elt_aux:n {#2} }
}
{
\msg_error:nnx { xtemplate } { unknown-key }
{ \l_xtemplate_key_name_tl }
}
}
-\cs_new_protected:Npn \xtemplate_parse_values_elt_aux:nn #1#2
+\cs_new_protected:Npn \xtemplate_parse_values_elt_aux:n #1
{
- \clist_put_right:Nn \l_xtemplate_restrict_clist {#1}
- \prop_get:NnN \l_xtemplate_keytypes_prop {#1} \l_xtemplate_tmp_tl
+ \clist_put_right:No \l_xtemplate_restrict_clist \l_xtemplate_key_name_tl
\xtemplate_split_keytype_arg:o \l_xtemplate_tmp_tl
- \use:c { xtemplate_store_value_ \l_xtemplate_keytype_tl :n } {#2}
+ \use:c { xtemplate_store_value_ \l_xtemplate_keytype_tl :n } {#1}
}
-\cs_generate_variant:Nn \xtemplate_parse_values_elt_aux:nn { o }
\cs_new_protected:Npn \xtemplate_set_template_eq:nn #1#2
{
\xtemplate_recover_defaults:n {#2}
@@ -792,12 +788,10 @@
}
\cs_new_protected:Npn \xtemplate_convert_to_assignments_aux:nn #1#2
{
- \prop_if_in:NnT \l_xtemplate_values_prop {#1}
+ \prop_get:NnNT \l_xtemplate_values_prop {#1} \l_xtemplate_value_tl
{
- \prop_if_in:NnTF \l_xtemplate_vars_prop {#1}
+ \prop_get:NnNTF \l_xtemplate_vars_prop {#1} \l_xtemplate_var_tl
{
- \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}
\str_if_eq:onF \l_xtemplate_keytype_tl { choice }
{
@@ -853,15 +847,11 @@
}
\cs_new_protected_nopar:Npn \xtemplate_assign_choice:
{
- \tl_set:Nx \l_xtemplate_tmp_tl
+ \xtemplate_assign_choice_aux:xF
{ \l_xtemplate_key_name_tl \c_space_tl \l_xtemplate_value_tl }
- \prop_if_in:NoTF \l_xtemplate_vars_prop \l_xtemplate_tmp_tl
- { \xtemplate_assign_choice_aux:o \l_xtemplate_tmp_tl }
{
- \tl_set:Nx \l_xtemplate_tmp_tl
+ \xtemplate_assign_choice_aux:xF
{ \l_xtemplate_key_name_tl \c_space_tl unknown }
- \prop_if_in:NoTF \l_xtemplate_vars_prop \l_xtemplate_tmp_tl
- { \xtemplate_assign_choice_aux:o \l_xtemplate_tmp_tl }
{
\prop_get:NoN \l_xtemplate_keytypes_prop \l_xtemplate_key_name_tl
\l_xtemplate_tmp_tl
@@ -872,12 +862,15 @@
}
}
}
-\cs_new_protected:Npn \xtemplate_assign_choice_aux:n #1
+\cs_new_protected_nopar:Npn \xtemplate_assign_choice_aux:nF #1
{
- \prop_get:NnN \l_xtemplate_vars_prop {#1} \l_xtemplate_tmp_tl
- \tl_put_right:No \l_xtemplate_assignments_tl \l_xtemplate_tmp_tl
+ \prop_get:NnNTF
+ \l_xtemplate_vars_prop
+ {#1}
+ \l_xtemplate_tmp_tl
+ { \tl_put_right:No \l_xtemplate_assignments_tl \l_xtemplate_tmp_tl }
}
-\cs_generate_variant:Nn \xtemplate_assign_choice_aux:n { o }
+\cs_generate_variant:Nn \xtemplate_assign_choice_aux:nF { x }
\cs_new_protected_nopar:Npn \xtemplate_assign_code:
{
\tl_put_left:Nx \l_xtemplate_assignments_tl
@@ -986,11 +979,10 @@
{
\tl_set:Nx \l_xtemplate_tmp_tl { \tl_to_str:n {#1} }
\tl_remove_all:Nn \l_xtemplate_key_name_tl { ~ }
- \prop_if_in:NoTF \l_xtemplate_vars_prop \l_xtemplate_tmp_tl
- {
- \prop_get:NoN \l_xtemplate_vars_prop \l_xtemplate_tmp_tl
- \l_xtemplate_value_tl
- }
+ \prop_get:NoNF
+ \l_xtemplate_vars_prop
+ \l_xtemplate_tmp_tl
+ \l_xtemplate_value_tl
{
\msg_error:nnx { xtemplate } { unknown-attribute }
{ \l_xtemplate_tmp_tl }
@@ -1033,11 +1025,8 @@
{ \prop_put:Nnn \l_xtemplate_collections_prop {#1} {#2} }
\cs_new_protected:Npn \xtemplate_get_collection:n #1
{
- \prop_if_in:NnTF \l_xtemplate_collections_prop {#1}
- {
- \prop_get:NnN \l_xtemplate_collections_prop {#1}
- \l_xtemplate_collection_tl
- }
+ \prop_get:NnNF \l_xtemplate_collections_prop {#1}
+ \l_xtemplate_collection_tl
{ \tl_clear:N \l_xtemplate_collection_tl }
}
\cs_new_nopar:Npn \xtemplate_assignments_pop: { \l_xtemplate_assignments_tl }