diff options
author | Karl Berry <karl@freefriends.org> | 2017-12-17 23:16:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-12-17 23:16:51 +0000 |
commit | f95f2dab244cf167851907d2f86f66d059993afd (patch) | |
tree | 39a76c04cb5e850e6a903dcb1b6b5cbe3e9c7f7c /Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty | |
parent | 6980cb1a55e1d39670564d76f29436530a761cae (diff) |
l3 (17dec17)
git-svn-id: svn://tug.org/texlive/trunk@46085 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty | 29 |
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 |