summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3tl.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx26
1 files changed, 23 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index d85b6b2a46d..86c5ecb14c4 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/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