summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty55
1 files changed, 44 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
index 16f16a26a13..fd2d7b22112 100644
--- a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
+++ b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
@@ -17,7 +17,7 @@
%% David Carlisle
%% (C) Copyright 2004-2008 Frank Mittelbach,
%% The LaTeX3 Project
-%% (C) Copyright 2009-2012 The LaTeX3 Project
+%% (C) Copyright 2009-2013 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
@@ -50,8 +50,8 @@
%%
%% -----------------------------------------------------------------------
%%
-\RequirePackage{expl3}[2012/12/21]
-\@ifpackagelater{expl3}{2012/12/21}
+\RequirePackage{expl3}[2013/03/12]
+\@ifpackagelater{expl3}{2013/03/12}
{}
{%
\PackageError{xparse}{Support package l3kernel too old}
@@ -63,7 +63,7 @@
}%
\endinput
}
-\GetIdInfo$Id: xparse.dtx 4390 2012-12-21 06:59:20Z joseph $
+\GetIdInfo$Id: xparse.dtx 4467 2013-03-12 08:29:05Z joseph $
{L3 Experimental document command parser}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -666,7 +666,15 @@
\tl_if_in:nnTF {####1} {#1}
{ \__xparse_grab_D_nested:NNnnN #1 #2 {####1} {#3} #4 }
{
- \__xparse_add_arg:o { \use_none:n ####1 }
+ \tl_if_blank:oTF { \use_none:n ####1 }
+ { \__xparse_add_arg:o { \use_none:n ####1 } }
+ {
+ \str_if_eq_x:nnTF
+ { \exp_not:o { \use_none:n ####1 } }
+ { { \exp_not:o { \use_ii:nnn ####1 \q_nil } } }
+ { \__xparse_add_arg:o { \use_ii:nn ####1 } }
+ { \__xparse_add_arg:o { \use_none:n ####1 } }
+ }
#3 \l__xparse_args_tl
}
}
@@ -1131,7 +1139,15 @@
\exp_args:No \tl_if_empty:oTF
{ #3 { \use_none:nnn } #2 \q__xparse #5 #4 \q__xparse #5 }
{
- \__xparse_put_arg_expandable:ow { \use_none:nn #1#2 }
+ \tl_if_blank:oTF { \use_none:nn #1#2 }
+ { \__xparse_put_arg_expandable:ow { } }
+ {
+ \str_if_eq_x:nnTF
+ { \exp_not:o { \use_none:nn #1#2 } }
+ { { \exp_not:o { \use_iii:nnnn #1#2 \q_nil } } }
+ { \__xparse_put_arg_expandable:ow { \use_iii:nnn #1#2 } }
+ { \__xparse_put_arg_expandable:ow { \use_none:nn #1#2 } }
+ }
#6 \q__xparse #7
}
{
@@ -1155,7 +1171,18 @@
{ #4 {#3} \q__xparse #5 {#6} }
}
\cs_new:Npn \__xparse_expandable_grab_D_alt:Nwn #1#2 \q__xparse #3
- { \__xparse_put_arg_expandable:ow { \use_none:n #3 } #2 \q__xparse #1 }
+ {
+ \tl_if_blank:oTF { \use_none:nn #1#2 }
+ { \__xparse_put_arg_expandable:ow { } }
+ {
+ \str_if_eq_x:nnTF
+ { \exp_not:o { \use_none:n #3 } }
+ { { \exp_not:o { \use_ii:nnn #3 \q_nil } } }
+ { \__xparse_put_arg_expandable:ow { \use_ii:nn #3 } }
+ { \__xparse_put_arg_expandable:ow { \use_none:n #3 } }
+ }
+ #2 \q__xparse #1
+ }
\cs_new:Npn \__xparse_expandable_grab_m:w #1 \q__xparse #2
{ #2 { \__xparse_expandable_grab_m_aux:wNn #1 \q__xparse #2 } }
\cs_new:Npn \__xparse_expandable_grab_m_aux:wNn #1 \q__xparse #2#3
@@ -1578,14 +1605,20 @@
\cs_new_eq:NN \GetDocumentEnvironmmentArgSpec \__xparse_get_arg_spec:n
\cs_new_eq:NN \ShowDocumentCommandArgSpec \__xparse_show_arg_spec:N
\cs_new_eq:NN \ShowDocumentEnvironmentArgSpec \__xparse_show_arg_spec:n
-\DeclareOption { log-declarations = true } { }
-\DeclareOption { log-declarations = false }
+\clist_new:N \l__xparse_options_clist
+\DeclareOption* { \clist_put_right:NV \l__xparse_options_clist \CurrentOption }
+\ProcessOptions \relax
+\keys_define:nn { xparse }
+ {
+ log-declarations .bool_set:N = \l__xparse_log_bool ,
+ log-declarations .initial:n = true
+ }
+\keys_set:nV { xparse } \l__xparse_options_clist
+\bool_if:NF \l__xparse_log_bool
{
\msg_redirect_module:nnn { LaTeX / xparse } { info } { none }
\msg_redirect_module:nnn { LaTeX / xparse } { warning } { none }
}
-\DeclareOption { log-declarations } { }
-\ProcessOptions \scan_stop:
%%
%%
%% End of file `xparse.sty'.