summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty57
1 files changed, 31 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
index ba9d715489a..c761e58bb88 100644
--- a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
+++ b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
@@ -50,8 +50,8 @@
%%
%% -----------------------------------------------------------------------
%%
-\RequirePackage{expl3}[2015/09/06]
-\@ifpackagelater{expl3}{2015/09/06}
+\RequirePackage{expl3}[2015/09/11]
+\@ifpackagelater{expl3}{2015/09/11}
{}
{%
\PackageError{xtemplate}{Support package l3kernel too old}
@@ -63,7 +63,7 @@
}%
\endinput
}
-\GetIdInfo$Id: xtemplate.dtx 5925 2015-09-06 09:25:46Z joseph $
+\GetIdInfo$Id: xtemplate.dtx 6001 2015-09-11 21:50:23Z joseph $
{L3 Experimental prototype document functions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -328,41 +328,46 @@
\__xtemplate_parse_keys_elt:n {#1}
\use:c { __xtemplate_store_value_ \l__xtemplate_keytype_tl :n } {#2}
}
-\group_begin:
-\char_set_lccode:nn { `\@ } { `\: }
-\char_set_catcode_other:N \@
-\tl_to_lowercase:n
+\cs_new_protected:Npx \__xtemplate_split_keytype:n #1
{
- \group_end:
- \cs_new_protected:Npn \__xtemplate_split_keytype:n #1
+ \exp_not:N \bool_set_false:N \exp_not:N \l__xtemplate_error_bool
+ \tl_set:Nn \exp_not:N \l__xtemplate_tmp_tl {#1}
+ \tl_remove_all:Nn \exp_not:N \l__xtemplate_tmp_tl { ~ }
+ \tl_replace_all:Nnn \exp_not:N \l__xtemplate_tmp_tl { : } { \token_to_str:N : }
+ \tl_if_in:onTF \exp_not:N \l__xtemplate_tmp_tl { \token_to_str:N : }
{
- \bool_set_false:N \l__xtemplate_error_bool
- \tl_set:Nn \l__xtemplate_tmp_tl {#1}
- \tl_remove_all:Nn \l__xtemplate_tmp_tl { ~ }
- \tl_replace_all:Nnn \l__xtemplate_tmp_tl { : } { @ }
- \tl_if_in:onTF \l__xtemplate_tmp_tl { @ }
+ \exp_not:n
{
\tl_clear:N \l__xtemplate_key_name_tl
\exp_after:wN \__xtemplate_split_keytype_aux:w
\l__xtemplate_tmp_tl \q_stop
}
- {
- \bool_set_true:N \l__xtemplate_error_bool
- \msg_error:nnx { xtemplate } { missing-keytype } {#1}
- }
}
- \cs_new_protected:Npn \__xtemplate_split_keytype_aux:w #1 @ #2 \q_stop
{
- \tl_put_right:Nx \l__xtemplate_key_name_tl { \tl_to_str:n {#1} }
- \tl_if_in:nnTF {#2} { @ }
+ \exp_not:N \bool_set_true:N \exp_not:N \l__xtemplate_error_bool
+ \msg_error:nnx { xtemplate } { missing-keytype } {#1}
+ }
+ }
+\use:x
+ {
+ \cs_new_protected:Npn \exp_not:N \__xtemplate_split_keytype_aux:w
+ ##1 \token_to_str:N : ##2 \exp_not:N \q_stop
+ {
+ \tl_put_right:Nx \exp_not:N \l__xtemplate_key_name_tl
+ { \exp_not:N \tl_to_str:n {##1} }
+ \tl_if_in:nnTF {##2} { \token_to_str:N : }
{
- \tl_put_right:Nn \l__xtemplate_key_name_tl { @ }
- \__xtemplate_split_keytype_aux:w #2 \q_stop
+ \tl_put_right:Nn \exp_not:N \l__xtemplate_key_name_tl
+ { \token_to_str:N : }
+ \exp_not:N \__xtemplate_split_keytype_aux:w ##2 \exp_not:N \q_stop
}
{
- \tl_if_empty:NTF \l__xtemplate_key_name_tl
- { \msg_error:nnx { xtemplate } { empty-key-name } { @ #2 } }
- { \__xtemplate_split_keytype_arg:n {#2} }
+ \exp_not:N \tl_if_empty:NTF \exp_not:N \l__xtemplate_key_name_tl
+ {
+ \msg_error:nnx { xtemplate } { empty-key-name }
+ { \token_to_str:N : ##2 }
+ }
+ { \exp_not:N \__xtemplate_split_keytype_arg:n {##2} }
}
}
}