[latex3-commits] [latex3/latex3] main: Add variants `\tl_if_single:c(TF)` and `\tl_if_single_p:c` (#1272) (cb110d459)

github at latex-project.org github at latex-project.org
Wed Oct 4 12:24:56 CEST 2023


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/cb110d459d079d8d18e0b269a244e81b9314eb43

>---------------------------------------------------------------

commit cb110d459d079d8d18e0b269a244e81b9314eb43
Author: Yukai Chou <muzimuzhi at gmail.com>
Date:   Wed Oct 4 18:22:51 2023 +0800

    Add variants `\tl_if_single:c(TF)` and `\tl_if_single_p:c` (#1272)


>---------------------------------------------------------------

cb110d459d079d8d18e0b269a244e81b9314eb43
 l3kernel/CHANGELOG.md | 1 +
 l3kernel/l3tl.dtx     | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 0bb6666ff..a176d757a 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -11,6 +11,7 @@ this project uses date-based 'snapshot' version identifiers.
 - Documentation for `\sys_if_timer_exist_p:` and `\sys_if_timer_exist:(TF)`.
   They were supported since l3kernel 2021-05-25, along with `\sys_timer:`.
 - l3doc.dtx: Support for footnotes in the function and variable environment  
+- Variants `\tl_if_single:c(TF)` and `\tl_if_single_p:c` (issue \#1272)
 
 ### Changed
 - Convert `\file_if_exist:n(TF)` to expandable status,
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index 6ca82baa7..54fab69f5 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -2427,13 +2427,14 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}[EXP,pTF]{\tl_if_single:N}
+% \begin{macro}[EXP,pTF]{\tl_if_single:N, \tl_if_single:c}
 %   Expand the token list and feed it to \cs{tl_if_single:nTF}.
 %    \begin{macrocode}
 \cs_new:Npn \tl_if_single_p:N { \exp_args:No \tl_if_single_p:n }
 \cs_new:Npn \tl_if_single:NT  { \exp_args:No \tl_if_single:nT  }
 \cs_new:Npn \tl_if_single:NF  { \exp_args:No \tl_if_single:nF  }
 \cs_new:Npn \tl_if_single:NTF { \exp_args:No \tl_if_single:nTF }
+\prg_generate_conditional_variant:Nnn \tl_if_single:N {c} { p , T , F , TF }
 %    \end{macrocode}
 % \end{macro}
 %





More information about the latex3-commits mailing list.