[latex3-commits] [latex3/latex3] develop: Add \bitset_use:N and \clist_use:N (fixes #1575) (221e960dc)
github at latex-project.org
github at latex-project.org
Tue Nov 12 15:49:16 CET 2024
Repository : https://github.com/latex3/latex3
On branch : develop
Link : https://github.com/latex3/latex3/commit/221e960dc4dd8877df9b29f145b219d3432a1fad
>---------------------------------------------------------------
commit 221e960dc4dd8877df9b29f145b219d3432a1fad
Author: Joseph Wright <joseph at texdev.net>
Date: Tue Nov 12 14:49:16 2024 +0000
Add \bitset_use:N and \clist_use:N (fixes #1575)
>---------------------------------------------------------------
221e960dc4dd8877df9b29f145b219d3432a1fad
l3kernel/CHANGELOG.md | 2 ++
l3kernel/l3bitset.dtx | 17 +++++++++++++++++
l3kernel/l3clist.dtx | 21 +++++++++++++++++++++
3 files changed, 40 insertions(+)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 45458031e..ce71252de 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -8,6 +8,8 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
### Added
+- `\bitset_use:N` and `\clist_use:N`: this clarifies that bitsets and clists
+ can be used with `V`-type expansion
- `\sys_if_engine_opentype:(TF)`
### Removed
diff --git a/l3kernel/l3bitset.dtx b/l3kernel/l3bitset.dtx
index 79a5a21b4..166bf58b3 100644
--- a/l3kernel/l3bitset.dtx
+++ b/l3kernel/l3bitset.dtx
@@ -240,6 +240,16 @@
% implementation based on \cs{fp_eval:n} otherwise.
% \end{function}
%
+% \begin{function}[EXP, added = 2024-11-12]{\bitset_use:N, \bitset_use:c}
+% \begin{syntax}
+% \cs{bisset_use:N} \meta{bitset var}
+% \end{syntax}
+% This leaves the current value of the bitset expressed as
+% a binary (string) number in the input stream.
+% If no bit has been set yet, the output is zero. This is
+% functionally equivalent to \cs{bitset_to_bin:N}.
+% \end{function}
+%
% \begin{function}[added = 2023-11-15]
% {\bitset_show:N, \bitset_show:c}
% \begin{syntax}
@@ -524,6 +534,13 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\bitset_use:N, \bitset_use:c}
+% \begin{macrocode}
+\cs_new_eq:NN \bitset_use:N \tl_use:N
+\cs_generate_variant:Nn \bitset_use:N { c }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}
% {
% \bitset_item:Nn, \bitset_item:cn
diff --git a/l3kernel/l3clist.dtx b/l3kernel/l3clist.dtx
index dc6caccf0..ae153a5cb 100644
--- a/l3kernel/l3clist.dtx
+++ b/l3kernel/l3clist.dtx
@@ -619,6 +619,20 @@
% \end{texnote}
% \end{function}
%
+% \begin{function}[EXP, added = 2024-11-12]{\clist_use:N, \clist_use:c}
+% \begin{syntax}
+% \cs{clist_use:N} \meta{clist~var}
+% \end{syntax}
+% Places the contents of the \meta{clist~var} in the input stream,
+% with a comma between each item.
+% \begin{texnote}
+% The result is returned within the \tn{unexpanded}
+% primitive (\cs{exp_not:n}), which means that the \meta{items}
+% do not expand further when appearing in an \texttt{e}-type
+% or \texttt{x}-type argument expansion.
+% \end{texnote}
+% \end{function}
+%
% \begin{function}[EXP, added = 2021-05-10]{\clist_use:nnnn, \clist_use:nn}
% \begin{syntax}
% \cs{clist_use:nnnn} \Arg{comma~list} \Arg{separator~between~two} \\
@@ -2008,6 +2022,13 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\clist_use:N, \clist_use:c}
+% \begin{macrocode}
+\cs_new_eq:NN \clist_use:N \tl_use:N
+\cs_generate_variant:Nn \clist_use:N { c }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}
% {
% \clist_use:nnnn, \clist_use:nn, \@@_use:Nw,
More information about the latex3-commits
mailing list.