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.dtx34
1 files changed, 33 insertions, 1 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index 42e16e29c9e..8fd54e3388a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3tl.dtx 3158 2012-01-09 00:47:42Z bruno $
+\GetIdInfo$Id: l3tl.dtx 3286 2012-01-31 21:57:22Z joseph $
{L3 Experimental token lists}
%</driver|package>
%<*driver>
@@ -1016,6 +1016,17 @@
% \cs{tl_act_...} functions.
% \end{variable}
%
+% \begin{function}[added = 2012-01-25]{\tl_to_str_active_safe:Nx}
+% \begin{syntax}
+% \cs{tl_to_str_active_safe:Nx} \meta{tl var} \Arg{tokens}
+% \end{syntax}
+% Exhaustively-expands the \meta{tokens} with the exception of any
+% category \meta{active} (catcode~$12$) tokens, which are not expanded. The
+% resulting \meta{expanded tokens} are then converted to a string as
+% described for \cs{tl_to_str:n}. The list of \meta{active} tokens is taken
+% from \cs{l_char_active_seq}.
+% \end{function}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -2182,6 +2193,27 @@
% \end{macro}
% \end{macro}
%
+% \subsection{Specialist functions for kernel use}
+%
+% \begin{macro}[int]{\tl_to_str_active_safe:Nx}
+% For converting a token list to a string where active characters are treated
+% as strings from the start. This is needed by the file-loading modules.
+% \begin{macrocode}
+\cs_new_protected:Npn \tl_to_str_active_safe:Nx #1#2
+ {
+ \group_begin:
+ \seq_map_inline:Nn \l_char_active_seq
+ { \cs_set_nopar:Npx ##1 { \token_to_str:N ##1 } }
+ \use:x
+ {
+ \group_end:
+ \tl_set:Nn \exp_not:N #1 {#2}
+ }
+ \tl_set:Nx #1 { \tl_to_str:N #1 }
+ }
+% \end{macrocode}
+%\end{macro}
+%
% \subsection{Viewing token lists}
%
% \begin{macro}{\tl_show:N, \tl_show:c}