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.sty85
1 files changed, 36 insertions, 49 deletions
diff --git a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
index 9c1441858b5..c16f725c5f8 100644
--- a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
+++ b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
@@ -50,8 +50,8 @@
%%
%% -----------------------------------------------------------------------
%%
-\RequirePackage{expl3}[2015/09/11]
-\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+\@ifpackagelater{expl3}{2015/09/27}
{}
{%
\PackageError{xparse}{Support package l3kernel too old}
@@ -63,19 +63,12 @@
}%
\endinput
}
-\GetIdInfo$Id: xparse.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: xparse.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental document command parser}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\group_begin:
-\char_set_lccode:nn { `\Q } { `\- }
-\char_set_lccode:nn { `\N } { `\N }
-\char_set_lccode:nn { `\V } { `\V }
-\tl_to_lowercase:n
- {
- \group_end:
- \tl_const:Nn \c__xparse_no_value_tl { QNoValue- }
- }
+\tl_const:Nx \c__xparse_no_value_tl
+ { \char_generate:nn { `\- } { 11 } NoValue- }
\prop_new:N \c__xparse_shorthands_prop
\prop_put:Nnn \c__xparse_shorthands_prop { o } { d[] }
\prop_put:Nnn \c__xparse_shorthands_prop { O } { D[] }
@@ -683,24 +676,20 @@
#3 \l__xparse_args_tl
}
}
- \group_begin:
- \token_if_eq_catcode:NNTF #1 ^
- {
+ \token_if_eq_catcode:NNTF + #1
+ {
+ \group_begin:
\char_set_lccode:nn { `A } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
\group_end:
\l__xparse_fn_tl A
}
- }
- {
- \char_set_lccode:nn { `^ } { `#1 }
- \tl_to_lowercase:n
- {
- \group_end:
- \l__xparse_fn_tl ^
- }
- }
+ }
+ {
+ \exp_after:wN \l__xparse_fn_tl
+ \token_to_str:N #1
+ }
}
}
\tl_new:N \l__xparse_nesting_a_tl
@@ -1061,7 +1050,7 @@
\__xparse_add_arg:o \c__xparse_no_value_tl
\group_begin:
\char_set_lccode:nn { `\# } { \tex_endlinechar:D }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{ \group_end: \peek_meaning_remove:NTF ## }
{
\__msg_kernel_error:nnxxx { xparse } { verbatim-newline }
@@ -1278,12 +1267,12 @@
\tl_set:Nn \l__xparse_split_list_tl {#2}
\group_begin:
\char_set_lccode:nn { `\@ } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
- \group_end:
- \tl_replace_all:Nnn \l__xparse_split_list_tl { @ } {#1}
- }
- \__xparse_split_list_multi:nV {#1} \l__xparse_split_list_tl
+ \group_end:
+ \tl_replace_all:Nnn \l__xparse_split_list_tl { @ }
+ } {#1}
+ \__xparse_split_list_multi:nV {#1} \l__xparse_split_list_tl
}
\group_end:
\cs_new_protected:Npn \__xparse_split_argument:nnn #1#2#3
@@ -1370,24 +1359,22 @@
{ \tl_to_str:n {#1} }
}
}
-\group_begin:
-\char_set_lccode:nn { `\Q } { `\- }
-\char_set_lccode:nn { `\F } { `\F }
-\char_set_lccode:nn { `\N } { `\N }
-\char_set_lccode:nn { `\T } { `\T }
-\char_set_lccode:nn { `\V } { `\V }
-\tl_to_lowercase:n
- {
- \group_end:
- \prg_new_conditional:Npnn \__xparse_if_no_value:n #1 { T , F , TF }
- {
- \str_if_eq:onTF
- { \__xparse_if_value_aux:w ? #1 { } QNoValue- }
- { ? { } QNoValue- }
- { \prg_return_true: }
- { \prg_return_false: }
- }
- \cs_new:Npn \__xparse_if_value_aux:w #1 QNoValue- { #1 }
+\use:x
+ {
+ \prg_new_conditional:Npnn \exp_not:N \__xparse_if_no_value:n ##1
+ { T , F , TF }
+ {
+ \exp_not:N \str_if_eq:onTF
+ {
+ \exp_not:N \__xparse_if_value_aux:w ? ##1 { }
+ \c__xparse_no_value_tl
+ }
+ { ? { } \c__xparse_no_value_tl }
+ { \exp_not:N \prg_return_true: }
+ { \exp_not:N \prg_return_false: }
+ }
+ \cs_new:Npn \exp_not:N \__xparse_if_value_aux:w ##1 \c__xparse_no_value_tl
+ { ##1 }
}
\__msg_kernel_new:nnnn { xparse } { bad-arg-spec }
{ Bad~argument~specification~'#1'. }