From d470efdd8b7b603d5d048f896fa1dce095a3e245 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 23 May 2023 03:00:46 +0000 Subject: CTAN sync 202305230300 --- macros/latex/contrib/l3kernel/l3int.dtx | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'macros/latex/contrib/l3kernel/l3int.dtx') diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx index f7d065d874..bf3c413b28 100644 --- a/macros/latex/contrib/l3kernel/l3int.dtx +++ b/macros/latex/contrib/l3kernel/l3int.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-15} +% \date{Released 2023-05-22} % % \maketitle % @@ -493,6 +493,17 @@ % is odd or even, as appropriate. % \end{function} % +% \begin{function}[EXP,pTF, added = 2023-05-17]{\int_if_zero:n} +% \begin{syntax} +% \cs{int_if_zero_p:n} \Arg{int expr} +% \cs{int_if_zero:nTF} \Arg{int expr} +% ~~\Arg{true code} \Arg{false code} +% \end{syntax} +% This function first evaluates the \meta{int expr} +% as described for \cs{int_eval:n}. It then evaluates if this +% is zero or not. +% \end{function} +% % \section{Integer expression loops} % % \begin{function}[rEXP]{\int_do_until:nNnn} @@ -1730,6 +1741,19 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}[pTF]{\int_if_zero:n} +% \begin{macrocode} +\prg_new_conditional:Npnn \int_if_zero:n #1 { p , T , F , TF } + { + \if_int_compare:w \@@_eval:w #1 = \c_zero_int + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +% \end{macrocode} +% \end{macro} +% % \begin{macro}[EXP, noTF]{\int_case:nn} % \begin{macro}{\@@_case:nnTF} % \begin{macro}{\@@_case:nw, \@@_case_end:nw} -- cgit v1.2.3