[latex3-commits] [latex3/latex3] main: Add \intarray_if_exist:N(TF) (4ba62049d)
github at latex-project.org
github at latex-project.org
Mon Apr 1 08:51:40 CEST 2024
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/4ba62049d3285c1811e6760672ce0406a1c4919f
>---------------------------------------------------------------
commit 4ba62049d3285c1811e6760672ce0406a1c4919f
Author: Yukai Chou <muzimuzhi at gmail.com>
Date: Mon Apr 1 06:53:59 2024 +0800
Add \intarray_if_exist:N(TF)
>---------------------------------------------------------------
4ba62049d3285c1811e6760672ce0406a1c4919f
l3kernel/CHANGELOG.md | 1 +
l3kernel/l3intarray.dtx | 23 +++++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 8002b8d2a..8adc810a7 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -9,6 +9,7 @@ this project uses date-based 'snapshot' version identifiers.
### Added
- `\prop_(g)put_if_not_in:Nnn` (renamed from `\prop_(g)put_if_new:Nnn`)
+- `\intarray_if_exist:N(TF)`
### Changed
- Expand object names in `\pdf_object_...` functions (issue \#1521)
diff --git a/l3kernel/l3intarray.dtx b/l3kernel/l3intarray.dtx
index 43f566c0e..5aba18857 100644
--- a/l3kernel/l3intarray.dtx
+++ b/l3kernel/l3intarray.dtx
@@ -140,6 +140,19 @@
% \meta{integer array} is empty, produce an error.
% \end{function}
%
+% \section{Integer array conditional}
+%
+% \begin{function}[pTF, added = 2024-03-31]
+% {\intarray_if_exist:N, \intarray_if_exist:c}
+% \begin{syntax}
+% \cs{intarray_if_exist_p:N} \meta{intarray~var}
+% \cs{intarray_if_exist:NTF} \meta{intarray~var} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Tests whether the \meta{intarray~var} is currently defined. This
+% does not check that the \meta{intarray~var} really is an integer
+% array variable.
+% \end{function}
+%
% \section{Viewing integer arrays}
%
% \begin{function}[added = 2018-05-04]
@@ -920,6 +933,16 @@ luacmd('@@_gset_range:w', function()
%
% \subsection{Common parts}
%
+% \begin{macro}[pTF]{\intarray_if_exist:N, \intarray_if_exist:c}
+% Copies of the \texttt{cs} functions defined in \pkg{l3basics}.
+% \begin{macrocode}
+\prg_new_eq_conditional:NNn \intarray_if_exist:N \cs_if_exist:N
+ { TF , T , F , p }
+\prg_new_eq_conditional:NNn \intarray_if_exist:c \cs_if_exist:c
+ { TF , T , F , p }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\intarray_show:N, \intarray_show:c, \intarray_log:N, \intarray_log:c}
% Convert the list to a comma list (with spaces after each comma)
% \begin{macrocode}
More information about the latex3-commits
mailing list.