summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3keys.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3keys.sty59
1 files changed, 24 insertions, 35 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty
index 8a34a4c8331..721a7ecc09d 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty
@@ -13,7 +13,7 @@
%%
%% Do not distribute a modified version of this file.
%%
-%% File: l3keys.dtx Copyright (C) 2009-2011 The LaTeX3 Project
+%% File: l3keys.dtx Copyright (C) 2006-2011 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
@@ -22,7 +22,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -46,7 +46,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3keys.dtx 2722 2011-09-05 08:49:40Z joseph $
+\GetIdInfo$Id: l3keys.dtx 2800 2011-09-10 16:54:36Z will $
{L3 Experimental key-value interfaces}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -110,23 +110,11 @@
}
\cs_new:Npn \keyval_split_key_value_aux:wTF #1 = #2#3 \q_stop
{ \tl_if_head_eq_meaning:nNTF {#3} \q_no_value }
-\group_begin:
- \char_set_catcode_math_toggle:n { `\Q }
- \cs_new_protected:Npn \keyval_split_key:w #1 \q_stop
- {
- \exp_args:NNf \tl_set:Nn \l_keyval_key_tl
- {
- \exp_after:wN \keyval_remove_spaces:w \exp_after:wN
- \exp_not:N \use_none:n #1 Q ~ Q
- }
- \tl_set:Nx \l_keyval_key_tl
- { \exp_after:wN \keyval_split_key_aux:w \l_keyval_key_tl \q_stop }
- }
- \cs_gset:Npn \keyval_split_key_aux:w #1 \q_stop { \exp_not:n {#1} }
- \cs_gset:Npn \keyval_remove_spaces:w #1 ~ Q
- { \keyval_remove_spaces_aux:w #1 Q }
- \cs_gset:Npn \keyval_remove_spaces_aux:w #1 Q #2 {#1}
-\group_end:
+\cs_new_protected:Npn \keyval_split_key:w #1 \q_stop
+ {
+ \tl_set:Nx \l_keyval_key_tl
+ { \exp_after:wN \tl_trim_spaces:n \exp_after:wN { \use_none:n #1 } }
+ }
\cs_new_protected:Npn \keyval_split_value:w #1 = =
{
\tl_put_right:Nx \l_keyval_parse_tl
@@ -148,16 +136,12 @@
{ \keyval_split_value_aux:w #1 \q_stop }
}
}
-\group_begin:
- \char_set_catcode_math_toggle:n { `\Q }
- \cs_new_protected:Npn \keyval_split_value_aux:w \q_nil #1 \q_stop
- {
- \exp_args:NNf \tl_set:Nn \l_keyval_value_tl
- { \keyval_remove_spaces:w \exp_not:N #1 Q ~ Q }
- \tl_put_right:Nx \l_keyval_parse_tl
- { { \exp_not:o \l_keyval_value_tl } }
- }
-\group_end:
+\cs_new_protected:Npn \keyval_split_value_aux:w \q_nil #1 \q_stop
+ {
+ \tl_set:Nx \l_keyval_value_tl { \tl_trim_spaces:n {#1} }
+ \tl_put_right:Nx \l_keyval_parse_tl
+ { { \exp_not:o \l_keyval_value_tl } }
+ }
\cs_new_protected:Npn \keyval_parse:NNn #1#2#3
{
\int_gincr:N \g_keyval_level_int
@@ -436,6 +420,14 @@
{ \keys_choice_code_store:x { \exp_not:n {#1} } }
\cs_new_protected:cpn { \c_keys_props_root_tl .choice_code:x } #1
{ \keys_choice_code_store:x {#1} }
+\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_set:N } #1
+ { \keys_variable_set:NnN #1 { clist } n }
+\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_set:c } #1
+ { \keys_variable_set:cnN {#1} { clist } n }
+\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_gset:N } #1
+ { \keys_variable_set:NnNN #1 { clist } g n }
+\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_gset:c } #1
+ { \keys_variable_set:cnNN {#1} { clist } g n }
\cs_new_protected:cpn { \c_keys_props_root_tl .default:n } #1
{ \keys_default_set:n {#1} }
\cs_new_protected:cpn { \c_keys_props_root_tl .default:V } #1
@@ -506,7 +498,7 @@
{ \keys_set_aux:onn { \l_keys_module_tl } }
\cs_new_protected:Npn \keys_set_aux:nnn #1#2#3
{
- \tl_set:Nn \l_keys_module_tl {#2}
+ \tl_set:Nx \l_keys_module_tl { \tl_to_str:n {#2} }
\keyval_parse:NNn \keys_set_elt:n \keys_set_elt:nn {#3}
\tl_set:Nn \l_keys_module_tl {#1}
}
@@ -516,7 +508,7 @@
{ \keys_set_known_aux:onnN { \l_keys_module_tl } }
\cs_new_protected:Npn \keys_set_known_aux:nnnN #1#2#3#4
{
- \tl_set:Nn \l_keys_module_tl {#2}
+ \tl_set:Nx \l_keys_module_tl { \tl_to_str:n {#2} }
\clist_clear:N \l_keys_unknown_clist
\cs_set_eq:NN \keys_execute_unknown: \keys_execute_unknown_alt:
\keyval_parse:NNn \keys_set_elt:n \keys_set_elt:nn {#3}
@@ -696,9 +688,6 @@
The~key~'#1'~must~have~a~value.\\
No~value~was~present:~the~key~will~be~ignored.
}
-\cs_new_eq:NN \KV_process_space_removal_sanitize:NNn \keyval_parse:NNn
-\cs_new_eq:NN \KV_process_space_removal_no_sanitize:NNn \keyval_parse:NNn
-\cs_new_eq:NN \KV_process_no_space_removal_no_sanitize:NNn \keyval_parse:NNn
%%
%%
%% End of file `l3keys.sty'.