summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel/l3tl.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-08-30 03:01:17 +0000
committerNorbert Preining <norbert@preining.info>2023-08-30 03:01:17 +0000
commit4fee29360f7566a474b6143951b0744fa151edc9 (patch)
tree1af77d3ca21368f054b09f30dd60e8028a91be62 /macros/latex/contrib/l3kernel/l3tl.dtx
parent64e26532c685fd24d6983508c6239e3c268b810b (diff)
CTAN sync 202308300301
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3tl.dtx')
-rw-r--r--macros/latex/contrib/l3kernel/l3tl.dtx238
1 files changed, 158 insertions, 80 deletions
diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx
index 08ed9216ef..06226fd7ba 100644
--- a/macros/latex/contrib/l3kernel/l3tl.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2023-08-11}
+% \date{Released 2023-08-29}
%
% \maketitle
%
@@ -177,10 +177,10 @@
%
% \begin{function}
% {
-% \tl_put_left:Nn, \tl_put_left:NV, \tl_put_left:No, \tl_put_left:Nx,
-% \tl_put_left:cn, \tl_put_left:cV, \tl_put_left:co, \tl_put_left:cx,
-% \tl_gput_left:Nn, \tl_gput_left:NV, \tl_gput_left:No, \tl_gput_left:Nx,
-% \tl_gput_left:cn, \tl_gput_left:cV, \tl_gput_left:co, \tl_gput_left:cx
+% \tl_put_left:Nn, \tl_put_left:NV, \tl_put_left:Nv, \tl_put_left:No, \tl_put_left:Nx,
+% \tl_put_left:cn, \tl_put_left:cV, \tl_put_left:cv, \tl_put_left:co, \tl_put_left:cx,
+% \tl_gput_left:Nn, \tl_gput_left:NV, \tl_gput_left:Nv, \tl_gput_left:No, \tl_gput_left:Nx,
+% \tl_gput_left:cn, \tl_gput_left:cV, \tl_gput_left:cv, \tl_gput_left:co, \tl_gput_left:cx
% }
% \begin{syntax}
% \cs{tl_put_left:Nn} \meta{tl~var} \Arg{tokens}
@@ -191,12 +191,10 @@
%
% \begin{function}
% {
-% \tl_put_right:Nn, \tl_put_right:NV, \tl_put_right:No, \tl_put_right:Nx,
-% \tl_put_right:cn, \tl_put_right:cV, \tl_put_right:co, \tl_put_right:cx,
-% \tl_gput_right:Nn, \tl_gput_right:NV, \tl_gput_right:No,
-% \tl_gput_right:Nx,
-% \tl_gput_right:cn, \tl_gput_right:cV, \tl_gput_right:co,
-% \tl_gput_right:cx
+% \tl_put_right:Nn, \tl_put_right:NV, \tl_put_right:Nv, \tl_put_right:No, \tl_put_right:Nx,
+% \tl_put_right:cn, \tl_put_right:cV, \tl_put_right:cv, \tl_put_right:co, \tl_put_right:cx,
+% \tl_gput_right:Nn, \tl_gput_right:NV, \tl_gput_right:Nv, \tl_gput_right:No, \tl_gput_right:Nx,
+% \tl_gput_right:cn, \tl_gput_right:cV, \tl_gput_right:cv, \tl_gput_right:co, \tl_gput_right:cx
% }
% \begin{syntax}
% \cs{tl_put_right:Nn} \meta{tl~var} \Arg{tokens}
@@ -230,7 +228,7 @@
% \end{function}
%
% \begin{function}[added = 2012-05-24, updated = 2012-06-05, EXP,pTF]
-% {\tl_if_empty:n, \tl_if_empty:V, \tl_if_empty:o}
+% {\tl_if_empty:n, \tl_if_empty:V, \tl_if_empty:o, \tl_if_empty:e}
% \begin{syntax}
% \cs{tl_if_empty_p:n} \Arg{token list}
% \cs{tl_if_empty:nTF} \Arg{token list} \Arg{true code} \Arg{false code}
@@ -270,7 +268,8 @@
% category codes are not important.
% \end{function}
%
-% \begin{function}[TF]{\tl_if_eq:nn}
+% \begin{function}[TF]
+% {\tl_if_eq:nn, \tl_if_eq:Vn, \tl_if_eq:nV, \tl_if_eq:xn, \tl_if_eq:nx}
% \begin{syntax}
% \cs{tl_if_eq:nnTF} \Arg{token list_1} \Arg{token list_2} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -281,7 +280,7 @@
% or \cs{str_if_eq:nnTF} if category codes are not important.
% \end{function}
%
-% \begin{function}[TF]{\tl_if_in:Nn, \tl_if_in:cn}
+% \begin{function}[TF]{\tl_if_in:Nn, \tl_if_in:NV, \tl_if_in:cn, \tl_if_in:cV}
% \begin{syntax}
% \cs{tl_if_in:NnTF} \meta{tl~var} \Arg{token list} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -293,7 +292,7 @@
% \end{function}
%
% \begin{function}[TF]
-% {\tl_if_in:nn, \tl_if_in:Vn, \tl_if_in:on, \tl_if_in:no}
+% {\tl_if_in:nn, \tl_if_in:Vn, \tl_if_in:nV, \tl_if_in:on, \tl_if_in:no}
% \begin{syntax}
% \cs{tl_if_in:nnTF} \Arg{token list_1} \Arg{token list_2} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -438,7 +437,8 @@
%
% \subsection{Using token lists}
%
-% \begin{function}[EXP]{\tl_to_str:n, \tl_to_str:o, \tl_to_str:V, \tl_to_str:v}
+% \begin{function}[EXP]
+% {\tl_to_str:n, \tl_to_str:o, \tl_to_str:V, \tl_to_str:v, \tl_to_str:e}
% \begin{syntax}
% \cs{tl_to_str:n} \Arg{token list}
% \end{syntax}
@@ -536,7 +536,7 @@
% \end{function}
%
% \begin{function}[updated = 2012-01-08, EXP]
-% {\tl_reverse:n, \tl_reverse:V, \tl_reverse:o}
+% {\tl_reverse:n, \tl_reverse:V, \tl_reverse:o, \tl_reverse:f, \tl_reverse:e}
% \begin{syntax}
% \cs{tl_reverse:n} \Arg{token list}
% \end{syntax}
@@ -1073,10 +1073,14 @@
%
% \begin{function}[updated = 2011-08-11]
% {
-% \tl_replace_once:Nnn, \tl_replace_once:Nxx,
-% \tl_replace_once:cnn, \tl_replace_once:cxx,
-% \tl_greplace_once:Nnn, \tl_greplace_once:Nxx
-% \tl_greplace_once:cnn, \tl_greplace_once:cxx
+% \tl_replace_once:Nnn, \tl_replace_once:NVn, \tl_replace_once:NnV,
+% \tl_replace_once:Nxn, \tl_replace_once:Nnx, \tl_replace_once:Nxx,
+% \tl_replace_once:cnn, \tl_replace_once:cVn, \tl_replace_once:cnV,
+% \tl_replace_once:cxn, \tl_replace_once:cnx, \tl_replace_once:cxx,
+% \tl_greplace_once:Nnn, \tl_greplace_once:NVn, \tl_rgeplace_once:NnV,
+% \tl_greplace_once:Nxn, \tl_greplace_once:Nnx, \tl_greplace_once:Nxx,
+% \tl_greplace_once:cnn, \tl_greplace_once:cVn, \tl_greplace_once:cnV,
+% \tl_greplace_once:cxn, \tl_greplace_once:cnx, \tl_greplace_once:cxx
% }
% \begin{syntax}
% \cs{tl_replace_once:Nnn} \meta{tl~var} \Arg{old tokens} \Arg{new tokens}
@@ -1090,10 +1094,14 @@
%
% \begin{function}[updated = 2011-08-11]
% {
-% \tl_replace_all:Nnn, \tl_replace_all:Nxx,
-% \tl_replace_all:cnn, \tl_replace_all:cxx
-% \tl_greplace_all:Nnn, \tl_greplace_all:Nxx,
-% \tl_greplace_all:cnn, \tl_greplace_all:cxx
+% \tl_replace_all:Nnn, \tl_replace_all:NVn, \tl_replace_all:NnV,
+% \tl_replace_all:Nxn, \tl_replace_all:Nnx, \tl_replace_all:Nxx,
+% \tl_replace_all:cnn, \tl_replace_all:cVn, \tl_replace_all:cnV,
+% \tl_replace_all:cxn, \tl_replace_all:cnx, \tl_replace_all:cxx,
+% \tl_greplace_all:Nnn, \tl_greplace_all:NVn, \tl_greplace_all:cnV,
+% \tl_greplace_all:Nxn, \tl_greplace_all:Nnx, \tl_greplace_all:Nxx,
+% \tl_greplace_all:cnn, \tl_greplace_all:cVn, \tl_greplace_all:cnV,
+% \tl_greplace_all:cxn, \tl_greplace_all:cnx, \tl_greplace_all:cxx
% }
% \begin{syntax}
% \cs{tl_replace_all:Nnn} \meta{tl~var} \Arg{old tokens} \Arg{new tokens}
@@ -1111,10 +1119,10 @@
%
% \begin{function}[updated = 2011-08-11]
% {
-% \tl_remove_once:Nn, \tl_remove_once:Nx,
-% \tl_remove_once:cn, \tl_remove_once:cx,
-% \tl_gremove_once:Nn, \tl_gremove_once:Nx
-% \tl_gremove_once:cn, \tl_gremove_once:cx
+% \tl_remove_once:Nn, \tl_remove_once:NV, \tl_remove_once:Nx,
+% \tl_remove_once:cn, \tl_remove_once:cV, \tl_remove_once:cx,
+% \tl_gremove_once:Nn, \tl_gremove_once:NV, \tl_gremove_once:Nx
+% \tl_gremove_once:cn, \tl_gremove_once:cV, \tl_gremove_once:cx
% }
% \begin{syntax}
% \cs{tl_remove_once:Nn} \meta{tl~var} \Arg{tokens}
@@ -1127,10 +1135,10 @@
%
% \begin{function}[updated = 2011-08-11]
% {
-% \tl_remove_all:Nn, \tl_remove_all:Nx,
-% \tl_remove_all:cn, \tl_remove_all:cx,
-% \tl_gremove_all:Nn, \tl_gremove_all:Nx
-% \tl_gremove_all:cn, \tl_gremove_all:cx
+% \tl_remove_all:Nn, \tl_remove_all:NV, \tl_remove_all:Nx,
+% \tl_remove_all:cn, \tl_remove_all:cV, \tl_remove_all:cx,
+% \tl_gremove_all:Nn, \tl_gremove_all:NV, \tl_gremove_all:Nx
+% \tl_gremove_all:cn, \tl_gremove_all:cV, \tl_gremove_all:cx
% }
% \begin{syntax}
% \cs{tl_remove_all:Nn} \meta{tl~var} \Arg{tokens}
@@ -1161,10 +1169,10 @@
%
% \begin{function}[updated = 2015-08-11]
% {
-% \tl_set_rescan:Nnn, \tl_set_rescan:Nno, \tl_set_rescan:Nnx,
-% \tl_set_rescan:cnn, \tl_set_rescan:cno, \tl_set_rescan:cnx,
-% \tl_gset_rescan:Nnn, \tl_gset_rescan:Nno, \tl_gset_rescan:Nnx,
-% \tl_gset_rescan:cnn, \tl_gset_rescan:cno, \tl_gset_rescan:cnx
+% \tl_set_rescan:Nnn, \tl_set_rescan:NnV, \tl_set_rescan:Nno, \tl_set_rescan:Nnx,
+% \tl_set_rescan:cnn, \tl_set_rescan:cnV, \tl_set_rescan:cno, \tl_set_rescan:cnx,
+% \tl_gset_rescan:Nnn, \tl_gset_rescan:NnV, \tl_gset_rescan:Nno, \tl_gset_rescan:Nnx,
+% \tl_gset_rescan:cnn, \tl_gset_rescan:cnV, \tl_gset_rescan:cno, \tl_gset_rescan:cnx
% }
% \begin{syntax}
% \cs{tl_set_rescan:Nnn} \meta{tl~var} \Arg{setup} \Arg{tokens}
@@ -1488,13 +1496,13 @@
%
% \begin{macro}
% {
-% \tl_put_left:Nn, \tl_put_left:NV, \tl_put_left:No, \tl_put_left:Nx,
-% \tl_put_left:cn, \tl_put_left:cV, \tl_put_left:co, \tl_put_left:cx
+% \tl_put_left:Nn, \tl_put_left:NV, \tl_put_left:Nv, \tl_put_left:No, \tl_put_left:Nx,
+% \tl_put_left:cn, \tl_put_left:cV, \tl_put_left:cv, \tl_put_left:co, \tl_put_left:cx
% }
% \begin{macro}
% {
-% \tl_gput_left:Nn, \tl_gput_left:NV, \tl_gput_left:No, \tl_gput_left:Nx,
-% \tl_gput_left:cn, \tl_gput_left:cV, \tl_gput_left:co, \tl_gput_left:cx
+% \tl_gput_left:Nn, \tl_gput_left:NV, \tl_gput_left:Nv, \tl_gput_left:No, \tl_gput_left:Nx,
+% \tl_gput_left:cn, \tl_gput_left:cV, \tl_gput_left:cv, \tl_gput_left:co, \tl_gput_left:cx
% }
% Adding to the left is done directly to gain a little performance.
% \begin{macrocode}
@@ -1508,6 +1516,11 @@
\__kernel_tl_set:Nx #1
{ \exp_not:V #2 \__kernel_exp_not:w \exp_after:wN {#1} }
}
+\cs_new_protected:Npn \tl_put_left:Nv #1#2
+ {
+ \__kernel_tl_set:Nx #1
+ { \exp_not:v {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
+ }
\cs_new_protected:Npn \tl_put_left:No #1#2
{
\__kernel_tl_set:Nx #1
@@ -1528,6 +1541,11 @@
\__kernel_tl_gset:Nx #1
{ \exp_not:V #2 \__kernel_exp_not:w \exp_after:wN {#1} }
}
+\cs_new_protected:Npn \tl_gput_left:Nv #1#2
+ {
+ \__kernel_tl_gset:Nx #1
+ { \exp_not:v {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
+ }
\cs_new_protected:Npn \tl_gput_left:No #1#2
{
\__kernel_tl_gset:Nx #1
@@ -1540,10 +1558,12 @@
{ \__kernel_tl_gset:Nx #1 { #2 \__kernel_exp_not:w \exp_after:wN {#1} } }
\cs_generate_variant:Nn \tl_put_left:Nn { c }
\cs_generate_variant:Nn \tl_put_left:NV { c }
+\cs_generate_variant:Nn \tl_put_left:Nv { c }
\cs_generate_variant:Nn \tl_put_left:No { c }
\cs_generate_variant:Nn \tl_put_left:Nx { c }
\cs_generate_variant:Nn \tl_gput_left:Nn { c }
\cs_generate_variant:Nn \tl_gput_left:NV { c }
+\cs_generate_variant:Nn \tl_gput_left:NV { c }
\cs_generate_variant:Nn \tl_gput_left:No { c }
\cs_generate_variant:Nn \tl_gput_left:Nx { c }
% \end{macrocode}
@@ -1552,14 +1572,14 @@
%
% \begin{macro}
% {
-% \tl_put_right:Nn, \tl_put_right:NV, \tl_put_right:No, \tl_put_right:Nx,
-% \tl_put_right:cn, \tl_put_right:cV, \tl_put_right:co, \tl_put_right:cx
+% \tl_put_right:Nn, \tl_put_right:NV, \tl_put_right:Nv, \tl_put_right:No, \tl_put_right:Nx,
+% \tl_put_right:cn, \tl_put_right:cV, \tl_put_right:cv, \tl_put_right:co, \tl_put_right:cx
% }
% \begin{macro}
% {
-% \tl_gput_right:Nn, \tl_gput_right:NV, \tl_gput_right:No,
+% \tl_gput_right:Nn, \tl_gput_right:NV, \tl_gput_right:Nv, \tl_gput_right:No,
% \tl_gput_right:Nx,
-% \tl_gput_right:cn, \tl_gput_right:cV, \tl_gput_right:co,
+% \tl_gput_right:cn, \tl_gput_right:cV, \tl_gput_right:cv, \tl_gput_right:co,
% \tl_gput_right:cx
% }
% The same on the right.
@@ -1571,6 +1591,11 @@
\__kernel_tl_set:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:V #2 }
}
+\cs_new_protected:Npn \tl_put_right:Nv #1#2
+ {
+ \__kernel_tl_set:Nx #1
+ { \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:v {#2} }
+ }
\cs_new_protected:Npn \tl_put_right:No #1#2
{
\__kernel_tl_set:Nx #1
@@ -1588,6 +1613,11 @@
\__kernel_tl_gset:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:V #2 }
}
+\cs_new_protected:Npn \tl_gput_right:Nv #1#2
+ {
+ \__kernel_tl_gset:Nx #1
+ { \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:v {#2} }
+ }
\cs_new_protected:Npn \tl_gput_right:No #1#2
{
\__kernel_tl_gset:Nx #1
@@ -1600,10 +1630,12 @@
{ \__kernel_tl_gset:Nx #1 { \__kernel_exp_not:w \exp_after:wN {#1} #2 } }
\cs_generate_variant:Nn \tl_put_right:Nn { c }
\cs_generate_variant:Nn \tl_put_right:NV { c }
+\cs_generate_variant:Nn \tl_put_right:Nv { c }
\cs_generate_variant:Nn \tl_put_right:No { c }
\cs_generate_variant:Nn \tl_put_right:Nx { c }
\cs_generate_variant:Nn \tl_gput_right:Nn { c }
\cs_generate_variant:Nn \tl_gput_right:NV { c }
+\cs_generate_variant:Nn \tl_gput_right:Nv { c }
\cs_generate_variant:Nn \tl_gput_right:No { c }
\cs_generate_variant:Nn \tl_gput_right:Nx { c }
% \end{macrocode}
@@ -1653,13 +1685,13 @@
%
% \begin{macro}
% {
-% \tl_set_rescan:Nnn, \tl_set_rescan:Nno, \tl_set_rescan:Nnx,
-% \tl_set_rescan:cnn, \tl_set_rescan:cno, \tl_set_rescan:cnx
+% \tl_set_rescan:Nnn, \tl_set_rescan:NnV, \tl_set_rescan:Nno, \tl_set_rescan:Nnx,
+% \tl_set_rescan:cnn, \tl_set_rescan:cnV, \tl_set_rescan:cno, \tl_set_rescan:cnx
% }
% \begin{macro}
% {
-% \tl_gset_rescan:Nnn, \tl_gset_rescan:Nno, \tl_gset_rescan:Nnx,
-% \tl_gset_rescan:cnn, \tl_gset_rescan:cno, \tl_gset_rescan:cnx
+% \tl_gset_rescan:Nnn, \tl_gset_rescan:NnV, \tl_gset_rescan:Nno, \tl_gset_rescan:Nnx,
+% \tl_gset_rescan:cnn, \tl_gset_rescan:cnV, \tl_gset_rescan:cno, \tl_gset_rescan:cnx
% }
% \begin{macro}{\tl_rescan:nn, \tl_rescan:nV}
% \begin{macro}{\@@_rescan_aux:}
@@ -1758,10 +1790,10 @@
\group_end:
#1 #2 {#3}
}
-\cs_generate_variant:Nn \tl_set_rescan:Nnn { Nno , Nnx }
-\cs_generate_variant:Nn \tl_set_rescan:Nnn { c , cno , cnx }
-\cs_generate_variant:Nn \tl_gset_rescan:Nnn { Nno , Nnx }
-\cs_generate_variant:Nn \tl_gset_rescan:Nnn { c , cno }
+\cs_generate_variant:Nn \tl_set_rescan:Nnn { NnV , Nno , Nnx }
+\cs_generate_variant:Nn \tl_set_rescan:Nnn { c , cnV , cno , cnx }
+\cs_generate_variant:Nn \tl_gset_rescan:Nnn { NnV , Nno , Nnx }
+\cs_generate_variant:Nn \tl_gset_rescan:Nnn { c , cnV , cno , cnx }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1879,10 +1911,34 @@
%
% \subsection{Modifying token list variables}
%
-% \begin{macro}{\tl_replace_all:Nnn, \tl_replace_all:cnn}
-% \begin{macro}{\tl_greplace_all:Nnn, \tl_greplace_all:cnn}
-% \begin{macro}{\tl_replace_once:Nnn, \tl_replace_once:cnn}
-% \begin{macro}{\tl_greplace_once:Nnn, \tl_greplace_once:cnn}
+% \begin{macro}
+% {
+% \tl_replace_all:Nnn, \tl_replace_all:NVn, \tl_replace_all:NnV,
+% \tl_replace_all:Nxn, \tl_replace_all:Nnx, \tl_replace_all:Nxx,
+% \tl_replace_all:cnn, \tl_replace_all:cVn, \tl_replace_all:cnV,
+% \tl_replace_all:cxn, \tl_replace_all:cnx, \tl_replace_all:cxx
+% }
+% \begin{macro}
+% {
+% \tl_greplace_all:Nnn, \tl_greplace_all:NVn, \tl_greplace_all:NnV,
+% \tl_greplace_all:Nxn, \tl_greplace_all:Nnx, \tl_greplace_all:Nxx,
+% \tl_greplace_all:cnn, \tl_greplace_all:cVn, \tl_greplace_all:cnV,
+% \tl_greplace_all:cxn, \tl_greplace_all:cnx, \tl_greplace_all:cxx
+% }
+% \begin{macro}
+% {
+% \tl_replace_once:Nnn, \tl_replace_once:NVn, \tl_replace_once:NnV,
+% \tl_replace_once:Nxn, \tl_replace_once:Nnx, \tl_replace_once:Nxx,
+% \tl_replace_once:cnn, \tl_replace_once:cVn, \tl_replace_once:cnV,
+% \tl_replace_once:cxn, \tl_replace_once:cnx, \tl_replace_once:cxx
+% }
+% \begin{macro}
+% {
+% \tl_greplace_once:Nnn, \tl_greplace_once:NVn, \tl_replace_once:NnV,
+% \tl_greplace_once:Nxn, \tl_greplace_once:Nnx, \tl_greplace_once:Nxx,
+% \tl_greplace_once:cnn, \tl_greplace_once:cVn, \tl_replace_once:cnV,
+% \tl_greplace_once:cxn, \tl_greplace_once:cnx, \tl_greplace_once:cxx
+% }
% All of the \texttt{replace} functions call \cs{@@_replace:NnNNNnn}
% with appropriate arguments. The first two arguments are explained
% later. The next controls whether the replacement function calls
@@ -1902,10 +1958,14 @@
{ \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_next:w \__kernel_tl_set:Nx }
\cs_new_protected:Npn \tl_greplace_all:Nnn
{ \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_next:w \__kernel_tl_gset:Nx }
-\cs_generate_variant:Nn \tl_replace_once:Nnn { Nxx , c , cxx }
-\cs_generate_variant:Nn \tl_greplace_once:Nnn { Nxx , c , cxx }
-\cs_generate_variant:Nn \tl_replace_all:Nnn { Nxx , c , cxx }
-\cs_generate_variant:Nn \tl_greplace_all:Nnn { Nxx , c , cxx }
+\cs_generate_variant:Nn \tl_replace_once:Nnn
+ { NV , NnV , Nx , Nnx , Nxx , c , cV , cnV , cx , cnx , cxx }
+\cs_generate_variant:Nn \tl_greplace_once:Nnn
+ { NV , NnV , Nx , Nnx , Nxx , c , cV , cnV , cx , cnx , cxx }
+\cs_generate_variant:Nn \tl_replace_all:Nnn
+ { NV , NnV , Nx , Nnx , Nxx , c , cV , cnV , cx , cnx , cxx }
+\cs_generate_variant:Nn \tl_greplace_all:Nnn
+ { NV , NnV , Nx , Nnx , Nxx , c , cV , cnV , cx , cnx , cxx }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2090,30 +2150,46 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\tl_remove_once:Nn, \tl_remove_once:cn}
-% \begin{macro}{\tl_gremove_once:Nn, \tl_gremove_once:cn}
+% \begin{macro}
+% {
+% \tl_remove_once:Nn, \tl_remove_once:NV, \tl_remove_once:Nx,
+% \tl_remove_once:cn, \tl_remove_once:cV, \tl_remove_once:cx
+% }
+% \begin{macro}
+% {
+% \tl_gremove_once:Nn, \tl_gremove_once:NV, \tl_gremove_once:Nx,
+% \tl_gremove_once:cn, \tl_gremove_once:cV, \tl_gremove_once:cx
+% }
% Removal is just a special case of replacement.
% \begin{macrocode}
\cs_new_protected:Npn \tl_remove_once:Nn #1#2
{ \tl_replace_once:Nnn #1 {#2} { } }
\cs_new_protected:Npn \tl_gremove_once:Nn #1#2
{ \tl_greplace_once:Nnn #1 {#2} { } }
-\cs_generate_variant:Nn \tl_remove_once:Nn { Nx , c , cx }
-\cs_generate_variant:Nn \tl_gremove_once:Nn { Nx , c , cx }
+\cs_generate_variant:Nn \tl_remove_once:Nn { NV , Nx , c , cV , cx }
+\cs_generate_variant:Nn \tl_gremove_once:Nn { NV , Nx , c , cV , cx }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\tl_remove_all:Nn, \tl_remove_all:cn}
-% \begin{macro}{\tl_gremove_all:Nn, \tl_gremove_all:cn}
+% \begin{macro}
+% {
+% \tl_remove_all:Nn, \tl_remove_all:NV, \tl_remove_all:Nx,
+% \tl_remove_all:cn, \tl_remove_all:cV, \tl_remove_all:cx
+% }
+% \begin{macro}
+% {
+% \tl_gremove_all:Nn, \tl_gremove_all:NV, \tl_gremove_all:Nx,
+% \tl_gremove_all:cn, \tl_gremove_all:cV, \tl_gremove_all:cx
+% }
% Removal is just a special case of replacement.
% \begin{macrocode}
\cs_new_protected:Npn \tl_remove_all:Nn #1#2
{ \tl_replace_all:Nnn #1 {#2} { } }
\cs_new_protected:Npn \tl_gremove_all:Nn #1#2
{ \tl_greplace_all:Nnn #1 {#2} { } }
-\cs_generate_variant:Nn \tl_remove_all:Nn { Nx , c , cx }
-\cs_generate_variant:Nn \tl_gremove_all:Nn { Nx , c , cx }
+\cs_generate_variant:Nn \tl_remove_all:Nn { NV , Nx , c , cV , cx }
+\cs_generate_variant:Nn \tl_gremove_all:Nn { NV , Nx , c , cV , cx }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2137,7 +2213,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[pTF]{\tl_if_empty:n, \tl_if_empty:V}
+% \begin{macro}[pTF]{\tl_if_empty:n, \tl_if_empty:V, \tl_if_empty:e}
% The \cs{if:w} triggers the expansion of \cs{tl_to_str:n} which converts the
% argument to a string: this is empty if and only if the argument is. Then
% |\if:w \scan_stop: ... \scan_stop:| is \texttt{true} if and only if the
@@ -2155,7 +2231,7 @@
\fi:
}
\prg_generate_conditional_variant:Nnn \tl_if_empty:n
- { V } { p , TF , T , F }
+ { V , e } { p , TF , T , F }
% \end{macrocode}
% \end{macro}
%
@@ -2252,7 +2328,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[TF]{\tl_if_eq:nn}
+% \begin{macro}[TF]{\tl_if_eq:nn, \tl_if_eq:Vn, \tl_if_eq:nV, \tl_if_eq:xn, \tl_if_eq:nx}
% A simple store and compare routine.
% \begin{macrocode}
\prg_new_protected_conditional:Npnn \tl_if_eq:nn #1#2 { T , F , TF }
@@ -2268,10 +2344,11 @@
\prg_return_false:
\fi:
}
+\prg_generate_conditional_variant:Nnn \tl_if_eq:nn { V , nV , x , nx } { TF , T , F }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[TF]{\tl_if_in:Nn, \tl_if_in:cn}
+% \begin{macro}[TF]{\tl_if_in:Nn, \tl_if_in:NV, \tl_if_in:cn, \tl_if_in:cV}
% See \cs{tl_if_in:nnTF} for further comments. Here we simply
% expand the token list variable and pass it to \cs{tl_if_in:nnTF}.
% \begin{macrocode}
@@ -2279,11 +2356,11 @@
\cs_new_protected:Npn \tl_if_in:NnF { \exp_args:No \tl_if_in:nnF }
\cs_new_protected:Npn \tl_if_in:NnTF { \exp_args:No \tl_if_in:nnTF }
\prg_generate_conditional_variant:Nnn \tl_if_in:Nn
- { c } { T , F , TF }
+ { NV , c , cV } { T , F , TF }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[TF]{\tl_if_in:nn, \tl_if_in:Vn, \tl_if_in:on, \tl_if_in:no}
+% \begin{macro}[TF]{\tl_if_in:nn, \tl_if_in:Vn, \tl_if_in:on, \tl_if_in:nV, \tl_if_in:no}
% Once more, the test relies on the emptiness test for robustness.
% The function \cs{@@_tmp:w} removes tokens until the first occurrence
% of |#2|. If this does not appear in |#1|, then the final |#2| is removed,
@@ -2313,7 +2390,7 @@
\if_false: } \fi:
}
\prg_generate_conditional_variant:Nnn \tl_if_in:nn
- { V , o , no } { T , F , TF }
+ { V , o , nV , no } { T , F , TF }
% \end{macrocode}
% \end{macro}
%
@@ -2557,10 +2634,10 @@
%
% \subsection{Using token lists}
%
-% \begin{macro}{\tl_to_str:n, \tl_to_str:o, \tl_to_str:V, \tl_to_str:v}
+% \begin{macro}{\tl_to_str:n, \tl_to_str:o, \tl_to_str:V, \tl_to_str:v, \tl_to_str:e}
% Another name for a primitive: defined in \pkg{l3basics}.
% \begin{macrocode}
-\cs_generate_variant:Nn \tl_to_str:n { o , V , v }
+\cs_generate_variant:Nn \tl_to_str:n { o , V , v , e }
% \end{macrocode}
% \end{macro}
%
@@ -3228,7 +3305,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP]{\tl_reverse:n, \tl_reverse:o, \tl_reverse:V}
+% \begin{macro}[EXP]
+% {\tl_reverse:n, \tl_reverse:o, \tl_reverse:V, \tl_reverse:f, \tl_reverse:e}
% \begin{macro}[EXP]{\@@_reverse_normal:nN}
% \begin{macro}[EXP]{\@@_reverse_group_preserve:nn}
% \begin{macro}[EXP]{\@@_reverse_space:n}
@@ -3250,7 +3328,7 @@
{#1}
}
}
-\cs_generate_variant:Nn \tl_reverse:n { o , V }
+\cs_generate_variant:Nn \tl_reverse:n { o , V , f , e }
\cs_new:Npn \@@_reverse_normal:N
{ \@@_act_reverse_output:n }
\cs_new:Npn \@@_reverse_group_preserve:n #1