Skip to content

Commit

Permalink
use tl_map_tokens:nn
Browse files Browse the repository at this point in the history
  • Loading branch information
Skillmon committed Feb 1, 2025
1 parent c93624f commit 49265cc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
6 changes: 6 additions & 0 deletions base/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ to completeness or accuracy and it contains some references to files that are
not part of the distribution.
================================================================================

2025-02-01 Jonathan P. Spratte

* ltcmd.dtx (subsection{User functions}):
Generalise \cs{ProcessList} by using \cs{tl_map_tokens:nn} instead of
\cs{tl_map_function:nN}.

2025-01-31 Frank Mittelbach <[email protected]>

* latexrelease.dtx (subsection{Ignoring \texttt{\string_new} errors when rolling back}):
Expand Down
14 changes: 10 additions & 4 deletions base/doc/usrguide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
\texttt{usrguide.tex} for full details.}%
}

\date{2025-01-24}
\date{2025-02-01}

\NewDocumentCommand\cs{m}{\texttt{\textbackslash\detokenize{#1}}}
\NewDocumentCommand\marg{m}{\arg{#1}}
Expand Down Expand Up @@ -668,15 +668,21 @@ \subsection{Argument processors}
\end{verbatim}

\begin{decl}
|\ProcessList| \arg{list} \arg{cmd}
|\ProcessList| \arg{list} \arg{tokens}
\end{decl}
To support \cs{SplitList}, the function \cs{ProcessList} is available
to apply a \meta{cmd} to every entry in a \meta{list}. The
\meta{cmd} should absorb one argument: the list entry. For example
to apply a \meta{tokens} to every entry in a \meta{list}. The
\meta{tokens} can be arbitrary contents that should expect one argument
after it: the list entry. For example
\begin{verbatim}
\NewDocumentCommand \foo {>{\SplitList{;}} m}
{\ProcessList{#1}{\SomeDocumentCommand}}
\end{verbatim}
or
\begin{verbatim}
\NewDocumentCommand \foo {>{\SplitList{;}} m}
{\ProcessList{#1}{Abc \SomeDocumentCommand}}
\end{verbatim}

\begin{decl}
|\ReverseBoolean|
Expand Down
8 changes: 5 additions & 3 deletions base/ltcmd.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
%%% From File: ltcmd.dtx
%
% \begin{macrocode}
\def\ltcmdversion{v1.3a}
\def\ltcmddate{2025-01-24}
\def\ltcmdversion{v1.3b}
\def\ltcmddate{2025-02-01}
% \end{macrocode}
%
%<*driver>
Expand Down Expand Up @@ -5706,8 +5706,10 @@
%
% \begin{macro}{\ProcessList}
% To support \cs{SplitList}.
% \changes{v1.3b}{2025-02-01}
% {Use \cs{tl_map_tokens:nn} instead of \cs{tl_map_function:nN}}
% \begin{macrocode}
\cs_new_eq:NN \ProcessList \tl_map_function:nN
\cs_new_eq:NN \ProcessList \tl_map_tokens:nn
% \end{macrocode}
% \end{macro}
%
Expand Down

0 comments on commit 49265cc

Please sign in to comment.