summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel/l3tl.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-07-02 03:03:53 +0000
committerNorbert Preining <norbert@preining.info>2022-07-02 03:03:53 +0000
commitcd3bef34bd0bfcf1625056fd2f2832328c516179 (patch)
treec7337e2acdc9c8e9f18518ee8cf09a985a9d94c8 /macros/latex/contrib/l3kernel/l3tl.dtx
parent360c779f505ae5d8baf567f534861a7a9c7afcb2 (diff)
CTAN sync 202207020303
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3tl.dtx')
-rw-r--r--macros/latex/contrib/l3kernel/l3tl.dtx26
1 files changed, 23 insertions, 3 deletions
diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx
index d85b6b2a46..86c5ecb14c 100644
--- a/macros/latex/contrib/l3kernel/l3tl.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-06-16}
+% \date{Released 2022-07-01}
%
% \maketitle
%
@@ -927,6 +927,26 @@
% \end{texnote}
% \end{function}
%
+% If you wish to handle token lists where the first token may be a space, and
+% this needs to be treated as the head/tail, this can be accomplished using
+% \cs{tl_if_head_is_space:nTF}, for example
+% \begin{verbatim}
+% \exp_last_unbraced:NNo
+% \cs_new:Npn \__mypkg_gobble_space:w \c_space_tl { }
+% \cs_new:Npn \mypkg_tl_head_keep_space:n #1
+% {
+% \tl_if_head_is_space:nTF {#1}
+% { ~ }
+% { \tl_head:n {#1} }
+% }
+% \cs_new:Npn \mypkg_tl_tail_keep_space:n #1
+% {
+% \tl_if_head_is_space:nTF {#1}
+% { \exp_not:o { \__mypkg_gobble_space:w #1 } }
+% { \tl_tail:n {#1} }
+% }
+% \end{verbatim}
+%
% \subsection{Items and ranges in token lists}
%
% \begin{function}[added = 2014-07-17, EXP]
@@ -3577,7 +3597,7 @@
\__kernel_chk_defined:NT #2
{
\exp_args:Nf \tl_if_empty:nTF
- { \cs_prefix_spec:N #2 \cs_argument_spec:N #2 }
+ { \cs_prefix_spec:N #2 \cs_parameter_spec:N #2 }
{
\exp_args:Ne #1
{ \token_to_str:N #2 = \__kernel_exp_not:w \exp_after:wN {#2} }
@@ -3651,7 +3671,7 @@
\__kernel_chk_defined:NT #1
{
\exp_args:Nf \tl_if_empty:nTF
- { \cs_prefix_spec:N #1 \cs_argument_spec:N #1 }
+ { \cs_prefix_spec:N #1 \cs_parameter_spec:N #1 }
{
\tl_set:Nx \l_@@_internal_a_tl {#3}
\tl_if_eq:NNTF #1 \l_@@_internal_a_tl