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.dtx43
1 files changed, 29 insertions, 14 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index f5a36e95bad..cfe96ac73af 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 2665 2011-08-25 22:15:27Z joseph $
+\GetIdInfo$Id: l3tl.dtx 2686 2011-08-29 19:41:06Z joseph $
{L3 Experimental token lists}
%</driver|package>
%<*driver>
@@ -66,18 +66,25 @@
% \maketitle
%
% \begin{documentation}
-%
-% \LaTeX3 stores lists of token in variables also called \enquote{token lists}.
-% Variables of this type get the suffix |tl| and functions of this type
-% have the prefix |tl|. To use a token list variable you simply call
-% the corresponding variable.
-%
-% Often you find yourself with not a token list variable but an
-% arbitrary token list which has to undergo certain tests. We will \emph{also}
-% prefix these functions with |tl|. While token list variables are
-% always single tokens, token lists are always surrounded by
-% braces. Many of the functions for token lists and token list variables
-% are very similar, and so are grouped together here.
+%
+% \TeX{} works with tokens, and \LaTeX3 therefore provides a number of
+% functions to deal with token lists. Token lists may be present direct in
+% the argument to a function:
+% \begin{verbatim}
+% \foo:n { a collection of \tokens }
+% \end{verbatim}
+% or may be stored for processing in a so-called \enquote{token list
+% variable}, which have the suffix \texttt{tl}:
+% the argument to a function:
+% \begin{verbatim}
+% \foo:N \l_some_tl
+% \end{verbatim}
+% In both cases, functions are available to test an manipulate the lists
+% of tokens, and these have the module prefix \texttt{tl}.
+% In many cases, function which can be applied to token list variables
+% are paired with similar functions for application to explicit lists
+% of tokens: the two \enquote{views} of a token list are therefore collected
+% together here.
%
% A token list can be seen either as a list of \enquote{items},
% or a list of \enquote{tokens}. An item is whatever \cs{use_none:n}
@@ -85,7 +92,15 @@
% with optional leading explicit space characters (each item is thus
% itself a token list). A token is either a normal \texttt{N} argument,
% or | |, |{|, or |}| (assuming normal \TeX{} category codes).
-% Functions which act on items are often faster than their analog acting
+% Thus for example
+% \begin{verbatim}
+% { Hello } ~ world
+% \end{verbatim}
+% contains six items (\texttt{Hello}, \texttt{w}, \texttt{o}, \texttt{r},
+% \texttt{l} and \texttt{d}), but thirteen tokens (|{|, \texttt{H}, \texttt{e},
+% \texttt{l}, \texttt{l}, \texttt{o}, |}|, \verb*| |, \texttt{w}, \texttt{o},
+% \texttt{r}, \texttt{l} and \texttt{d}).
+% Functions which act on items are often faster than their analogue acting
% directly on tokens.
%
% \section{Creating and initialising token list variables}