summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3packages/xparse
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3packages/xparse')
-rw-r--r--Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty29
1 files changed, 23 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
index f228093d00f..5b394dbb61a 100644
--- a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
+++ b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
@@ -23,8 +23,8 @@
%% (C) Copyright 2004-2008 Frank Mittelbach,
%% The LaTeX3 Project
%% (C) Copyright 2009-2017 The LaTeX3 Project
-\RequirePackage{expl3}[2017/12/05]
-\@ifpackagelater{expl3}{2017/12/05}
+\RequirePackage{expl3}[2017/12/16]
+\@ifpackagelater{expl3}{2017/12/16}
{}
{%
\PackageError{xparse}{Support package l3kernel too old}
@@ -36,7 +36,7 @@
}%
\endinput
}
-\ProvidesExplPackage{xparse}{2017/12/05}{}
+\ProvidesExplPackage{xparse}{2017/12/16}{}
{L3 Experimental document command parser}
\tl_new:N \l__xparse_arg_spec_tl
\tl_new:N \l__xparse_args_tl
@@ -1837,6 +1837,13 @@
(or~no~arguments~at~all).~You~cannot~have~a~terminal~optional~
argument~with~expandable~commands.
}
+\__msg_kernel_new:nnnn { xparse } { if-boolean }
+ { Invalid~use~\iow_char:N\\IfBooleanTF~{#1} }
+ {
+ \c__msg_coding_error_text_tl
+ The~first~argument~of~\iow_char:N\\IfBoolean(TF/T/F)~must~be~
+ a~boolean~argument~obtained~from~parsing~'s'~or~'t'~arguments.
+ }
\__msg_kernel_new:nnnn { xparse } { inconsistent-long }
{ Inconsistent~long~arguments~for~expandable~command~'#1'. }
{
@@ -2109,9 +2116,19 @@
\__xparse_check_definable:nNT {#1} \DeclareExpandableDocumentCommand
{ \__xparse_declare_expandable_cmd:Nnn #1 {#2} {#3} }
}
-\cs_new_eq:NN \IfBooleanTF \bool_if:NTF
-\cs_new_eq:NN \IfBooleanT \bool_if:NT
-\cs_new_eq:NN \IfBooleanF \bool_if:NF
+\cs_new:Npn \IfBooleanTF #1
+ {
+ \bool_lazy_and:nnTF
+ { \tl_if_single_p:n {#1} }
+ { \tl_if_single_token_p:n #1 }
+ { \bool_if:NTF #1 }
+ {
+ \__msg_kernel_error:nnn { xparse } { if-boolean } {#1}
+ \use_ii:nn
+ }
+ }
+\cs_new:Npn \IfBooleanT #1#2 { \IfBooleanTF {#1} {#2} { } }
+\cs_new:Npn \IfBooleanF #1 { \IfBooleanTF {#1} { } }
\cs_new_eq:NN \IfNoValueF \tl_if_novalue:nF
\cs_new_eq:NN \IfNoValueT \tl_if_novalue:nT
\cs_new_eq:NN \IfNoValueTF \tl_if_novalue:nTF