summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-09-16 22:35:41 +0000
committerKarl Berry <karl@freefriends.org>2011-09-16 22:35:41 +0000
commit6d95b4a2c1bbdaea1a3802c822808f476ac5703b (patch)
tree1abf9117bf53f2de53fbcc62c352acc92780365b /Master/texmf-dist/source/latex
parentb7f762397f5df2d732326713423e31e1bf91b903 (diff)
l3kernel 2828 (15sep11)
git-svn-id: svn://tug.org/texlive/trunk@23983 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/expl3.dtx397
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx58
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx881
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx49
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3box.dtx242
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3clist.dtx606
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx536
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3color.dtx38
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3doc.dtx661
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx72
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3expan.dtx83
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx33
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3final.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp.dtx19
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3int.dtx114
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3io.dtx43
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3keys.dtx202
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx107
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3msg.dtx55
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx14
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx346
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prop.dtx85
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3quark.dtx72
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3seq.dtx42
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3skip.dtx148
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx226
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx333
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3toks.dtx76
28 files changed, 2946 insertions, 2600 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
index fc8efd3c193..9f9b88667ef 100644
--- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -37,8 +37,8 @@
\RequirePackage{l3names}
\def\ExplFileName{expl3}
\def\ExplFileDescription{L3 Experimental code bundle wrapper}
-\def\ExplFileDate{2011/09/05}
-\def\ExplFileVersion{2729}
+\def\ExplFileDate{2011/09/15}
+\def\ExplFileVersion{2828}
%</driver|package>
%<*driver>
\documentclass[full]{l3doc}
@@ -47,17 +47,17 @@
\end{document}
%</driver>
% \fi
-%
+%
% \providecommand\acro[1]{\textsc{\MakeLowercase{#1}}}
% \newenvironment{arg-description}{%
% \begin{itemize}\def\makelabel##1{\hss\llap{\bfseries##1}}}{\end{itemize}}
-%
+%
% \title{^^A
% The \textsf{expl3} package and \LaTeX3 programming^^A
% \thanks{This file describes v\ExplFileVersion,
% last revised \ExplFileDate.}^^A
% }
-%
+%
% \author{^^A
% The \LaTeX3 Project\thanks
% {^^A
@@ -74,12 +74,12 @@
% \begin{documentation}
%
% \begin{abstract}
-%
+%
% This document gives an introduction to a new set of programming
% conventions that have been designed to meet the requirements of
% implementing large scale \TeX{} macro programming projects such as
% \LaTeX{}. These programming conventions are the base layer of \LaTeX3.
-%
+%
% The main features of the system described are:
% \begin{itemize}
% \item classification of the macros (or, in \LaTeX{} terminology,
@@ -89,7 +89,7 @@
% \item a simple mechanism for controlling the expansion of a function's
% arguments.
% \end{itemize}
-% This system is being used as the basis for \TeX{} programming within
+% This system is being used as the basis for \TeX{} programming within
% the \LaTeX3 project. Note that the language is not intended for either
% document mark-up or style specification. Instead, it is intended that
% such features will be built on top of the conventions described here.
@@ -99,56 +99,56 @@
% layer provided by the \LaTeX3 Project, see the accompanying \texttt{source3}
% document.
%
-% \end{abstract}
-%
+% \end{abstract}
+%
% \section{Introduction}
-%
+%
% The first step to develop a \LaTeX{} kernel beyond \LaTeXe{} is to
-% address how the underlying system is programmed. Rather than the
-% current mix of \LaTeX{} and \TeX{} macros, the \LaTeX3 system provides
-% its own consistent interface to all of the functions needed to
+% address how the underlying system is programmed. Rather than the
+% current mix of \LaTeX{} and \TeX{} macros, the \LaTeX3 system provides
+% its own consistent interface to all of the functions needed to
% control \TeX{}. A key part of this work is to ensure that everything
-% is documented, so that \LaTeX{} programmers and users can work
+% is documented, so that \LaTeX{} programmers and users can work
% efficiently without needing to be familiar with the internal nature
% of the kernel or with plain \TeX{}.
-%
+%
% The \pkg{expl3} bundle provides this new programming interface for
% \LaTeX. To make programming systematic, \LaTeX3 uses some very
% different conventions to \LaTeXe{} or plain TeX{}. As a result,
% programmers starting with \LaTeX3 will need to become familiar with
% the syntax of the new language.
-%
+%
% The next section shows where this language fits into a complete
% \TeX{}-based document processing system. We then describe the major
% features of the syntactic structure of command names, including the
% argument specification syntax used in function names.
-%
+%
% The practical ideas behind this argument syntax will be explained,
-% together with the expansion control mechanism and the interface
-% used to define variant forms of functions.
-%
+% together with the expansion control mechanism and the interface
+% used to define variant forms of functions.
+%
% As we shall demonstrate, the use of a structured naming scheme and of
% variant forms for functions greatly improves the readability of the
% code and hence also its reliability. Moreover, experience has shown
% that the longer command names which result from the new syntax do not
% make the process of \emph{writing} code significantly harder.
-%
+%
% \section{Languages and interfaces}
-%
+%
% It is possible to identify several distinct languages related to the
% various interfaces that are needed in a \TeX{}-based document processing
% system. This section looks at those we consider most important for
% the \LaTeX3 system.
-%
+%
% \begin{description}
-% \item[Document mark-up] This comprises those commands (often called
+% \item[Document mark-up] This comprises those commands (often called
% tags) that are to embedded in the document (the |.tex| file).
-%
+%
% It is generally accepted that such mark-up should be essentially
% \emph{declarative}. It may be traditional \TeX{}-based mark-up such
% as \LaTeXe{}, as described in~\cite{A-W:LLa94} and~\cite{A-W:GMS94},
% or a mark-up language defined via \acro{HTML} or \acro{XML}.
-%
+%
% One problem with more traditional \TeX{} coding conventions (as
% described in~\cite{A-W:K-TB}) is that the names and syntax of \TeX{}'s
% primitive formatting commands are ingeniously designed to be
@@ -160,37 +160,37 @@
% \TeX{} programmers to define higher-level commands, and their
% idiosyncratic syntax is not at all popular with this community.
% Moreover, many of them have names that could be very useful as
-% document mark-up tags were they not pre-empted as primitives
-% (\emph{e.g.}~\cs{box} or \cs{special}).
-%
+% document mark-up tags were they not pre-empted as primitives
+% (\emph{e.g.}~\tn{box} or \tn{special}).
+%
% \item[Designer interface] This relates a (human) typographic
-% designer's specification for a document to a program that
+% designer's specification for a document to a program that
% \enquote{formats
% the document}. It should ideally use a declarative language that
-% facilitates expression of the relationship and spacing rules
+% facilitates expression of the relationship and spacing rules
% specified for the layout of the various document elements.
-%
+%
% This language is not embedded in document text and it will be very
-% different in form to the document mark-up language. For \LaTeX,
-% this level was almost completely missing from \LaTeX2.09; \LaTeXe{}
-% made some improvements in this area but it is still the case that
-% implementing a design specification in \LaTeX{} requires far more
+% different in form to the document mark-up language. For \LaTeX,
+% this level was almost completely missing from \LaTeX2.09; \LaTeXe{}
+% made some improvements in this area but it is still the case that
+% implementing a design specification in \LaTeX{} requires far more
% \enquote{low-level} coding than is acceptable.
-%
-% \item[Programmer interface]
-% This language is the implementation language within which the
-% basic typesetting functionality is implemented, building upon the
+%
+% \item[Programmer interface]
+% This language is the implementation language within which the
+% basic typesetting functionality is implemented, building upon the
% primitives of \TeX{} (or a successor program). It may also be used
% to implement the previous two languages \enquote{within} \TeX{}, as in
% the
% current \LaTeX{} system.
-%
+%
% \end{description}
-%
-% The last layer is covered by the conventions described in this
-% document, which describes a system aimed at providing a suitable
+%
+% The last layer is covered by the conventions described in this
+% document, which describes a system aimed at providing a suitable
% basis for coding \LaTeX3. Its main distinguishing features are
-% summarised here:
+% summarised here:
% \begin{itemize}
% \item A consistent naming scheme for all commands, including \TeX{}
% primitives.
@@ -199,14 +199,14 @@
% functionality.
% \item A simple mechanism for controlling argument expansion.
% \item Provision of a set of core \LaTeX{} functions that is sufficient
-% for handling programming constructs such as queues, sets, stacks,
+% for handling programming constructs such as queues, sets, stacks,
% property lists.
% \item A \TeX{} programming environment in which, for example, all
% white space is ignored.
% \end{itemize}
-%
+%
% \section{The naming scheme}
-%
+%
% \LaTeX3 does not use |@| as a \enquote{letter} for defining
% internal macros. Instead, the symbols |_| and |:|
% are used in internal macro names to provide structure. In
@@ -226,7 +226,7 @@
% \emph{module}.
%
% \subsection{Examples}
-%
+%
% Before giving the details of the naming scheme, here are a few typical
% examples to indicate the flavour of the scheme; first some variable
% names.
@@ -234,15 +234,15 @@
% \cs{l_tmpa_box} is a local variable (hence the~|l_| prefix)
% corresponding to a box register.\\
% \cs{g_tmpa_int} is a global variable (hence the~|g_| prefix)
-% corresponding to an integer register (i.e.~a \TeX{} count
+% corresponding to an integer register (i.e.~a \TeX{} count
% register).\\
% \cs{c_empty_tl} is the constant~(|c_|) token list variable
% that is always empty.
% \end{quote}
%
% Now here is an example of a typical function name.
-%
-% \cs{seq_push:Nn} is the function which puts the token list specified
+%
+% \cs{seq_push:Nn} is the function which puts the token list specified
% by its second argument onto the stack specified by its first argument.
% The different natures of the two arguments are indicated by the~|:Nn|
% suffix. The first argument must be a single token which \enquote{names}
@@ -253,9 +253,9 @@
% list (which we shall here call a \textit{braced token list}): the~|n|
% denotes such a \enquote{normal} argument form. The name of the function
% indicates it belongs to the |seq| module.
-%
+%
% \subsection{Formal naming syntax}
-%
+%
% We shall now look in more detail at the syntax of these names. A
% function name in \LaTeX3 will have a name consisting of three parts:
% \begin{quote}
@@ -271,25 +271,25 @@
% \meta{module} and \meta{description}
% \end{quote}
% these both give information about the command.
-%
-% A \emph{module} is a collection of closely related functions and
+%
+% A \emph{module} is a collection of closely related functions and
% variables. Typical module names include~|int| for integer parameters
% and related functions,~|seq| for sequences and~|box| for boxes.
-%
+%
% Packages providing new programming functionality will add new modules
% as needed; the programmer can choose any unused name, consisting
% of letters only, for a module. In general, the module name and module
% prefix should be related: for example, the kernel module containing
% \texttt{box} functions is called \texttt{l3box}.
-%
+%
% The \emph{description} gives more detailed information about the
% function or parameter, and provides a unique name for it. It should
-% consist of letters and, possibly,~|_|~characters. In general, the
-% description should use |_| to divide up \enquote{words} or other easy to
+% consist of letters and, possibly,~|_|~characters. In general, the
+% description should use |_| to divide up \enquote{words} or other easy to
% follow parts of the name. For example, the \LaTeX3 kernel provides
% \cs{if_cs_exist:N} which, as might be expected, tests if a command
% name exists.
-%
+%
% As a semi-formalized concept the letter |g| is sometimes used to
% prefix certain parts of the \meta{description}
% to mark the function as \enquote{globally acting}, \emph{e.g.},
@@ -299,13 +299,13 @@
% variable prefixes.
%
% \subsubsection{Variables: scope and type}
-%
+%
% The \meta{scope} part of the name describes how the variable can be
-% accessed. Variables are classified as local, global or constant.
+% accessed. Variables are classified as local, global or constant.
% This \emph{scope} type appears as a code at the beginning of the name;
% the codes used are:
% \begin{arg-description}
-% \item[c] constants (global variables whose value should not be
+% \item[c] constants (global variables whose value should not be
% changed);
% \item[g] variables whose value should only be set globally;
% \item[l] variables whose value should only be set locally.
@@ -318,19 +318,19 @@
% assignments to a variable; otherwise you risk exhausting the save stack.
% \unskip\footnote{See \emph{The \TeX{}book}, p.\,301, for further
% information.}
-%
-% The \meta{type} will be in the list of available
+%
+% The \meta{type} will be in the list of available
% \emph{data-types};\footnote{Of course, if a totally new data type is
% needed then this will not be the case. However, it is hoped that only
% the kernel team will need to create new data types.} these include the
% primitive \TeX{} data-types, such as the various registers, but to
% these will be added data-types built within the \LaTeX{} programming
% system.
-%
+%
% The data types in \LaTeX3 are:
% \begin{description}
% \item[bool] either true or false (the \LaTeX3 implementation does
-% not use \cs{iftrue} or \cs{iffalse});
+% not use \tn{iftrue} or \tn{iffalse});
% \item[box] box register;
% \item[clist] comma separated list;
% \item[coffin] a \enquote{box with handles} --- a higher-level data
@@ -339,34 +339,34 @@
% \item[fp] floating-point values;
% \item[int] integer-valued count register;
% \item[prop] property list;
-% \item[seq] sequence: a data-type used to implement lists (with
+% \item[seq] sequence: a data-type used to implement lists (with
% access at both ends) and stacks;
% \item[skip] \enquote{rubber} lengths;
-% \item[stream] an input or output stream (for reading from or writing
+% \item[stream] an input or output stream (for reading from or writing
% to, respectively);
% \item[tl] \enquote{token list variables}: placeholders for token lists.
% \end{description}
% When the \meta{type} and \meta{module} are identical (as often happens in
% the more basic modules) the \meta{module} part is often omitted for
% aesthetic reasons.
-%
-% The name \enquote{token list} may cause confusion, and so some background is
-% useful. \TeX{} works with tokens and lists of tokens, rather than
-% characters. It provides two ways to store these token lists: within
+%
+% The name \enquote{token list} may cause confusion, and so some background is
+% useful. \TeX{} works with tokens and lists of tokens, rather than
+% characters. It provides two ways to store these token lists: within
% macros and as token registers (|toks|). The implementation in \LaTeX3 means
% that
% |toks| are not required, and that all operations for storing tokens can us
% the |tl| variable type.
-%
+%
% Experienced \TeX{} programmers will notice that some of the variable
% types listed are native \TeX{} registers whilst others are not. In
% general, the underlying \TeX{} implementation for a data structure may
% vary but the \emph{documented interface} will be stable. For example,
% the |prop| data type was originally implemented as a |toks|, but
% is currently built on top of the |tl| data structure.
-%
+%
% \subsubsection{Variables: guidance}
-%
+%
% Both comma lists and sequences both have similar characteristics.
% They both use special delimiters to mark out one entry from the
% next, and are both accessible at both ends. In general, it is
@@ -381,31 +381,31 @@
% handling user input where commas will not occur. On the other
% hand, sequences should be used to store arbitrary lists of
% data.
-%
+%
% \pkg{expl3} implements stacks using the sequence data structure.
-% Thus creating stacks involves first creating a sequence, and
+% Thus creating stacks involves first creating a sequence, and
% then using the sequence functions which work in a stack manner
% (\cs{seq_push:Nn}, \emph{etc}.).
-%
-% Due to the nature of the underlying \TeX{} implementation, it is
-% possible to assign values to token list variables and comma lists
+%
+% Due to the nature of the underlying \TeX{} implementation, it is
+% possible to assign values to token list variables and comma lists
% without first declaring them. However, this is \emph{not supported
% behaviour}. The \LaTeX3 coding convention is that all variables must
% be declared before use.
%
-% The \pkg{expl3} package can be loaded with the |check-declarations| option
-% to verify that all variables are declared before use. This has a
-% performance implication and is therefore intended for testing during
-% development and not for use in production documents.
-%
+% The \pkg{expl3} package can be loaded with the |check-declarations| option
+% to verify that all variables are declared before use. This has a
+% performance implication and is therefore intended for testing during
+% development and not for use in production documents.
+%
% \subsubsection{Functions: argument specifications}
-%
+%
% Function names end with an \meta{arg-spec} after a colon. This
% gives an indication of the types of argument that a function takes,
% and provides a convenient method of naming similar functions that
% differ only in their argument forms (see the next section for
% examples).
-%
+%
% The \meta{arg-spec} consists of a (possibly empty) list of letters,
% each denoting one argument of the function. The letter, including
% its case, conveys information about the type of argument required.
@@ -440,34 +440,34 @@
% delimited arguments and the boolean tests needed after certain
% primitive |\if|\ldots\ commands.
% \end{arg-description}
-%
-% In case of |n| arguments that consist of a single token the
+%
+% In case of |n| arguments that consist of a single token the
% surrounding braces can be omitted in nearly all
% situations---functions that force the use of braces even for single
% token arguments are explicitly mentioned. However, programmers are
-% encouraged to always use braces around \texttt{n} arguments, as this
+% encouraged to always use braces around \texttt{n} arguments, as this
% makes the relationship between function and argument clearer.
-%
+%
% Further argument specifiers are available as part of the expansion
% control system. These are discussed in the next section.
-%
+%
% \section{Expansion control}
%
% Let's take a look at some typical operations one might want to
% perform. Suppose we maintain a stack of open files and we use the
% stack |\g_ior_file_name_seq| to keep track of them (|io| is the
% file reading and writing module: it uses the module prefix
-% \texttt{ior} for reading functions and variables). The basic
-% operation here is to push a name onto this stack which could be
-% done by the operation
+% \texttt{ior} for reading functions and variables). The basic
+% operation here is to push a name onto this stack which could be
+% done by the operation
% \begin{quote}
% |\seq_gpush:Nn \g_ior_file_name_seq {#1}|
% \end{quote}
% where |#1| is the filename. In other words, this operation would
% push the file name as is onto the stack.
%
-% However, we might face a situation where the filename is stored in
-% a variable of some sort, say |\l_ior_curr_file_tl|. In this case we
+% However, we might face a situation where the filename is stored in
+% a variable of some sort, say |\l_ior_curr_file_tl|. In this case we
% want to retrieve the value of the variable. If we simply use
% \begin{quote}
% |\seq_gpush:Nn \g_io_file_name_seq \l_io_curr_file_tl|
@@ -476,7 +476,7 @@
% only the variable name itself. Instead a suitable number of
% |\exp_after:wN| would be necessary (together with extra braces) to
% change the order of expansion,\footnote{\cs{exp_after:wN} is
-% the \LaTeX3 name for the \TeX{} \cs{expandafter} primitive.}, \emph{i.e.}
+% the \LaTeX3 name for the \TeX{} \tn{expandafter} primitive.}, \emph{i.e.}
% \begin{quote}
% |\exp_after:wN| \\
% | \seq_gpush:Nn| \\
@@ -487,12 +487,12 @@
% \end{quote}
%
% The above example is probably the simplest case but already shows
-% how the code changes to something difficult to understand.
-% Furthermore there is an assumption in this: that the storage bin
-% reveals its contents after exactly one expansion. Relying on this
-% means that you cannot do proper checking plus you have to know
+% how the code changes to something difficult to understand.
+% Furthermore there is an assumption in this: that the storage bin
+% reveals its contents after exactly one expansion. Relying on this
+% means that you cannot do proper checking plus you have to know
% exactly how a storage bin acts in order to get the correct number
-% of expansions. Therefore \LaTeX3 provides the programmer with a
+% of expansions. Therefore \LaTeX3 provides the programmer with a
% general scheme that keeps the code compact and easy to understand.
%
% To denote that some argument to a function needs special treatment one
@@ -501,7 +501,7 @@
% \begin{quote}
% |\seq_gpush:NV \g_io_file_name_seq \l_io_curr_file_tl|
% \end{quote}
-% to achieve the desired effect. Here the |V| (the second argument)
+% to achieve the desired effect. Here the |V| (the second argument)
% is for \enquote{retrieve the value of the variable} before passing it to
% the base function.
%
@@ -516,13 +516,13 @@
% \begin{quote}
% |\seq_gpush:cV { g_file_name_seq } \l_tmpa_tl|
% \end{quote}
-% is equivalent to
+% is equivalent to
% \begin{quote}
% |\seq_gpush:NV \g_file_name_seq \l_tmpa_tl"|
% \end{quote}
% Remember that \texttt{c} arguments are \emph{fully expanded} by
-% \TeX{} when creating csnames. This means that (a) the entire
-% argument must be expandable and (b) any variables will be
+% \TeX{} when creating csnames. This means that (a) the entire
+% argument must be expandable and (b) any variables will be
% converted to their content. So the preceding examples are also
% equivalent to
% \begin{quote}
@@ -547,12 +547,12 @@
% text of an~|\edef|, and the expansion is passed to the function as
% a braced token list. This means that expansion takes place until
% only unexpandable tokens are left.
-% \item[o] One-level-expanded token or braced token list.\\
+% \item[o] One-level-expanded token or braced token list.\\
% This means that the argument is expanded one level, as by
-% \cs{expandafter}, and the expansion is passed to the function as a
+% \tn{expandafter}, and the expansion is passed to the function as a
% braced token list. Note that if the original argument is a braced
% token list then only the first token in that list is expanded.
-% In general, using \texttt{V} should be preferred to using
+% In general, using \texttt{V} should be preferred to using
% \texttt{o} for simple variable retrieval.
% \item[f] Almost the same as the |x| type except here the token list
% is expanded fully until the first unexpandable token is found and
@@ -562,13 +562,13 @@
% \end{description}
%
% \subsection{Simpler means better}
-%
+%
% Anyone who programs in \TeX{} is frustratingly familiar with the
% problem of arranging that arguments to functions are suitably expanded
% before the function is called. To illustrate how expansion control
% can bring instant relief to this problem we shall consider two
% examples copied from \texttt{latex.ltx}.
-%
+%
% \begin{verbatim}
% \global\expandafter\let
% \csname\cf@encoding \string#1\expandafter\endcsname
@@ -584,19 +584,19 @@
% encoding |?|. The result is a mess of interwoven |\expandafter|
% and |\csname| beloved of all \TeX{} programmers, and the code is
% essentially unreadable.
-%
+%
% Using the conventions and functionality outlined here, the task would
% be achieved with code such as this:
% \begin{verbatim}
-% \cs_gset_eq:cc
+% \cs_gset_eq:cc
% { \cf@encoding \token_to_str:N #1 } { ? \token_to_str:N #1 }
% \end{verbatim}
% The command |\cs_gset_eq:cc| is a global~|\let| that generates
% command names out of both of its arguments before making the
% definition. This produces code that is far more readable and more
% likely to be correct first time. (\cs{token_to_str:N} is the \LaTeX3
-% name for \cs{string}.)
-%
+% name for \tn{string}.)
+%
% Here is the second example.
% \begin{verbatim}
% \expandafter
@@ -613,7 +613,7 @@
% and a token whose name comes from~`|sym#3|'. Then the function~|\in@|
% is called and this tests if its first argument occurs in the token list
% of its second argument.
-%
+%
% Again we can improve enormously on the code. First we shall rename
% the function~|\in@| according to our conventions. A function such as
% this but taking two normal \enquote{\texttt{n}} arguments might reasonably be
@@ -626,20 +626,20 @@
% Note that, in addition to the lack of |\expandafter|, the space after
% the~|}| will be silently ignored since all white space is ignored in
% this programming environment.
-%
+%
% \subsection{New functions from old}
-%
+%
% For many common functions the \LaTeX3 kernel will provide variants
% with a range of argument forms, and similarly it is expected that
% extension packages providing new functions will make them available in
% the all the commonly needed forms.
-%
+%
% However, there will be occasions where it is necessary to construct a
% new such variant form; therefore the expansion module provides a
% straightforward mechanism for the creation of functions with any
% required argument type, starting from a function that takes \enquote{normal}
% \TeX{} undelimited arguments.
-%
+%
% To illustrate this let us suppose you have a \enquote{base function}
% |\demo_cmd:Nnn| that takes three normal arguments, and that you need
% to construct the variant |\demo_cmd:cnx|, for which the first argument
@@ -648,7 +648,7 @@
% |\demo_cmd:Nnn|.
% To produce the variant form from the base form, simply use this:
% \begin{verbatim}
-% \cs_generate_variant:Nn \demo_cmd:Nnn { cnx }
+% \cs_generate_variant:Nn \demo_cmd:Nnn { cnx }
% \end{verbatim}
% This defines the variant form so that you can then write, for example:
% \begin{verbatim}
@@ -659,7 +659,7 @@
% \def \tempa {{pq}}%
% \edef \tempb {\rst \xyz}%
% \expandafter
-% \demo@cmd:nnn
+% \demo@cmd:nnn
% \csname abc%
% \expandafter
% \expandafter
@@ -672,7 +672,7 @@
% \tempb
% }%
% \end{verbatim}
-%
+%
% Another example: you may wish to declare a function
% |\demo_cmd_b:xcxcx|, a variant of an existing function
% |\demo_cmd_b:nnnnn|, that fully
@@ -682,37 +682,37 @@
% \begin{verbatim}
% \cs_generate_variant:Nn \demo_cmd_b:nnnnn { xcxcx }
% \end{verbatim}
-%
-% This extension mechanism is written so that if the same new form of
+%
+% This extension mechanism is written so that if the same new form of
% some existing command is implemented by two extension packages then the
% two definitions will be identical and thus no conflict will occur.
-%
+%
% \section{The distribution}
-%
-% At present, the \pkg{expl3} modules are designed to be loaded on top
+%
+% At present, the \pkg{expl3} modules are designed to be loaded on top
% of \LaTeXe. In time, a \LaTeX3 format will be produced based on this
% code. This allows the code to be used in \LaTeXe{} packages \emph{now}
% while a stand-alone \LaTeX3 is developed.
-%
+%
% \begin{bfseries}
-% While \pkg{expl3} is still experimental, the bundle is now regarded
-% as broadly stable. The syntax conventions and functions provided
-% are now ready for wider use. There may still be changes to some
-% functions, but these will be minor when compared to the scope of
+% While \pkg{expl3} is still experimental, the bundle is now regarded
+% as broadly stable. The syntax conventions and functions provided
+% are now ready for wider use. There may still be changes to some
+% functions, but these will be minor when compared to the scope of
% \pkg{expl3}.
% \end{bfseries}
%
% New modules will be added to the distributed version of \pkg{expl3}
-% as they reach maturity. At present, the \pkg{expl3} bundle consists
+% as they reach maturity. At present, the \pkg{expl3} bundle consists
% of a number of modules, most of which are loaded by including the
% line:
% \begin{verbatim}
% \RequirePackage{expl3}
-% \end{verbatim}
+% \end{verbatim}
% in a \LaTeXe{} package, class or other file. The \pkg{expl3} modules
% regarded as stable, and therefore suitable for basing real code on,
% are as follows:
-%
+%
% \begin{description}
% \providecommand\explpkg[2]{\item[#1]#2}
% \explpkg{l3basics}{
@@ -728,7 +728,7 @@
% \explpkg{l3coffins}{
% Augmented box constructs for alignment operations.
% }
-% \explpkg{l3expan}{
+% \explpkg{l3expan}{
% This is the argument expansion module discussed earlier in this
% document.
% }
@@ -749,19 +749,19 @@
% messages to be filtered (higher-level interface for filtering
% to be written!).
% }
-% \explpkg{l3names}{
+% \explpkg{l3names}{
% This sets up the basic naming scheme and renames all
-% the \TeX{} primitives.
+% the \TeX{} primitives.
% }
% \explpkg{l3prg}{
% Program control structures such as boolean data type |bool|, generic
-% do-while loops, case-switches, sorting routines and stepwise loops.
+% do-while loops, case-switches, sorting routines and stepwise loops.
% }
% \explpkg{l3prop}{
% This implements the data-type for \enquote{property lists} that are used, in
% particular, for storing key/value pairs.
% }
-% \explpkg{l3quark}{
+% \explpkg{l3quark}{
% A \enquote{quark} is a command that is defined to expand to
% itself! Therefore they must never be expanded as this will generate
% infinite recursion; they do however have many uses, \emph{e.g.}~as
@@ -772,7 +772,7 @@
% }
% \explpkg{l3skip}{
% Implements the \enquote{rubber length} datatype \texttt{skip} and the
-% \enquote{rigid length} datatype |dim|.
+% \enquote{rigid length} datatype |dim|.
% }
% \explpkg{l3tl}{
% This implements a basic data-type, called a \textit{token-list
@@ -789,32 +789,32 @@
% \section{Moving from \LaTeXe{} to \LaTeX3}
%
% To help programmers to use \LaTeX3 code in existing \LaTeXe{} package,
-% some short notes on making the change are probably desirable.
+% some short notes on making the change are probably desirable.
% Suggestions for inclusion here are welcome! Some of the following
% is concerned with code, and some with coding style.
-%
+%
% \begin{itemize}
% \item \pkg{expl3} is mainly focussed on programming. This means that
% some areas still require the use of \LaTeXe{} internal macros.
-% For example, you may well need \cs{@ifpackageloaded}, as there
+% For example, you may well need \tn{@ifpackageloaded}, as there
% is currently no native \LaTeX3 package loading module.
-% \item User level macros should be generated using the mechanism
+% \item User level macros should be generated using the mechanism
% available in the \pkg{xparse} package, which is available from CTAN
% or the \LaTeX3 SVN repository.
-% \item At an internal level, most functions should be generated
-% \cs{long} (using \cs{cs_new:Npn}) rather than \enquote{short} (using
+% \item At an internal level, most functions should be generated
+% \tn{long} (using \cs{cs_new:Npn}) rather than \enquote{short} (using
% \cs{cs_new_nopar:Npn}). The exceptions are:
% \begin{itemize}
% \item Functions which take no arguments;
-% \item Functions which are used with pre-set arguments which
-% therefore cannot be \cs{long}: this is mainly the case with
+% \item Functions which are used with pre-set arguments which
+% therefore cannot be \tn{long}: this is mainly the case with
% auxiliary functions.
% \end{itemize}
-% \item Where possible, declare all variables and functions (using
+% \item Where possible, declare all variables and functions (using
% \cs{cs_new:Npn}, \cs{tl_new:N}, etc.) before use.
% \item Prefer \enquote{higher-level} functions over \enquote{lower-level},
% where
-% possible. So for example use \cs{cs_if_exist:N(TF)} in preference
+% possible. So for example use \cs{cs_if_exist:N(TF)} in preference
% \cs{if_cs_exist:N}.
% \item Use space to make code readable. In general, we recommend
% a layout such as:
@@ -830,15 +830,15 @@
% |#1|, |#2|, etc.
% \item Put different code items on separate lines: readability is
% much more useful than compactness.
-% \item Use long, descriptive names for functions and variables,
+% \item Use long, descriptive names for functions and variables,
% and for auxiliary functions use the parent function name plus
% |aux|, |aux_i|, |aux_ii| and so on.
% \item If in doubt, ask the team via the LaTeX-L list: someone will
-% soon get back to you!
-% \end{itemize}
-%
+% soon get back to you!
+% \end{itemize}
+%
% \section{The \LaTeX3 Project}
-%
+%
% Development of \LaTeX3 is carried out by The \LaTeX3 Project. Over time,
% the membership of this team has naturally varied. Currently, the members
% are
@@ -862,32 +862,32 @@
% \item Alan Jeffrey
% \item Martin Schr{\"o}der
% \end{itemize}
-%
+%
% \begin{thebibliography}{1}
-%
+%
% \bibitem{A-W:K-TB}
% Donald E Knuth
% \newblock \emph{The \TeX{}book}.
% \newblock Addison-Wesley, Reading, Massachusetts, 1984.
-%
+%
% \bibitem{A-W:GMS94}
% Goossens, Mittelbach and Samarin.
% \newblock \emph{ The \LaTeX{} Companion}.
% \newblock Addison-Wesley, Reading, Massachusetts, 1994.
-%
+%
% \bibitem{A-W:LLa94}
% Leslie Lamport.
% \newblock \emph{\LaTeX{}: A Document Preparation System}.
% \newblock Addison-Wesley, Reading, Massachusetts, second edition, 1994.
-%
+%
% \bibitem{tub:MR97-1}
% Frank Mittelbach and Chris Rowley.
% \newblock \enquote{The \LaTeX3 Project}.
-% \newblock \emph{TUGboat},
+% \newblock \emph{TUGboat},
% Vol.\,18, No.\,3, pp.\,195--198, 1997.
-%
+%
% \end{thebibliography}
-%
+%
% \end{documentation}
%
% \begin{implementation}
@@ -897,7 +897,7 @@
% \begin{macrocode}
%<*package>
% \end{macrocode}
-%
+%
% Load \pkg{etex} as otherwise we are likely to get into trouble
% with registers. Some inserts are reserved also as these have to
% be from the standard pool.
@@ -905,7 +905,7 @@
\RequirePackage{etex}
\reserveinserts{32}
% \end{macrocode}
-%
+%
% We want \pkg{calc} to allow \LaTeXe{} to do \eTeX{}-like setting (which will
% be native in \LaTeX3).
% \begin{macrocode}
@@ -925,7 +925,7 @@
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
% \end{macrocode}
-%
+%
% \begin{macro}{\@l@expl@check@declarations@bool}
% \begin{macro}{\@l@expl@log@functions@bool}
% A couple of package options to be provided.
@@ -942,8 +942,8 @@
\ProcessOptions \relax
% \end{macrocode}
% \end{macro}
-% \end{macro}
-%
+% \end{macro}
+%
% We already loaded \pkg{l3names} at the beginning of the \texttt{dtx} file.
% We now load the base of \LaTeX3, stopping once token list variables are
% defined.
@@ -959,30 +959,30 @@
% the appropriate definitions.
% \begin{macrocode}
\ifodd \@l@expl@check@declarations@bool \relax
- \cs_new_protected:Npn \tl_check_exists:N #1
- {
- \cs_if_exist:NF #1
- {
+ \cs_new_protected:Npn \tl_check_exists:N #1
+ {
+ \cs_if_exist:NF #1
+ {
\msg_kernel_error:nnx { check } { non-declared-variable }
{ \token_to_str:N #1 }
- }
+ }
}
- \cs_set_protected:Npn \tl_set:Nn #1#2
+ \cs_set_protected:Npn \tl_set:Nn #1#2
{
\tl_check_exists:N #1
\cs_set_nopar:Npx #1 { \exp_not:n {#2} }
}
- \cs_set_protected:Npn \tl_set:Nx #1#2
+ \cs_set_protected:Npn \tl_set:Nx #1#2
{
\tl_check_exists:N #1
\cs_set_nopar:Npx #1 {#2}
}
- \cs_set_protected:Npn \tl_gset:Nn #1#2
+ \cs_set_protected:Npn \tl_gset:Nn #1#2
{
\tl_check_exists:N #1
\cs_gset_nopar:Npx #1 { \exp_not:n {#2} }
}
- \cs_set_protected:Npn \tl_gset:Nx #1#2
+ \cs_set_protected:Npn \tl_gset:Nx #1#2
{
\tl_check_exists:N #1
\cs_gset_nopar:Npx #1 {#2}
@@ -1001,8 +1001,8 @@
}
\fi
% \end{macrocode}
-%\end{macro}
-%
+% \end{macro}
+%
% The rest of the code can now be loaded.
% \begin{macrocode}
\RequirePackage{
@@ -1015,7 +1015,7 @@
l3prop,
l3msg,
l3io,
- l3file,
+ l3file,
l3skip,
l3keys,
l3fp,
@@ -1025,12 +1025,7 @@
l3luatex
}
% \end{macrocode}
-%
-% Depreciated, but loaded for the moment.
-% \begin{macrocode}
-\RequirePackage{l3toks}
-% \end{macrocode}
-%
+%
% The error message for variables cannot be created before now: this means that
% \pkg{expl3} itself may cause some odd errors.
% \begin{macrocode}
@@ -1038,15 +1033,15 @@
{
\msg_kernel_new:nnnn { check } { non-declared-variable }
{ The~variable~#1~has~not~been~declared~\msg_line_context:. }
- {
+ {
Checking~is~active,~and~you~have~tried~do~so~something~like: \\
\ \ \tl_set:Nn #1 ~
\iow_char:N \{ ~ ... ~ \iow_char:N \} \\
without~first~having: \\
- \ \ \tl_new:N #1 \\
- \\
+ \ \ \tl_new:N #1 \\
+ \\
LaTeX~will~create~the~variable~and~continue.
- }
+ }
}
% \end{macrocode}
%
@@ -1054,7 +1049,7 @@
% These are redefined here to reduce unnecessary work when switching.
% The definition for \cs{ExplSyntaxOff} copies the code from earlier,
% so that category codes are restored.
-% \begin{macrocode}
+% \begin{macrocode}
\cs_set_protected_nopar:Npn \ExplSyntaxOn
{
\bool_if:NF \l_expl_status_bool
@@ -1083,7 +1078,7 @@
\char_set_catcode_math_superscript:n { 94 } % circumflex
\char_set_catcode_letter:n { 95 } % underscore
\char_set_catcode_other:n { 124 } % pipe
- \char_set_catcode_space:n { 126 } % tilde
+ \char_set_catcode_space:n { 126 } % tilde
\tex_endlinechar:D = 32 \scan_stop:
\bool_set_true:N \l_expl_status_bool
}
@@ -1094,11 +1089,11 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
%
% \end{implementation}
-%
+%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
index 5fe3d23d968..76e9b809b98 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3alloc.dtx 2528 2011-08-09 09:10:06Z joseph $
+\GetIdInfo$Id: l3alloc.dtx 2776 2011-09-07 18:33:19Z joseph $
{L3 Experimental register allocation}
%</driver|package>
%<*driver>
@@ -78,13 +78,13 @@
% \item |\box255| is reserved for use in the output routine, so it
% should not be allocated otherwise.
% \item \TeX{} can load up 256 hyphenation patterns (registers
-% |\tex_language:D| 0--255),
+% \tn{language} 0--255),
% \item \TeX{} can load no more than 16 math families,
% \item \TeX{} supports no more than 16 I/O streams for reading
-% (|\tex_read:D|) and 16 I/O streams for writing (|\tex_write:D|),
+% (\tn{read}) and 16 I/O streams for writing (\tn{write}),
% \item \TeX{} supports no more than 256 inserts.
-% \item The other registers (|\tex_count:D|, |\tex_dimen:D|,
-% |\tex_skip:D|, |\tex_muskip:D|, |\tex_box:D|, and |\tex_toks:D|
+% \item The other registers (\tn{count}, \tn{dimen},
+% \tn{skip}, \tn{muskip}, \tn{box}, and \tn{toks})
% range from 0 to 32768, but registers numbered above 255 are
% accessed somewhat less efficiently.
% \item Registers could be allocated both globally and locally; the
@@ -96,7 +96,7 @@
% register was allocated last and which registers can not be
% allocated by the standard mechanisms.
%
-% \begin{function}{\alloc_new:nnnN}
+% \begin{function}[updated = 2011-09-05]{\alloc_new:nnnN}
% \begin{syntax}
% \cs{alloc_new:nnnN} \Arg{type} \Arg{min} \Arg{max} \meta{function}
% \end{syntax}
@@ -112,7 +112,7 @@
%
% \section{Internal functions}
%
-% \begin{function}{\alloc_setup_type:nnn}
+% \begin{function}[updated = 2011-09-05]{\alloc_setup_type:nnn}
% \begin{syntax}
% \cs{alloc_setup_type:nnn} \Arg{type} \Arg{min} \Arg{max}
% \end{syntax}
@@ -126,8 +126,8 @@
% \cs{alloc_reg:nNN} \Arg{type} \meta{function} \meta{register}
% \end{syntax}
% Preforms the allocation for a new \meta{register} of \meta{type},
-% using the allocator \meta{function} (which will be either a
-% primitive \cs{tex_\ldots def:D} or \cs{tex_chardef:D}).
+% using the allocator \meta{function} (which will be either a
+% primitive \tn{\ldots def} or \tn{chardef}).
% \end{function}
%
% \end{documentation}
@@ -139,11 +139,11 @@
% \begin{macrocode}
%<*initex>
% \end{macrocode}
-%
+%
% \begin{macro}{\alloc_new:nnnN}
% Shorthand for defining new register types and their allocators:
% \begin{macrocode}
-\cs_new:Npn \alloc_new:nnnN #1#2#3#4
+\cs_new_protected:Npn \alloc_new:nnnN #1#2#3#4
{
\alloc_setup_type:nnn {#1} {#2} {#3}
\cs_new_nopar:cpn { #1 _new:N } ##1 { \alloc_reg:nNN {#1} #4 ##1 }
@@ -156,7 +156,7 @@
% last allocated global register, plus a constant for the maximum
% allocation. We also need a sequence to store the \enquote{exceptions}.
% \begin{macrocode}
-\cs_new_nopar:Npn \alloc_setup_type:nnn #1#2#3
+\cs_new_protected:Npn \alloc_setup_type:nnn #1#2#3
{
\tl_new:c { g_ #1 _allocation_tl }
\tl_gset:cx { g_ #1 _allocation_tl } { \int_eval:n {#2} }
@@ -165,7 +165,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\int_eval:n}
% For bootstrapping purposes, a definition of \cs{int_eval:n} is needed
% in terms of primitives. This is replaced in \pkg{l3int} with a clearer
@@ -174,7 +174,7 @@
\cs_new:Npn \int_eval:n #1 { \tex_number:D \etex_numexpr:D #1 \scan_stop: }
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}
% {box_new:N, \dim_new:N, \int_new:N, \muskip_new:N \skip_new:N}
% To get everything to work correctly for inserts, some register types
@@ -188,7 +188,7 @@
\alloc_new:nnnN { skip } \c_zero \c_max_register_int \tex_skipdef:D
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\insert_new:N}
% \begin{macro}[aux]{\alloc_reserve_insert:n}
% For inserts, there is a need to reserve space in various other registers.
@@ -210,35 +210,35 @@
\exp_args:Nf \alloc_reserve_insert:n
{ \etex_numexpr:D #1 + 1 \scan_stop: }
}
- }
+ }
\alloc_reserve_insert:n { 221 }
\group_end:
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% Box $255$ is reserved by \TeX{} for output, so is protected here from
% use by the allocator.
% \begin{macrocode}
\seq_put_right:Nn \g_box_allocation_seq { 255 }
% \end{macrocode}
%
-% \begin{macro}[int]{\alloc_reg:nNN}
-% This internal macro performs the actual allocation.
+% \begin{macro}[int]{\alloc_reg:nNN}
+% This internal macro performs the actual allocation.
% \begin{macrocode}
-\cs_new_nopar:Npn \alloc_reg:nNN #1#2#3
+\cs_new_protected_nopar:Npn \alloc_reg:nNN #1#2#3
{
\chk_if_free_cs:N #3
- \pref_global:D #2 #3 \tl_use:c { g_ #1 _allocation_tl } \scan_stop:
+ \tex_global:D #2 #3 \tl_use:c { g_ #1 _allocation_tl } \scan_stop:
\iow_log:x
- {
+ {
\token_to_str:N #3 ~=~ #1 ~register~
\tl_use:c { g_ #1 _allocation_tl }
}
\alloc_next:n {#1}
- }
+ }
% \end{macrocode}
-% \end{macro}
+% \end{macro}
%
% \begin{macro}[aux]{\alloc_next:n}
% Finding the next register to use is a question of doing an increment
@@ -247,12 +247,12 @@
% first but that needs an additional calculation.) There is a built-in
% loop to handle reserved allocation positions.
% \begin{macrocode}
-\cs_new_nopar:Npn \alloc_next:n #1
+\cs_new_protected_nopar:Npn \alloc_next:n #1
{
\tl_gset:cx { g_ #1 _allocation_tl }
{ \int_eval:n { \tl_use:c { g_ #1 _allocation_tl } + 1 } }
\int_compare:nNnTF
- { \tl_use:c { g_ #1 _allocation_tl } }
+ { \tl_use:c { g_ #1 _allocation_tl } }
> { \tl_use:c { c_ #1 _allocation_max_tl } }
{ \msg_kernel_fatal:nnx { alloc } { out-of-registers } {#1} }
{
@@ -262,12 +262,12 @@
}
}
% \end{macrocode}
-% \end{macro}
+% \end{macro}
%
% \begin{macrocode}
%</initex>
% \end{macrocode}
%
% \end{implementation}
-%
+%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index 3a51478f5cc..95440947255 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3basics.dtx 2689 2011-08-29 19:50:38Z joseph $
+\GetIdInfo$Id: l3basics.dtx 2817 2011-09-12 14:16:56Z joseph $
{L3 Experimental basic definitions}
%</driver|package>
%<*driver>
@@ -76,7 +76,7 @@
% processing are covered; conditional processing dealing with specific
% data types is described in the modules specific for the respective
% data types.
-%
+%
% \section{No operation functions}
%
% \begin{function}[EXP]{\prg_do_nothing:}
@@ -125,7 +125,7 @@
% with category code $2$ (close-group). The later will be a ^^A{
% |}| if standard category codes apply.
% \end{function}
-%
+%
% \section{Control sequences and functions}
%
% As \TeX{} is a macro language, creating new functions means
@@ -134,21 +134,21 @@
% in the code (|#1|, |#2|, \emph{etc.}) is replaced the appropriate
% arguments absorbed by the function. In the following, \meta{code}
% is therefore used as a shorthand for \enquote{replacement text}.
-%
+%
% Functions which are not \enquote{protected} will be fully expanded
% inside an \texttt{x} expansion. In contrast, \enquote{protected}
% functions are not expanded within \texttt{x} expansions.
-%
+%
% \subsection{Defining functions}
%
% Functions can be created with no requirement that they are declared
-% first (in contrast to variables, which must always be declared).
+% first (in contrast to variables, which must always be declared).
% Declaring a function before setting up the code means that the name
% chosen will be checked and an error raised if it is already in use.
% The name of a function can be checked at the point of definition using
% the \cs{cs_new\ldots} functions: this is recommended for all
% functions which are defined for the first time.
-%
+%
% \subsection{Defining new functions using primitive parameter text}
%
% \begin{function}{\cs_new:Npn, \cs_new:cpn, \cs_new:Npx, \cs_new:cpx}
@@ -201,8 +201,7 @@
% \cs_new_protected_nopar:Npx, \cs_new_protected_nopar:cpx
% }
% \begin{syntax}
-% \cs{cs_new_protected_nopar:Npn} \meta{function} \meta{parameters}
-% ~~\Arg{code}
+% \cs{cs_new_protected_nopar:Npn} \meta{function} \meta{parameters} \Arg{code}
% \end{syntax}
% Creates \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
@@ -212,12 +211,12 @@
% expand within an \texttt{x}-type argument. The definition is global
% and an error will result if the \meta{function} is already defined.
% \end{function}
-%
+%
% \begin{function}{\cs_set:Npn, \cs_set:cpn, \cs_set:Npx, \cs_set:cpx}
% \begin{syntax}
% \cs{cs_set:Npn} \meta{function} \meta{parameters} \Arg{code}
% \end{syntax}
-% Sets \meta{function} to expand to \meta{code} as replacement text.
+% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% The assignment of a meaning to \meta{function} is restricted to
@@ -226,13 +225,13 @@
%
% \begin{function}
% {
-% \cs_set_nopar:Npn, \cs_set_nopar:cpn,
+% \cs_set_nopar:Npn, \cs_set_nopar:cpn,
% \cs_set_nopar:Npx, \cs_set_nopar:cpx
% }
% \begin{syntax}
% \cs{cs_set_nopar:Npn} \meta{function} \meta{parameters} \Arg{code}
% \end{syntax}
-% Sets \meta{function} to expand to \meta{code} as replacement text.
+% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% When the \meta{function} is used the \meta{parameters} absorbed
@@ -247,10 +246,9 @@
% \cs_set_protected:Npx, \cs_set_protected:cpx
% }
% \begin{syntax}
-% \cs{cs_set_protected:Npn} \meta{function} \meta{parameters}
-% ~~\Arg{code}
+% \cs{cs_set_protected:Npn} \meta{function} \meta{parameters} \Arg{code}
% \end{syntax}
-% Sets \meta{function} to expand to \meta{code} as replacement text.
+% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% The assignment of a meaning to \meta{function} is restricted to
@@ -264,11 +262,10 @@
% \cs_set_protected_nopar:Npx, \cs_set_protected_nopar:cpx ,
% }
% \begin{syntax}
-% \cs{cs_set_protected_nopar:Npn} \meta{function}
-% ~~\meta{parameters} \Arg{code}
+% \cs{cs_set_protected_nopar:Npn} \meta{function} \meta{parameters} \Arg{code}
% \end{syntax}
-% Sets \meta{function} to expand to \meta{code} as replacement text.
-% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
+% Sets \meta{function} to expand to \meta{code} as replacement text.
+% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% When the \meta{function} is used the \meta{parameters} absorbed
% cannot contain \cs{par} tokens. The assignment of a meaning
@@ -282,7 +279,7 @@
% \cs{cs_gset:Npn} \meta{function} \meta{parameters} \Arg{code}
% \end{syntax}
% Globally sets \meta{function} to expand to \meta{code} as replacement
-% text. Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
+% text. Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% The assignment of a meaning to \meta{function} is \emph{not}
% restricted to the current \TeX{} group level: the assignment is
@@ -291,14 +288,14 @@
%
% \begin{function}
% {
-% \cs_gset_nopar:Npn, \cs_gset_nopar:cpn,
-% \cs_gset_nopar:Npx , \cs_gset_nopar:cpx
+% \cs_gset_nopar:Npn, \cs_gset_nopar:cpn,
+% \cs_gset_nopar:Npx, \cs_gset_nopar:cpx
% }
% \begin{syntax}
% \cs{cs_gset_nopar:Npn} \meta{function} \meta{parameters} \Arg{code}
% \end{syntax}
% Globally sets \meta{function} to expand to \meta{code} as replacement
-% text. Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
+% text. Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% When the \meta{function} is used the \meta{parameters} absorbed
% cannot contain \cs{par} tokens. The assignment of a meaning to
@@ -312,11 +309,10 @@
% \cs_gset_protected:Npx, \cs_gset_protected:cpx
% }
% \begin{syntax}
-% \cs{cs_gset_protected:Npn} \meta{function} \meta{parameters}
-% ~~\Arg{code}
+% \cs{cs_gset_protected:Npn} \meta{function} \meta{parameters} \Arg{code}
% \end{syntax}
% Globally sets \meta{function} to expand to \meta{code} as replacement
-% text. Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
+% text. Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% The assignment of a meaning to \meta{function} is \emph{not}
% restricted to the current \TeX{} group level: the assignment is
@@ -330,11 +326,10 @@
% \cs_gset_protected_nopar:Npx, \cs_gset_protected_nopar:cpx
% }
% \begin{syntax}
-% \cs{cs_gset_protected_nopar:Npn} \meta{function}
-% ~~\meta{parameters} \Arg{code}
+% \cs{cs_gset_protected_nopar:Npn} \meta{function} \meta{parameters} \Arg{code}
% \end{syntax}
% Globally sets \meta{function} to expand to \meta{code} as replacement
-% text. Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
+% text. Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% When the \meta{function} is used the \meta{parameters} absorbed
% cannot contain \cs{par} tokens. The assignment of a meaning to
@@ -342,9 +337,9 @@
% group level: the assignment is global. The \meta{function} will
% not expand within an \texttt{x}-type argument.
% \end{function}
-%
+%
% \subsection{Defining new functions using the signature}
-%
+%
% \begin{function}
% {
% \cs_new:Nn, \cs_new:cn,
@@ -360,7 +355,7 @@
% function. The definition is global and
% an error will result if the \meta{function} is already defined.
% \end{function}
-%
+%
% \begin{function}
% {
% \cs_new_nopar:Nn, \cs_new_nopar:cn,
@@ -377,7 +372,7 @@
% absorbed cannot contain \cs{par} tokens. The definition is global and
% an error will result if the \meta{function} is already defined.
% \end{function}
-%
+%
% \begin{function}
% {
% \cs_new_protected:Nn, \cs_new_protected:cn,
@@ -394,7 +389,7 @@
% argument. The definition is global and
% an error will result if the \meta{function} is already defined.
% \end{function}
-%
+%
% \begin{function}
% {
% \cs_new_protected_nopar:Nn, \cs_new_protected_nopar:cn,
@@ -412,7 +407,7 @@
% expand within an \texttt{x}-type argument. The definition is global and
% an error will result if the \meta{function} is already defined.
% \end{function}
-%
+%
% \begin{function}
% {
% \cs_set:Nn, \cs_set:cn,
@@ -425,11 +420,11 @@
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
-% function.
+% function.
% The assignment of a meaning to \meta{function} is restricted to
% the current \TeX{} group level.
% \end{function}
-%
+%
% \begin{function}
% {
% \cs_set_nopar:Nn, \cs_set_nopar:cn,
@@ -447,7 +442,7 @@
% The assignment of a meaning to \meta{function} is restricted to
% the current \TeX{} group level.
% \end{function}
-%
+%
% \begin{function}
% {
% \cs_set_protected:Nn, \cs_set_protected:cn,
@@ -465,7 +460,7 @@
% The assignment of a meaning to \meta{function} is restricted to
% the current \TeX{} group level.
% \end{function}
-%
+%
% \begin{function}
% {
% \cs_set_protected_nopar:Nn, \cs_set_protected_nopar:cn,
@@ -484,7 +479,7 @@
% The assignment of a meaning to \meta{function} is restricted to
% the current \TeX{} group level.
% \end{function}
-%
+%
% \begin{function}
% {
% \cs_gset:Nn, \cs_gset:cn,
@@ -497,10 +492,10 @@
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
-% function.
+% function.
% The assignment of a meaning to \meta{function} is global.
% \end{function}
-%
+%
% \begin{function}
% {
% \cs_gset_nopar:Nn, \cs_gset_nopar:cn,
@@ -517,7 +512,7 @@
% absorbed cannot contain \cs{par} tokens.
% The assignment of a meaning to \meta{function} is global.
% \end{function}
-%
+%
% \begin{function}
% {
% \cs_gset_protected:Nn, \cs_gset_protected:cn,
@@ -534,7 +529,7 @@
% argument.
% The assignment of a meaning to \meta{function} is global.
% \end{function}
-%
+%
% \begin{function}
% {
% \cs_gset_protected_nopar:Nn, \cs_gset_protected_nopar:cn,
@@ -552,12 +547,11 @@
% expand within an \texttt{x}-type argument.
% The assignment of a meaning to \meta{function} is global.
% \end{function}
-%
-% \begin{function}
+%
+% \begin{function}[updated = 2011-09-05]
% {\cs_generate_from_arg_count:NNnn, \cs_generate_from_arg_count:cNnn}
% \begin{syntax}
-% \cs{cs_generate_from_arg_count:NNnn} \meta{function}
-% ~~\meta{creator} \meta{number} \meta{code}
+% \cs{cs_generate_from_arg_count:NNnn} \meta{function} \meta{creator} \meta{number} \meta{code}
% \end{syntax}
% Uses the \meta{creator} function (which should have signature
% |Npn|, for example \cs{cs_new:Npn}) to define a \meta{function}
@@ -574,30 +568,31 @@
% second control sequence is a \emph{copy} of the first (rather than
% a pointer to it). Thus the old and new control sequence are not
% tided together: changes to one are not reflected in the other.
-%
+%
% In the following text \enquote{cs} is used as an abbreviation for
% \enquote{control sequence}.
-%
+%
% \begin{function}
% {\cs_new_eq:NN, \cs_new_eq:Nc, \cs_new_eq:cN, \cs_new_eq:cc}
% \begin{syntax}
% \cs{cs_new_eq:NN} \meta{cs 1} \meta{cs 2}
+% \cs{cs_new_eq:NN} \meta{cs 1} \meta{token}
% \end{syntax}
-% Creates \meta{control sequence 1} and sets it to have the same
-% meaning as \meta{control sequence 2} at the point where
-% \cs{cs_new_eq:NN} is executed. The two control sequences may
-% subsequently be altered without affecting the copy. The assignment
-% of a meaning to \meta{control sequence 1} is global.
+% Globally creates \meta{control sequence 1} and sets it to have the same
+% meaning as \meta{control sequence 2} or <token>.
+% The second control sequence may
+% subsequently be altered without affecting the copy.
% \end{function}
-%
+%
% \begin{function}
% {\cs_set_eq:NN, \cs_set_eq:Nc, \cs_set_eq:cN, \cs_set_eq:cc}
% \begin{syntax}
% \cs{cs_set_eq:NN} \meta{cs 1} \meta{cs 2}
+% \cs{cs_set_eq:NN} \meta{cs 1} \meta{token}
% \end{syntax}
% Sets \meta{control sequence 1} to have the same meaning as
-% \meta{control sequence 2} at the point where \cs{cs_set_eq:NN}
-% is executed. The two control sequences may subsequently be
+% \meta{control sequence 2} (or <token>).
+% The second control sequence may subsequently be
% altered without affecting the copy. The assignment of a meaning
% to \meta{control sequence 1} is restricted to the current
% \TeX{} group level.
@@ -607,10 +602,11 @@
% {\cs_gset_eq:NN, \cs_gset_eq:Nc, \cs_gset_eq:cN, \cs_gset_eq:cc}
% \begin{syntax}
% \cs{cs_gset_eq:NN} \meta{cs 1} \meta{cs 2}
+% \cs{cs_gset_eq:NN} \meta{cs 1} \meta{token}
% \end{syntax}
% Globally sets \meta{control sequence 1} to have the same meaning as
-% \meta{control sequence 2} at the point where \cs{cs_gset_eq:NN}
-% is executed. The two control sequences may subsequently be
+% \meta{control sequence 2} (or <token>).
+% The second control sequence may subsequently be
% altered without affecting the copy. The assignment of a meaning to
% \meta{control sequence 1} is \emph{not} restricted to the current
% \TeX{} group level: the assignment is global.
@@ -620,7 +616,7 @@
%
% There are occasions where control sequences need to be deleted.
% This is handled in a very simple manner.
-%
+%
% \begin{function}{\cs_undefine:N, \cs_undefine:c}
% \begin{syntax}
% \cs{cs_undefine:N} \meta{control sequence}
@@ -629,7 +625,7 @@
% \end{function}
%
% \subsection{Showing control sequences}
-%
+%
% \begin{function}[EXP]{\cs_meaning:N, \cs_meaning:c}
% \begin{syntax}
% \cs{cs_meaning:N} \meta{control sequence}
@@ -638,7 +634,7 @@
% control sequence. This will show the \meta{replacement text} for a
% macro.
% \begin{texnote}
-% This is \TeX{}'s \cs{meaning} primitive.
+% This is \TeX{}'s \tn{meaning} primitive.
% \end{texnote}
% \end{function}
%
@@ -649,11 +645,10 @@
% Displays the definition of the \meta{control sequence} on the
% terminal.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{show}.
+% This is the \TeX{} primitive \tn{show}.
% \end{texnote}
% \end{function}
-%
-
+%
% \subsection{Converting to and from control sequences}
%
% \begin{function}[EXP]{\use:c}
@@ -661,13 +656,16 @@
% \cs{use:c} \Arg{control sequence name}
% \end{syntax}
% Converts the given \meta{control sequence name} into a single
-% control sequence token. This process requires two expansions.
+% control sequence token. This process requires two expansions.
% The content for \meta{control sequence name} may be literal
% material or from other expandable functions. The
% \meta{control sequence name} must, when fully expanded, consist
% of character tokens which are not active: typically, they will
% be of category code $10$ (space), $11$ (letter)
-% or $12$ (other), or a mixture of these. As an example, both
+% or $12$ (other), or a mixture of these.
+% \end{function}
+%
+% As an example of the \cs{use:c} function, both
% \begin{verbatim}
% \use:c { a b c }
% \end{verbatim}
@@ -682,20 +680,25 @@
% \abc
% \end{verbatim}
% after two expansions of \cs{use:c}.
-% \end{function}
-%
+%
% \begin{function}[EXP]{\cs:w, \cs_end:}
% \begin{syntax}
% \cs{cs:w} \meta{control sequence name} \cs{cs_end:}
% \end{syntax}
% Converts the given \meta{control sequence name} into a single
-% control sequence token. This process requires one expansion.
+% control sequence token. This process requires one expansion.
% The content for \meta{control sequence name} may be literal
% material or from other expandable functions. The
% \meta{control sequence name} must, when fully expanded, consist
% of character tokens which are not active: typically, they will
% be of category code $10$ (space), $11$ (letter)
-% or $12$ (other), or a mixture of these. As an example, both
+% or $12$ (other), or a mixture of these.
+% \begin{texnote}
+% These are the \TeX{} primitives \tn{csname} and \tn{endcsname}.
+% \end{texnote}
+% \end{function}
+%
+% As an example of the \cs{cs:w} and \cs{cs_end:} functions, both
% \begin{verbatim}
% \cs:w a b c \cs_end:
% \end{verbatim}
@@ -710,10 +713,6 @@
% \abc
% \end{verbatim}
% after one expansion of \cs{cs:w}.
-% \begin{texnote}
-% These are the \TeX{} primitives \cs{csname} and \cs{endcsname}.
-% \end{texnote}
-% \end{function}
%
% \begin{function}[EXP]{\cs_to_str:N}
% \begin{syntax}
@@ -738,7 +737,7 @@
% of each token is set when the token is read by a function (if it
% is read more than once, the category code is determined by the
% the situation in force when first function absorbs the token).
-%
+%
% \begin{function}[EXP]{\use:n, \use:nn, \use:nnn, \use:nnnn}
% \begin{syntax}
% \cs{use:n} \Arg{group1}
@@ -788,7 +787,7 @@
% \end{function}
%
% \begin{function}[EXP]
-% {\use_i:nnnn, \use_ii:nnnn, \use_iii:nnnn , \use_iv:nnnn}
+% {\use_i:nnnn, \use_ii:nnnn, \use_iii:nnnn, \use_iv:nnnn}
% \begin{syntax}
% \cs{use_i:nnnn} \Arg{group1} \Arg{group2} \Arg{group3} \Arg{group4}
% \end{syntax}
@@ -870,7 +869,7 @@
% the marker given in the function name, leaving nothing in the
% input stream.
% \end{function}
-%
+%
% \begin{function}[EXP]
% {
% \use_i_delimit_by_q_nil:nw,
@@ -886,39 +885,7 @@
% in the input stream for further processing.
% \end{function}
%
-%
-% \begin{function}[EXP]
-% {
-% \use_i_after_fi:nw,
-% \use_i_after_else:nw,
-% \use_i_after_or:nw,
-% \use_i_after_orelse:nw
-% }
-% \begin{syntax}
-% \cs{use_i_after_fi:nw} \Arg{inserted tokens} \cs{fi:}
-% \cs{use_i_after_else:nw} \Arg{inserted tokens} \cs{else:}
-% ~~\meta{balanced text} \cs{fi:}
-% \cs{use_i_after_or:nw} \Arg{inserted tokens} \cs{or:}
-% ~~\meta{balanced text} \cs{fi:}
-% \cs{use_i_after_orelse:nw} \Arg{inserted tokens} \cs{or:} or \cs{else:}
-% ~~\meta{balanced text} \cs{fi:}
-% \end{syntax}
-% Absorb the \meta{balanced text}, if appropriate, delimited by
-% the function name given. The \meta{inserted tokens} are then placed
-% in the input stream after the delimiter. Thus for example
-% \begin{verbatim}
-% \use_i_after_fi:nw { some tokens } \fi:
-% \end{verbatim}
-% will leave
-% \begin{verbatim}
-% \fi: some tokens
-% \end{verbatim}
-% in the input stream for further processing. See the discussion of the
-% primitive \TeX{} conditionals for more detail on \cs{else:}, \cs{fi:}
-% and \cs{or:}.
-% \end{function}
-%
-% \subsection{Decomposing control sequences}
+% \subsection{Decomposing control sequences}
%
% \begin{function}[EXP]{\cs_get_arg_count_from_signature:N}
% \begin{syntax}
@@ -933,7 +900,7 @@
%
% \begin{function}[EXP]{\cs_get_function_name:N}
% \begin{syntax}
-% \cs{cs_get_function_name:NN} \meta{function}
+% \cs{cs_get_function_name:N} \meta{function}
% \end{syntax}
% Splits the \meta{function} into the name (\emph{i.e.}~the part
% before the colon) and the signature (\emph{i.e.}~after the colon).
@@ -944,14 +911,14 @@
%
% \begin{function}[EXP]{\cs_get_function_signature:N}
% \begin{syntax}
-% \cs{cs_get_function_signature:NN} \meta{function}
+% \cs{cs_get_function_signature:N} \meta{function}
% \end{syntax}
% Splits the \meta{function} into the name (\emph{i.e.}~the part
% before the colon) and the signature (\emph{i.e.}~after the colon).
% The \meta{signature} is then left in the input stream made up of
% tokens with category code $12$ (other).
% \end{function}
-%
+%
% \begin{function}[EXP]{\cs_split_function:NN}
% \begin{syntax}
% \cs{cs_split_function:NN} \meta{function} \meta{processor}
@@ -968,21 +935,6 @@
% specification \texttt{:nnN} (plus any trailing arguments needed).
% \end{function}
%
-% \begin{function}[EXP]{\cs_to_str:N}
-% \begin{syntax}
-% \cs{cs_to_str:N} \Arg{control sequence}
-% \end{syntax}
-% Converts the given \meta{control sequence} into a series of
-% characters with category code $12$ (other), except spaces,
-% of category code $10$. The sequence will \emph{not} include
-% the current escape token, \emph{cf.}~\cs{token_to_str:N}.
-% Full expansion of this function requires a variable number
-% of expansion steps (either 3 or 4), and so an
-% \texttt{f}- or \texttt{x}-type expansion will be required to
-% convert the \meta{control sequence} to a sequence of characters
-% in the input stream.
-% \end{function}
-%
% \section{Predicates and conditionals}
% \label{sec:predicates}
%
@@ -990,8 +942,8 @@
% \begin{description}
% \item[Branching conditionals]
% Functions that carry out a test and then execute, depending on its
-% result, either the code supplied in the \meta{true arg} or the
-% \meta{false arg}.
+% result, either the code supplied in the \meta{true arg} or the
+% \meta{false arg}.
% These arguments are denoted with |T| and |F|, respectively. An
% example would be
% \begin{quote}
@@ -1003,7 +955,7 @@
% the second argument (true case) or in the third argument (false
% case).
%
-% These type of functions are known as \enquote{conditionals};
+% These type of functions are known as \enquote{conditionals};
% whenever a |TF| function is defined it will usually be accompanied by
% |T| and |F| functions as well. These are provided for convenience when
% the branch only needs to go a single way. Package writers are free to
@@ -1021,8 +973,8 @@
%
% \item[Predicates]
% \enquote{Predicates} are functions that return a special type of
-% boolean value which can be tested by the function \cs{if_predicate:w}
-% or in the boolean expression parser. All functions of this type
+% boolean value which can be tested by the boolean expression parser.
+% All functions of this type
% are expandable and have names that end with |_p| in the
% description part. For example,
% \begin{quote}
@@ -1033,26 +985,13 @@
% argument (a single token denoted by |N|) is still free for definition.
% It would be used in constructions like
% \begin{quote}
-% |\if_predicate:w \cs_if_free_p:N \l_tmpz_tl| \\
-% | |\meta{true code} \\
-% |else:| \\
-% | |\meta{false code}\\
-% |\fi:| \\
-% \end{quote}
-% or in expressions utilizing the boolean logic parser:
-% \begin{quote}
% |\bool_if:nTF {| \\
% \verb" \cs_if_free_p:N \l_tmpz_tl || \cs_if_free_p:N \g_tmpz_tl " \\
% |}|
-% \Arg{true code} \Arg{false code}
+% \Arg{true code} \Arg{false code}
% \end{quote}
-%
-% Like their branching cousins, predicate functions ensure that all
-% underlying primitive |\else:| or |\fi:| have been removed before
-% returning the boolean true or false values.\footnote{If defined
-% using the interface provided.}
%
-% For each predicate defined, a \enquote{predicate conditional} will
+% For each predicate defined, a \enquote{branching conditional} will
% also exist that behaves like a conditional described above.
%
% \item[Primitive conditionals]
@@ -1060,22 +999,21 @@
% concept used in plain \TeX{} and \LaTeXe{}. Their use is discouraged
% in \pkg{expl3} (although still used in low-level definitions)
% because they are more fragile and in many cases require more
-% expansion control (hence more code) than the two types of
+% expansion control (hence more code) than the two types of
% conditionals described above.
% \end{description}
-%
+%
% \begin{variable}{\c_true_bool, \c_false_bool}
% Constants that represent |true| and |false|, respectively. Used to
% implement predicates.
-% \end{variable}
-%
+% \end{variable}
+%
% \subsection{Tests on control sequences}
%
% \begin{function}[EXP,pTF]{\cs_if_eq:NN}
% \begin{syntax}
% \cs{cs_if_eq_p:NN} \Arg{cs1} \Arg{cs2}
-% \cs{cs_if_eq:NNTF} \Arg{cs1} \Arg{cs2} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{cs_if_eq:NNTF} \Arg{cs1} \Arg{cs2} \Arg{true code} \Arg{false code}
% \end{syntax}
% Compares the definition of two \meta{control sequences} and
% is logically \texttt{true} if the two are the same.
@@ -1084,8 +1022,7 @@
% \begin{function}[EXP,pTF]{\cs_if_exist:N, \cs_if_exist:c}
% \begin{syntax}
% \cs{cs_if_exist_p:N} \meta{control sequence}
-% \cs{cs_if_exist:NTF} \meta{control sequence} \meta{true code}
-% ~~\meta{false code}
+% \cs{cs_if_exist:NTF} \meta{control sequence} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests whether the \meta{control sequence} is currently defined
% (whether as a function or another control sequence type). Any
@@ -1096,19 +1033,18 @@
% \begin{function}[EXP,pTF]{\cs_if_free:N, \cs_if_free:c}
% \begin{syntax}
% \cs{cs_if_free_p:N} \meta{control sequence}
-% \cs{cs_if_free:NTF} \meta{control sequence} \meta{true code}
-% ~~\meta{false code}
+% \cs{cs_if_free:NTF} \meta{control sequence} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests whether the \meta{control sequence} is currently free to
% be defined. This test will be \texttt{false} if the
% \meta{control sequence} currently exists (as defined by
% \cs{cs_if_exist:N}).
% \end{function}
-%
+%
% \subsection{Testing string equality}
%
% \begin{function}[EXP,pTF]
-% {
+% {
% \str_if_eq:nn, \str_if_eq:Vn, \str_if_eq:on, \str_if_eq:no,
% \str_if_eq:nV, \str_if_eq:VV, \str_if_eq:xx
% }
@@ -1126,39 +1062,30 @@
% expandable (including those involving an \texttt{x}-type
% expansion).
% \end{function}
-%
+%
% \subsection{Engine-specific conditionals}
%
-% \begin{function}[EXP,TF]{\luatex_if_engine:}
+% \begin{function}[updated = 2011-09-06,EXP,pTF]{\luatex_if_engine:}
% \begin{syntax}
% \cs{luatex_if_luatex:TF} \Arg{true code} \Arg{false code}
% \end{syntax}
% Detects is the document is being compiled using \LuaTeX{}.
% \end{function}
%
-% \begin{function}[EXP,TF]{\pdftex_if_engine:}
+% \begin{function}[updated = 2011-09-06,EXP,pTF]{\pdftex_if_engine:}
% \begin{syntax}
% \cs{pdftex_if_engine:TF} \Arg{true code} \Arg{false code}
% \end{syntax}
% Detects is the document is being compiled using \pdfTeX{}.
% \end{function}
%
-% \begin{function}[EXP,TF]{\xetex_if_engine:}
+% \begin{function}[updated = 2011-09-06,EXP,pTF]{\xetex_if_engine:}
% \begin{syntax}
% \cs{xetex_if_engine:TF} \Arg{true code} \Arg{false code}
% \end{syntax}
% Detects is the document is being compiled using \XeTeX{}.
% \end{function}
%
-% \begin{variable}
-% {
-% \c_luatex_is_engine_bool, \c_pdftex_is_engine_bool,
-% \c_xetex_is_engine_bool
-% }
-% Boolean versions of the engine conditionals, for use in predicate
-% tests.
-% \end{variable}
-%
% \subsection{Primitive conditionals}
%
% The \eTeX{} engine itself provides many different conditionals. Some
@@ -1171,60 +1098,59 @@
% fonts and are described there. The ones described below are either
% the universal conditionals or deal with control sequences. We will
% prefix primitive conditionals with |\if_|.
-%
+%
% \begin{function}[EXP]
% {\if_true:, \if_false:, \or:, \else:, \fi:, \reverse_if:N}
-% \begin{syntax}
-% "\if_true:" <true code> "\else:" <false code> "\fi:" \\
-% "\if_false:" <true code> "\else:" <false code> "\fi:" \\
-% "\reverse_if:N" <primitive conditional>
-% \end{syntax}
-% "\if_true:" always executes <true code>, while "\if_false:" always
-% executes <false code>. "\reverse_if:N" reverses any two-way primitive
-% conditional. "\else:" and "\fi:" delimit the branches of the
-% conditional. "\or:" is used in case switches, see \pkg{l3intexpr}
-% for more.
-% \begin{texnote}
-% These are equivalent to their corresponding \TeX\ primitive
-% conditionals; |\reverse_if:N| is \eTeX's |\unless|.
-% \end{texnote}
-% \end{function}
-%
+% \begin{syntax}
+% "\if_true:" <true code> "\else:" <false code> "\fi:" \\
+% "\if_false:" <true code> "\else:" <false code> "\fi:" \\
+% "\reverse_if:N" <primitive conditional>
+% \end{syntax}
+% "\if_true:" always executes <true code>, while "\if_false:" always
+% executes <false code>. "\reverse_if:N" reverses any two-way primitive
+% conditional. "\else:" and "\fi:" delimit the branches of the
+% conditional. "\or:" is used in case switches, see \pkg{l3int}
+% for more.
+% \begin{texnote}
+% These are equivalent to their corresponding \TeX\ primitive
+% conditionals; |\reverse_if:N| is \eTeX's |\unless|.
+% \end{texnote}
+% \end{function}
+%
% \begin{function}[EXP]{\if_meaning:w}
-% \begin{syntax}
-% "\if_meaning:w" <arg1> <arg2> <true code> "\else:" <false code> "\fi:"
-% \end{syntax}
-% "\if_meaning:w" executes <true code> when <arg1> and <arg2> are the same,
-% otherwise it executes <false code>.
-% <arg1> and <arg2> could be functions, variables, tokens; in all cases the
-% \emph{unexpanded} definitions are compared.
-% \begin{texnote}
-% This is \TeX's |\ifx|.
-% \end{texnote}
+% \begin{syntax}
+% "\if_meaning:w" <arg1> <arg2> <true code> "\else:" <false code> "\fi:"
+% \end{syntax}
+% "\if_meaning:w" executes <true code> when <arg1> and <arg2> are the same,
+% otherwise it executes <false code>.
+% <arg1> and <arg2> could be functions, variables, tokens; in all cases the
+% \emph{unexpanded} definitions are compared.
+% \begin{texnote}
+% This is \TeX's |\ifx|.
+% \end{texnote}
% \end{function}
%
% \begin{function}[EXP]{\if:w, \if_charcode:w,\if_catcode:w}
-% \begin{syntax}
-% "\if:w" <token1> <token2> <true code> "\else:" <false code> "\fi:" \\
-% "\if_catcode:w" <token1> <token2> <true code> "\else:" <false
-% code> "\fi:"
-% \end{syntax}
-% These conditionals will expand any following tokens until two
-% unexpandable tokens are left. If you wish to prevent this expansion,
-% prefix the token in question with "\exp_not:N". "\if_catcode:w"
-% tests if the category codes of the two tokens are the same whereas
-% "\if:w" tests if the character codes are
-% identical. "\if_charcode:w" is an alternative name for "\if:w".
+% \begin{syntax}
+% "\if:w" <token1> <token2> <true code> "\else:" <false code> "\fi:" \\
+% "\if_catcode:w" <token1> <token2> <true code> "\else:" <false code> "\fi:"
+% \end{syntax}
+% These conditionals will expand any following tokens until two
+% unexpandable tokens are left. If you wish to prevent this expansion,
+% prefix the token in question with "\exp_not:N". "\if_catcode:w"
+% tests if the category codes of the two tokens are the same whereas
+% "\if:w" tests if the character codes are
+% identical. "\if_charcode:w" is an alternative name for "\if:w".
% \end{function}
%
% \begin{function}[EXP]{\if_predicate:w}
-% \begin{syntax}
-% "\if_predicate:w" <predicate> <true code> "\else:" <false code> "\fi:"
-% \end{syntax}
-% This function takes a predicate function and
-% branches according to the result. (In practice this function would also
-% accept a single boolean variable in place of the <predicate> but to make the
-% coding clearer this should be done through "\if_bool:N".)
+% \begin{syntax}
+% "\if_predicate:w" <predicate> <true code> "\else:" <false code> "\fi:"
+% \end{syntax}
+% This function takes a predicate function and
+% branches according to the result. (In practice this function would also
+% accept a single boolean variable in place of the <predicate> but to make the
+% coding clearer this should be done through "\if_bool:N".)
% \end{function}
%
% \begin{function}[EXP]{\if_bool:N}
@@ -1238,8 +1164,7 @@
% \begin{function}[EXP]{\if_cs_exist:N, \if_cs_exist:w}
% \begin{syntax}
% "\if_cs_exist:N" <cs> <true code> "\else:" <false code> "\fi:" \\
-% "\if_cs_exist:w" <tokens> "\cs_end:" <true code> "\else:" <false
-% code> "\fi:"
+% "\if_cs_exist:w" <tokens> "\cs_end:" <true code> "\else:" <false code> "\fi:"
% \end{syntax}
% Check if <cs> appears in the hash table or if the control sequence
% that can be formed from <tokens> appears in the hash table. The
@@ -1259,9 +1184,9 @@
% Execute <true code> if currently in horizontal mode, otherwise
% execute <false code>. Similar for the other functions.
% \end{function}
-%
+%
% \section{Internal kernel functions}
-%
+%
% \begin{function}{\chk_if_exist_cs:N, \chk_if_exist_cs:c}
% \begin{syntax}
% \cs{chk_if_exist_cs:N} \meta{cs}
@@ -1279,28 +1204,6 @@
% criteria for \cs{cs_if_free_p:N}, and if not raises a kernel-level
% error.
% \end{function}
-%
-% \begin{function}{\pref_global:D, \pref_long:D, \pref_protected:D}
-% \begin{syntax}
-% \cs{pref_global:D} \cs{cs_set_nopar:Npn}
-% \end{syntax}
-% Prefix functions that can be used in front of some definition
-% functions (namely \ldots). The result of prefixing a function
-% definition with \cs{pref_global:D} makes the definition global,
-% \cs{pref_long:D} change the argument scanning mechanism so that it
-% allows \cs{par} tokens in the argument of the prefixed function,
-% and \cs{pref_protected:D} makes the definition robust inside
-% \texttt{x}-type expansions.
-%
-% None of these internal functions should be used by a programmer since
-% the necessary combinations are all available as separate function,
-% \emph{e.g.} \cs{cs_set:Npn} is internally implemented as \cs{pref_long:D}
-% \c{cs_set_nopar:Npn}.
-% \begin{texnote}
-% These prefixes are the primitives \tn{global}, \tn{long}, and
-% \cs{protected}.
-% \end{texnote}
-% \end{function}
%
% \end{documentation}
%
@@ -1321,7 +1224,7 @@
% \end{macrocode}
%
% \subsection{Renaming some \TeX{} primitives (again)}
-%
+%
% Having given all the \TeX{} primitives a consistent name, we need to
% give sensible names to the ones we actually want to use.
% These will be defined as needed in the appropriate modules, but
@@ -1329,13 +1232,6 @@
% in terms of csname usage, an alternative scheme would be to just use
% the \cs{tex\ldots:D} name in the cases where no good alternative exists.}
%
-% \begin{macro}{\cs_set_eq:NwN}
-% A pretty basic requirement: \cs{let} one control sequence to another.
-% \begin{macrocode}>
-\tex_let:D \cs_set_eq:NwN \tex_let:D
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\if_true:}
% \begin{macro}{\if_false:}
% \begin{macro}{\or:}
@@ -1347,19 +1243,21 @@
% \begin{macro}{\if_predicate:w}
% \begin{macro}{\if_charcode:w}
% \begin{macro}{\if_catcode:w}
+% \begin{macro}{\if_meaning:w}
% Then some conditionals.
% \begin{macrocode}
-\cs_set_eq:NwN \if_true: \tex_iftrue:D
-\cs_set_eq:NwN \if_false: \tex_iffalse:D
-\cs_set_eq:NwN \or: \tex_or:D
-\cs_set_eq:NwN \else: \tex_else:D
-\cs_set_eq:NwN \fi: \tex_fi:D
-\cs_set_eq:NwN \reverse_if:N \etex_unless:D
-\cs_set_eq:NwN \if:w \tex_if:D
-\cs_set_eq:NwN \if_bool:N \tex_ifodd:D
-\cs_set_eq:NwN \if_predicate:w \tex_ifodd:D
-\cs_set_eq:NwN \if_charcode:w \tex_if:D
-\cs_set_eq:NwN \if_catcode:w \tex_ifcat:D
+\tex_let:D \if_true: \tex_iftrue:D
+\tex_let:D \if_false: \tex_iffalse:D
+\tex_let:D \or: \tex_or:D
+\tex_let:D \else: \tex_else:D
+\tex_let:D \fi: \tex_fi:D
+\tex_let:D \reverse_if:N \etex_unless:D
+\tex_let:D \if:w \tex_if:D
+\tex_let:D \if_bool:N \tex_ifodd:D
+\tex_let:D \if_predicate:w \tex_ifodd:D
+\tex_let:D \if_charcode:w \tex_if:D
+\tex_let:D \if_catcode:w \tex_ifcat:D
+\tex_let:D \if_meaning:w \tex_ifx:D
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1372,11 +1270,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
-% \begin{macro}{\if_meaning:w}
-% \begin{macrocode}
-\cs_set_eq:NwN \if_meaning:w \tex_ifx:D
-% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\if_mode_math:}
@@ -1385,21 +1278,21 @@
% \begin{macro}{\if_mode_inner:}
% \TeX{} lets us detect some if its modes.
% \begin{macrocode}
-\cs_set_eq:NwN \if_mode_math: \tex_ifmmode:D
-\cs_set_eq:NwN \if_mode_horizontal: \tex_ifhmode:D
-\cs_set_eq:NwN \if_mode_vertical: \tex_ifvmode:D
-\cs_set_eq:NwN \if_mode_inner: \tex_ifinner:D
+\tex_let:D \if_mode_math: \tex_ifmmode:D
+\tex_let:D \if_mode_horizontal: \tex_ifhmode:D
+\tex_let:D \if_mode_vertical: \tex_ifvmode:D
+\tex_let:D \if_mode_inner: \tex_ifinner:D
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{\if_cs_exist:N}
% \begin{macro}{\if_cs_exist:w}
% \begin{macrocode}
-\cs_set_eq:NwN \if_cs_exist:N \etex_ifdefined:D
-\cs_set_eq:NwN \if_cs_exist:w \etex_ifcsname:D
+\tex_let:D \if_cs_exist:N \etex_ifdefined:D
+\tex_let:D \if_cs_exist:w \etex_ifcsname:D
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1410,14 +1303,14 @@
% The three |\exp_| functions are used in the \textsf{l3expan} module
% where they are described.
% \begin{macrocode}
-\cs_set_eq:NwN \exp_after:wN \tex_expandafter:D
-\cs_set_eq:NwN \exp_not:N \tex_noexpand:D
-\cs_set_eq:NwN \exp_not:n \etex_unexpanded:D
+\tex_let:D \exp_after:wN \tex_expandafter:D
+\tex_let:D \exp_not:N \tex_noexpand:D
+\tex_let:D \exp_not:n \etex_unexpanded:D
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{\token_to_meaning:N}
% \begin{macro}{\token_to_str:N}
% \begin{macro}{\cs:w}
@@ -1425,12 +1318,12 @@
% \begin{macro}{\cs_meaning:N}
% \begin{macro}{\cs_show:N}
% \begin{macrocode}
-\cs_set_eq:NwN \token_to_meaning:N \tex_meaning:D
-\cs_set_eq:NwN \token_to_str:N \tex_string:D
-\cs_set_eq:NwN \cs:w \tex_csname:D
-\cs_set_eq:NwN \cs_end: \tex_endcsname:D
-\cs_set_eq:NwN \cs_meaning:N \tex_meaning:D
-\cs_set_eq:NwN \cs_show:N \tex_show:D
+\tex_let:D \token_to_meaning:N \tex_meaning:D
+\tex_let:D \token_to_str:N \tex_string:D
+\tex_let:D \cs:w \tex_csname:D
+\tex_let:D \cs_end: \tex_endcsname:D
+\tex_let:D \cs_meaning:N \tex_meaning:D
+\tex_let:D \cs_show:N \tex_show:D
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1446,48 +1339,48 @@
% versions that are safe inside alignments. These safe versions are
% defined in the \textsf{l3prg} module.
% \begin{macrocode}
-\cs_set_eq:NwN \scan_stop: \tex_relax:D
-\cs_set_eq:NwN \group_begin: \tex_begingroup:D
-\cs_set_eq:NwN \group_end: \tex_endgroup:D
+\tex_let:D \scan_stop: \tex_relax:D
+\tex_let:D \group_begin: \tex_begingroup:D
+\tex_let:D \group_end: \tex_endgroup:D
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{\if_int_compare:w}
% \begin{macro}{\int_to_roman:w}
% \begin{macrocode}
-\cs_set_eq:NwN \if_int_compare:w \tex_ifnum:D
-\cs_set_eq:NwN \int_to_roman:w \tex_romannumeral:D
+\tex_let:D \if_int_compare:w \tex_ifnum:D
+\tex_let:D \int_to_roman:w \tex_romannumeral:D
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{\group_insert_after:N}
% \begin{macrocode}
-\cs_set_eq:NwN \group_insert_after:N \tex_aftergroup:D
+\tex_let:D \group_insert_after:N \tex_aftergroup:D
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{\pref_global:D}
-% \begin{macro}{\pref_long:D}
-% \begin{macro}{\pref_protected:D}
+%
+% \begin{macro}{\tex_global:D}
+% \begin{macro}{\tex_long:D}
+% \begin{macro}{\tex_protected:D}
% \begin{macrocode}
-\cs_set_eq:NwN \pref_global:D \tex_global:D
-\cs_set_eq:NwN \pref_long:D \tex_long:D
-\cs_set_eq:NwN \pref_protected:D \etex_protected:D
+\tex_let:D \tex_global:D \tex_global:D
+\tex_let:D \tex_long:D \tex_long:D
+\tex_let:D \tex_protected:D \etex_protected:D
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{\exp_args:Nc}
% Discussed in \pkg{l3expan}, but needed much earlier.
% \begin{macrocode}
\tex_long:D \tex_def:D \exp_args:Nc #1#2 { \exp_after:wN #1 \cs:w #2 \cs_end: }
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\token_to_str:c}
% \begin{macro}{\cs_meaning:c}
% \begin{macro}{\cs_show:c}
@@ -1518,20 +1411,20 @@
% after all, the \TeX{} primitives for assignments are and it can be
% a cause of problems if others aren't.
% \begin{macrocode}
-\cs_set_eq:NwN \cs_set_nopar:Npn \tex_def:D
-\cs_set_eq:NwN \cs_set_nopar:Npx \tex_edef:D
-\pref_protected:D \cs_set_nopar:Npn \cs_set:Npn
- { \pref_long:D \cs_set_nopar:Npn }
-\pref_protected:D \cs_set_nopar:Npn \cs_set:Npx
- { \pref_long:D \cs_set_nopar:Npx }
-\pref_protected:D \cs_set_nopar:Npn \cs_set_protected_nopar:Npn
- { \pref_protected:D \cs_set_nopar:Npn }
-\pref_protected:D \cs_set_nopar:Npn \cs_set_protected_nopar:Npx
- { \pref_protected:D \cs_set_nopar:Npx }
+\tex_let:D \cs_set_nopar:Npn \tex_def:D
+\tex_let:D \cs_set_nopar:Npx \tex_edef:D
+\tex_protected:D \cs_set_nopar:Npn \cs_set:Npn
+ { \tex_long:D \cs_set_nopar:Npn }
+\tex_protected:D \cs_set_nopar:Npn \cs_set:Npx
+ { \tex_long:D \cs_set_nopar:Npx }
+\tex_protected:D \cs_set_nopar:Npn \cs_set_protected_nopar:Npn
+ { \tex_protected:D \cs_set_nopar:Npn }
+\tex_protected:D \cs_set_nopar:Npn \cs_set_protected_nopar:Npx
+ { \tex_protected:D \cs_set_nopar:Npx }
\cs_set_protected_nopar:Npn \cs_set_protected:Npn
- { \pref_protected:D \pref_long:D \cs_set_nopar:Npn }
+ { \tex_protected:D \tex_long:D \cs_set_nopar:Npn }
\cs_set_protected_nopar:Npn \cs_set_protected:Npx
- { \pref_protected:D \pref_long:D \cs_set_nopar:Npx }
+ { \tex_protected:D \tex_long:D \cs_set_nopar:Npx }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1552,20 +1445,20 @@
% \begin{macro}{\cs_gset_protected:Npx}
% Global versions of the above functions.
% \begin{macrocode}
-\cs_set_eq:NwN \cs_gset_nopar:Npn \tex_gdef:D
-\cs_set_eq:NwN \cs_gset_nopar:Npx \tex_xdef:D
+\tex_let:D \cs_gset_nopar:Npn \tex_gdef:D
+\tex_let:D \cs_gset_nopar:Npx \tex_xdef:D
\cs_set_protected_nopar:Npn \cs_gset:Npn
- { \pref_long:D \cs_gset_nopar:Npn }
+ { \tex_long:D \cs_gset_nopar:Npn }
\cs_set_protected_nopar:Npn \cs_gset:Npx
- { \pref_long:D \cs_gset_nopar:Npx }
+ { \tex_long:D \cs_gset_nopar:Npx }
\cs_set_protected_nopar:Npn \cs_gset_protected_nopar:Npn
- { \pref_protected:D \cs_gset_nopar:Npn }
+ { \tex_protected:D \cs_gset_nopar:Npn }
\cs_set_protected_nopar:Npn \cs_gset_protected_nopar:Npx
- { \pref_protected:D \cs_gset_nopar:Npx }
+ { \tex_protected:D \cs_gset_nopar:Npx }
\cs_set_protected_nopar:Npn \cs_gset_protected:Npn
- { \pref_protected:D \pref_long:D \cs_gset_nopar:Npn }
+ { \tex_protected:D \tex_long:D \cs_gset_nopar:Npn }
\cs_set_protected_nopar:Npn \cs_gset_protected:Npx
- { \pref_protected:D \pref_long:D \cs_gset_nopar:Npx }
+ { \tex_protected:D \tex_long:D \cs_gset_nopar:Npx }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1621,7 +1514,7 @@
%
% \begin{macro}{\use_i:nn}
% \begin{macro}{\use_ii:nn}
-% The equivalent to \LaTeXe{}'s \cs{@firstoftwo} and \cs{@secondoftwo}.
+% The equivalent to \LaTeXe{}'s \tn{@firstoftwo} and \tn{@secondoftwo}.
% \begin{macrocode}
\cs_set:Npn \use_i:nn #1#2 {#1}
\cs_set:Npn \use_ii:nn #1#2 {#2}
@@ -1687,22 +1580,6 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\use_i_after_fi:nw}
-% \begin{macro}{\use_i_after_else:nw}
-% \begin{macro}{\use_i_after_or:nw}
-% \begin{macro}{\use_i_after_orelse:nw}
-% Returns the first argument after ending the conditional.
-% \begin{macrocode}
-\cs_set:Npn \use_i_after_fi:nw #1 \fi: { \fi: #1 }
-\cs_set:Npn \use_i_after_else:nw #1 \else: #2 \fi: { \fi: #1 }
-\cs_set:Npn \use_i_after_or:nw #1 \or: #2 \fi: { \fi: #1 }
-\cs_set:Npn \use_i_after_orelse:nw #1#2#3 \fi: { \fi: #1 }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
% \subsection{Gobbling tokens from input}
%
% \begin{macro}{\use_none:n}
@@ -1749,9 +1626,9 @@
% testing and processing must return the \meta{state} this leaves
% \TeX{} in. Therefore, a simple user interface could be something like
% \begin{verbatim}
-% \if_meaning:w #1#2 \prg_return_true: \else:
+% \if_meaning:w #1#2 \prg_return_true: \else:
% \if_meaning:w #1#3 \prg_return_true: \else:
-% \prg_return_false:
+% \prg_return_false:
% \fi: \fi:
% \end{verbatim}
% Usually, a \TeX{} programmer would have to insert a number of
@@ -1793,7 +1670,7 @@
{
\prg_get_parm_aux:nw
{
- \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn
+ \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn
\cs_set:Npn { parm }
}
}
@@ -1801,14 +1678,14 @@
{
\prg_get_parm_aux:nw
{
- \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn
+ \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn
\cs_new:Npn { parm }
}
}
\cs_set_protected:Npn \prg_set_protected_conditional:Npnn #1
{
\prg_get_parm_aux:nw{
- \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn
+ \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn
\cs_set_protected:Npn { parm }
}
}
@@ -1821,7 +1698,7 @@
}
}
% \end{macrocode}
-% \end{macro}
+% \end{macro}
%
% \begin{macro}{\prg_set_conditional:Nnn,\prg_new_conditional:Nnn,
% \prg_set_protected_conditional:Nnn,\prg_new_protected_conditional:Nnn}
@@ -1868,7 +1745,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\prg_set_eq_conditional:NNn,\prg_new_eq_conditional:NNn}
% The obvious setting-equal functions.
% \begin{macrocode}
@@ -1889,6 +1766,7 @@
\cs_set:Npn \prg_get_parm_aux:nw #1#2# { #1 {#2} }
% \end{macrocode}
% \end{macro}
+%
% \begin{macro}[aux]{\prg_generate_conditional_parm_aux:nnNNnnnn,
% \prg_generate_conditional_parm_aux:nw}
% The workhorse here is going through a list of desired forms, \emph{i.e.},
@@ -1946,7 +1824,7 @@
{
\exp_args:Nc #1 { #2 _p: #3 } #4
{
- #5 \c_zero
+ #5 \c_zero
\c_true_bool \c_false_bool
}
}
@@ -1973,6 +1851,7 @@
}
% \end{macrocode}
% \end{macro}
+%
% \begin{macro}[aux]
% {
% \prg_generate_p_form_count:Nnnnn,
@@ -1987,7 +1866,7 @@
{
\cs_generate_from_arg_count:cNnn { #2 _p: #3 } #1 {#4}
{
- #5 \c_zero
+ #5 \c_zero
\c_true_bool \c_false_bool
}
}
@@ -2014,7 +1893,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}[aux]{\prg_set_eq_conditional_aux:NNNn,
% \prg_set_eq_conditional_aux:NNNw}
% \begin{macrocode}
@@ -2078,7 +1957,7 @@
% |\token_to_str:N \a|. If there are two tokens, then the escape
% character is printable, while if it is non-printable then only
% one is present.
-%
+%
% However, there is an additional complication: the control
% sequence itself may start with a space. Clearly that should \emph{not} be
% lost in the process of converting to a string. So the approach adopted is
@@ -2086,7 +1965,7 @@
% \verb*|\token_to_str:N \ | yields the escape character itself and a space.
% The escape sequence will terminate the expansion started by
% \cs{int_to_roman:w}, which is a negative number and so will not
-% gobble the escape character even if it's a number. The \cs{tex_if:D}
+% gobble the escape character even if it's a number. The \cs{if:w}
% test will then be \texttt{false}, and the na\"ive approach of gobbling
% the first character of the \cs{token_to_str:N} version of the control
% sequence will work, even if the first character is a space.
@@ -2103,7 +1982,7 @@
% space, which terminates the first \cs{int_to_roman:w} but leaves no
% token for the \cs{if:w} test. This means that the \cs{int_to_roman:w}
% is executed before the test is finished. The result is that the
-% \cs{fi:}, expanded before the \cs{tex_if:D} is finished, becomes
+% \cs{fi:}, expanded before the \cs{if:w} is finished, becomes
% \cs{scan_stop:} \cs{fi:}, and the \cs{scan_stop:} is then used in
% the \cs{if:w} test.
% In this case, \cs{token_to_str:N} is therefore used with no gobbling at
@@ -2152,8 +2031,8 @@
% \begin{macrocode}
\cs_set:Npn \cs_split_function:NN #1#2
{
- \exp_after:wN \cs_split_function_aux:w
- \int_to_roman:w - `\q \cs_to_str:N #1 @ a \q_stop #2
+ \exp_after:wN \cs_split_function_aux:w
+ \int_to_roman:w - `\q \cs_to_str:N #1 @ a \q_stop #2
}
% \end{macrocode}
% If no colon in the name, |#2| is |a| with catcode 11 and |#3| is
@@ -2166,11 +2045,11 @@
% \begin{macrocode}
\cs_set:Npn \cs_split_function_aux:w #1 @ #2#3 \q_stop #4
{
- \if_meaning:w a #2
- \exp_after:wN \use_i:nn
+ \if_meaning:w a #2
+ \exp_after:wN \use_i:nn
\else:
\exp_after:wN\use_ii:nn
- \fi:
+ \fi:
{ #4 {#1} { } \c_false_bool }
{ \cs_split_function_auxii:w #2#3 \q_stop #4 {#1} }
}
@@ -2232,7 +2111,7 @@
% \begin{macrocode}
\prg_set_conditional:Npnn \cs_if_exist:c #1 { p , T , F , TF }
{
- \if_cs_exist:w #1 \cs_end:
+ \if_cs_exist:w #1 \cs_end:
\exp_after:wN \use_i:nn
\else:
\exp_after:wN \use_ii:nn
@@ -2240,7 +2119,7 @@
{
\exp_after:wN \if_meaning:w \cs:w #1 \cs_end: \scan_stop:
\prg_return_false:
- \else:
+ \else:
\prg_return_true:
\fi:
}
@@ -2267,7 +2146,7 @@
}
\prg_set_conditional:Npnn \cs_if_free:c #1 { p , T , F , TF }
{
- \if_cs_exist:w #1 \cs_end:
+ \if_cs_exist:w #1 \cs_end:
\exp_after:wN \use_i:nn
\else:
\exp_after:wN \use_ii:nn
@@ -2275,7 +2154,7 @@
{
\exp_after:wN \if_meaning:w \cs:w #1 \cs_end: \scan_stop:
\prg_return_true:
- \else:
+ \else:
\prg_return_false:
\fi:
}
@@ -2301,7 +2180,7 @@
% |\c_minus_one|.
% \begin{macrocode}
%<*package>
-\cs_set_eq:NwN \c_minus_one \m@ne
+\tex_let:D \c_minus_one \m@ne
%</package>
%<*initex>
\tex_countdef:D \c_minus_one = 10 ~
@@ -2357,7 +2236,7 @@
% a reasonable response.
% \begin{macrocode}
\cs_set_protected_nopar:Npn \msg_kernel_error:nnxx #1#2#3#4
- {
+ {
\tex_errmessage:D
{
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~! ^^J
@@ -2376,7 +2255,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{\msg_line_context:}
% Another one from \pkg{l3msg} which will be altered later.
% \begin{macrocode}
@@ -2385,15 +2264,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\cs_record_meaning:N}
-% This macro will be used later on for tracing purposes. But we
-% need some more modules to define it, so we just give some dummy
-% definition here.
-% \begin{macrocode}
-\cs_set:Npn \cs_record_meaning:N #1 { }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\chk_if_free_cs:N, \chk_if_free_cs:c}
% This command is called by |\cs_new_nopar:Npn| and |\cs_new_eq:NN|
% \emph{etc.}\
@@ -2402,7 +2272,7 @@
% undefined or |\scan_stop:|. Otherwise an error message is
% issued. We have to make sure we don't put the argument into the
% conditional processing since it may be an |\if...| type function!
-% \begin {macrocode}
+% \begin{macrocode}
\cs_set_protected_nopar:Npn \chk_if_free_cs:N #1
{
\cs_if_free:NF #1
@@ -2424,7 +2294,7 @@
}
\fi:
%</package>
-\cs_set_protected_nopar:Npn \chk_if_free_cs:c
+\cs_set_protected_nopar:Npn \chk_if_free_cs:c
{ \exp_args:Nc \chk_if_free_cs:N }
% \end{macrocode}
% \end{macro}
@@ -2457,11 +2327,11 @@
% \begin{macro}{\cs_new_protected:Npn}
% \begin{macro}{\cs_new_protected:Npx}
% Global versions of the above functions.
-% \begin {macrocode}
+% \begin{macrocode}
\cs_set:Npn \cs_tmp:w #1#2
{
- \cs_set_protected_nopar:Npn #1 ##1
- {
+ \cs_set_protected_nopar:Npn #1 ##1
+ {
\chk_if_free_cs:N ##1
#2 ##1
}
@@ -2497,16 +2367,16 @@
% versions are also provided.
%
% |\cs_set_nopar:cpn|\meta{string}\meta{rep-text} will turn \meta{string}
-% into a csname and then assign \m {rep-text} to it by using
+% into a csname and then assign \meta{rep-text} to it by using
% |\cs_set_nopar:Npn|. This means that there might be a parameter
% string between the two arguments.
% \begin{macrocode}
\cs_set:Npn \cs_tmp:w #1#2
{ \cs_new_protected_nopar:Npn #1 { \exp_args:Nc #2 } }
-\cs_tmp:w \cs_set_nopar:cpn \cs_set_nopar:Npn
-\cs_tmp:w \cs_set_nopar:cpx \cs_set_nopar:Npx
-\cs_tmp:w \cs_gset_nopar:cpn \cs_gset_nopar:Npn
-\cs_tmp:w \cs_gset_nopar:cpx \cs_gset_nopar:Npx
+\cs_tmp:w \cs_set_nopar:cpn \cs_set_nopar:Npn
+\cs_tmp:w \cs_set_nopar:cpx \cs_set_nopar:Npx
+\cs_tmp:w \cs_gset_nopar:cpn \cs_gset_nopar:Npn
+\cs_tmp:w \cs_gset_nopar:cpx \cs_gset_nopar:Npx
\cs_tmp:w \cs_new_nopar:cpn \cs_new_nopar:Npn
\cs_tmp:w \cs_new_nopar:cpx \cs_new_nopar:Npx
% \end{macrocode}
@@ -2526,12 +2396,12 @@
% Variants of the |\cs_set:Npn| versions which make a csname out
% of the first arguments. We may also do this globally.
% \begin{macrocode}
-\cs_tmp:w \cs_set:cpn \cs_set:Npn
-\cs_tmp:w \cs_set:cpx \cs_set:Npx
-\cs_tmp:w \cs_gset:cpn \cs_gset:Npn
-\cs_tmp:w \cs_gset:cpx \cs_gset:Npx
-\cs_tmp:w \cs_new:cpn \cs_new:Npn
-\cs_tmp:w \cs_new:cpx \cs_new:Npx
+\cs_tmp:w \cs_set:cpn \cs_set:Npn
+\cs_tmp:w \cs_set:cpx \cs_set:Npx
+\cs_tmp:w \cs_gset:cpn \cs_gset:Npn
+\cs_tmp:w \cs_gset:cpx \cs_gset:Npx
+\cs_tmp:w \cs_new:cpn \cs_new:Npn
+\cs_tmp:w \cs_new:cpx \cs_new:Npx
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2549,12 +2419,12 @@
% Variants of the |\cs_set_protected_nopar:Npn| versions which make a csname
% out of the first arguments. We may also do this globally.
% \begin{macrocode}
-\cs_tmp:w \cs_set_protected_nopar:cpn \cs_set_protected_nopar:Npn
-\cs_tmp:w \cs_set_protected_nopar:cpx \cs_set_protected_nopar:Npx
+\cs_tmp:w \cs_set_protected_nopar:cpn \cs_set_protected_nopar:Npn
+\cs_tmp:w \cs_set_protected_nopar:cpx \cs_set_protected_nopar:Npx
\cs_tmp:w \cs_gset_protected_nopar:cpn \cs_gset_protected_nopar:Npn
\cs_tmp:w \cs_gset_protected_nopar:cpx \cs_gset_protected_nopar:Npx
\cs_tmp:w \cs_new_protected_nopar:cpn \cs_new_protected_nopar:Npn
-\cs_tmp:w \cs_new_protected_nopar:cpx \cs_new_protected_nopar:Npx
+\cs_tmp:w \cs_new_protected_nopar:cpx \cs_new_protected_nopar:Npx
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2572,46 +2442,12 @@
% Variants of the |\cs_set_protected:Npn| versions which make a csname
% out of the first arguments. We may also do this globally.
% \begin{macrocode}
-\cs_tmp:w \cs_set_protected:cpn \cs_set_protected:Npn
+\cs_tmp:w \cs_set_protected:cpn \cs_set_protected:Npn
\cs_tmp:w \cs_set_protected:cpx \cs_set_protected:Npx
-\cs_tmp:w \cs_gset_protected:cpn \cs_gset_protected:Npn
+\cs_tmp:w \cs_gset_protected:cpn \cs_gset_protected:Npn
\cs_tmp:w \cs_gset_protected:cpx \cs_gset_protected:Npx
-\cs_tmp:w \cs_new_protected:cpn \cs_new_protected:Npn
-\cs_tmp:w \cs_new_protected:cpx \cs_new_protected:Npx
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[aux]{\use_0_parameter:}
-% \begin{macro}[aux]{\use_1_parameter:}
-% \begin{macro}[aux]{\use_2_parameter:}
-% \begin{macro}[aux]{\use_3_parameter:}
-% \begin{macro}[aux]{\use_4_parameter:}
-% \begin{macro}[aux]{\use_5_parameter:}
-% \begin{macro}[aux]{\use_6_parameter:}
-% \begin{macro}[aux]{\use_7_parameter:}
-% \begin{macro}[aux]{\use_8_parameter:}
-% \begin{macro}[aux]{\use_9_parameter:}
-% For using parameters, \emph{i.e.}, when you need to define a function to
-% process three parameters. See \textsf{xparse} for an application.
-% \begin{macrocode}
-\cs_new_nopar:cpn { use_0_parameter: } { }
-\cs_new_nopar:cpn { use_1_parameter: } { {##1} }
-\cs_new_nopar:cpn { use_2_parameter: } { {##1} {##2} }
-\cs_new_nopar:cpn { use_3_parameter: } { {##1} {##2} {##3} }
-\cs_new_nopar:cpn { use_4_parameter: } { {##1} {##2} {##3} {##4} }
-\cs_new_nopar:cpn { use_5_parameter: } { {##1} {##2} {##3} {##4} {##5} }
-\cs_new_nopar:cpn { use_6_parameter: } { {##1} {##2} {##3} {##4} {##5} {##6} }
-\cs_new_nopar:cpn { use_7_parameter: }
- { {##1} {##2} {##3} {##4} {##5}{##6} {##7} }
-\cs_new_nopar:cpn { use_8_parameter: }
- { {##1} {##2} {##3} {##4} {##5} {##6} {##7} {##8} }
-\cs_new_nopar:cpn{ use_9_parameter: }
- { {##1} {##2} {##3} {##4} {##5} {##6} {##7} {##8} {##9} }
+\cs_tmp:w \cs_new_protected:cpn \cs_new_protected:Npn
+\cs_tmp:w \cs_new_protected:cpx \cs_new_protected:Npx
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2619,10 +2455,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \subsection{Copying definitions}
%
@@ -2643,7 +2475,7 @@
% an \enquote{already defined} error rather than
% \enquote{runaway argument}.
% \begin{macrocode}
-\cs_new_protected:Npn \cs_set_eq:NN #1 { \cs_set_eq:NwN #1 =~ }
+\cs_new_protected:Npn \cs_set_eq:NN #1 { \tex_let:D #1 =~ }
\cs_new_protected_nopar:Npn \cs_set_eq:cN { \exp_args:Nc \cs_set_eq:NN }
\cs_new_protected_nopar:Npn \cs_set_eq:Nc { \exp_args:NNc \cs_set_eq:NN }
\cs_new_protected_nopar:Npn \cs_set_eq:cc { \exp_args:Ncc \cs_set_eq:NN }
@@ -2658,10 +2490,10 @@
% \begin{macro}{\cs_new_eq:Nc}
% \begin{macro}{\cs_new_eq:cc}
% \begin{macrocode}
-\cs_new_protected:Npn \cs_new_eq:NN #1
+\cs_new_protected:Npn \cs_new_eq:NN #1
{
\chk_if_free_cs:N #1
- \pref_global:D \cs_set_eq:NN #1
+ \tex_global:D \cs_set_eq:NN #1
}
\cs_new_protected_nopar:Npn \cs_new_eq:cN { \exp_args:Nc \cs_new_eq:NN }
\cs_new_protected_nopar:Npn \cs_new_eq:Nc { \exp_args:NNc \cs_new_eq:NN }
@@ -2677,7 +2509,7 @@
% \begin{macro}{\cs_gset_eq:Nc}
% \begin{macro}{\cs_gset_eq:cc}
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \cs_gset_eq:NN { \pref_global:D \cs_set_eq:NN }
+\cs_new_protected_nopar:Npn \cs_gset_eq:NN { \tex_global:D \cs_set_eq:NN }
\cs_new_protected_nopar:Npn \cs_gset_eq:Nc { \exp_args:NNc \cs_gset_eq:NN }
\cs_new_protected_nopar:Npn \cs_gset_eq:cN { \exp_args:Nc \cs_gset_eq:NN }
\cs_new_protected_nopar:Npn \cs_gset_eq:cc { \exp_args:Ncc \cs_gset_eq:NN }
@@ -2689,7 +2521,7 @@
%
% \subsection{Undefining functions}
%
-% \begin{macro}{\cs_undefine:N , \cs_undefine:c}
+% \begin{macro}{\cs_undefine:N, \cs_undefine:c}
% The following function is used to free the main memory from the
% definition of some function that isn't in use any longer.
% \begin{macrocode}
@@ -2720,13 +2552,13 @@
\cs_new:Npn \cs_get_arg_count_from_signature_aux:nnN #1#2#3
{
\if_predicate:w #3
- \exp_after:wN \use_i:nn
+ \exp_after:wN \use_i:nn
\else:
\exp_after:wN\use_ii:nn
- \fi:
+ \fi:
{
- \exp_after:wN \cs_get_arg_count_from_signature_auxii:w
- \use_none:nnnnnnnnn #2 9876543210 \q_stop
+ \exp_after:wN \cs_get_arg_count_from_signature_auxii:w
+ \use_none:nnnnnnnnn #2 9876543210 \q_stop
}
{ -1 }
}
@@ -2743,6 +2575,7 @@
%
% \begin{macro}[aux]{\cs_generate_from_arg_count:NNnn}
% \begin{macro}[aux]{\cs_generate_from_arg_count_error_msg:Nn}
+% \begin{macro}[aux]{\cs_generate_from_arg_count_aux:nwn}
% We provide a constructor function for defining functions with a
% given number of arguments. For this we need to choose the correct
% parameter text and then use that when defining. Since \TeX{}
@@ -2757,34 +2590,26 @@
\cs_new_protected:Npn \cs_generate_from_arg_count:NNnn #1#2#3#4
{
\if_case:w \int_eval:w #3 \int_eval_end:
- \use_i_after_orelse:nw {#2#1}
- \or:
- \use_i_after_orelse:nw {#2#1 ##1}
- \or:
- \use_i_after_orelse:nw {#2#1 ##1##2}
- \or:
- \use_i_after_orelse:nw {#2#1 ##1##2##3}
- \or:
- \use_i_after_orelse:nw {#2#1 ##1##2##3##4}
- \or:
- \use_i_after_orelse:nw {#2#1 ##1##2##3##4##5}
- \or:
- \use_i_after_orelse:nw {#2#1 ##1##2##3##4##5##6}
- \or:
- \use_i_after_orelse:nw {#2#1 ##1##2##3##4##5##6##7}
- \or:
- \use_i_after_orelse:nw {#2#1 ##1##2##3##4##5##6##7##8}
- \or:
- \use_i_after_orelse:nw {#2#1 ##1##2##3##4##5##6##7##8##9}
+ \cs_generate_from_arg_count_aux:nwn {}
+ \or: \cs_generate_from_arg_count_aux:nwn {##1}
+ \or: \cs_generate_from_arg_count_aux:nwn {##1##2}
+ \or: \cs_generate_from_arg_count_aux:nwn {##1##2##3}
+ \or: \cs_generate_from_arg_count_aux:nwn {##1##2##3##4}
+ \or: \cs_generate_from_arg_count_aux:nwn {##1##2##3##4##5}
+ \or: \cs_generate_from_arg_count_aux:nwn {##1##2##3##4##5##6}
+ \or: \cs_generate_from_arg_count_aux:nwn {##1##2##3##4##5##6##7}
+ \or: \cs_generate_from_arg_count_aux:nwn {##1##2##3##4##5##6##7##8}
+ \or: \cs_generate_from_arg_count_aux:nwn {##1##2##3##4##5##6##7##8##9}
\else:
- \use_i_after_fi:nw
- {
- \cs_generate_from_arg_count_error_msg:Nn #1 {#3}
- \use_none:n
- }
+ \cs_generate_from_arg_count_error_msg:Nn #1 {#3}
+ \use_i:nnn
\fi:
+ {#2#1}
{#4}
}
+\cs_new_protected_nopar:Npn
+ \cs_generate_from_arg_count_aux:nwn #1 #2 \fi: #3
+ { \fi: #3 #1 }
% \end{macrocode}
% A variant form we need right away.
% \begin{macrocode}
@@ -2798,10 +2623,11 @@
{
\msg_kernel_error:nnxx { kernel } { bad-number-of-arguments }
{ \token_to_str:N #1 } { \int_eval:n {#2} }
- }
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{Using the signature to define functions}
%
@@ -2810,7 +2636,6 @@
% with user interface |\cs_set:Nn \foo_bar:nn {#1,#2}|, \emph{i.e.}, the
% number of arguments is read from the signature.
%
-%
% \begin{macro}{\cs_set:Nn}
% \begin{macro}{\cs_set:Nx}
% \begin{macro}{\cs_set_nopar:Nn}
@@ -2827,11 +2652,11 @@
% \begin{macro}{\cs_gset_protected:Nx}
% \begin{macro}{\cs_gset_protected_nopar:Nn}
% \begin{macro}{\cs_gset_protected_nopar:Nx}
-% We want to define |\cs_set:Nn| as
+% We want to define |\cs_set:Nn| as
% \begin{verbatim}
% \cs_set_protected:Npn \cs_set:Nn #1#2
% {
-% \cs_generate_from_arg_count:NNnn #1 \cs_set:Npn
+% \cs_generate_from_arg_count:NNnn #1 \cs_set:Npn
% { \cs_get_arg_count_from_signature:N #1 } {#2}
% }
% \end{verbatim}
@@ -2845,12 +2670,12 @@
\cs_set_protected:cpx { cs_ #1 : #2 } ##1##2
{
\exp_not:N \cs_generate_from_arg_count:NNnn ##1
- \exp_after:wN \exp_not:N \cs:w cs_#1 : #3 \cs_end:
+ \exp_after:wN \exp_not:N \cs:w cs_#1 : #3 \cs_end:
{ \exp_not:N\cs_get_arg_count_from_signature:N ##1 }{##2}
}
}
% \end{macrocode}
-% Then we define the 32 variants beginning with |N|.
+% Then we define the 32 variants beginning with |N|.
% \begin{macrocode}
\cs_tmp:w { set } { Nn } { Npn }
\cs_tmp:w { set } { Nx } { Npx }
@@ -2913,11 +2738,11 @@
% \end{macro}
% \end{macro}
%
-% Then something similar for the |c| variants.
+% Then something similar for the |c| variants.
% \begin{verbatim}
% \cs_set_protected:Npn \cs_set:cn #1#2
% {
-% \cs_generate_from_arg_count:cNnn {#1} \cs_set:Npn
+% \cs_generate_from_arg_count:cNnn {#1} \cs_set:Npn
% { \cs_get_arg_count_from_signature:c {#1} } {#2}
% }
% \end{verbatim}
@@ -2926,7 +2751,7 @@
{
\cs_set_protected:cpx {cs_#1:#2}##1##2{
\exp_not:N\cs_generate_from_arg_count:cNnn {##1}
- \exp_after:wN \exp_not:N \cs:w cs_#1:#3 \cs_end:
+ \exp_after:wN \exp_not:N \cs:w cs_#1:#3 \cs_end:
{ \exp_not:N \cs_get_arg_count_from_signature:c {##1} } {##2}
}
}
@@ -3009,7 +2834,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
% \subsection{Checking control sequence equality}
%
% \begin{macro}[pTF]{\cs_if_eq:NN,\cs_if_eq:cN,\cs_if_eq:Nc,\cs_if_eq:cc}
@@ -3034,7 +2859,7 @@
\cs_new_nopar:Npn \cs_if_eq:ccF { \exp_args:Ncc \cs_if_eq:NNF }
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Diagnostic wrapper functions}
%
% \begin{macro}{\kernel_register_show:N, \kernel_register_show:c}
@@ -3054,15 +2879,9 @@
%
% \subsection{Engine specific definitions}
%
-% \begin{macro}
-% {
-% \c_pdftex_is_engine_bool, \c_luatex_is_engine_bool,
-% \c_xetex_is_engine_bool
-% }
-% \begin{macro}[TF]{\xetex_if_engine:, \luatex_if_engine:, \pdftex_if_engine:}
+% \begin{macro}[pTF]{\xetex_if_engine:, \luatex_if_engine:, \pdftex_if_engine:}
% In some cases it will be useful to know which engine we're running.
-% Don't provide a |_p| predicate because the |_bool| is used for the
-% same thing. This can all be hard-coded for speed.
+% This can all be hard-coded for speed.
% \begin{macrocode}
\cs_new_eq:NN \luatex_if_engine:T \use_none:n
\cs_new_eq:NN \luatex_if_engine:F \use:n
@@ -3073,9 +2892,9 @@
\cs_new_eq:NN \xetex_if_engine:T \use_none:n
\cs_new_eq:NN \xetex_if_engine:F \use:n
\cs_new_eq:NN \xetex_if_engine:TF \use_ii:nn
-\cs_new_eq:NN \c_luatex_is_engine_bool \c_false_bool
-\cs_new_eq:NN \c_pdftex_is_engine_bool \c_true_bool
-\cs_new_eq:NN \c_xetex_is_engine_bool \c_false_bool
+\cs_new_eq:NN \luatex_if_engine_p: \c_false_bool
+\cs_new_eq:NN \pdftex_if_engine_p: \c_true_bool
+\cs_new_eq:NN \xetex_if_engine_p: \c_false_bool
\cs_if_exist:NT \xetex_XeTeXversion:D
{
\cs_set_eq:NN \pdftex_if_engine:T \use_none:n
@@ -3084,8 +2903,8 @@
\cs_set_eq:NN \xetex_if_engine:T \use:n
\cs_set_eq:NN \xetex_if_engine:F \use_none:n
\cs_set_eq:NN \xetex_if_engine:TF \use_i:nn
- \cs_set_eq:NN \c_pdftex_is_engine_bool \c_false_bool
- \cs_set_eq:NN \c_xetex_is_engine_bool \c_true_bool
+ \cs_set_eq:NN \pdftex_if_engine_p: \c_false_bool
+ \cs_set_eq:NN \xetex_if_engine_p: \c_true_bool
}
\cs_if_exist:NT \luatex_directlua:D
{
@@ -3095,12 +2914,11 @@
\cs_set_eq:NN \pdftex_if_engine:T \use_none:n
\cs_set_eq:NN \pdftex_if_engine:F \use:n
\cs_set_eq:NN \pdftex_if_engine:TF \use_ii:nn
- \cs_set_eq:NN \c_luatex_is_engine_bool \c_true_bool
- \cs_set_eq:NN \c_pdftex_is_engine_bool \c_false_bool
+ \cs_set_eq:NN \luatex_if_engine_p: \c_true_bool
+ \cs_set_eq:NN \pdftex_if_engine_p: \c_false_bool
}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \subsection{Doing nothing functions}
%
@@ -3110,7 +2928,7 @@
\cs_new_nopar:Npn \prg_do_nothing: { }
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{String comparisons}
%
% \begin{macro}[pTF]{\str_if_eq:nn}
@@ -3125,22 +2943,23 @@
{
\if_int_compare:w \pdftex_strcmp:D { \exp_not:n {#1} } { \exp_not:n {#2} }
= \c_zero
- \prg_return_true: \else: \prg_return_false: \fi:
+ \prg_return_true: \else: \prg_return_false: \fi:
}
\prg_new_conditional:Npnn \str_if_eq:xx #1#2 { p , T , F , TF }
{
\if_int_compare:w \pdftex_strcmp:D {#1} {#2} = \c_zero
- \prg_return_true: \else: \prg_return_false: \fi:
+ \prg_return_true: \else: \prg_return_false: \fi:
}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Deprecated functions}
-%
+%
% Deprecated on 2011-05-27, for removal by 2011-08-31.
-%
+%
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \cs_gnew_nopar:Npn \cs_new_nopar:Npn
\cs_new_eq:NN \cs_gnew:Npn \cs_new:Npn
\cs_new_eq:NN \cs_gnew_protected_nopar:Npn \cs_new_protected_nopar:Npn
@@ -3157,24 +2976,74 @@
\cs_new_eq:NN \cs_gnew:cpx \cs_new:cpx
\cs_new_eq:NN \cs_gnew_protected_nopar:cpx \cs_new_protected_nopar:cpx
\cs_new_eq:NN \cs_gnew_protected:cpx \cs_new_protected:cpx
+%</deprecated>
% \end{macrocode}
-%
+%
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \cs_gnew_eq:NN \cs_new_eq:NN
\cs_new_eq:NN \cs_gnew_eq:cN \cs_new_eq:cN
\cs_new_eq:NN \cs_gnew_eq:Nc \cs_new_eq:Nc
\cs_new_eq:NN \cs_gnew_eq:cc \cs_new_eq:cc
+%</deprecated>
% \end{macrocode}
-%
+%
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \cs_gundefine:N \cs_undefine:N
\cs_new_eq:NN \cs_gundefine:c \cs_undefine:c
+%</deprecated>
% \end{macrocode}
-%
+%
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \group_execute_after:N \group_insert_after:N
+%</deprecated>
% \end{macrocode}
%
+% Deprecated 2011-09-06, for removal by 2012-09-05.
+%
+% \begin{macro}
+% {
+% \c_pdftex_is_engine_bool, \c_luatex_is_engine_bool,
+% \c_xetex_is_engine_bool
+% }
+% Predicates are better
+% \begin{macrocode}
+\cs_new_eq:NN \c_luatex_is_engine_bool \luatex_if_engine_p:
+\cs_new_eq:NN \c_pdftex_is_engine_bool \pdftex_if_engine_p:
+\cs_new_eq:NN \c_xetex_is_engine_bool \xetex_if_engine_p:
+% \end{macrocode}
+% \end{macro}
+%
+% Deprecated 2011-09-06, for removal by 2012-10-06.
+%
+% \begin{macro}{\use_i_after_fi:nw}
+% \begin{macro}{\use_i_after_else:nw}
+% \begin{macro}{\use_i_after_or:nw}
+% \begin{macro}{\use_i_after_orelse:nw}
+% These functions return the first argument after ending the conditional.
+% This is rather specialized, and we want to de-emphasize the use of
+% primitive \TeX{} conditionals.
+% \begin{macrocode}
+\cs_set:Npn \use_i_after_fi:nw #1 \fi: { \fi: #1 }
+\cs_set:Npn \use_i_after_else:nw #1 \else: #2 \fi: { \fi: #1 }
+\cs_set:Npn \use_i_after_or:nw #1 \or: #2 \fi: { \fi: #1 }
+\cs_set:Npn \use_i_after_orelse:nw #1#2#3 \fi: { \fi: #1 }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% Deprecated 2011-09-07, for removal by 2011-10-07.
+%
+% \begin{macro}{\cs_set_eq:NwN}
+% \begin{macrocode}
+\tex_let:D \cs_set_eq:NwN \tex_let:D
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
index 8ed5fa7a137..85932bfcfce 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -83,7 +83,7 @@
{\def\ExplFileDate{#2}}
\protected\def\GetIdInfoAuxSVN#1\relax#2-#3-#4\relax#5Z\relax
{\def\ExplFileDate{#2/#3/#4}}
-\GetIdInfo$Id: l3bootstrap.dtx 2687 2011-08-29 19:48:45Z joseph $
+\GetIdInfo$Id: l3bootstrap.dtx 2798 2011-09-10 15:42:13Z will $
{L3 experimental bootstrap code}
%</package>
%<*driver>
@@ -126,9 +126,9 @@
% As the modules use a coding syntax different from standard
% \LaTeXe{} it provides a few functions for setting it up.
%
-% \begin{function}{\ExplSyntaxOn, \ExplSyntaxOff}
+% \begin{function}[updated = 2011-08-13]{\ExplSyntaxOn, \ExplSyntaxOff}
% \begin{syntax}
-% \cs{ExplSyntaxOn} \meta{code} \cs{ExplSyntaxOff}
+% \cs{ExplSyntaxOn} \meta{code} \cs{ExplSyntaxOff}
% \end{syntax}
% The \cs{ExplSyntaxOn} function switches to a category code
% r{\'e}gime in which spaces are ignored and in which the colon (|:|)
@@ -140,7 +140,7 @@
%
% \begin{function}{\ExplSyntaxNamesOn, \ExplSyntaxNamesOff}
% \begin{syntax}
-% \cs{ExplSyntaxNamesOn} \meta{code} \cs{ExplSyntaxNamesOff}
+% \cs{ExplSyntaxNamesOn} \meta{code} \cs{ExplSyntaxNamesOff}
% \end{syntax}
% The \cs{ExplSyntaxOn} function switches to a category code
% regim{\'e} in which the colon (|:|) and underscore (|_|) are treated as
@@ -154,8 +154,7 @@
% \begin{function}{\ProvidesExplPackage, \ProvidesExplClass, \ProvidesExplFile}
% \begin{syntax}
% |\RequirePackage{expl3}| \\
-% \cs{ProvidesExplPackage} \Arg{package} \Arg{date} \Arg{version}
-% ~~\Arg{description}
+% \cs{ProvidesExplPackage} \Arg{package} \Arg{date} \Arg{version} \Arg{description}
% \end{syntax}
% These functions act broadly in the same way as the \LaTeXe{} kernel
% functions \cs{ProvidesPackage}, \cs{ProvidesClass} and
@@ -163,7 +162,7 @@
% \cs{ExplSyntaxOn} for the remainder of the code with the file. At the
% end of the file, \cs{ExplSyntaxOff} will be called to reverse this.
% (This is the same concept as \LaTeXe{} provides in turning on
-% \cs{makeatletter} within package and class code.)
+% \tn{makeatletter} within package and class code.)
% \end{function}
%
% \begin{function}{\GetIdInfo}
@@ -181,7 +180,7 @@
%
% To summarize: Every single package using this syntax should identify
% itself using one of the above methods. Special care is taken so that
-% every package or class file loaded with \cs{RequirePackage} or alike
+% every package or class file loaded with \tn{RequirePackage} or alike
% are loaded with usual \LaTeXe{} category codes and the \LaTeX3 category code
% scheme is reloaded when needed afterwards. See implementation for
% details. If you use the \cs{GetIdInfo} command you can use the
@@ -223,11 +222,11 @@
% \end{macrocode}
%
% For \LuaTeX{} the extra primitives need to be enabled before
-% they can be use. No \cs{ifdefined} yet, so do it the old-fashioned
-% way. The primitive \cs{strcmp} is simulated using some \Lua{}
+% they can be use. No \tn{ifdefined} yet, so do it the old-fashioned
+% way. The primitive \tn{strcmp} is simulated using some \Lua{}
% code, which currently has to be applied to every job as the \Lua{}
% code is not part of the format. Thanks to Taco Hoekwater for this
-% code. The odd \cs{csname} business is needed so that the later
+% code. The odd \tn{csname} business is needed so that the later
% deletion code will work.
% \begin{macrocode}
%<*initex>
@@ -281,7 +280,7 @@
%</package>
% \end{macrocode}
%
-% For \LuaTeX{} the functionality of the \cs{pdfstrcmp} primitive
+% For \LuaTeX{} the functionality of the \tn{pdfstrcmp} primitive
% needs to be provided: the \pkg{pdftexmcds} package is used to
% do this if necessary. At present, there is also a need to deal
% with some low-level allocation stuff that could usefully be added
@@ -438,8 +437,8 @@
% \end{macro}
%
% \begin{macro}{\@pushfilename, \@popfilename}
-% The idea here is to use \LaTeXe{}'s \cs{@pushfilename} and
-% \cs{@popfilename} to track the current syntax status. This can be
+% The idea here is to use \LaTeXe{}'s \tn{@pushfilename} and
+% \tn{@popfilename} to track the current syntax status. This can be
% achieved by saving the current status flag at each push to a stack,
% then recovering it at the pop stage and checking if the code
% environment should still be active.
@@ -496,7 +495,7 @@
% The pop auxiliary function removes the first item from the stack,
% saves the rest of the stack and then does the test. As
% \cs{ExplSyntaxOff} is already defined as a protected macro, there
-% is no need for \cs{noexpand} here.
+% is no need for \tn{noexpand} here.
% \begin{macrocode}
%<*package>
\expandafter\edef\csname\detokenize{expl_status_pop:w}\endcsname#1#2\@nil
@@ -535,10 +534,10 @@
%</package>
% \end{macrocode}
%
-% \subsection{The \cs{pdfstrcmp} primitive in \XeTeX{}}
+% \subsection{The \tn{pdfstrcmp} primitive in \XeTeX{}}
%
-% Only \pdfTeX{} has a primitive called \cs{pdfstrcmp}. The \XeTeX{}
-% version is just \cs{strcmp}, so there is some shuffling to do.
+% Only \pdfTeX{} has a primitive called \tn{pdfstrcmp}. The \XeTeX{}
+% version is just \tn{strcmp}, so there is some shuffling to do.
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname pdfstrcmp\endcsname\relax
@@ -548,7 +547,7 @@
%
% \subsection{Engine requirements}
%
-% The code currently requires functionality equivalent to \cs{pdfstrcmp}
+% The code currently requires functionality equivalent to \tn{pdfstrcmp}
% in addition to \eTeX{}. The former is therefore used as a test for
% a suitable engine.
% \begin{macrocode}
@@ -592,7 +591,7 @@
%
% \begin{macro}{\ExplSyntaxNamesOn, \ExplSyntaxNamesOff}
% These can be set up early, as they are not used anywhere in the
-% package or format itself. Using an \cs{edef} here makes the
+% package or format itself. Using an \tn{edef} here makes the
% definitions that bit clearer later.
% \begin{macrocode}
\protected\edef\ExplSyntaxNamesOn
@@ -627,7 +626,7 @@
\endlinechar = 32 \relax
%</initex>
% \end{macrocode}
-%
+%
% \begin{macro}{\ExplSyntaxOn, \ExplSyntaxOff}
% The idea here is that multiple \cs{ExplSyntaxOn} calls are not
% going to mess up category codes, and that multiple calls to
@@ -649,7 +648,7 @@
\char_set_catcode:nn { 95 } { \char_value_catcode:n { 95 } }
\char_set_catcode:nn { 124 } { \char_value_catcode:n { 124 } }
\char_set_catcode:nn { 126 } { \char_value_catcode:n { 126 } }
- \tex_endlinechar:D =
+ \tex_endlinechar:D =
\tex_the:D \tex_endlinechar:D \scan_stop:
\bool_set_false:N \l_expl_status_bool
\cs_set_protected_nopar:Npn \ExplSyntaxOff { }
@@ -663,7 +662,7 @@
\char_set_catcode_math_superscript:n { 94 } % circumflex
\char_set_catcode_letter:n { 95 } % underscore
\char_set_catcode_other:n { 124 } % pipe
- \char_set_catcode_space:n { 126 } % tilde
+ \char_set_catcode_space:n { 126 } % tilde
\tex_endlinechar:D = 32 \scan_stop:
\bool_set_true:N \l_expl_status_bool
}
@@ -673,7 +672,7 @@
% \end{macro}
%
% \begin{variable}{\l_expl_status_bool}
-% A flag to show the current syntax status.
+% A flag to show the current syntax status.
% \begin{macrocode}
%<*initex>
\chardef \l_expl_status_bool = 0 ~
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
index d839bee4342..539d04ed4b9 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3box.dtx 2711 2011-09-02 12:15:53Z joseph $
+\GetIdInfo$Id: l3box.dtx 2799 2011-09-10 15:46:33Z will $
{L3 Experimental boxes}
%</driver|package>
%<*driver>
@@ -168,7 +168,7 @@
% Inserts the current content of the \meta{box} onto the current
% list for typesetting.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{copy}.
+% This is the \TeX{} primitive \tn{copy}.
% \end{texnote}
% \end{function}
%
@@ -180,7 +180,7 @@
% list for typesetting, then globally clears the content of the
% \meta{box}.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{box}.
+% This is the \TeX{} primitive \tn{box}.
% \end{texnote}
% \end{function}
%
@@ -212,7 +212,7 @@
%
% \section{Measuring and setting box dimensions}
%
-% \begin{function}{\box_dp:N, \box_dp:c}
+% \begin{function}[EXP]{\box_dp:N, \box_dp:c}
% \begin{syntax}
% \cs{box_dp:N} \meta{box}
% \end{syntax}
@@ -221,11 +221,11 @@
% is suitable for use in a \meta{dimension expression} for
% calculations.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{dp}.
+% This is the \TeX{} primitive \tn{dp}.
% \end{texnote}
% \end{function}
%
-% \begin{function}{\box_ht:N, \box_ht:c}
+% \begin{function}[EXP]{\box_ht:N, \box_ht:c}
% \begin{syntax}
% \cs{box_ht:N} \meta{box}
% \end{syntax}
@@ -234,11 +234,11 @@
% is suitable for use in a \meta{dimension expression} for
% calculations.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{ht}.
+% This is the \TeX{} primitive \tn{ht}.
% \end{texnote}
% \end{function}
%
-% \begin{function}{\box_wd:N, \box_wd:c}
+% \begin{function}[EXP]{\box_wd:N, \box_wd:c}
% \begin{syntax}
% \cs{box_wd:N} \meta{box}
% \end{syntax}
@@ -246,7 +246,7 @@
% input stream. The output of this function is suitable for use in a
% \meta{dimension expression} for calculations.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{wd}.
+% This is the \TeX{} primitive \tn{wd}.
% \end{texnote}
% \end{function}
%
@@ -273,16 +273,16 @@
% Set the width of the \meta{box} to the value of the
% \Arg{dimension expression}. This is a global assignment.
% \end{function}
-%
+%
% \section{Affine transformations}
-%
+%
% Affine transformations are changes which (informally) preserve straight
% lines. Simple translations are affine transformations, but are better handled
% in \TeX{} by doing the translation first, then inserting an unmodified box.
% On the other hand, rotation and resizing of boxed material can best be
% handled by modifying boxes. These transformations are described here.
-%
-% \begin{function}{\box_resize:Nnn, \box_resize:cnn}
+%
+% \begin{function}[added = 2011-09-02]{\box_resize:Nnn, \box_resize:cnn}
% \begin{syntax}
% \cs{box_resize:Nnn} \meta{box} \Arg{x-size} \Arg{y-size}
% \end{syntax}
@@ -294,11 +294,12 @@
% cause the material in the \meta{box} to be reversed in direction, but the
% reference point of the \meta{box} will be unchanged. The resizing applies
% within the current \TeX{} group level.
-%
+%
% \textbf{This function is experimental}
% \end{function}
-%
-% \begin{function}{\box_resize_to_ht_plus_dp:Nn, \box_resize_to_ht_plus_dp:cn}
+%
+% \begin{function}[added = 2011-09-02]
+% {\box_resize_to_ht_plus_dp:Nn, \box_resize_to_ht_plus_dp:cn}
% \begin{syntax}
% \cs{box_resize_to_ht_plus_dp:Nnn} \meta{box} \Arg{y-size}
% \end{syntax}
@@ -314,8 +315,9 @@
%
% \textbf{This function is experimental}
% \end{function}
-%
-% \begin{function}{\box_resize_to_wd:Nn, \box_resize_to_wd:cn}
+%
+% \begin{function}[added = 2011-09-02]
+% {\box_resize_to_wd:Nn, \box_resize_to_wd:cn}
% \begin{syntax}
% \cs{box_resize_to_wd:Nnn} \meta{box} \Arg{x-size}
% \end{syntax}
@@ -329,8 +331,8 @@
%
% \textbf{This function is experimental}
% \end{function}
-%
-% \begin{function}{\box_rotate:Nn, \box_rotate:cn}
+%
+% \begin{function}[added = 2011-09-02]{\box_rotate:Nn, \box_rotate:cn}
% \begin{syntax}
% \cs{box_rotate:Nn} \meta{box} \Arg{angle}
% \end{syntax}
@@ -344,8 +346,8 @@
%
% \textbf{This function is experimental}
% \end{function}
-%
-% \begin{function}{\box_scale:Nnn, \box_scale:cnn}
+%
+% \begin{function}[added = 2011-09-02]{\box_scale:Nnn, \box_scale:cnn}
% \begin{syntax}
% \cs{box_scale:Nnn} \meta{box} \Arg{x-scale} \Arg{y-scale}
% \end{syntax}
@@ -395,20 +397,20 @@
% not a constant, it is \emph{not} settable by the programmer but is
% instead varied by \TeX{}.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{lastbox} renamed.
+% This is the \TeX{} primitive \tn{lastbox} renamed.
% \end{texnote}
% \end{variable}
%
% \section{Constant boxes}
%
-% \begin{variable}{\c_empty_box}
-% This is a permanently empty box, which is neither set as horizontal
-% nor vertical.
-% \end{variable}
+% \begin{variable}{\c_empty_box}
+% This is a permanently empty box, which is neither set as horizontal
+% nor vertical.
+% \end{variable}
%
-% \section{Scratch boxes}
+% \section{Scratch boxes}
%
-% \begin{variable}{\l_tmpa_tl, \l_tmpb_tl}
+% \begin{variable}{\l_tmpa_box, \l_tmpb_box}
% Scratch boxes for local assignment. These are never used by
% the kernel code, and so are safe for use with any \LaTeX3-defined
% function. However, they may be overwritten by other non-kernel
@@ -423,7 +425,7 @@
% \end{syntax}
% Writes the contents of \meta{box} to the log file.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{showbox}.
+% This is the \TeX{} primitive \tn{showbox}.
% \end{texnote}
% \end{function}
%
@@ -436,7 +438,7 @@
% Typesets the \meta{contents} into a horizontal box of natural
% width and then includes this box in the current list for typesetting.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{hbox}.
+% This is the \TeX{} primitive \tn{hbox}.
% \end{texnote}
% \end{function}
%
@@ -511,12 +513,11 @@
%
% \begin{function}
% {
-% \hbox_set_inline_begin:N, \hbox_set_inline_begin:c,
-% \hbox_set_inline_end:
+% \hbox_set:Nw, \hbox_set:cw,
+% \hbox_set_end:
% }
% \begin{syntax}
-% \cs{hbox_set_inline_begin:N} \meta{box} \meta{contents}
-% ~~\cs{hbox_set_inline_end:}
+% \cs{hbox_set:Nw} \meta{box} \meta{contents} \cs{hbox_set_end:}
% \end{syntax}
% Typesets the \meta{contents} at natural width and then stores the
% result inside the \meta{box}. The assignment is local. In contrast
@@ -527,12 +528,11 @@
%
% \begin{function}
% {
-% \hbox_gset_inline_begin:N, \hbox_gset_inline_begin:c,
-% \hbox_gset_inline_end:
+% \hbox_gset:Nw, \hbox_gset:cw,
+% \hbox_gset_end:
% }
% \begin{syntax}
-% \cs{hbox_gset_inline_begin:N} \meta{box} \meta{contents}
-% ~~\cs{hbox_gset_inline_end:}
+% \cs{hbox_gset:Nw} \meta{box} \meta{contents} \cs{hbox_gset_end:}
% \end{syntax}
% Typesets the \meta{contents} at natural width and then stores the
% result inside the \meta{box}. The assignment is global. In contrast
@@ -548,7 +548,7 @@
% Unpacks the content of the horizontal \meta{box}, retaining any stretching
% or shrinking applied when the \meta{box} was set.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{unhcopy}.
+% This is the \TeX{} primitive \tn{unhcopy}.
% \end{texnote}
% \end{function}
%
@@ -560,7 +560,7 @@
% or shrinking applied when the \meta{box} was set. The \meta{box} is
% then cleared globally.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{unhbox}.
+% This is the \TeX{} primitive \tn{unhbox}.
% \end{texnote}
% \end{function}
%
@@ -573,7 +573,7 @@
% result most vertical boxes have a large height value and small or
% zero depth. The exception are |_top| boxes, where the reference point
% is that of the first item added. These tend to have a large depth and
-% small height, although the later will typically be non-zero.
+% small height, although the latter will typically be non-zero.
%
% \begin{function}{\vbox:n}
% \begin{syntax}
@@ -582,7 +582,7 @@
% Typesets the \meta{contents} into a vertical box of natural height
% and includes this box in the current list for typesetting.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{vbox}.
+% This is the \TeX{} primitive \tn{vbox}.
% \end{texnote}
% \end{function}
%
@@ -595,7 +595,7 @@
% baseline of the box will tbe equal to that of the \emph{first}
% item added to the box.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{vtop}.
+% This is the \TeX{} primitive \tn{vtop}.
% \end{texnote}
% \end{function}
%
@@ -672,12 +672,11 @@
%
% \begin{function}
% {
-% \vbox_set_inline_begin:N, \vbox_set_inline_begin:c,
-% \vbox_set_inline_end:
+% \vbox_set:Nw, \vbox_set:cw,
+% \vbox_set_end:
% }
% \begin{syntax}
-% \cs{vbox_set_inline_begin:N} \meta{box} \meta{contents}
-% ~~\cs{vbox_set_inline_end:}
+% \cs{vbox_begin:Nw} \meta{box} \meta{contents} \cs{vbox_set_end:}
% \end{syntax}
% Typesets the \meta{contents} at natural height and then stores the
% result inside the \meta{box}. The assignment is local. In contrast
@@ -688,12 +687,11 @@
%
% \begin{function}
% {
-% \vbox_gset_inline_begin:N, \vbox_gset_inline_begin:c,
-% \vbox_gset_inline_end:
+% \vbox_gset:Nw, \vbox_gset:cw,
+% \vbox_gset_end:
% }
% \begin{syntax}
-% \cs{vbox_gset_inline_begin:N} \meta{box} \meta{contents}
-% ~~\cs{vbox_set_inline_end:}
+% \cs{vbox_gset:Nw} \meta{box} \meta{contents} \cs{vbox_gset_end:}
% \end{syntax}
% Typesets the \meta{contents} at natural height and then stores the
% result inside the \meta{box}. The assignment is global. In contrast
@@ -710,7 +708,7 @@
% \meta{dimexpr} by removing content from the top of \meta{box2}
% (which must be a vertical box).
% \begin{texnote}
-% This is the \TeX{} primitive \cs{vsplit}.
+% This is the \TeX{} primitive \tn{vsplit}.
% \end{texnote}
% \end{function}
%
@@ -721,7 +719,7 @@
% Unpacks the content of the vertical \meta{box}, retaining any stretching
% or shrinking applied when the \meta{box} was set.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{unvcopy}.
+% This is the \TeX{} primitive \tn{unvcopy}.
% \end{texnote}
% \end{function}
%
@@ -733,7 +731,7 @@
% or shrinking applied when the \meta{box} was set. The \meta{box}
% is then cleared globally.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{unvbox}.
+% This is the \TeX{} primitive \tn{unvbox}.
% \end{texnote}
% \end{function}
%
@@ -749,7 +747,7 @@
% \end{syntax}
% Tests is \meta{box} is a horizontal box.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{ifhbox}.
+% This is the \TeX{} primitive \tn{ifhbox}.
% \end{texnote}
% \end{function}
%
@@ -763,7 +761,7 @@
% \end{syntax}
% Tests is \meta{box} is a vertical box.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{ifvbox}.
+% This is the \TeX{} primitive \tn{ifvbox}.
% \end{texnote}
% \end{function}
%
@@ -777,7 +775,7 @@
% \end{syntax}
% Tests is \meta{box} is an empty (void) box.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{ifvoid}.
+% This is the \TeX{} primitive \tn{ifvoid}.
% \end{texnote}
% \end{function}
%
@@ -869,7 +867,7 @@
\cs_new_protected_nopar:Npn \box_set_eq:NN #1#2
{ \tex_setbox:D #1 \tex_copy:D #2 }
\cs_new_protected_nopar:Npn \box_gset_eq:NN
- { \pref_global:D \box_set_eq:NN }
+ { \tex_global:D \box_set_eq:NN }
\cs_generate_variant:Nn \box_set_eq:NN { cN , Nc , cc }
\cs_generate_variant:Nn \box_gset_eq:NN { cN , Nc , cc }
% \end{macrocode}
@@ -894,7 +892,7 @@
\cs_new_protected_nopar:Npn \box_set_eq_clear:NN #1#2
{ \tex_setbox:D #1 \tex_box:D #2 }
\cs_new_protected_nopar:Npn \box_gset_eq_clear:NN
- { \pref_global:D \box_set_eq_clear:NN }
+ { \tex_global:D \box_set_eq_clear:NN }
\cs_generate_variant:Nn \box_set_eq_clear:NN { cN , Nc , cc }
\cs_generate_variant:Nn \box_gset_eq_clear:NN { cN , Nc , cc }
% \end{macrocode}
@@ -1041,7 +1039,7 @@
\cs_new_protected_nopar:Npn \box_set_to_last:N #1
{ \tex_setbox:D #1 \l_last_box }
\cs_new_protected_nopar:Npn \box_gset_to_last:N
- { \pref_global:D \box_set_to_last:N }
+ { \tex_global:D \box_set_to_last:N }
\cs_generate_variant:Nn \box_set_to_last:N { c }
\cs_generate_variant:Nn \box_gset_to_last:N { c }
% \end{macrocode}
@@ -1101,7 +1099,7 @@
% \testfile*
% \begin{macrocode}
\cs_new_protected:Npn \hbox_set:Nn #1#2 { \tex_setbox:D #1 \tex_hbox:D {#2} }
-\cs_new_protected_nopar:Npn \hbox_gset:Nn { \pref_global:D \hbox_set:Nn }
+\cs_new_protected_nopar:Npn \hbox_gset:Nn { \tex_global:D \hbox_set:Nn }
\cs_generate_variant:Nn \hbox_set:Nn { c }
\cs_generate_variant:Nn \hbox_gset:Nn { c }
% \end{macrocode}
@@ -1116,33 +1114,48 @@
\cs_new_protected:Npn \hbox_set_to_wd:Nnn #1#2#3
{ \tex_setbox:D #1 \tex_hbox:D to \dim_eval:w #2 \dim_eval_end: {#3} }
\cs_new_protected_nopar:Npn \hbox_gset_to_wd:Nnn
- { \pref_global:D \hbox_set_to_wd:Nnn }
+ { \tex_global:D \hbox_set_to_wd:Nnn }
\cs_generate_variant:Nn \hbox_set_to_wd:Nnn { c }
\cs_generate_variant:Nn \hbox_gset_to_wd:Nnn {cnn}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\hbox_set_inline_begin:N, \hbox_set_inline_begin:c}
-% \begin{macro}{\hbox_gset_inline_begin:N, \hbox_gset_inline_begin:c}
-% \begin{macro}{\hbox_set_inline_end:}
-% \begin{macro}{\hbox_gset_inline_end:}
+% \begin{macro}{\hbox_set:Nw, \hbox_set:cw}
+% \begin{macro}{\hbox_gset:Nw, \hbox_gset:cw}
+% \begin{macro}{\hbox_set_end:, \hbox_gset_end:}
% \testfile*
% Storing material in a horizontal box. This type is useful in
% environment definitions.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \hbox_set_inline_begin:N #1
+\cs_new_protected_nopar:Npn \hbox_set:Nw #1
{ \tex_setbox:D #1 \tex_hbox:D \c_group_begin_token }
-\cs_new_protected_nopar:Npn \hbox_gset_inline_begin:N
- { \pref_global:D \hbox_set_inline_begin:N }
-\cs_generate_variant:Nn \hbox_set_inline_begin:N { c }
-\cs_generate_variant:Nn \hbox_gset_inline_begin:N { c }
-\cs_new_eq:NN \hbox_set_inline_end: \c_group_end_token
-\cs_new_eq:NN \hbox_gset_inline_end: \c_group_end_token
+\cs_new_protected_nopar:Npn \hbox_gset:Nw
+ { \tex_global:D \hbox_set:Nw }
+\cs_generate_variant:Nn \hbox_set:Nw { c }
+\cs_generate_variant:Nn \hbox_gset:Nw { c }
+\cs_new_eq:NN \hbox_set_end: \c_group_end_token
+\cs_new_eq:NN \hbox_gset_end: \c_group_end_token
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+%
+% \begin{macro}{\hbox_set_inline_begin:N, \hbox_set_inline_begin:c}
+% \begin{macro}{\hbox_gset_inline_begin:N, \hbox_gset_inline_begin:c}
+% \begin{macro}{\hbox_set_inline_end:,\hbox_gset_inline_end:}
+% \testfile*
+% Renamed September 2011.
+% \begin{macrocode}
+\cs_new_eq:NN \hbox_set_inline_begin:N \hbox_set:Nw
+\cs_new_eq:NN \hbox_set_inline_begin:c \hbox_set:cw
+\cs_new_eq:NN \hbox_set_inline_end: \hbox_set_end:
+\cs_new_eq:NN \hbox_gset_inline_begin:N \hbox_gset:Nw
+\cs_new_eq:NN \hbox_gset_inline_begin:c \hbox_gset:cw
+\cs_new_eq:NN \hbox_gset_inline_end: \hbox_gset_end:
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \end{macro}
%
% \begin{macro}{\hbox_to_wd:nn}
@@ -1215,7 +1228,7 @@
% Storing material in a vertical box with a natural height.
% \begin{macrocode}
\cs_new_protected:Npn \vbox_set:Nn #1#2 { \tex_setbox:D #1 \tex_vbox:D {#2} }
-\cs_new_protected_nopar:Npn \vbox_gset:Nn { \pref_global:D \vbox_set:Nn }
+\cs_new_protected_nopar:Npn \vbox_gset:Nn { \tex_global:D \vbox_set:Nn }
\cs_generate_variant:Nn \vbox_set:Nn { c }
\cs_generate_variant:Nn \vbox_gset:Nn { c }
% \end{macrocode}
@@ -1231,7 +1244,7 @@
\cs_new_protected:Npn \vbox_set_top:Nn #1#2
{ \tex_setbox:D #1 \tex_vtop:D {#2} }
\cs_new_protected_nopar:Npn \vbox_gset_top:Nn
- { \pref_global:D \vbox_set_top:Nn }
+ { \tex_global:D \vbox_set_top:Nn }
\cs_generate_variant:Nn \vbox_set_top:Nn { c }
\cs_generate_variant:Nn \vbox_gset_top:Nn { c }
% \end{macrocode}
@@ -1246,29 +1259,46 @@
\cs_new_protected:Npn \vbox_set_to_ht:Nnn #1#2#3
{ \tex_setbox:D #1 \tex_vbox:D to \dim_eval:w #2 \dim_eval_end: {#3} }
\cs_new_protected_nopar:Npn \vbox_gset_to_ht:Nnn
- { \pref_global:D \vbox_set_to_ht:Nnn }
+ { \tex_global:D \vbox_set_to_ht:Nnn }
\cs_generate_variant:Nn \vbox_set_to_ht:Nnn { c }
\cs_generate_variant:Nn \vbox_gset_to_ht:Nnn { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\vbox_set_inline_begin:N, \vbox_set_inline_begin:c}
-% \begin{macro}{\vbox_gset_inline_begin:N, \vbox_gset_inline_begin:c}
-% \begin{macro}{\vbox_set_inline_end:}
-% \begin{macro}{\vbox_gset_inline_end:}
+% \begin{macro}{\vbox_set:Nw, \vbox_set:cw}
+% \begin{macro}{\vbox_gset:Nw, \vbox_gset:cw}
+% \begin{macro}{\vbox_set_end:, \vbox_gset_end:}
% \testfile*
% Storing material in a vertical box. This type is useful in
% environment definitions.
% \begin{macrocode}
-\cs_new_nopar:Npn \vbox_set_inline_begin:N #1
+\cs_new_nopar:Npn \vbox_set:Nw #1
{ \tex_setbox:D #1 \tex_vbox:D \c_group_begin_token }
-\cs_new_protected_nopar:Npn \vbox_gset_inline_begin:N
- { \pref_global:D \vbox_set_inline_begin:N }
-\cs_generate_variant:Nn \vbox_set_inline_begin:N { c }
-\cs_generate_variant:Nn \vbox_gset_inline_begin:N { c }
-\cs_new_eq:NN \vbox_set_inline_end: \c_group_end_token
-\cs_new_eq:NN \vbox_gset_inline_end: \c_group_end_token
+\cs_new_protected_nopar:Npn \vbox_gset:Nw
+ { \tex_global:D \vbox_set:Nw }
+\cs_generate_variant:Nn \vbox_set:Nw { c }
+\cs_generate_variant:Nn \vbox_gset:Nw { c }
+\cs_new_eq:NN \vbox_set_end: \c_group_end_token
+\cs_new_eq:NN \vbox_gset_end: \c_group_end_token
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\vbox_set_inline_begin:N, \vbox_set_inline_begin:c}
+% \begin{macro}{\vbox_gset_inline_begin:N, \vbox_gset_inline_begin:c}
+% \begin{macro}{\vbox_set_inline_end:}
+% \begin{macro}{\vbox_gset_inline_end:}
+% \testfile*
+% Renamed September 2011.
+% \begin{macrocode}
+\cs_new_eq:NN \vbox_set_inline_begin:N \vbox_set:Nw
+\cs_new_eq:NN \vbox_set_inline_begin:c \vbox_set:cw
+\cs_new_eq:NN \vbox_set_inline_end: \vbox_set_end:
+\cs_new_eq:NN \vbox_gset_inline_begin:N \vbox_gset:Nw
+\cs_new_eq:NN \vbox_gset_inline_begin:c \vbox_gset:cw
+\cs_new_eq:NN \vbox_gset_inline_end: \vbox_gset_end:
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1296,9 +1326,9 @@
{ \tex_setbox:D #1 \tex_vsplit:D #2 to \dim_eval:w #3 \dim_eval_end: }
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Affine transformations}
-%
+%
% \begin{variable}{\l_box_angle_fp}
% When rotating boxes, the angle itself may be needed by the
% engine-dependent code. This is done using the \pkg{fp} module so
@@ -1307,7 +1337,7 @@
\fp_new:N \l_box_angle_fp
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}{\l_box_cos_fp, \l_box_sin_fp}
% These are used to hold the calculated sine and cosine values while
% carrying out a rotation.
@@ -1362,7 +1392,7 @@
\fp_new:N \l_box_y_new_fp
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{macro}{\box_rotate:Nn}
% \begin{macro}[aux]{\box_rotate_aux:N}
% \begin{macro}[aux]{\box_rotate_set_sin_cos:}
@@ -1380,11 +1410,11 @@
{
\hbox_set:Nn #1
{
- \group_begin:
+ \group_begin:
\fp_set:Nn \l_box_angle_fp {#2}
\box_rotate_set_sin_cos:
\fp_compare:NNNTF \l_box_sin_fp = \c_zero_fp
- {
+ {
\fp_compare:NNNTF \l_box_cos_fp = \c_one_fp
{ \box_use:N #1 }
{ \box_rotate_aux:N #1 }
@@ -1471,7 +1501,7 @@
\driver_box_rotate_begin:
\box_use:N \l_box_tmp_box
\driver_box_rotate_end:
- }
+ }
}
% \end{macrocode}
% Tidy up the size of the box so that the material is actually inside
@@ -1485,7 +1515,7 @@
\box_use:N \l_box_tmp_box
}
% \end{macrocode}
-% When loaded on top of \LaTeXe{} the \cs{rotatebox} function can be
+% When loaded on top of \LaTeXe{} the \tn{rotatebox} function can be
% used. There is just a slight adjustment in the syntax.
% \begin{macrocode}
%<*package>
@@ -1639,7 +1669,7 @@
% find the new dimensions.
% \begin{macrocode}
\fp_compare:NNNTF \l_box_scale_x_fp = \c_one_fp
- {
+ {
\fp_compare:NNNTF \l_box_scale_y_fp = \c_one_fp
{ \box_use:N #1 }
{ \box_resize_aux:Nnn #1 {#2} {#3} }
@@ -1669,17 +1699,17 @@
{ \fp_use:N \l_box_scale_y_fp \l_box_top_dim }
\dim_set:Nn \l_box_bottom_new_dim
{ \fp_use:N \l_box_scale_y_fp \l_box_bottom_dim }
- }
+ }
{
\dim_set:Nn \l_box_top_new_dim
{ - \fp_use:N \l_box_scale_y_fp \l_box_top_dim }
\dim_set:Nn \l_box_bottom_new_dim
{ - \fp_use:N \l_box_scale_y_fp \l_box_bottom_dim }
- }
+ }
\box_resize_common:N #1
}
% \end{macrocode}
-% When loaded on top of \LaTeXe{} the \cs{resizebox} function can be
+% When loaded on top of \LaTeXe{} the \tn{resizebox} function can be
% used. There is just a slight adjustment in the syntax.
% \begin{macrocode}
%<*package>
@@ -1687,7 +1717,7 @@
{
\hbox_set:Nn #1
{
- \resizebox *
+ \resizebox *
{ \etex_dimexpr:D #2 \scan_stop: }
{ \etex_dimexpr:D #3 \scan_stop: }
{ \box_use:N #1 }
@@ -1697,7 +1727,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{\box_resize_to_ht_plus_dp:Nn, \box_resize_to_ht_plus_dp:cn}
% \begin{macro}{\box_resize_to_wd:Nn, \box_resize_to_wd:cn}
% Scaling to a total height or to a width is a simplified version of the main
@@ -1748,7 +1778,7 @@
}
\cs_generate_variant:Nn \box_resize_to_wd:Nn { c }
% \end{macrocode}
-% Again, in package mode the scaling can be handled by \cs{resizebox}.
+% Again, in package mode the scaling can be handled by \tn{resizebox}.
% \begin{macrocode}
%<*package>
\cs_set_protected_nopar:Npn \box_resize_to_ht_plus_dp:Nn #1#2
@@ -1792,7 +1822,7 @@
\dim_set:Nn \l_box_right_dim { \box_wd:N #1 }
\dim_zero:N \l_box_left_dim
\fp_compare:NNNTF \l_box_scale_x_fp = \c_one_fp
- {
+ {
\fp_compare:NNNTF \l_box_scale_y_fp = \c_one_fp
{ \box_use:N #1 }
{ \box_scale_aux:Nnn #1 {#2} {#3} }
@@ -1819,7 +1849,7 @@
\box_resize_common:N #1
}
% \end{macrocode}
-% When loaded on top of \LaTeXe{} the \cs{scalebox} function can be
+% When loaded on top of \LaTeXe{} the \tn{scalebox} function can be
% used. There is just a slight adjustment in the syntax.
% \begin{macrocode}
%<*package>
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
index b2c09e72e15..53823cde267 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
@@ -10,7 +10,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3clist.dtx 2725 2011-09-05 18:53:03Z bruno $
+\GetIdInfo$Id: l3clist.dtx 2798 2011-09-10 15:42:13Z will $
{L3 Experimental comma separated lists}
%</driver|package>
%<*driver>
@@ -162,8 +162,7 @@
%
% \begin{function}{\clist_concat:NNN, \clist_concat:ccc}
% \begin{syntax}
-% \cs{clist_concat:NNN} \meta{comma list1} \meta{comma list2}
-% ~~\meta{comma list3}
+% \cs{clist_concat:NNN} \meta{comma list1} \meta{comma list2} \meta{comma list3}
% \end{syntax}
% Concatenates the content of \meta{comma list2} and \meta{comma list3}
% together and saves the result in \meta{comma list1}. The items in
@@ -174,8 +173,7 @@
%
% \begin{function}{\clist_gconcat:NNN, \clist_gconcat:ccc}
% \begin{syntax}
-% \cs{clist_gconcat:NNN} \meta{comma list1} \meta{comma list2}
-% ~~\meta{comma list3}
+% \cs{clist_gconcat:NNN} \meta{comma list1} \meta{comma list2} \meta{comma list3}
% \end{syntax}
% Concatenates the content of \meta{comma list2} and \meta{comma list3}
% together and saves the result in \meta{comma list1}. The items in
@@ -184,14 +182,47 @@
% \meta{comma list1}.
% \end{function}
%
-% \section{Appending items to comma lists}
+% \section{Adding data to comma lists}
%
-% \begin{function}{
-% \clist_put_left:Nn, \clist_put_left:NV,
-% \clist_put_left:No, \clist_put_left:Nx,
-% \clist_put_left:cn, \clist_put_left:cV,
-% \clist_put_left:co, \clist_put_left:cx
-% }
+% \begin{function}[added = 2011-09-06]
+% {
+% \clist_set:Nn, \clist_set:NV,
+% \clist_set:No, \clist_set:Nx,
+% \clist_set:cn, \clist_set:cV,
+% \clist_set:co, \clist_set:cx
+% }
+% \begin{syntax}
+% \cs{clist_set:Nn} \meta{comma list} |{|\meta{item1},\ldots{},\meta{item$_n$}|}|
+% \end{syntax}
+% Sets \meta{comma list} to contain the \meta{items},
+% removing any previous content from the variable.
+% Spaces are removed from both sides of each item.
+% The assignment is restricted to the current \TeX{} group.
+% \end{function}
+%
+% \begin{function}[added = 2011-09-06]
+% {
+% \clist_gset:Nn, \clist_gset:NV,
+% \clist_gset:No, \clist_gset:Nx,
+% \clist_gset:cn, \clist_gset:cV,
+% \clist_gset:co, \clist_gset:cx
+% }
+% \begin{syntax}
+% \cs{clist_gset:Nn} \meta{comma list} |{|\meta{item1},\ldots{},\meta{item$_n$}|}|
+% \end{syntax}
+% Sets \meta{comma list} to contain the \meta{items},
+% removing any previous content from the variable.
+% Spaces are removed from both sides of each item.
+% The assignment is global.
+% \end{function}
+%
+% \begin{function}[updated = 2011-09-05]
+% {
+% \clist_put_left:Nn, \clist_put_left:NV,
+% \clist_put_left:No, \clist_put_left:Nx,
+% \clist_put_left:cn, \clist_put_left:cV,
+% \clist_put_left:co, \clist_put_left:cx
+% }
% \begin{syntax}
% \cs{clist_put_left:Nn} \meta{comma list} |{|\meta{item1},\ldots{},\meta{item$_n$}|}|
% \end{syntax}
@@ -200,12 +231,13 @@
% The assignment is restricted to the current \TeX{} group.
% \end{function}
%
-% \begin{function}{
-% \clist_gput_left:Nn, \clist_gput_left:NV,
-% \clist_gput_left:No, \clist_gput_left:Nx,
-% \clist_gput_left:cn, \clist_gput_left:cV,
-% \clist_gput_left:co, \clist_gput_left:cx
-% }
+% \begin{function}[updated = 2011-09-05]
+% {
+% \clist_gput_left:Nn, \clist_gput_left:NV,
+% \clist_gput_left:No, \clist_gput_left:Nx,
+% \clist_gput_left:cn, \clist_gput_left:cV,
+% \clist_gput_left:co, \clist_gput_left:cx
+% }
% \begin{syntax}
% \cs{clist_gput_left:Nn} \meta{comma list} |{|\meta{item1},\ldots{},\meta{item$_n$}|}|
% \end{syntax}
@@ -214,12 +246,13 @@
% The assignment is global.
% \end{function}
%
-% \begin{function}{
-% \clist_put_right:Nn, \clist_put_right:NV,
-% \clist_put_right:No, \clist_put_right:Nx,
-% \clist_put_right:cn, \clist_put_right:cV,
-% \clist_put_right:co, \clist_put_right:cx
-% }
+% \begin{function}[updated = 2011-09-05]
+% {
+% \clist_put_right:Nn, \clist_put_right:NV,
+% \clist_put_right:No, \clist_put_right:Nx,
+% \clist_put_right:cn, \clist_put_right:cV,
+% \clist_put_right:co, \clist_put_right:cx
+% }
% \begin{syntax}
% \cs{clist_put_right:Nn} \meta{comma list} |{|\meta{item1},\ldots{},\meta{item$_n$}|}|
% \end{syntax}
@@ -228,12 +261,13 @@
% The assignment is restricted to the current \TeX{} group.
% \end{function}
%
-% \begin{function}{
-% \clist_gput_right:Nn, \clist_gput_right:NV,
-% \clist_gput_right:No, \clist_gput_right:Nx,
-% \clist_gput_right:cn, \clist_gput_right:cV,
-% \clist_gput_right:co, \clist_gput_right:cx
-% }
+% \begin{function}[updated = 2011-09-05]
+% {
+% \clist_gput_right:Nn, \clist_gput_right:NV,
+% \clist_gput_right:No, \clist_gput_right:Nx,
+% \clist_gput_right:cn, \clist_gput_right:cV,
+% \clist_gput_right:co, \clist_gput_right:cx
+% }
% \begin{syntax}
% \cs{clist_gput_right:Nn} \meta{comma list} |{|\meta{item1},\ldots{},\meta{item$_n$}|}|
% \end{syntax}
@@ -254,10 +288,10 @@
%
% \section{Modifying comma lists}
%
-% While comma lists are normally used as ordered lists, it may be
-% necessary to modify the content. The functions here may be used
-% to update comma lists, while retaining the order of the unaffected
-% entries.
+% While comma lists are normally used as ordered lists, it may be
+% necessary to modify the content. The functions here may be used
+% to update comma lists, while retaining the order of the unaffected
+% entries.
%
% \begin{function}{\clist_remove_duplicates:N, \clist_remove_duplicates:c}
% \begin{syntax}
@@ -295,7 +329,7 @@
% \end{texnote}
% \end{function}
%
-% \begin{function}{\clist_remove_all:Nn, \clist_remove_all:cn}
+% \begin{function}[updated = 2011-09-06]{\clist_remove_all:Nn, \clist_remove_all:cn}
% \begin{syntax}
% \cs{clist_remove_all:Nn} \meta{comma list} \Arg{item}
% \end{syntax}
@@ -308,7 +342,7 @@
% \end{texnote}
% \end{function}
%
-% \begin{function}{\clist_gremove_all:Nn, \clist_gremove_all:cn}
+% \begin{function}[updated = 2011-09-06]{\clist_gremove_all:Nn, \clist_gremove_all:cn}
% \begin{syntax}
% \cs{clist_gremove_all:Nn} \meta{comma list} \Arg{item}
% \end{syntax}
@@ -326,8 +360,7 @@
% \begin{function}[EXP,pTF]{\clist_if_empty:N, \clist_if_empty:c}
% \begin{syntax}
% \cs{clist_if_empty_p:N} \meta{comma list}
-% \cs{clist_if_empty:NTF} \meta{comma list}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{clist_if_empty:NTF} \meta{comma list} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{comma list} is empty (containing no items).
% \end{function}
@@ -336,27 +369,34 @@
% {\clist_if_eq:NN, \clist_if_eq:Nc, \clist_if_eq:cN, \clist_if_eq:cc}
% \begin{syntax}
% \cs{clist_if_eq_p:NN} \Arg{clist1} \Arg{clist2}
-% \cs{clist_if_eq:NNTF} \Arg{clist1} \Arg{clist2} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{clist_if_eq:NNTF} \Arg{clist1} \Arg{clist2} \Arg{true code} \Arg{false code}
% \end{syntax}
% Compares the content of two \meta{comma lists} and
% is logically \texttt{true} if the two contain the same list of
% entries in the same order.
% \end{function}
%
-% \begin{function}[TF]{
-% \clist_if_in:Nn, \clist_if_in:NV, \clist_if_in:No,
-% \clist_if_in:cn, \clist_if_in:cV, \clist_if_in:co,
-% \clist_if_in:nn, \clist_if_in:nV, \clist_if_in:no
-% }
+% \begin{function}[updated = 2011-09-06, TF]
+% {
+% \clist_if_in:Nn, \clist_if_in:NV, \clist_if_in:No,
+% \clist_if_in:cn, \clist_if_in:cV, \clist_if_in:co,
+% \clist_if_in:nn, \clist_if_in:nV, \clist_if_in:no
+% }
% \begin{syntax}
-% \cs{clist_if_in:NnTF} \meta{comma list} \Arg{item}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{clist_if_in:NnTF} \meta{comma list} \Arg{item} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{item} is present in the \meta{comma list}.
+% In the case of an \texttt{n}-type \meta{comma list},
+% spaces are stripped from each item, but braces are not removed.
+% Hence,
+% \begin{verbatim}
+% \clist_if_in:nnTF { a , {b}~ , {b} , c } { b } {true} {false}
+% \end{verbatim}
+% yields \texttt{false}.
% \begin{texnote}
% The \meta{item} may not contain |{|, |}|, or |#|
-% (assuming the usual \TeX{} category codes apply).
+% (assuming the usual \TeX{} category codes apply),
+% and should not contain |,| nor start or end with a space.
% \end{texnote}
% \end{function}
%
@@ -407,8 +447,7 @@
% \begin{function}
% {\clist_map_variable:NNn, \clist_map_variable:cNn, \clist_map_variable:nNn}
% \begin{syntax}
-% \cs{clist_map_variable:NNn} \meta{comma list}
-% ~~\meta{tl~var.} \Arg{function using tl~var.}
+% \cs{clist_map_variable:NNn} \meta{comma list} \meta{tl~var.} \Arg{function using tl~var.}
% \end{syntax}
% Stores each entry in the \meta{comma list} in turn in the
% \meta{tl~var.}\ and applies the \meta{function using tl~var.}
@@ -437,7 +476,7 @@
% \end{verbatim}
% Use outside of a \cs{clist_map_\ldots} scenario will lead to low
% level \TeX{} errors.
-% \begin{texnote}^^A temporarily untrue, fixed next week.
+% \begin{texnote}
% When the mapping is broken, additional tokens may be inserted by the
% internal macro \cs{clist_break_point:n} before further items are taken
% from the input stream. This will depend on the design of the mapping
@@ -482,8 +521,6 @@
% in the previous section: a comma list should either be used as an
% ordered data type or as a stack, but not in both ways.
%
-% \section{Comma lists as stacks}
-%
% \begin{function}{\clist_get:NN, \clist_get:cN}
% \begin{syntax}
% \cs{clist_get:NN} \meta{comma list} \meta{token list variable}
@@ -502,7 +539,7 @@
% \meta{comma list}. The \meta{token list variable} is assigned locally.
% \end{function}
%
-% \begin{function}{\clist_pop:NN, \clist_pop:cN}
+% \begin{function}[updated = 2011-09-06]{\clist_pop:NN, \clist_pop:cN}
% \begin{syntax}
% \cs{clist_pop:NN} \meta{comma list} \meta{token list variable}
% \end{syntax}
@@ -529,9 +566,10 @@
% \clist_push:cn, \clist_push:cV, \clist_push:co, \clist_push:cx
% }
% \begin{syntax}
-% \cs{clist_push:Nn} \meta{comma list} \Arg{item}
+% \cs{clist_push:Nn} \meta{comma list} \Arg{items}
% \end{syntax}
-% Adds the \Arg{item} to the top of the \meta{comma list}.
+% Adds the \Arg{items} to the top of the \meta{comma list}.
+% Spaces are removed from both sides of each item.
% The assignment is restricted to the current \TeX{} group.
% \end{function}
%
@@ -541,10 +579,12 @@
% \clist_gpush:cn, \clist_gpush:cV, \clist_gpush:co, \clist_gpush:cx
% }
% \begin{syntax}
-% \cs{clist_gpush:Nn} \meta{comma list} \Arg{item}
+% \cs{clist_gpush:Nn} \meta{comma list} \Arg{items}
% \end{syntax}
-% Pushes the \meta{item} onto the end of the top of the
-% \meta{comma list}. The assignment is global.
+% Pushes the \meta{items} onto the end of the top of the
+% \meta{comma list}.
+% Spaces are removed from both sides of each item.
+% The assignment is global.
% \end{function}
%
% \section{Viewing comma lists}
@@ -556,12 +596,29 @@
% Displays the entries in the \meta{comma list} in the terminal.
% \end{function}
%
+% \section{Scratch comma lists}
+%
+% \begin{variable}[added = 2011-09-06]{\l_tmpa_clist, \l_tmpb_clist}
+% Scratch comma lists for local assignment. These are never used by
+% the kernel code, and so are safe for use with any \LaTeX3-defined
+% function. However, they may be overwritten by other non-kernel
+% code and so should only be used for short-term storage.
+% \end{variable}
+%
+% \begin{variable}[added = 2011-09-06]{\g_tmpa_clist, \g_tmpb_clist}
+% Scratch comma lists for global assignment. These are never used by
+% the kernel code, and so are safe for use with any \LaTeX3-defined
+% function. However, they may be overwritten by other non-kernel
+% code and so should only be used for short-term storage.
+% \end{variable}
+%
% \section{Experimental comma list functions}
%
% This section contains functions which may or may not be retained, depending
% on how useful they are found to be.
%
-% \begin{function}[EXP]{\clist_length:N, \clist_length:c,\clist_length:n}
+% \begin{function}[added = 2011-06-25, updated = 2011-09-06, EXP]
+% {\clist_length:N, \clist_length:c,\clist_length:n}
% \begin{syntax}
% \cs{clist_length:N} \meta{comma list}
% \end{syntax}
@@ -571,7 +628,8 @@
% \emph{i.e.}~every item in a \meta{comma list} is unique.
% \end{function}
%
-% \begin{function}[EXP]{\clist_item:Nn, \clist_item:cn, \clist_item:nn}
+% \begin{function}[updated = 2011-09-06, EXP]
+% {\clist_item:Nn, \clist_item:cn, \clist_item:nn}
% \begin{syntax}
% \cs{clist_item:Nn} \meta{comma list} \Arg{integer expression}
% \end{syntax}
@@ -585,7 +643,7 @@
% nothing.
% \end{function}
%
-% \begin{function}
+% \begin{function}[updated = 2011-08-31]
% {
% \clist_set_from_seq:NN, \clist_set_from_seq:cN,
% \clist_set_from_seq:Nc, \clist_set_from_seq:cc
@@ -595,9 +653,10 @@
% \end{syntax}
% Sets the \meta{comma list} within the current \TeX{} group to be equal
% to the content of the \meta{sequence}.
+% Items which contain either spaces or commas are surrounded by braces.
% \end{function}
%
-% \begin{function}
+% \begin{function}[updated = 2011-08-31]
% {
% \clist_gset_from_seq:NN, \clist_gset_from_seq:cN,
% \clist_gset_from_seq:Nc, \clist_gset_from_seq:cc
@@ -607,38 +666,21 @@
% \end{syntax}
% Sets the \meta{comma list} globally to equal to the content of the
% \meta{sequence}.
+% Items which contain either spaces or commas are surrounded by braces.
% \end{function}
%
-% \section{Deprecated comma-list functions}
+% \section{Internal comma-list functions}
%
-% \begin{function}{\clist_trim_spaces:N, \clist_trim_spaces:c}
+% \begin{function}[added = 2011-07-09, rEXP]{\clist_trim_spaces:n}
% \begin{syntax}
-% \cs{clist_trim_spaces:N} \meta{comma list}
-% \end{syntax}
-% Removes leading and trailing spaces from each \meta{item} in the
-% \meta{comma list} within the current \TeX{} group. This space-removal
-% process takes place as described for \cs{tl_trim_spaces:n}.
-% \end{function}
-%
-% \begin{function}{\clist_gtrim_spaces:N, \clist_gtrim_spaces:c}
-% \begin{syntax}
-% \cs{clist_gtrim_spaces:N} \meta{comma list}
-% \end{syntax}
-% Removes leading and trailing spaces from each \meta{item} in the
-% \meta{comma list} globally. This space-removal
-% process takes place as described for \cs{tl_trim_spaces:n}.
-% \end{function}
-%
-% \begin{function}[rEXP]{\clist_trim_spaces:n}
-% \begin{syntax}
-% \cs{clist_trim_spaces:N} \meta{comma list}
+% \cs{clist_trim_spaces:n} \Arg{comma list}
% \end{syntax}
% Removes leading and trailing spaces from each \meta{item} in the
% \meta{comma list}, leaving the resulting modified list in the
-% input stream.
+% input stream. This is used by the functions which add data
+% into a comma list.
% \end{function}
%
-%
% \end{documentation}
%
% \begin{implementation}
@@ -659,16 +701,20 @@
%</package>
% \end{macrocode}
%
-%^^A todo: provide users with \l_tmpa_clist and friends?
-%
-% \begin{variable}{\l_clist_tmpa_tl, \l_clist_tmpb_tl}
+% \begin{variable}{\l_clist_tmpa_tl}
% Scratch space for various internal uses.
% \begin{macrocode}
\tl_new:N \l_clist_tmpa_tl
-\tl_new:N \l_clist_tmpb_tl
% \end{macrocode}
% \end{variable}
%
+% \begin{macro}[aux]{\clist_tmp:w}
+% A temporary function for various purposes.
+% \begin{macrocode}
+\cs_new_protected:Npn \clist_tmp:w { }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Allocation and initialisation}
%
% \begin{macro}{\clist_new:N,\clist_new:c}
@@ -736,8 +782,7 @@
% \begin{macro}{\clist_gconcat:NNN, \clist_gconcat:ccc}
% \UnitTested
% \begin{macro}[aux]{\clist_concat_aux:NNNN}
-% Concatenating sequences is not quite as easy as it seems, as there is
-% the danger that |#1| may be the same as either |#2| or |#3|. Also,
+% Concatenating sequences is not quite as easy as it seems, as
% there needs to be the correct addition of a comma to the output. So
% a little work to do.
% \begin{macrocode}
@@ -749,16 +794,9 @@
{
#1 #2
{
- \clist_if_empty:NTF #3
- { \exp_not:o #4 }
- {
- \exp_not:o #3
- \clist_if_empty:NF #4
- {
- ,
- \exp_not:o #4
- }
- }
+ \exp_not:o #3
+ \clist_if_empty:NF #3 { \clist_if_empty:NF #4 { , } }
+ \exp_not:o #4
}
}
\cs_generate_variant:Nn \clist_concat:NNN { ccc }
@@ -770,13 +808,6 @@
%
% \subsection{Removing spaces around items}
%
-% \begin{macro}[aux]{\clist_tmp:w}
-% A temporary function for various purposes.
-% \begin{macrocode}
-\cs_new_protected:Npn \clist_tmp:w { }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}[int,EXP]{\clist_trim_spaces_generic:nw}
% \begin{macro}[aux]{\clist_trim_spaces_generic_aux:w}
% \begin{macro}[aux]{\clist_trim_spaces_generic_aux_ii:nn}
@@ -851,9 +882,32 @@
% \end{macro}
% \end{macro}
%
+% \subsection{Adding data to comma lists}
%
-%
-% \subsection{Appending items to comma lists}
+% \begin{macro}
+% {
+% \clist_set:Nn, \clist_set:NV,
+% \clist_set:No, \clist_set:Nx,
+% \clist_set:cn, \clist_set:cV,
+% \clist_set:co, \clist_set:cx
+% }
+% \begin{macro}
+% {
+% \clist_gset:Nn, \clist_gset:NV,
+% \clist_gset:No, \clist_gset:Nx,
+% \clist_gset:cn, \clist_gset:cV,
+% \clist_gset:co, \clist_gset:cx
+% }
+% \begin{macrocode}
+\cs_new_protected:Npn \clist_set:Nn #1#2
+ { \tl_set:Nx #1 { \clist_trim_spaces:n {#2} } }
+\cs_new_protected:Npn \clist_gset:Nn #1#2
+ { \tl_gset:Nx #1 { \clist_trim_spaces:n {#2} } }
+\cs_generate_variant:Nn \clist_set:Nn { NV , No , Nx , c , cV , co , cx }
+\cs_generate_variant:Nn \clist_gset:Nn { NV , No , Nx , c , cV , co , cx }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}
% {
@@ -862,7 +916,7 @@
% \clist_put_left:cn, \clist_put_left:cV,
% \clist_put_left:co, \clist_put_left:cx
% }
-%^^A \UnitTested
+% \UnitTested
% \begin{macro}
% {
% \clist_gput_left:Nn, \clist_gput_left:NV,
@@ -870,7 +924,7 @@
% \clist_gput_left:cn, \clist_gput_left:cV,
% \clist_gput_left:co, \clist_gput_left:cx
% }
-%^^A \UnitTested
+% \UnitTested
% Comma lists cannot hold empty values: there are therefore a couple
% of sanity checks to avoid accumulating commas.
% \begin{macrocode}
@@ -946,34 +1000,35 @@
% \UnitTested
% \begin{macro}{\clist_gpop:NN, \clist_gpop:cN}
% \UnitTested
-% \begin{macro}[aux]{\clist_pop_aux:NNN}
-% \begin{macro}[aux]{\clist_pop_aux:wNNN}
+% \begin{macro}[aux]
+% {\clist_pop_aux:NNN, \clist_pop_aux:NwNNN, \clist_pop_aux:wNN}
% The aim here is to get the popped item as |#1| in the auxiliary, with
% |#2| containing either the remainder of the list \emph{or} \cs{q_nil}
% if there were insufficient items. That keeps the number of auxiliary
% functions down.
-%^^A broken for {a,{b,c}}, which unbraces {b,c}.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \clist_pop:NN
- { \clist_pop_aux:NNN \tl_set:Nn }
+ { \clist_pop_aux:NNN \tl_set:Nf }
\cs_new_protected_nopar:Npn \clist_gpop:NN
- { \clist_pop_aux:NNN \tl_gset:Nn }
+ { \clist_pop_aux:NNN \tl_gset:Nf }
\cs_new_protected_nopar:Npn \clist_pop_aux:NNN #1#2#3
- { \exp_after:wN \clist_pop_aux:wNNN #2 , \q_nil , \q_nil , \q_stop #1#2#3 }
-\cs_new_protected:Npn \clist_pop_aux:wNNN #1 , #2 , \q_nil , #3 \q_stop #4#5#6
{
+ \exp_after:wN \clist_pop_aux:wNNN #2 , \q_nil \q_stop #1#2#3
+ }
+\cs_new_protected:Npn \clist_pop_aux:wNNN #1 , #2 \q_stop #3#4#5
+ {
+ \tl_set:Nn #5 {#1}
\quark_if_nil:nTF {#2}
- { #4 #5 { } }
- { #4 #5 {#2} }
- \tl_set:Nn #6 {#1}
+ { #3 #4 { } }
+ { #3 #4 { \clist_pop_aux:w \exp_stop_f: #2 } }
}
+\cs_new_protected:Npn \clist_pop_aux:w #1 , \q_nil {#1}
\cs_generate_variant:Nn \clist_pop:NN { c }
\cs_generate_variant:Nn \clist_gpop:NN { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{
% \clist_push:Nn, \clist_push:NV, \clist_push:No, \clist_push:Nx,
@@ -1061,42 +1116,58 @@
% \UnitTested
% \begin{macro}[aux]{\clist_remove_all_aux:NNn}
% \begin{macro}[aux]{\clist_remove_all_aux:w}
-% Removing an item from a comma list is done without looping over
-% the entire list, as the performance of that approach is very bad for
-% long lists. Instead, a delimited function is needed. For this to work
-% correctly, there is a need to add an additional comma at the start of
-% the list, and to remove it again once the removal is complete. Of
-% course, the list can end up empty, which is the reason for the test
-% before copying back to the parent.
+% \begin{macro}[aux]{\clist_remove_all_aux:}
+% The method used here is very similar to \cs{tl_replace_all:Nnn}.
+% Build a function delimited by the \meta{item} that should be removed,
+% surrounded with commas, and call that function followed by
+% the expanded comma list, and another copy of the \meta{item}.
+% The loop is controlled by the argument grabbed by
+% \cs{clist_remove_all_aux:w}: when the item was found,
+% the \cs{q_mark} delimiter used is the one inserted by
+% \cs{clist_tmp:w}, and \cs{use_none_delimit_by_q_stop:w}
+% is deleted. At the end, the final \meta{item} is
+% grabbed, and the argument of \cs{clist_tmp:w} contains
+% \cs{q_mark}: in that case, \cs{clist_remove_all_aux:w}
+% removes the second \cs{q_mark} (inserted by \cs{clist_tmp:w}),
+% and lets \cs{use_none_delimit_by_q_stop:w} act.
+%
+% No brace is lost because items are always grabbed with a leading comma.
+% The result of the first assignment has an extra leading comma,
+% which we remove in a second assignment.
+% Two exceptions: if the clist lost all of its elements, the result
+% is empty, and we shouldn't remove anything; if the clist started up
+% empty, the first step happens to turn it into a single comma, and
+% the second step removes it.
% \begin{macrocode}
\cs_new_protected:Npn \clist_remove_all:Nn
- { \clist_remove_all_aux:NNn \clist_set_eq:NN }
+ { \clist_remove_all_aux:NNn \tl_set:Nx }
\cs_new_protected:Npn \clist_gremove_all:Nn
- { \clist_remove_all_aux:NNn \clist_gset_eq:NN }
+ { \clist_remove_all_aux:NNn \tl_gset:Nx }
\cs_new_protected:Npn \clist_remove_all_aux:NNn #1#2#3
{
+ \cs_set:Npn \clist_tmp:w ##1 , #3 ,
+ {
+ ##1
+ , \q_mark , \use_none_delimit_by_q_stop:w ,
+ \clist_remove_all_aux:
+ }
+ #1 #2
+ {
+ \exp_after:wN \clist_remove_all_aux:
+ #2 , \q_mark , #3 , \q_stop
+ }
\clist_if_empty:NF #2
{
- \clist_clear:N \l_clist_remove_clist
- \cs_set_protected:Npn \clist_remove_all_aux:w
- ##1 , #3 , ##2 \q_stop
+ #1 #2
{
- \tl_put_right:Nn \l_clist_remove_clist {##1}
- \quark_if_no_value:nF {##2}
- { \clist_remove_all_aux:w , ##2 \q_stop }
+ \exp_args:No \exp_not:o
+ { \exp_after:wN \use_none:n #2 }
}
- \exp_after:wN \clist_remove_all_aux:w
- \exp_after:wN , #2 , #3 , \q_no_value \q_stop
- \tl_if_empty:NF \l_clist_remove_clist
- {
- \exp_after:wN \tl_set:No \exp_after:wN
- \l_clist_remove_clist \exp_after:wN
- { \exp_after:wN \use_none:n \l_clist_remove_clist }
- }
- #1 #2 \l_clist_remove_clist
}
}
-\cs_new_protected:Npn \clist_remove_all_aux:w { }
+\cs_new:Npn \clist_remove_all_aux:
+ { \exp_after:wN \clist_remove_all_aux:w \clist_tmp:w , }
+\cs_new:Npn \clist_remove_all_aux:w #1 , \q_mark , #2 , { \exp_not:n {#1} }
\cs_generate_variant:Nn \clist_remove_all:Nn { c }
\cs_generate_variant:Nn \clist_gremove_all:Nn { c }
% \end{macrocode}
@@ -1104,10 +1175,17 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
+% \end{macro}
%
% \subsection{Comma list conditionals}
%
+% \begin{variable}{\l_clist_if_in_clist}
+% An internal comma list for \cs{clist_if_in:nn} conditionals.
+% \begin{macrocode}
+\clist_new:N \l_clist_if_in_clist
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macro}[pTF]{\clist_if_empty:N, \clist_if_empty:c}
% \UnitTested
% Simple copies from the token list variable material.
@@ -1132,35 +1210,29 @@
% \begin{macro}[TF]
% {
% \clist_if_in:Nn, \clist_if_in:NV, \clist_if_in:No,
-% \clist_if_in:cn, \clist_if_in:cV, \clist_if_in:co
+% \clist_if_in:cn, \clist_if_in:cV, \clist_if_in:co,
+% \clist_if_in:nn, \clist_if_in:nV, \clist_if_in:no
% }
+% \begin{macro}[aux]{\clist_if_in_return:nn}
% \UnitTested
+% See description of the \cs{tl_if_in:Nn} function for details.
+% We simply surround the comma list, and the item, with commas.
% \begin{macrocode}
-\prg_new_protected_conditional:Npnn \clist_if_in:Nn #1#2
- { T , F , TF }
+\prg_new_protected_conditional:Npnn \clist_if_in:Nn #1#2 { T , F , TF }
{
- \cs_set_protected:Npn \clist_tmp:w ##1 , #2 , ##2##3 \q_stop
- {
- \if_meaning:w \q_no_value ##2
- \prg_return_false:
- \else:
- \prg_return_true:
- \fi:
- }
- \exp_last_unbraced:NNo \clist_tmp:w , #1 , #2 , \q_no_value \q_stop
+ \exp_args:No \clist_if_in_return:nn #1 {#2}
}
-\prg_new_protected_conditional:Npnn \clist_if_in:nn #1#2
- { T , F , TF }
+\prg_new_protected_conditional:Npnn \clist_if_in:nn #1#2 { T , F , TF }
{
- \cs_set_protected:Npn \clist_tmp:w ##1 , #2 , ##2##3 \q_stop
- {
- \if_meaning:w \q_no_value ##2
- \prg_return_false:
- \else:
- \prg_return_true:
- \fi:
- }
- \clist_tmp:w , #1 , #2 , \q_no_value \q_stop
+ \clist_set:Nn \l_clist_if_in_clist {#1}
+ \exp_args:No \clist_if_in_return:nn \l_clist_if_in_clist {#2}
+ }
+\cs_new_protected:Npn \clist_if_in_return:nn #1#2
+ {
+ \cs_set:Npn \clist_tmp:w ##1 ,#2, { }
+ \tl_if_empty:oTF
+ { \clist_tmp:w ,#1, {} {} ,#2, }
+ { \prg_return_false: } { \prg_return_true: }
}
\cs_generate_variant:Nn \clist_if_in:NnT { NV , No }
\cs_generate_variant:Nn \clist_if_in:NnT { c , cV , co }
@@ -1173,6 +1245,7 @@
\cs_generate_variant:Nn \clist_if_in:nnTF { nV , no }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \subsection{Mapping to comma lists}
%
@@ -1182,6 +1255,8 @@
% \UnitTested
% \begin{macro}[aux]{\clist_map_function_aux:Nw}
% Mapping to comma lists is pretty simple, if not massively efficient.
+% The auxiliary function \cs{clist_map_function_aux:Nw} is used
+% directly in \cs{clist_length:n}. Change with care.
% \begin{macrocode}
\cs_new_nopar:Npn \clist_map_function:NN #1#2
{
@@ -1316,7 +1391,7 @@
% \begin{macro}{\clist_map_break:}
% \UnitTested
% \begin{macro}{\clist_map_break:n}
-% Both are simple renaming.^^A todo: fix \clist_map_break:n (cf. seq).
+% Both are simple renaming.
% \begin{macrocode}
\cs_new_eq:NN \clist_map_break: \use_none_delimit_by_q_recursion_stop:w
\cs_new_eq:NN \clist_map_break:n \use_i_delimit_by_q_recursion_stop:nw
@@ -1367,6 +1442,20 @@
% \end{macro}
% \end{macro}
%
+% \subsection{Scratch comma lists}
+%
+% \begin{variable}{\l_tmpa_clist, \l_tmpb_clist}
+% \begin{variable}{\g_tmpa_tl, \g_tmpb_tl}
+% Temporary comma list variables.
+% \begin{macrocode}
+\clist_new:N \l_tmpa_clist
+\clist_new:N \l_tmpb_clist
+\clist_new:N \g_tmpa_clist
+\clist_new:N \g_tmpb_clist
+% \end{macrocode}
+% \end{variable}
+% \end{variable}
+%
% \subsection{Experimental functions}
%
% \begin{macro}{\clist_length:N, \clist_length:c}
@@ -1375,7 +1464,11 @@
% Counting the items in a comma list is done using the same approach as for
% other length functions: turn each entry into a \texttt{+1} then use
% integer evaluation to actually do the mathematics.
-%^^A todo: make a faster version avoiding \clist_map_function:nN?
+% In the case of an \texttt{n}-type comma-list, we could of course use
+% \cs{clist_map_function:nN}, but that is very slow, because it carefully
+% removes spaces. Instead, we call \cs{clist_map_function_aux:Nw}
+% directly, and test for each item whether it is blank (hence should
+% be ignored).
% \begin{macrocode}
\cs_new:Npn \clist_length:N #1
{
@@ -1385,15 +1478,17 @@
\clist_map_function:NN #1 \clist_length_aux:n
}
}
+\cs_new:Npn \clist_length_aux:n #1 { +1 }
\cs_new:Npn \clist_length:n #1
{
\int_eval:n
{
0
- \clist_map_function:nN {#1} \clist_length_aux:n
+ \clist_map_function_aux:Nw \clist_length_n_aux:n #1
+ , \q_recursion_tail , \q_recursion_stop
}
}
-\cs_new:Npn \clist_length_aux:n #1 { +1 }
+\cs_new:Npn \clist_length_n_aux:n #1 { \tl_if_blank:nF {#1} {+1} }
\cs_generate_variant:Nn \clist_length:N { c }
% \end{macrocode}
% \end{macro}
@@ -1401,35 +1496,44 @@
% \end{macro}
%
% \begin{macro}{\clist_item:Nn, \clist_item:cn}
-% \begin{macro}{\clist_item:nn}
-% \begin{macro}[aux]{\clist_item_aux:nnn}
-% The idea here is to find the offset of the item from the left, then use
-% a loop to grab the correct item. If the resulting offset is too large,
-% then \cs{quark_if_recursion_stop:n} will be true,
-% terminating the loop and returning nothing at all.
+% \begin{macro}[aux]{\clist_item_aux:nnNn}
+% \begin{macro}[aux]{\clist_item_N_loop:nw}
+% To avoid needing to test the end of the list at each step,
+% we first compute the \meta{length} of the list. If the item number
+% is less than $-\meta{length}$ or more than $\meta{length}-1$,
+% the result is empty. If it is negative, but not less than $-\meta{length}$,
+% add the \meta{length} to the item number before performing the loop.
+% The loop itself is very simple, return the item if the counter
+% reached zero, otherwise, decrease the counter and repeat.
% \begin{macrocode}
-\cs_set_nopar:Npn \clist_item:Nn #1#2
- { \exp_args:No \clist_item:nn #1 {#2} }
-\cs_set:Npn \clist_item:nn #1#2
+\cs_new:Npn \clist_item:Nn #1#2
{
- \int_compare:nNnTF {#2} < \c_zero
+ \exp_args:Nfo \clist_item_aux:nnNn
+ { \clist_length:N #1 }
+ #1
+ \clist_item_N_loop:nw
+ {#2}
+ }
+\cs_new:Npn \clist_item_aux:nnNn #1#2#3#4
+ {
+ \int_compare:nNnTF {#4} < \c_zero
+ {
+ \int_compare:nNnTF {#4} < { - #1 }
+ { \use_none_delimit_by_q_stop:w }
+ { \exp_args:Nf #3 { \int_eval:n { #4 + #1 } } }
+ }
{
- \exp_args:Nf \clist_item_aux:nw
- { \int_eval:n { \clist_length:n {#1} + #2 } }
- #1 , \q_recursion_tail \q_recursion_stop
+ \int_compare:nNnTF {#4} < {#1}
+ { #3 {#4} }
+ { \use_none_delimit_by_q_stop:w }
}
- { \clist_item_aux:nw {#2} #1 , \q_recursion_tail \q_recursion_stop }
+ #2, \q_stop
}
-\cs_set:Npn \clist_item_aux:nw #1#2 , #3
+\cs_new:Npn \clist_item_N_loop:nw #1 #2,
{
\int_compare:nNnTF {#1} = \c_zero
- { \use_i_delimit_by_q_recursion_stop:nw {#2} }
- {
- \quark_if_recursion_tail_stop:n {#3}
- \exp_args:Nf \clist_item_aux:nw
- { \int_eval:n { #1 - 1 } }
- #3
- }
+ { \use_i_delimit_by_q_stop:nw {#2} }
+ { \exp_args:Nf \clist_item_N_loop:nw { \int_eval:n { #1 - 1 } } }
}
\cs_generate_variant:Nn \clist_item:Nn { c }
% \end{macrocode}
@@ -1437,6 +1541,51 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\clist_item:nn}
+% \begin{macro}[aux]{
+% \clist_item_n_aux:nw,
+% \clist_item_n_loop:nw,
+% \clist_item_n_end:n,
+% \clist_item_n_strip:w}
+% This starts in the same way as \cs{clist_item:Nn} by checking the length
+% of the comma list. The final item should be space-trimmed before being
+% brace-stripped, hence we insert a couple of odd-looking
+% \cs{prg_do_nothing:} to avoid losing braces. Blank items are ignored.
+% \begin{macrocode}
+\cs_new:Npn \clist_item:nn #1#2
+ {
+ \exp_args:Nf \clist_item_aux:nnNn
+ { \clist_length:n {#1} }
+ {#1}
+ \clist_item_n_aux:nw
+ {#2}
+ }
+\cs_new:Npn \clist_item_n_aux:nw #1
+ { \clist_item_n_loop:nw {#1} \prg_do_nothing: }
+\cs_new:Npn \clist_item_n_loop:nw #1 #2,
+ {
+ \exp_args:No \tl_if_blank:nTF {#2}
+ { \clist_item_n_loop:nw {#1} \prg_do_nothing: }
+ {
+ \int_compare:nNnTF {#1} = \c_zero
+ { \exp_args:No \clist_item_n_end:n {#2} }
+ {
+ \exp_args:Nf \clist_item_n_loop:nw
+ { \int_eval:n { #1 - 1 } }
+ \prg_do_nothing:
+ }
+ }
+ }
+\cs_new:Npn \clist_item_n_end:n #1 #2 \q_stop
+ {
+ \exp_after:wN \exp_after:wN \exp_after:wN \clist_item_n_strip:w
+ \tl_trim_spaces:n {#1} ,
+ }
+\cs_new:Npn \clist_item_n_strip:w #1 , {#1}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}
% {
% \clist_set_from_seq:NN, \clist_set_from_seq:cN,
@@ -1450,31 +1599,31 @@
% }
% \UnitTested
% Setting a comma list from a comma-separated list is done using a simple
-% mapping. We wrap each item with braces, \cs{exp_not:n}, and a comma. The
+% mapping. We wrap most items with \cs{exp_not:n}, and a comma. Items which
+% contain a comma or a space are surrounded by an extra set of braces. The
% first comma must be removed, except in the case of an empty comma-list.
% \begin{macrocode}
-\cs_new_protected:Npn \clist_set_from_seq:NN #1#2
- {
- \seq_if_empty:NTF #2
- { \clist_clear:N #1 }
- {
- \seq_push_item_def:n { , \exp_not:n {{##1}} }
- \tl_set:Nx #1
- { \exp_after:wN \use_none:n \tex_romannumeral:D -`\0 #2 }
- \seq_pop_item_def:
- }
- }
-\cs_new_protected:Npn \clist_gset_from_seq:NN #1#2
+\cs_new_protected:Npn \clist_set_from_seq:NN
+ { \clist_set_from_seq_aux:NNNN \clist_clear:N \tl_set:Nx }
+\cs_new_protected:Npn \clist_gset_from_seq:NN
+ { \clist_set_from_seq_aux:NNNN \clist_gclear:N \tl_gset:Nx }
+\cs_new_protected:Npn \clist_set_from_seq_aux:NNNN #1#2#3#4
{
- \seq_if_empty:NTF #2
- { \clist_gclear:N #1 }
+ \seq_if_empty:NTF #4
+ { #1 #3 }
{
- \seq_push_item_def:n { , \exp_not:n {{##1}} }
- \tl_gset:Nx #1
- { \exp_after:wN \use_none:n \tex_romannumeral:D -`\0 #2 }
+ \seq_push_item_def:n
+ {
+ ,
+ \tl_if_empty:oTF { \clist_set_from_seq_aux:w ##1 ~ , ##1 ~ }
+ { \exp_not:n {##1} }
+ { \exp_not:n { {##1} } }
+ }
+ #2 #3 { \exp_last_unbraced:Nf \use_none:n #4 }
\seq_pop_item_def:
}
}
+\cs_new:Npn \clist_set_from_seq_aux:w #1 , #2 ~ { }
\cs_generate_variant:Nn \clist_set_from_seq:NN { Nc }
\cs_generate_variant:Nn \clist_set_from_seq:NN { c , cc }
\cs_generate_variant:Nn \clist_gset_from_seq:NN { Nc }
@@ -1491,8 +1640,10 @@
% \UnitTested
% These are old stack functions.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \clist_top:NN \clist_get:NN
\cs_new_eq:NN \clist_top:cN \clist_get:cN
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
@@ -1500,20 +1651,24 @@
% \UnitTested
% An older name for \cs{clist_remove_all:Nn}.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \clist_remove_element:Nn \clist_remove_all:Nn
\cs_new_eq:NN \clist_gremove_element:Nn \clist_gremove_all:Nn
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\clist_display:N, \clist_display:c}
% An older name for \cs{clist_show:N}.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \clist_display:N \clist_show:N
\cs_new_eq:NN \clist_display:c \clist_show:c
+%</deprecated>
% \end{macrocode}
% \end{macro}
-%
-% Deprecated on 2011-09-05, for removal by 2012-09-04.
+%
+% Deprecated on 2011-09-05, for removal by 2011-12-32.
%
% \begin{macro}
% {
@@ -1522,21 +1677,20 @@
% }
% Since clist items are now always stripped from their surrounding
% spaces, it is redundant to provide these functions.
+% The \cs{clist_trim_spaces:n} function is now internal,
+% deprecated for use outside the kernel.
% \begin{macrocode}
-\cs_new_protected:Npn \clist_trim_spaces:N #1
- { \tl_set:Nx #1 { \exp_args:No \clist_trim_spaces:n #1 } }
-\cs_new_protected:Npn \clist_gtrim_spaces:N #1
- { \tl_gset:Nx #1 { \exp_args:No \clist_trim_spaces:n #1 } }
+\cs_new_protected:Npn \clist_trim_spaces:N #1 { \clist_set:No #1 {#1} }
+\cs_new_protected:Npn \clist_gtrim_spaces:N #1 { \clist_gset:No #1 {#1} }
\cs_generate_variant:Nn \clist_trim_spaces:N { c }
\cs_generate_variant:Nn \clist_gtrim_spaces:N { c }
% \end{macrocode}
% \end{macro}
%
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
%
% \end{implementation}
%
-% \PrintIndex \ No newline at end of file
+% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
index 8feef032c77..197f62c3960 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
@@ -1,5 +1,5 @@
% \iffalse meta-comment
-%
+%
%% File: l3coffins.dtx Copyright(C) 2010,2011 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3coffins.dtx 2717 2011-09-03 13:40:31Z joseph $
+\GetIdInfo$Id: l3coffins.dtx 2814 2011-09-12 12:56:08Z joseph $
{L3 Experimental coffin code layer}
%</driver|package>
%<*driver>
@@ -46,13 +46,13 @@
\end{document}
%</driver>
% \fi
-%
+%
% \title{^^A
% The \textsf{l3coffins} package\\ Coffin code layer^^A
% \thanks{This file describes v\ExplFileVersion,
% last revised \ExplFileDate.}^^A
% }
-%
+%
% \author{^^A
% The \LaTeX3 Project\thanks
% {^^A
@@ -73,17 +73,17 @@
% the \pkg{xcoffins} module (in the \pkg{l3experimental} bundle).
%
% \section{Creating and initialising coffins}
-%
-% \begin{function}{\coffin_new:N, \coffin_new:c}
+%
+% \begin{function}[added = 2011-08-17]{\coffin_new:N, \coffin_new:c}
% \begin{syntax}
% \cs{coffin_new:N} \meta{coffin}
% \end{syntax}
% Creates a new \meta{coffin} or raises an error if the name is
-% already taken. The declaration is global. The \meta{coffin} will
+% already taken. The declaration is global. The \meta{coffin} will
% initially be empty.
% \end{function}
%
-% \begin{function}{\coffin_clear:N, \coffin_clear:c}
+% \begin{function}[added = 2011-08-17]{\coffin_clear:N, \coffin_clear:c}
% \begin{syntax}
% \cs{coffin_clear:N} \meta{coffin}
% \end{syntax}
@@ -91,7 +91,7 @@
% group level.
% \end{function}
%
-%\begin{function}
+% \begin{function}[added = 2011-08-17]
% {\coffin_set_eq:NN, \coffin_set_eq:Nc, \coffin_set_eq:cN, \coffin_set_eq:cc}
% \begin{syntax}
% \cs{coffin_set_eq:NN} \meta{coffin1} \meta{coffin2}
@@ -99,10 +99,14 @@
% Sets both the content and poles of \meta{coffin1} equal to those
% of \meta{coffin2} within the current \TeX\ group level.
% \end{function}
-%
+%
% \section{Setting coffin content and poles}
%
-% \begin{function}{\hcoffin_set:Nn, \hcoffin_set:cn}
+% All coffin functions create and manipulate coffins locally within the
+% current \TeX\ group level.
+%
+% \begin{function}[added = 2011-08-17, updated = 2011-09-03]
+% {\hcoffin_set:Nn, \hcoffin_set:cn}
% \begin{syntax}
% \cs{hcoffin_set:Nn} \meta{coffin} \Arg{material}
% \end{syntax}
@@ -111,100 +115,125 @@
% then set up based on the size of the typeset material.
% \end{function}
%
-% \begin{function}{\vcoffin_set:Nnn, \vcoffin_set:cnn}
+% \begin{function}[added = 2011-09-10]
+% {\hcoffin_set:Nw, \hcoffin_set:cw, \hcoffin_set_end:}
+% \begin{syntax}
+% \cs{hcoffin_set:Nw} \meta{coffin} \Arg{material} \cs{hcoffin_set_end:}
+% \end{syntax}
+% Typesets the \meta{material} in horizontal mode, storing the result
+% in the \meta{coffin}. The standard poles for the \meta{coffin} are
+% then set up based on the size of the typeset material.
+% These functions are useful for setting the entire contents of an
+% environment in a coffin.
+% \end{function}
+%
+% \begin{function}[added = 2011-08-17, updated = 2011-09-03
+% ]{\vcoffin_set:Nnn, \vcoffin_set:cnn}
% \begin{syntax}
% \cs{vcoffin_set:Nnn} \meta{coffin} \Arg{width} \Arg{material}
% \end{syntax}
% Typesets the \meta{material} in vertical mode constrained to the
% given \meta{width} and stores the result in the \meta{coffin}. The
-% standard poles for the \meta{coffin} are then set up based on the
+% standard poles for the \meta{coffin} are then set up based on the
% size of the typeset material.
% \end{function}
%
-% \begin{function}
+% \begin{function}[added = 2011-09-10]
+% {\vcoffin_set:Nnw, \vcoffin_set:cnw, \vcoffin_set_end:}
+% \begin{syntax}
+% \cs{vcoffin_set:Nnw} \meta{coffin} \Arg{width} \Arg{material} \cs{vcoffin_set_end:}
+% \end{syntax}
+% Typesets the \meta{material} in vertical mode constrained to the
+% given \meta{width} and stores the result in the \meta{coffin}. The
+% standard poles for the \meta{coffin} are then set up based on the
+% size of the typeset material.
+% These functions are useful for setting the entire contents of an
+% environment in a coffin.
+% \end{function}
+%
+% \begin{function}[added = 2011-08-17]
% {\coffin_set_horizontal_pole:Nnn, \coffin_set_horizontal_pole:cnn}
% \begin{syntax}
-% \cs{coffin_set_horizontal_pole:Nnn} \meta{coffin}
+% \cs{coffin_set_horizontal_pole:Nnn} \meta{coffin}
% ~~\Arg{pole} \Arg{offset}
% \end{syntax}
% Sets the \meta{pole} to run horizontally through the \meta{coffin}.
% The \meta{pole} will be located at the \meta{offset} from the
% bottom edge of the bounding box of the \meta{coffin}. The
% \meta{offset} should be given as a dimension expression; this may
-% include the terms \cs{TotalHeight}, \cs{Height}, \cs{Depth} and
-% \cs{Width}, which will evaluate to the appropriate dimensions of
+% include the terms \cs{TotalHeight}, \cs{Height}, \cs{Depth} and
+% \cs{Width}, which will evaluate to the appropriate dimensions of
% the \meta{coffin}.
% \end{function}
%
-% \begin{function}
+% \begin{function}[added = 2011-08-17]
% {\coffin_set_vertical_pole:Nnn, \coffin_set_vertical_pole:cnn}
% \begin{syntax}
-% \cs{coffin_set_vertical_pole:Nnn} \meta{coffin}
-% ~~\Arg{pole} \Arg{offset}
+% \cs{coffin_set_vertical_pole:Nnn} \meta{coffin} \Arg{pole} \Arg{offset}
% \end{syntax}
% Sets the \meta{pole} to run vertically through the \meta{coffin}.
% The \meta{pole} will be located at the \meta{offset} from the
% left-hand edge of the bounding box of the \meta{coffin}. The
% \meta{offset} should be given as a dimension expression; this may
-% include the terms \cs{TotalHeight}, \cs{Height}, \cs{Depth} and
-% \cs{Width}, which will evaluate to the appropriate dimensions of
+% include the terms \cs{TotalHeight}, \cs{Height}, \cs{Depth} and
+% \cs{Width}, which will evaluate to the appropriate dimensions of
% the \meta{coffin}.
% \end{function}
-%
+%
% \section{Coffin transformations}
-%
-% \begin{function}{\coffin_resize:Nnn, \coffin_resize:cnn}
+%
+% \begin{function}[added = 2011-09-02]{\coffin_resize:Nnn, \coffin_resize:cnn}
% \begin{syntax}
% \cs{coffin_resize:Nnn} \meta{coffin} \Arg{width} \Arg{total-height}
% \end{syntax}
% Resized the \meta{coffin} to \meta{width} and \meta{total-height},
% both of which should be given as dimension expressions. These may
-% include the terms \cs{TotalHeight}, \cs{Height}, \cs{Depth} and
-% \cs{Width}, which will evaluate to the appropriate dimensions of
+% include the terms \cs{TotalHeight}, \cs{Height}, \cs{Depth} and
+% \cs{Width}, which will evaluate to the appropriate dimensions of
% the \meta{coffin}.
-%
+%
% \textbf{This function is experimental.}
% \end{function}
-%
-% \begin{function}{\coffin_rotate:Nn, \coffin_rotate:cn}
+%
+% \begin{function}[added = 2011-09-02]{\coffin_rotate:Nn, \coffin_rotate:cn}
% \begin{syntax}
% \cs{coffin_rotate:Nn} \meta{coffin} \Arg{angle}
% \end{syntax}
% Rotates the \meta{coffin} by the given \meta{angle} (given in
% degrees counter-clockwise). This process will rotate both the
-% coffin content and poles. Multiple rotations will not result in
+% coffin content and poles. Multiple rotations will not result in
% the bounding box of the coffin growing unnecessarily.
% \end{function}
%
-% \begin{function}{\coffin_scale:Nnn, \coffin_scale:cnn}
+% \begin{function}[added = 2011-09-02]{\coffin_scale:Nnn, \coffin_scale:cnn}
% \begin{syntax}
% \cs{coffin_scale:Nnn} \meta{coffin} \Arg{x-scale} \Arg{y-scale}
% \end{syntax}
-% Scales the \meta{coffin} by a factors \meta{x-scale} and
-% \meta{y-scale} in the horizontal and vertical directions,
+% Scales the \meta{coffin} by a factors \meta{x-scale} and
+% \meta{y-scale} in the horizontal and vertical directions,
% respectively. The two scale factors should be given as real numbers.
-%
+%
% \textbf{This function is experimental.}
% \end{function}
%
% \section{Joining and using coffins}
%
% \begin{function}
-% {
+% {
% \coffin_attach:NnnNnnnn, \coffin_attach:cnnNnnnn,
% \coffin_attach:Nnncnnnn, \coffin_attach:cnncnnnn
% }
% \begin{syntax}
-% \cs{coffin_attach:NnnNnnnn}
+% \cs{coffin_attach:NnnNnnnn}
% ~~\meta{coffin1} \Arg{coffin1-pole1} \Arg{coffin1-pole2}
% ~~\meta{coffin2} \Arg{coffin2-pole1} \Arg{coffin2-pole2}
% ~~\Arg{x-offset} \Arg{y-offset}
% \end{syntax}
-% This function carries out alignment such that the bounding box
+% This function attaches <coffin2> to <coffin1> such that the bounding box
% of \meta{coffin1} is not altered, \emph{i.e.}~\meta{coffin2} can
-% protrude outside of the bounding box of the coffin. The alignment
+% protrude outside of the bounding box of the coffin. The alignment
% is carried out by first calculating \meta{handle1}, the
-% point of intersection of \meta{coffin1-pole1} and
+% point of intersection of \meta{coffin1-pole1} and
% \meta{coffin1-pole2}, and \meta{handle2}, the point of intersection
% of \meta{coffin2-pole1} and \meta{coffin2-pole2}. \meta{coffin2} is
% then attached to \meta{coffin1} such that the relationship between
@@ -214,19 +243,19 @@
% \end{function}
%
% \begin{function}
-% {
+% {
% \coffin_join:NnnNnnnn, \coffin_join:cnnNnnnn,
% \coffin_join:Nnncnnnn, \coffin_join:cnncnnnn
% }
% \begin{syntax}
-% \cs{coffin_join:NnnNnnnn}
+% \cs{coffin_join:NnnNnnnn}
% ~~\meta{coffin1} \Arg{coffin1-pole1} \Arg{coffin1-pole2}
% ~~\meta{coffin2} \Arg{coffin2-pole1} \Arg{coffin2-pole2}
% ~~\Arg{x-offset} \Arg{y-offset}
% \end{syntax}
-% This function carries out alignment such that the bounding box
-% of \meta{coffin1} after the process will expand. The new bounding
-% box will cover the area contain the bounding boxes of the two
+% This function joins <coffin2> to <coffin1> such that the bounding box
+% of \meta{coffin1} may expand. The new bounding
+% box will cover the area containing the bounding boxes of the two
% original coffins. The alignment is carried out by first calculating
% \meta{handle1}, the point of intersection of \meta{coffin1-pole1} and
% \meta{coffin1-pole2}, and \meta{handle2}, the point of intersection
@@ -244,37 +273,38 @@
% \end{syntax}
% Typesetting is carried out by first calculating \meta{handle}, the
% point of intersection of \meta{pole1} and \meta{pole2}. The coffin
-% is then typeset such that the relationship between the current
+% is then typeset such that the relationship between the current
% reference point in the document and the \meta{handle} is described
-% by the \meta{x-offset} and \meta{y-offset}. The two offsets should
-% be given as dimension expressions. Typesetting a coffin is
-% therefore analogous to carrying out an alignment where the
+% by the \meta{x-offset} and \meta{y-offset}. The two offsets should
+% be given as dimension expressions. Typesetting a coffin is
+% therefore analogous to carrying out an alignment where the
% \enquote{parent} coffin is the current insertion point.
% \end{function}
-%
+%
% \section{Coffin diagnostics}
%
-% \begin{function}{\coffin_display_handles:cn, \coffin_display_handles:cn}
+% \begin{function}[updated = 2011-09-02]
+% {\coffin_display_handles:cn, \coffin_display_handles:cn}
% \begin{syntax}
% \cs{coffin_display_handles:Nn} \meta{coffin} \Arg{colour}
% \end{syntax}
% This function first calculates the intersections between all of
-% the \meta{poles} of the \meta{coffin} to give a set of
-% \meta{handles}. It then prints the \meta{coffin} at the current
-% location in the source, with the position of the \meta{handles}
-% marked on the coffin. The \meta{handles} will be labelled as part
-% of this process: the locations of the \meta{handles} and the labels
+% the \meta{poles} of the \meta{coffin} to give a set of
+% \meta{handles}. It then prints the \meta{coffin} at the current
+% location in the source, with the position of the \meta{handles}
+% marked on the coffin. The \meta{handles} will be labelled as part
+% of this process: the locations of the \meta{handles} and the labels
% are both printed in the \meta{colour} specified.
% \end{function}
%
-% \begin{function}{\coffin_mark_handle:Nnnn, \coffin_mark_handle:cnnn}
+% \begin{function}[updated = 2011-09-02]
+% {\coffin_mark_handle:Nnnn, \coffin_mark_handle:cnnn}
% \begin{syntax}
-% \cs{coffin_mark_handle:Nnnn} \meta{coffin} \Arg{pole1} \Arg{pole2}
-% ~~\Arg{colour}
+% \cs{coffin_mark_handle:Nnnn} \meta{coffin} \Arg{pole1} \Arg{pole2} \Arg{colour}
% \end{syntax}
-% This function first calculates the \meta{handle} for the
+% This function first calculates the \meta{handle} for the
% \meta{coffin} as defined by the intersection of \meta{pole1} and
-% \meta{pole2}. It then marks the position of the \meta{handle}
+% \meta{pole2}. It then marks the position of the \meta{handle}
% on the \meta{coffin}. The \meta{handle} will be labelled as part of
% this process: the location of the \meta{handle} and the label are
% both printed in the \meta{colour} specified.
@@ -285,13 +315,13 @@
% \cs{coffin_show_structure:N} \meta{coffin}
% \end{syntax}
% This function shows the structural information about the
-% \meta{coffin} in the terminal. The width, height and depth of the
-% typeset material are given, along with the location of all of the
-% poles of the coffin.
-%
+% \meta{coffin} in the terminal. The width, height and depth of the
+% typeset material are given, along with the location of all of the
+% poles of the coffin.
+%
% Notice that the poles of a coffin are defined by four values:
-% the $x$ and $y$ co-ordinates of a point that the pole
-% passes through and the $x$- and $y$-components of a
+% the $x$ and $y$ co-ordinates of a point that the pole
+% passes through and the $x$- and $y$-components of a
% vector denoting the direction of the pole. It is the ratio between
% the later, rather than the absolute values, which determines the
% direction of the pole.
@@ -302,11 +332,11 @@
% \begin{implementation}
%
% \section{\pkg{l3coffins} Implementation}
-%
+%
% \begin{macrocode}
%<*initex|package>
% \end{macrocode}
-%
+%
% \begin{macrocode}
%<*package>
\ProvidesExplPackage
@@ -334,7 +364,7 @@
% \end{variable}
%
% \begin{variable}{\c_coffin_corners_prop}
-% The \enquote{corners}; of a coffin define the real content, as
+% The \enquote{corners}; of a coffin define the real content, as
% opposed to the \TeX{} bounding box. They all start off in the same
% place, of course.
% \begin{macrocode}
@@ -345,7 +375,7 @@
\prop_put:Nnn \c_coffin_corners_prop { br } { { 0 pt } { 0 pt } }
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}{\c_coffin_poles_prop}
% Pole positions are given for horizontal, vertical and reference-point
% based values.
@@ -443,7 +473,7 @@
% \begin{variable}{\l_coffin_y_fp}
% \begin{variable}{\l_coffin_x_prime_fp}
% \begin{variable}{\l_coffin_y_prime_fp}
-% Used for calculations where there are clear $x$- and
+% Used for calculations where there are clear $x$- and
% $y$-components, for example during vector rotation.
% \begin{macrocode}
\fp_new:N \l_coffin_x_fp
@@ -507,7 +537,7 @@
{
\cs_if_exist:cTF { l_coffin_poles_ \int_value:w #1 _prop }
{ #2 }
- {
+ {
\msg_kernel_error:nnx { coffins } { unknown-coffin }
{ \token_to_str:N #1 }
}
@@ -519,7 +549,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\coffin_clear:N, \coffin_clear:c}
% Clearing coffins means emptying the box and resetting all of the
% structures.
@@ -535,22 +565,22 @@
\cs_generate_variant:Nn \coffin_clear:N { c }
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\coffin_new:N, \coffin_new:c}
% Creating a new coffin means making the underlying box and adding the
% data structures. These are created globally, as there is a need to
% avoid any strange effects if the coffin is created inside a group.
% This means that the usual rule about \cs{l_\ldots} variables has
-% to be broken.
+% to be broken.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_new:N #1
{
\box_new:N #1
\prop_clear_new:c { l_coffin_corners_ \int_value:w #1 _prop }
\prop_clear_new:c { l_coffin_poles_ \int_value:w #1 _prop }
- \prop_gset_eq:cN { l_coffin_corners_ \int_value:w #1 _prop }
+ \prop_gset_eq:cN { l_coffin_corners_ \int_value:w #1 _prop }
\c_coffin_corners_prop
- \prop_gset_eq:cN { l_coffin_poles_ \int_value:w #1 _prop }
+ \prop_gset_eq:cN { l_coffin_poles_ \int_value:w #1 _prop }
\c_coffin_poles_prop
}
\cs_generate_variant:Nn \coffin_new:N { c }
@@ -565,12 +595,12 @@
{
\coffin_if_exist:NT #1
{
- \hbox_set:Nn #1
- {
+ \hbox_set:Nn #1
+ {
\color_group_begin:
\color_ensure_current:
- #2
- \color_group_end:
+ #2
+ \color_group_end:
}
\coffin_reset_structure:N #1
\coffin_update_poles:N #1
@@ -582,23 +612,23 @@
% \end{macro}
%
% \begin{macro}{\vcoffin_set:Nnn, \vcoffin_set:cnn}
-% Setting vertical coffins is more complex. First, the material is
+% Setting vertical coffins is more complex. First, the material is
% typeset with a given width. The default handles and poles are set as
-% for a horizontal coffin, before finding the top baseline using a
+% for a horizontal coffin, before finding the top baseline using a
% temporary box.
% \begin{macrocode}
\cs_new_protected:Npn \vcoffin_set:Nnn #1#2#3
{
\coffin_if_exist:NT #1
{
- \vbox_set:Nn #1
+ \vbox_set:Nn #1
{
\dim_set:Nn \tex_hsize:D {#2}
\color_group_begin:
\color_ensure_current:
- #3
- \color_group_end:
- }
+ #3
+ \color_group_end:
+ }
\coffin_reset_structure:N #1
\coffin_update_poles:N #1
\coffin_update_corners:N #1
@@ -617,6 +647,70 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\hcoffin_set:Nw, \hcoffin_set:cw}
+% \begin{macro}{\hcoffin_set_end:}
+% These are the \enquote{begin}/\enquote{end} versions of the above:
+% watch the grouping!
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \hcoffin_set:Nw #1
+ {
+ \coffin_if_exist:NT #1
+ {
+ \hbox_set:Nw #1 \color_group_begin: \color_ensure_current:
+ \cs_set_protected_nopar:Npn \hcoffin_set_end:
+ {
+ \color_group_end:
+ \hbox_set_end:
+ \coffin_reset_structure:N #1
+ \coffin_update_poles:N #1
+ \coffin_update_corners:N #1
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \hcoffin_set_end: { }
+\cs_generate_variant:Nn \hcoffin_set:Nw { c }
+% \end{macrocode}
+%
+% \end{macro}\end{macro}
+%
+% \begin{macro}{\vcoffin_set:Nnw, \vcoffin_set:cnw}
+% \begin{macro}{\vcoffin_set_end:}
+% The same for vertical coffins.
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \vcoffin_set:Nnw #1#2
+ {
+ \coffin_if_exist:NT #1
+ {
+ \vbox_set:Nw #1
+ \dim_set:Nn \tex_hsize:D {#2}
+ \color_group_begin: \color_ensure_current:
+ \cs_set_protected:Npn \vcoffin_set_end:
+ {
+ \color_group_end:
+ \vbox_set_end:
+ \coffin_reset_structure:N #1
+ \coffin_update_poles:N #1
+ \coffin_update_corners:N #1
+ \vbox_set_top:Nn \l_coffin_tmp_box { \vbox_unpack:N #1 }
+ \coffin_set_pole:Nnx #1 { T }
+ {
+ { 0 pt }
+ {
+ \dim_eval:n { \box_ht:N #1 - \box_ht:N \l_coffin_tmp_box }
+ }
+ { 1000 pt }
+ { 0 pt }
+ }
+ \box_clear:N \l_coffin_tmp_box
+ }
+ }
+ }
+\cs_new_protected_nopar:Npn \vcoffin_set_end: { }
+\cs_generate_variant:Nn \vcoffin_set:Nnw { c }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}
% {
% \coffin_set_eq:NN, \coffin_set_eq:Nc,
@@ -655,14 +749,14 @@
% \subsection{Coffins: handle and pole management}
%
% \begin{macro}{\coffin_get_pole:NnN}
-% A simple wrapper around the recovery of a coffin pole, with some
+% A simple wrapper around the recovery of a coffin pole, with some
% error checking and recovery built-in.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_get_pole:NnN #1#2#3
{
\prop_get:cnNF
{ l_coffin_poles_ \int_value:w #1 _prop } {#2} #3
- {
+ {
\msg_kernel_error:nnxx { coffins } { unknown-coffin-pole }
{#2} { \token_to_str:N #1 }
\tl_set:Nn #3 { { 0 pt } { 0 pt } { 0 pt } { 0 pt } }
@@ -676,15 +770,15 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_reset_structure:N #1
{
- \prop_set_eq:cN { l_coffin_corners_ \int_value:w #1 _prop }
+ \prop_set_eq:cN { l_coffin_corners_ \int_value:w #1 _prop }
\c_coffin_corners_prop
- \prop_set_eq:cN { l_coffin_poles_ \int_value:w #1 _prop }
+ \prop_set_eq:cN { l_coffin_poles_ \int_value:w #1 _prop }
\c_coffin_poles_prop
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\coffin_set_eq_structure:NN}
+% \begin{macro}{\coffin_set_eq_structure:NN,\coffin_gset_eq_structure:NN}
% Setting coffin structures equal simply means copying the property
% list.
% \begin{macrocode}
@@ -695,6 +789,13 @@
\prop_set_eq:cc { l_coffin_poles_ \int_value:w #1 _prop }
{ l_coffin_poles_ \int_value:w #2 _prop }
}
+\cs_new_protected_nopar:Npn \coffin_gset_eq_structure:NN #1#2
+ {
+ \prop_gset_eq:cc { l_coffin_corners_ \int_value:w #1 _prop }
+ { l_coffin_corners_ \int_value:w #2 _prop }
+ \prop_gset_eq:cc { l_coffin_poles_ \int_value:w #1 _prop }
+ { l_coffin_poles_ \int_value:w #2 _prop }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -741,7 +842,7 @@
% {\coffin_set_horizontal_pole:Nnn, \coffin_set_horizontal_pole:cnn}
% \begin{macro}{\coffin_set_vertical_pole:Nnn,\coffin_set_vertical_pole:cnn}
% \begin{macro}{\coffin_set_pole:Nnn, \coffin_set_pole:Nnx}
-% Setting the pole of a coffin at the user/designer level requires a
+% Setting the pole of a coffin at the user/designer level requires a
% bit more care. The idea here is to provide a reasonable interface to
% the system, then to do the setting with full expansion. The
% three-argument version is used internally to do a direct setting.
@@ -754,7 +855,7 @@
\coffin_set_pole:Nnx #1 {#2}
{
{ 0 pt } { \dim_eval:n {#3} }
- { 1000 pt } { 0 pt }
+ { 1000 pt } { 0 pt }
}
\coffin_end_user_dimensions:
}
@@ -766,7 +867,7 @@
\coffin_set_user_dimensions:N #1
\coffin_set_pole:Nnx #1 {#2}
{
- { \dim_eval:n {#3} } { 0 pt }
+ { \dim_eval:n {#3} } { 0 pt }
{ 0 pt } { 1000 pt }
}
\coffin_end_user_dimensions:
@@ -795,7 +896,7 @@
{ { \dim_use:N \box_wd:N #1 } { \dim_use:N \box_ht:N #1 } }
\prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } { bl }
{ { 0 pt } { \dim_eval:n { - \box_dp:N #1 } } }
- \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } { br }
+ \prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } { br }
{ { \dim_use:N \box_wd:N #1 } { \dim_eval:n { - \box_dp:N #1 } } }
}
% \end{macrocode}
@@ -810,17 +911,17 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_update_poles:N #1
{
- \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { hc }
+ \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { hc }
{
{ \dim_eval:n { 0.5 \box_wd:N #1 } }
{ 0 pt } { 0 pt } { 1000 pt }
}
- \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { r }
+ \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { r }
{
{ \dim_use:N \box_wd:N #1 }
{ 0 pt } { 0 pt } { 1000 pt }
}
- \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { vc }
+ \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { vc }
{
{ 0 pt }
{ \dim_eval:n { ( \box_ht:N #1 - \box_dp:N #1 ) / 2 } }
@@ -834,7 +935,7 @@
{ 1000 pt }
{ 0 pt }
}
- \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { b }
+ \prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } { b }
{
{ 0 pt }
{ \dim_eval:n { - \box_dp:N #1 } }
@@ -852,7 +953,7 @@
% \begin{macro}[aux]{\coffin_calculate_intersection_aux:nnnnnN}
% The lead off in finding intersections is to recover the two poles
% and then hand off to the auxiliary for the actual calculation. There
-% may of course not be an intersection, for which an error trap is
+% may of course not be an intersection, for which an error trap is
% needed.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_calculate_intersection:Nnn #1#2#3
@@ -864,7 +965,7 @@
\coffin_calculate_intersection:nnnnnnnn
\l_coffin_pole_a_tl \l_coffin_pole_b_tl
\bool_if:NT \l_coffin_error_bool
- {
+ {
\msg_kernel_error:nn { coffins } { no-pole-intersection }
\dim_zero:N \l_coffin_x_dim
\dim_zero:N \l_coffin_y_dim
@@ -872,18 +973,18 @@
}
% \end{macrocode}
% The two poles passed here each have four values (as dimensions),
-% ($a$, $b$, $c$, $d$) and
-% ($a'$, $b'$, $c'$, $d'$). These are arguments
+% ($a$, $b$, $c$, $d$) and
+% ($a'$, $b'$, $c'$, $d'$). These are arguments
% $1$--$4$ and $5$--$8$, respectively. In both
-% cases $a$ and $b$ are the co-ordinates of a point on the
+% cases $a$ and $b$ are the co-ordinates of a point on the
% pole and $c$ and $d$ define the direction of the pole. Finding
-% the intersection depends on the directions of the poles, which are
+% the intersection depends on the directions of the poles, which are
% given by $d / c$ and $d' / c'$. However, if one of the poles
% is either horizontal or vertical then one or more of $c$, $d$,
% $c'$ and $d'$ will be zero and a special case is needed.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_calculate_intersection:nnnnnnnn
- #1#2#3#4#5#6#7#8
+ #1#2#3#4#5#6#7#8
{
\dim_compare:nNnTF {#3} = { \c_zero_dim }
% \end{macrocode}
@@ -896,7 +997,7 @@
\dim_compare:nNnTF {#7} = \c_zero_dim
{ \bool_set_true:N \l_coffin_error_bool }
% \end{macrocode}
-% The second pole may still be horizontal, in which case the
+% The second pole may still be horizontal, in which case the
% $y$-component of the intersection will be $b'$. If not,
% \[
% y = \frac{d'}{c'} \left ( x - a' \right ) + b'
@@ -907,7 +1008,7 @@
{
\dim_compare:nNnTF {#8} = \c_zero_dim
{ \dim_set:Nn \l_coffin_y_dim {#6} }
- {
+ {
\coffin_calculate_intersection_aux:nnnnnN
{#1} {#5} {#6} {#7} {#8} \l_coffin_y_dim
}
@@ -935,10 +1036,10 @@
% \]
% which is again handled by the same auxiliary.
% \begin{macrocode}
- {
+ {
\coffin_calculate_intersection_aux:nnnnnN
{#2} {#6} {#5} {#8} {#7} \l_coffin_x_dim
- }
+ }
}
}
% \end{macrocode}
@@ -950,23 +1051,23 @@
{
\dim_compare:nNnTF {#7} = \c_zero_dim
{
- \dim_set:Nn \l_coffin_x_dim {#5}
+ \dim_set:Nn \l_coffin_x_dim {#5}
\coffin_calculate_intersection_aux:nnnnnN
{#5} {#1} {#2} {#3} {#4} \l_coffin_y_dim
}
{
\dim_compare:nNnTF {#8} = \c_zero_dim
{
- \dim_set:Nn \l_coffin_x_dim {#6}
+ \dim_set:Nn \l_coffin_x_dim {#6}
\coffin_calculate_intersection_aux:nnnnnN
{#6} {#2} {#1} {#4} {#3} \l_coffin_x_dim
}
% \end{macrocode}
-% If none of the special cases apply then there is still a need to
+% If none of the special cases apply then there is still a need to
% check that there is a unique intersection between the two pole. This
% is the case if they have different slopes.
% \begin{macrocode}
- {
+ {
\fp_set_from_dim:Nn \l_coffin_calc_a_fp {#3}
\fp_set_from_dim:Nn \l_coffin_calc_b_fp {#4}
\fp_set_from_dim:Nn \l_coffin_calc_c_fp {#7}
@@ -986,12 +1087,12 @@
% and noting that the two ratios are already worked out from the test
% just performed. There is quite a bit of shuffling from dimensions to
% floating points in order to do the work. The $y$-values is then
-% worked out using the standard auxiliary starting from the
+% worked out using the standard auxiliary starting from the
% $x$-position.
% \begin{macrocode}
{
\fp_set_from_dim:Nn \l_coffin_calc_result_fp {#6}
- \fp_set_from_dim:Nn \l_coffin_calc_a_fp {#2}
+ \fp_set_from_dim:Nn \l_coffin_calc_a_fp {#2}
\fp_sub:Nn \l_coffin_calc_result_fp
{ \l_coffin_calc_a_fp }
\fp_set_from_dim:Nn \l_coffin_calc_a_fp {#1}
@@ -1029,7 +1130,7 @@
% |#2| and |#3| are co-ordinates.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_calculate_intersection_aux:nnnnnN
- #1#2#3#4#5#6
+ #1#2#3#4#5#6
{
\fp_set_from_dim:Nn \l_coffin_calc_result_fp {#1}
\fp_set_from_dim:Nn \l_coffin_calc_a_fp {#2}
@@ -1062,10 +1163,10 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_join:NnnNnnnn #1#2#3#4#5#6#7#8
{
- \coffin_align:NnnNnnnnN
+ \coffin_align:NnnNnnnnN
#1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_coffin_aligned_coffin
% \end{macrocode}
-% Correct the placement of the reference point. If the $x$-offset
+% Correct the placement of the reference point. If the $x$-offset
% is negative then the reference point of the second box is to the left
% of that of the first, which is corrected using a kern. On the right
% side the first box might stick out, which will show up if it is wider
@@ -1076,11 +1177,11 @@
{
\dim_compare:nNnT { \l_coffin_offset_x_dim } < \c_zero_dim
{ \tex_kern:D -\l_coffin_offset_x_dim }
- \hbox_unpack:N \l_coffin_aligned_coffin
+ \hbox_unpack:N \l_coffin_aligned_coffin
\dim_set:Nn \l_coffin_tmp_dim
{ \l_coffin_offset_x_dim - \box_wd:N #1 + \box_wd:N #4 }
\dim_compare:nNnT \l_coffin_tmp_dim < \c_zero_dim
- { \tex_kern:D -\l_coffin_tmp_dim }
+ { \tex_kern:D -\l_coffin_tmp_dim }
}
% \end{macrocode}
% The coffin structure is reset, and the corners are cleared: only
@@ -1105,12 +1206,12 @@
{
\coffin_offset_poles:Nnn #1 { 0 pt } { 0 pt }
\coffin_offset_poles:Nnn #4
- { \l_coffin_offset_x_dim } { \l_coffin_offset_y_dim }
+ { \l_coffin_offset_x_dim } { \l_coffin_offset_y_dim }
\coffin_offset_corners:Nnn #1 { 0 pt } { 0 pt }
\coffin_offset_corners:Nnn #4
- { \l_coffin_offset_x_dim } { \l_coffin_offset_y_dim }
+ { \l_coffin_offset_x_dim } { \l_coffin_offset_y_dim }
}
- \coffin_update_vertical_poles:NNN #1 #4 \l_coffin_aligned_coffin
+ \coffin_update_vertical_poles:NNN #1 #4 \l_coffin_aligned_coffin
\coffin_set_eq:NN #1 \l_coffin_aligned_coffin
}
\cs_generate_variant:Nn \coffin_join:NnnNnnnn { c , Nnnc , cnnc }
@@ -1131,7 +1232,7 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_attach:NnnNnnnn #1#2#3#4#5#6#7#8
{
- \coffin_align:NnnNnnnnN
+ \coffin_align:NnnNnnnnN
#1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_coffin_aligned_coffin
\box_set_ht:Nn \l_coffin_aligned_coffin { \box_ht:N #1 }
\box_set_dp:Nn \l_coffin_aligned_coffin { \box_dp:N #1 }
@@ -1143,13 +1244,13 @@
\coffin_update_poles:N \l_coffin_aligned_coffin
\coffin_offset_poles:Nnn #1 { 0 pt } { 0 pt }
\coffin_offset_poles:Nnn #4
- { \l_coffin_offset_x_dim } { \l_coffin_offset_y_dim }
+ { \l_coffin_offset_x_dim } { \l_coffin_offset_y_dim }
\coffin_update_vertical_poles:NNN #1 #4 \l_coffin_aligned_coffin
\coffin_set_eq:NN #1 \l_coffin_aligned_coffin
}
\cs_new_protected_nopar:Npn \coffin_attach_mark:NnnNnnnn #1#2#3#4#5#6#7#8
{
- \coffin_align:NnnNnnnnN
+ \coffin_align:NnnNnnnnN
#1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_coffin_aligned_coffin
\box_set_ht:Nn \l_coffin_aligned_coffin { \box_ht:N #1 }
\box_set_dp:Nn \l_coffin_aligned_coffin { \box_dp:N #1 }
@@ -1168,7 +1269,7 @@
% of the input coffins. Those for the first coffin are worked out after
% those for the second coffin, as this allows the `primed'
% storage area to be used for the second coffin. The `real' box
-% offsets are then calculated, before using these to re-box the
+% offsets are then calculated, before using these to re-box the
% input coffins. The default poles are then set up, but the final result
% will depend on how the bounding box is being handled.
% \begin{macrocode}
@@ -1182,7 +1283,7 @@
{ \l_coffin_x_dim - \l_coffin_x_prime_dim + #7 }
\dim_set:Nn \l_coffin_offset_y_dim
{ \l_coffin_y_dim - \l_coffin_y_prime_dim + #8 }
- \hbox_set:Nn \l_coffin_aligned_internal_coffin
+ \hbox_set:Nn \l_coffin_aligned_internal_coffin
{
\box_use:N #1
\tex_kern:D -\box_wd:N #1
@@ -1190,7 +1291,7 @@
\box_move_up:nn { \l_coffin_offset_y_dim } { \box_use:N #4 }
}
\coffin_set_eq:NN #9 \l_coffin_aligned_internal_coffin
- }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -1223,7 +1324,7 @@
{
{ \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim }
{#5} {#6}
- }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -1242,7 +1343,7 @@
}
\cs_new_protected_nopar:Npn \coffin_offset_corner:Nnnnn #1#2#3#4#5#6
{
- \prop_put:cnx
+ \prop_put:cnx
{ l_coffin_corners_ \int_value:w \l_coffin_aligned_coffin _prop }
{ #1 - #2 }
{
@@ -1277,11 +1378,11 @@
{
\dim_compare:nNnTF {#2} < {#6}
{
- \coffin_set_pole:Nnx #9 { T }
+ \coffin_set_pole:Nnx #9 { T }
{ { 0 pt } {#6} { 1000 pt } { 0 pt } }
}
{
- \coffin_set_pole:Nnx #9 { T }
+ \coffin_set_pole:Nnx #9 { T }
{ { 0 pt } {#2} { 1000 pt } { 0 pt } }
}
}
@@ -1289,11 +1390,11 @@
{
\dim_compare:nNnTF {#2} < {#6}
{
- \coffin_set_pole:Nnx #9 { B }
+ \coffin_set_pole:Nnx #9 { B }
{ { 0 pt } {#2} { 1000 pt } { 0 pt } }
}
{
- \coffin_set_pole:Nnx #9 { B }
+ \coffin_set_pole:Nnx #9 { B }
{ { 0 pt } {#6} { 1000 pt } { 0 pt } }
}
}
@@ -1304,27 +1405,14 @@
%
% \begin{macro}{\coffin_typeset:Nnnnn, \coffin_typeset:cnnnn}
% Typesetting a coffin means aligning it with the current position,
-% which is done using a coffin with no content at all. This is done
-% using the same approach as \cs{coffin_align:NnnNnnnnN} but without the
-% offset corrections (which would be thrown away). The same is true
-% for overlaying coffins, which uses the known size of an empty
-% box!
+% which is done using a coffin with no content at all. As well as aligning to
+% the empty coffin, there is also a need to leave vertical mode, if necessary.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_typeset:Nnnnn #1#2#3#4#5
{
- \coffin_align:NnnNnnnnN \c_empty_coffin { H } { l }
+ \coffin_align:NnnNnnnnN \c_empty_coffin { H } { l }
#1 {#2} {#3} {#4} {#5} \l_coffin_aligned_coffin
- \hbox_set:Nn \l_coffin_aligned_coffin
- {
- \dim_compare:nNnT { \l_coffin_offset_x_dim } < \c_zero_dim
- { \tex_kern:D -\l_coffin_offset_x_dim }
- \hbox_unpack:N \l_coffin_aligned_coffin
- \dim_set:Nn \l_coffin_tmp_dim
- { \l_coffin_offset_x_dim + \box_wd:N #1 }
- \dim_compare:nNnT { \l_coffin_tmp_dim } < \c_zero_dim
- { \tex_kern:D -\l_coffin_tmp_dim }
- }
- \hbox_unpack:N \c_empty_box
+ \hbox_unpack:N \c_empty_box
\box_use:N \l_coffin_aligned_coffin
}
\cs_generate_variant:Nn \coffin_typeset:Nnnnn { c }
@@ -1366,7 +1454,7 @@
% \end{variable}
%
% \begin{macro}{\coffin_rotate:Nn, \coffin_rotate:cn}
-% Rotating a coffin requires several steps which can be conveniently
+% Rotating a coffin requires several steps which can be conveniently
% run together. The first step is to convert the angle given in degrees
% to one in radians. This is then used to set \cs{l_coffin_sin_fp} and
% \cs{l_coffin_cos_fp}, which are carried through unchanged for the rest
@@ -1399,7 +1487,7 @@
% At this stage, there needs to be a calculation to find where the
% corners of the content and the box itself will end up.
% \begin{macrocode}
- \coffin_find_corner_maxima:N #1
+ \coffin_find_corner_maxima:N #1
\coffin_find_bounding_shift:
\box_rotate:Nn #1 {#2}
% \end{macrocode}
@@ -1410,7 +1498,7 @@
% the bounding box and the content left edge. The $y$-direction is
% dealt with by moving the box down by any depth it has acquired.
% \begin{macrocode}
- \hbox_set:Nn #1
+ \hbox_set:Nn #1
{
\tex_kern:D \l_coffin_bounding_shift_dim
\tex_kern:D -\l_coffin_left_corner_dim
@@ -1418,25 +1506,25 @@
{ \box_use:N #1 }
}
% \end{macrocode}
-% If there have been any previous rotations then the size of the
+% If there have been any previous rotations then the size of the
% bounding box will be bigger than the contents. This can be corrected
-% easily by setting the size of the box to the height and width of the
+% easily by setting the size of the box to the height and width of the
% content.
% \begin{macrocode}
- \box_set_ht:Nn #1
+ \box_set_ht:Nn #1
{ \l_coffin_top_corner_dim - \l_coffin_bottom_corner_dim }
- \box_set_dp:Nn #1 { 0 pt }
- \box_set_wd:Nn #1
+ \box_set_dp:Nn #1 { 0 pt }
+ \box_set_wd:Nn #1
{ \l_coffin_right_corner_dim - \l_coffin_left_corner_dim }
% \end{macrocode}
-% The final task is to move the poles and corners such that they are
+% The final task is to move the poles and corners such that they are
% back in alignment with the box reference point.
% \begin{macrocode}
\prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop }
{ \coffin_shift_corner:Nnnn #1 {##1} ##2 }
\prop_map_inline:cn { l_coffin_poles_ \int_value:w #1 _prop }
{ \coffin_shift_pole:Nnnnnn #1 {##1} ##2 }
- }
+ }
\cs_generate_variant:Nn \coffin_rotate:Nn { c }
% \end{macrocode}
% \end{macro}
@@ -1448,14 +1536,14 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_set_bounding:N #1
{
- \prop_put:Nnx \l_coffin_bounding_prop { tl }
+ \prop_put:Nnx \l_coffin_bounding_prop { tl }
{ { 0 pt } { \dim_use:N \box_ht:N #1 } }
- \prop_put:Nnx \l_coffin_bounding_prop { tr }
+ \prop_put:Nnx \l_coffin_bounding_prop { tr }
{ { \dim_use:N \box_wd:N #1 } { \dim_use:N \box_ht:N #1 } }
- \dim_set:Nn \l_coffin_tmp_dim { - \box_dp:N #1 }
- \prop_put:Nnx \l_coffin_bounding_prop { bl }
+ \dim_set:Nn \l_coffin_tmp_dim { - \box_dp:N #1 }
+ \prop_put:Nnx \l_coffin_bounding_prop { bl }
{ { 0 pt } { \dim_use:N \l_coffin_tmp_dim } }
- \prop_put:Nnx \l_coffin_bounding_prop { br }
+ \prop_put:Nnx \l_coffin_bounding_prop { br }
{ { \dim_use:N \box_wd:N #1 } { \dim_use:N \l_coffin_tmp_dim } }
}
% \end{macrocode}
@@ -1472,34 +1560,34 @@
{
\coffin_rotate_vector:nnNN {#2} {#3} \l_coffin_x_dim \l_coffin_y_dim
\prop_put:Nnx \l_coffin_bounding_prop {#1}
- { { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } }
+ { { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } }
}
\cs_new_protected_nopar:Npn \coffin_rotate_corner:Nnnn #1#2#3#4
{
\coffin_rotate_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim
\prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } {#2}
- { { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } }
+ { { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } }
}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\coffin_rotate_pole:Nnnnnn}
-% Rotating a single pole simply means shifting the co-ordinate of
+% Rotating a single pole simply means shifting the co-ordinate of
% the pole and its direction. The rotation here is about the bottom-left
% corner of the coffin.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_rotate_pole:Nnnnnn #1#2#3#4#5#6
{
\coffin_rotate_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim
- \coffin_rotate_vector:nnNN {#5} {#6}
+ \coffin_rotate_vector:nnNN {#5} {#6}
\l_coffin_x_prime_dim \l_coffin_y_prime_dim
\coffin_set_pole:Nnx #1 {#2}
{
{ \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim }
{ \dim_use:N \l_coffin_x_prime_dim }
{ \dim_use:N \l_coffin_y_prime_dim }
- }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -1508,8 +1596,8 @@
% A rotation function, which needs only an input vector (as dimensions)
% and an output space. The values \cs{l_coffin_cos_fp} and
% \cs{l_coffin_sin_fp} should previously have been set up correctly.
-% Working this way means that the floating point work is kept to a
-% minimum: for any given rotation the sin and cosine values do no
+% Working this way means that the floating point work is kept to a
+% minimum: for any given rotation the sin and cosine values do no
% change, after all.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_rotate_vector:nnNN #1#2#3#4
@@ -1520,7 +1608,7 @@
\fp_set_eq:NN \l_coffin_tmp_fp \l_coffin_y_fp
\fp_mul:Nn \l_coffin_x_prime_fp { \l_coffin_cos_fp }
\fp_mul:Nn \l_coffin_tmp_fp { \l_coffin_sin_fp }
- \fp_sub:Nn \l_coffin_x_prime_fp { \l_coffin_tmp_fp }
+ \fp_sub:Nn \l_coffin_x_prime_fp { \l_coffin_tmp_fp }
\fp_set_eq:NN \l_coffin_y_prime_fp \l_coffin_y_fp
\fp_set_eq:NN \l_coffin_tmp_fp \l_coffin_x_fp
\fp_mul:Nn \l_coffin_y_prime_fp { \l_coffin_cos_fp }
@@ -1534,7 +1622,7 @@
%
% \begin{macro}{\coffin_find_corner_maxima:N}
% \begin{macro}[aux]{\coffin_find_corner_maxima_aux:nn}
-% The idea here is to find the extremities of the content of the
+% The idea here is to find the extremities of the content of the
% coffin. This is done by looking for the smallest values for the bottom
% and left corners, and the largest values for the top and right
% corners. The values start at the maximum dimensions so that the
@@ -1546,7 +1634,7 @@
\dim_set:Nn \l_coffin_right_corner_dim { -\c_max_dim }
\dim_set:Nn \l_coffin_bottom_corner_dim { \c_max_dim }
\dim_set:Nn \l_coffin_left_corner_dim { \c_max_dim }
- \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop }
+ \prop_map_inline:cn { l_coffin_corners_ \int_value:w #1 _prop }
{ \coffin_find_corner_maxima_aux:nn ##2 }
}
\cs_new_protected_nopar:Npn \coffin_find_corner_maxima_aux:nn #1#2
@@ -1554,7 +1642,7 @@
\dim_set_min:Nn \l_coffin_left_corner_dim {#1}
\dim_set_max:Nn \l_coffin_right_corner_dim {#1}
\dim_set_min:Nn \l_coffin_bottom_corner_dim {#2}
- \dim_set_max:Nn \l_coffin_top_corner_dim {#2}
+ \dim_set_max:Nn \l_coffin_top_corner_dim {#2}
}
% \end{macrocode}
% \end{macro}
@@ -1604,7 +1692,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \subsection{Resizing coffins}
%
% \begin{variable}{\l_coffin_scale_x_fp}
@@ -1630,7 +1718,7 @@
% \begin{macro}{\coffin_resize:Nnn, \coffin_resize:cnn}
% Resizing a coffin begins by setting up the user-friendly names for
% the dimensions of the coffin box. The new sizes are then turned into
-% scale factor. This is the same operation as takes place for the
+% scale factor. This is the same operation as takes place for the
% underlying box, but that operation is grouped and so the same
% calculation is done here.
% \begin{macrocode}
@@ -1670,7 +1758,7 @@
{ \coffin_x_shift_corner:Nnnn #1 {##1} ##2 }
\prop_map_inline:cn { l_coffin_poles_ \int_value:w #1 _prop }
{ \coffin_x_shift_pole:Nnnnnn #1 {##1} ##2 }
- }
+ }
\coffin_end_user_dimensions:
}
% \end{macrocode}
@@ -1695,7 +1783,7 @@
\fp_compare:NNNTF \l_coffin_scale_x_fp > \c_zero_fp
{ \l_coffin_scaled_width_dim -#2 \Width }
{ \l_coffin_scaled_width_dim #2 \Width }
- \coffin_resize_common:Nnn #1
+ \coffin_resize_common:Nnn #1
{ \l_coffin_scaled_width_dim } { \l_coffin_scaled_total_height_dim }
}
\cs_generate_variant:Nn \coffin_scale:Nnn { c }
@@ -1721,14 +1809,14 @@
%
% \begin{macro}{\coffin_scale_corner:Nnnn}
% \begin{macro}{\coffin_scale_pole:Nnnnnn}
-% Scaling both corners and poles is a simple calculation using the
+% Scaling both corners and poles is a simple calculation using the
% preceding vector scaling.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \coffin_scale_corner:Nnnn #1#2#3#4
{
\coffin_scale_vector:nnNN {#3} {#4} \l_coffin_x_dim \l_coffin_y_dim
\prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } {#2}
- { { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } }
+ { { \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim } }
}
\cs_new_protected_nopar:Npn \coffin_scale_pole:Nnnnnn #1#2#3#4#5#6
{
@@ -1737,7 +1825,7 @@
{
{ \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim }
{#5} {#6}
- }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -1751,16 +1839,16 @@
\cs_new_protected_nopar:Npn \coffin_x_shift_corner:Nnnn #1#2#3#4
{
\prop_put:cnx { l_coffin_corners_ \int_value:w #1 _prop } {#2}
- {
+ {
{ \dim_eval:n { #3 + \box_wd:N #1 } } {#4}
- }
+ }
}
\cs_new_protected_nopar:Npn \coffin_x_shift_pole:Nnnnnn #1#2#3#4#5#6
{
\prop_put:cnx { l_coffin_poles_ \int_value:w #1 _prop } {#2}
{
- { \dim_eval:n #3 + \box_wd:N #1 } {#4}
- {#5} {#6}
+ { \dim_eval:n #3 + \box_wd:N #1 } {#4}
+ {#5} {#6}
}
}
% \end{macrocode}
@@ -1838,7 +1926,7 @@
%
% \begin{variable}{\l_coffin_display_x_dim}
% \begin{variable}{\l_coffin_display_y_dim}
-% As the intersections of poles have to be calculated to find which
+% As the intersections of poles have to be calculated to find which
% ones to print, there is a need to avoid repetition. This is done
% by saving the intersection into two dedicated values.
% \begin{macrocode}
@@ -1857,7 +1945,7 @@
% \end{variable}
%
% \begin{variable}{\l_coffin_display_font_tl}
-% Stores the settings used to print coffin data: this keeps things
+% Stores the settings used to print coffin data: this keeps things
% flexible.
% \begin{macrocode}
\tl_new:N \l_coffin_display_font_tl
@@ -1894,19 +1982,19 @@
\hbox:n { \tex_vrule:D width 1 pt height 1 pt \scan_stop: } % TODO
%</initex>
%<*package>
- \color {#4}
- \rule { 1 pt } { 1 pt }
+ \color {#4}
+ \rule { 1 pt } { 1 pt }
%</package>
}
\coffin_attach_mark:NnnNnnnn #1 {#2} {#3}
- \l_coffin_display_pole_coffin { hc } { vc } { 0 pt } { 0 pt }
+ \l_coffin_display_pole_coffin { hc } { vc } { 0 pt } { 0 pt }
\hcoffin_set:Nn \l_coffin_display_coord_coffin
{
%<*initex>
% TODO
%</initex>
%<*package>
- \color {#4}
+ \color {#4}
%</package>
\l_coffin_display_font_tl
( \tl_to_str:n { #2 , #3 } )
@@ -1918,7 +2006,7 @@
\prop_get:NnN \l_coffin_display_handles_prop
{ #3 #2 } \l_coffin_tmp_tl
\quark_if_no_value:NTF \l_coffin_tmp_tl
- {
+ {
\coffin_attach_mark:NnnNnnnn #1 {#2} {#3}
\l_coffin_display_coord_coffin { l } { vc }
{ 1 pt } { 0 pt }
@@ -1926,7 +2014,7 @@
{
\exp_last_unbraced:No \coffin_mark_handle_aux:nnnnNnn
\l_coffin_tmp_tl #1 {#2} {#3}
- }
+ }
}
{
\exp_last_unbraced:No \coffin_mark_handle_aux:nnnnNnn
@@ -1937,7 +2025,7 @@
{
\coffin_attach_mark:NnnNnnnn #5 {#6} {#7}
\l_coffin_display_coord_coffin {#1} {#2}
- { #3 \l_coffin_display_offset_dim }
+ { #3 \l_coffin_display_offset_dim }
{ #4 \l_coffin_display_offset_dim }
}
\cs_generate_variant:Nn \coffin_mark_handle:Nnnn { c }
@@ -1950,8 +2038,8 @@
% \begin{macro}[aux]{\coffin_display_handles_aux:nnnn}
% \begin{macro}[aux]{\coffin_display_attach:Nnnnn}
% Printing the poles starts by removing any duplicates, for which the
-% \texttt{H} poles is used as the definitive version for the baseline
-% and bottom. Two loops are then used to find the combinations of
+% \texttt{H} poles is used as the definitive version for the baseline
+% and bottom. Two loops are then used to find the combinations of
% handles for all of these poles. This is done such that poles are
% removed during the loops to avoid duplication.
% \begin{macrocode}
@@ -1963,27 +2051,27 @@
\hbox:n { \tex_vrule:D width 1 pt height 1 pt \scan_stop: } % TODO
%</initex>
%<*package>
- \color {#2}
- \rule { 1 pt } { 1 pt }
+ \color {#2}
+ \rule { 1 pt } { 1 pt }
%</package>
}
\prop_set_eq:Nc \l_coffin_display_poles_prop
{ l_coffin_poles_ \int_value:w #1 _prop }
\coffin_get_pole:NnN #1 { H } \l_coffin_pole_a_tl
- \coffin_get_pole:NnN #1 { T } \l_coffin_pole_b_tl
+ \coffin_get_pole:NnN #1 { T } \l_coffin_pole_b_tl
\tl_if_eq:NNT \l_coffin_pole_a_tl \l_coffin_pole_b_tl
{ \prop_del:Nn \l_coffin_display_poles_prop { T } }
\coffin_get_pole:NnN #1 { B } \l_coffin_pole_b_tl
\tl_if_eq:NNT \l_coffin_pole_a_tl \l_coffin_pole_b_tl
{ \prop_del:Nn \l_coffin_display_poles_prop { B } }
- \coffin_set_eq:NN \l_coffin_display_coffin #1
+ \coffin_set_eq:NN \l_coffin_display_coffin #1
\prop_clear:N \l_coffin_handles_tmp_prop
\prop_map_inline:Nn \l_coffin_display_poles_prop
{
\prop_del:Nn \l_coffin_display_poles_prop {##1}
\coffin_display_handles_aux:nnnnnn {##1} ##2 {#2}
}
- \box_use:N \l_coffin_display_coffin
+ \box_use:N \l_coffin_display_coffin
}
% \end{macrocode}
% For each pole there is a check for an intersection, which here does
@@ -1994,7 +2082,7 @@
\cs_new_protected_nopar:Npn \coffin_display_handles_aux:nnnnnn #1#2#3#4#5#6
{
\prop_map_inline:Nn \l_coffin_display_poles_prop
- {
+ {
\bool_set_false:N \l_coffin_error_bool
\coffin_calculate_intersection:nnnnnnnn {#2} {#3} {#4} {#5} ##2
\bool_if:NF \l_coffin_error_bool
@@ -2007,10 +2095,10 @@
\hcoffin_set:Nn \l_coffin_display_coord_coffin
{
%<*initex>
- % TODO
+ % TODO
%</initex>
%<*package>
- \color {#6}
+ \color {#6}
%</package>
\l_coffin_display_font_tl
( \tl_to_str:n { #1 , ##1 } )
@@ -2023,12 +2111,12 @@
{ ##1 #1 } \l_coffin_tmp_tl
\quark_if_no_value:NTF \l_coffin_tmp_tl
{
- \coffin_display_attach:Nnnnn
+ \coffin_display_attach:Nnnnn
\l_coffin_display_coord_coffin { l } { vc }
{ 1 pt } { 0 pt }
}
- {
- \exp_last_unbraced:No
+ {
+ \exp_last_unbraced:No
\coffin_display_handles_aux:nnnn
\l_coffin_tmp_tl
}
@@ -2044,7 +2132,7 @@
{
\coffin_display_attach:Nnnnn
\l_coffin_display_coord_coffin {#1} {#2}
- { #3 \l_coffin_display_offset_dim }
+ { #3 \l_coffin_display_offset_dim }
{ #4 \l_coffin_display_offset_dim }
}
\cs_generate_variant:Nn \coffin_display_handles:Nn { c }
@@ -2070,11 +2158,11 @@
\tex_kern:D \l_coffin_offset_x_dim
\box_move_up:nn { \l_coffin_offset_y_dim } { \box_use:N #1 }
}
- \box_set_ht:Nn \l_coffin_aligned_coffin
+ \box_set_ht:Nn \l_coffin_aligned_coffin
{ \box_ht:N \l_coffin_display_coffin }
- \box_set_dp:Nn \l_coffin_aligned_coffin
+ \box_set_dp:Nn \l_coffin_aligned_coffin
{ \box_dp:N \l_coffin_display_coffin }
- \box_set_wd:Nn \l_coffin_aligned_coffin
+ \box_set_wd:Nn \l_coffin_aligned_coffin
{ \box_wd:N \l_coffin_display_coffin }
\box_set_eq:NN \l_coffin_display_coffin \l_coffin_aligned_coffin
}
@@ -2087,7 +2175,7 @@
% \begin{macro}{\coffin_show_structure:N, \coffin_show_structure:c}
% \begin{macro}[aux]{\coffin_show_aux:n}
% \begin{macro}[aux]{\coffin_show_aux:w}
-% For showing the various internal structures attached to a coffin in
+% For showing the various internal structures attached to a coffin in
% a way that keeps things relatively readable. If there is no apparent
% structure then the code complains.
% \begin{macrocode}
@@ -2095,8 +2183,8 @@
{
\cs_if_exist:cTF { l_coffin_poles_ \int_value:w #1 _prop }
{
- \iow_term:x
- {
+ \iow_term:x
+ {
\iow_newline:
Size~of~coffin~\token_to_str:N #1 : \iow_newline:
> ~ ht~=~\dim_use:N \box_ht:N #1 \iow_newline:
@@ -2111,9 +2199,9 @@
\coffin_show_aux:nn
}
\etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN
- { \exp_after:wN \coffin_show_aux:w \l_coffin_tmp_tl }
+ { \exp_after:wN \coffin_show_aux:w \l_coffin_tmp_tl }
}
- {
+ {
\iow_term:x { ---~No~poles~found~--- }
\tl_show:n { Is~this~really~a~coffin? }
}
@@ -2159,4 +2247,4 @@
%
% \end{implementation}
%
-% \PrintIndex \ No newline at end of file
+% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
index 0570e50a575..2089859d4e3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
@@ -1,5 +1,5 @@
% \iffalse meta-comment
-%
+%
%% File: l3color.dtx Copyright(C) 2011 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3color.dtx 2717 2011-09-03 13:40:31Z joseph $
+\GetIdInfo$Id: l3color.dtx 2776 2011-09-07 18:33:19Z joseph $
{L3 Experimental colour support}
%</driver|package>
%<*driver>
@@ -46,13 +46,13 @@
\end{document}
%</driver>
% \fi
-%
+%
% \title{^^A
-% The \textsf{l3drivers} package\\ Colour support^^A
+% The \textsf{l3color} package\\ Colour support^^A
% \thanks{This file describes v\ExplFileVersion,
% last revised \ExplFileDate.}^^A
% }
-%
+%
% \author{^^A
% The \LaTeX3 Project\thanks
% {^^A
@@ -67,18 +67,18 @@
% \maketitle
%
% \begin{documentation}
-%
+%
% This module provides support for colour in \LaTeX3{}. At present, the
% material here is mainly intended to support a small number of low-level
% requirements in other \pkg{l3kernel} modules.
-%
+%
% \section{Colour in boxes}
-%
+%
% Controlling the colour of text in boxes requires a small number of control
% functions, so that the boxed material uses the colour at the point where
% it is set, rather than where it is used.
-%
-% \begin{function}{\color_group_begin:, \color_group_end:}
+%
+% \begin{function}[added = 2011-09-03]{\color_group_begin:, \color_group_end:}
% \begin{syntax}
% \cs{color_group_begin:}
% \ldots
@@ -86,8 +86,8 @@
% \end{syntax}
% Creates a colour group: one used to \enquote{trap} colour settings.
% \end{function}
-%
-% \begin{function}{\color_ensure_current:}
+%
+% \begin{function}[added = 2011-09-03]{\color_ensure_current:}
% \begin{syntax}
% \cs{color_ensure_current:}
% \end{syntax}
@@ -96,17 +96,17 @@
% box is used. This function should usually be used within a
% \cs{color_group_begin:} \ldots \cs{color_group_end:} group.
% \end{function}
-%
+%
% \end{documentation}
%
% \begin{implementation}
%
% \section{\pkg{l3color} Implementation}
-%
+%
% \begin{macrocode}
%<*initex|package>
% \end{macrocode}
-%
+%
% \begin{macrocode}
%<*package>
\ProvidesExplPackage
@@ -114,11 +114,11 @@
\package_check_loaded_expl:
%</package>
% \end{macrocode}
-%
+%
% \begin{macro}{\color_group_begin:, \color_group_end:}
% Grouping for colour is almost the same as using the basic \cs{group_begin:}
% and \cs{group_end:} functions. However, in vertical mode the end-of-group
-% needs a \cs{tex_par:D}, which in horizontal mode does nothing.
+% needs a \tn{par}, which in horizontal mode does nothing.
% \begin{macrocode}
\cs_new_eq:NN \color_group_begin: \group_begin:
\cs_new_protected_nopar:Npn \color_group_end:
@@ -128,7 +128,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\color_ensure_current:}
% A driver-independent wrapper for setting the foreground colour to the
% current colour \enquote{now}.
@@ -149,4 +149,4 @@
%
% \end{implementation}
%
-% \PrintIndex \ No newline at end of file
+% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
index d7d925dbfa5..551abe0a6a3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -65,7 +65,7 @@ Do not distribute a modified version of this file.
%</driver>
%
%<*driver|class>
-\RequirePackage{l3names}
+\RequirePackage{expl3,xparse}
%</driver|class>
%
% Need to protect the file metadata for any modules that load l3doc.
@@ -78,7 +78,7 @@ Do not distribute a modified version of this file.
% \end{macrocode}
%
%<*driver|class>
-\GetIdInfo$Id: l3doc.dtx 2719 2011-09-04 13:40:25Z will $
+\GetIdInfo$Id: l3doc.dtx 2819 2011-09-12 17:26:47Z will $
{L3 Experimental documentation class}
%</driver|class>
%
@@ -86,7 +86,7 @@ Do not distribute a modified version of this file.
\ProvidesFile{\ExplFileName.dtx}
[\ExplFileDate\space v\ExplFileVersion\space\ExplFileDescription]
\documentclass{l3doc}
-\usepackage{framed}
+\usepackage{framed,lipsum}
\begin{document}
\DocInput{l3doc.dtx}
\end{document}
@@ -96,7 +96,6 @@ Do not distribute a modified version of this file.
%<*class>
\ProvidesExplClass
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-\RequirePackage{expl3,xparse}
\let \ExplFileName \filenameOld
\let \ExplFileDate \filedateOld
\let \ExplFileVersion \fileversionOld
@@ -114,6 +113,7 @@ Do not distribute a modified version of this file.
%
% \begin{documentation}
%
+%
% \section{Introduction}
%
% This is an ad-hoc class for documenting the \pkg{expl3} bundle,
@@ -182,8 +182,7 @@ Do not distribute a modified version of this file.
%
% Problems at the moment:
% (1)~not flexible in the types of things that can be documented;
-% (2)~very nonstandard markup (e.g., the odd `"/ (...)"' tags;
-% (3)~no obvious link between the "\begin{function}" environment for
+% (2)~no obvious link between the "\begin{function}" environment for
% documenting things to the "\begin{macro}" function that's used
% analogously in the implementation.
%
@@ -242,7 +241,7 @@ Do not distribute a modified version of this file.
% \pkg{doc} uses the "\OnlyDocumentation"/"\AlsoImplementation" macros
% to guide the use of "\StopEventually{}", which is intended to be placed
% to partition the documentation and implementation within a single DTX file.
-%
+%
% This isn't very flexible, since it assumes that we \emph{always} want
% to print the documentation. For the \pkg{expl3} sources, I wanted to be
% be able to input DTX files in two modes: only displaying the documentation,
@@ -278,7 +277,7 @@ Do not distribute a modified version of this file.
% \begin{framed}
% \vspace{-\baselineskip}
% \begin{verbatim}
-% \begin{function}{ list_of , functions }
+% \begin{function}{ \function_one: , \function_two: }
% \begin{syntax}
% "\foo_bar:" \Arg{meta} <test1>
% \end{syntax}
@@ -287,7 +286,7 @@ Do not distribute a modified version of this file.
% \end{verbatim}
% \vspace{-2\baselineskip}
% \hrulefill
-% \begin{function}{ list_of , functions }
+% \begin{function}{ \function_one: , \function_two: }
% \begin{syntax}
% "\foo_bar:" \Arg{meta} <test1>
% \end{syntax}
@@ -320,7 +319,7 @@ Do not distribute a modified version of this file.
% \end{framed}
%
% Note that the list of functions used to use "|" as a separator instead,
-% and this syntax is still supported.
+% and this syntax is \textbf{no longer} supported.
%
% In the old syntax, individual functions could be suffixed by an optional flag or
% two to indicate the same information given in the optional argument.
@@ -488,12 +487,43 @@ Do not distribute a modified version of this file.
Javier~Bezos,~Will~Robertson,~Joseph~Wright,~Bruno~Le~Floch}}
% \end{macrocode}
%
-% \subsection{Options and configuration}
+% \subsection{Variables}
%
% \begin{macrocode}
-\DeclareOption{a5paper}{\@latexerr{Option not supported}{}}
+\coffin_new:N \l_doc_output_box
+\coffin_new:N \l_doc_names_coffin
+\coffin_new:N \l_doc_descr_coffin
+\coffin_new:N \l_doc_syntax_coffin
+\bool_new:N \l_doc_long_name_bool
+\bool_new:N \g_doc_implementation_bool
+\dim_new:N \l_doc_trial_width_dim
+\int_new:N \l_doc_macro_int
+\int_new:N \g_doc_nested_macro_int
+\prop_new:N \g_doc_missing_tests_prop
+\clist_new:N \g_docinput_clist
+% \end{macrocode}
+%
+% \begin{macrocode}
+\seq_new:N \g_doc_testfiles_seq
+\seq_new:N \g_doc_functions_seq
+\seq_new:N \g_doc_macros_seq
+\seq_new:N \g_doc_not_tested_seq
+% \end{macrocode}
+%
+% For function/macro environments:
+% \begin{macrocode}
+\bool_new:N \l_doc_meta_TF_bool
+\bool_new:N \l_doc_meta_pTF_bool
+\bool_new:N \l_doc_meta_EXP_bool
+\bool_new:N \l_doc_meta_rEXP_bool
+\bool_new:N \l_doc_macro_internal_bool
+\bool_new:N \l_doc_macro_aux_bool
+\bool_new:N \l_doc_macro_TF_bool
+\bool_new:N \l_doc_macro_pTF_bool
+\bool_new:N \l_doc_macro_var_bool
% \end{macrocode}
%
+% For package options:
% \begin{macrocode}
\bool_new:N \g_doc_full_bool
\bool_new:N \g_doc_lmodern_bool
@@ -501,6 +531,34 @@ Do not distribute a modified version of this file.
\bool_new:N \g_doc_checktest_bool
% \end{macrocode}
%
+% \subsection{expl3 extras}
+%
+% \begin{macro}
+% {
+% \coffin_gset_eq:NN, \coffin_gset_eq:Nc,
+% \coffin_gset_eq:cN, \coffin_gset_eq:cc
+% }
+% Setting two coffins equal is just a wrapper around other functions.
+% \begin{macrocode}
+\cs_set_protected_nopar:Npn \coffin_gset_eq:NN #1#2
+ {
+ \coffin_if_exist:NT #1
+ {
+ \box_gset_eq:NN #1 #2
+ \coffin_gset_eq_structure:NN #1 #2
+ }
+ }
+\cs_generate_variant:Nn \coffin_gset_eq:NN { c , Nc , cc }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Options and configuration}
+%
+% \begin{macrocode}
+\DeclareOption{a5paper}{\@latexerr{Option not supported}{}}
+% \end{macrocode}
+%
+%
% \begin{macrocode}
\DeclareOption{full}{ \bool_set_true:N \g_doc_full_bool }
\DeclareOption{onlydoc}{ \bool_set_false:N \g_doc_full_bool }
@@ -548,7 +606,17 @@ Do not distribute a modified version of this file.
% \begin{macrocode}
\LoadClass{article}
\RequirePackage{doc}
-\RequirePackage{array,alphalph,booktabs,color,fixltx2e,enumitem,pifont,textcomp,trace,underscore,csquotes}
+\RequirePackage{array,alphalph,booktabs,color,colortbl,fixltx2e,enumitem,pifont,textcomp,trace,underscore,csquotes,fancyvrb}
+\raggedbottom
+% \end{macrocode}
+%
+%
+% I've never worked out why the verbatim environment adds extra space in dtx documents.
+% Fix it with fancyvrb:
+% \begin{macrocode}
+\fvset{gobble=2}
+\cs_set_eq:NN \verbatim \Verbatim
+\cs_set_eq:NN \endverbatim \endVerbatim
% \end{macrocode}
%
% \begin{macrocode}
@@ -630,19 +698,19 @@ Do not distribute a modified version of this file.
% \end{macrocode}
% (These were introduced when "article" was the documentclass, but
% I've left them here for now to remind me to do something about them
-% later; we still have the problem of \emph{very long} command names.)
+% later.)
%
% Customise lists:
% \begin{macrocode}
\cs_set_eq:NN \@@oldlist\list
\cs_set_nopar:Npn \list#1#2{\@@oldlist{#1}{#2\listparindent\z@}}
-\setlength \parindent { 0pt }
+\setlength \parindent { 2em }
\setlength \itemindent { 0pt }
-\setlength \parskip { \medskipamount }
+\setlength \parskip { 0pt plus 3pt minus 0pt }
% \end{macrocode}
%
%
-% Customise TOC (as we have so many sections). Different design and/or
+% Customise TOC (as we have so many sections). Different design and/or
% structure is called for ):
% \begin{macrocode}
\cs_set_nopar:Npn \l@section #1#2 {
@@ -662,7 +730,6 @@ Do not distribute a modified version of this file.
\cs_set_nopar:Npn\l@subsection{\@dottedtocline{2}{2.5em}{2.3em}} % #2 = 1.5em
% \end{macrocode}
%
-
%
% \subsection{Text markup}
%
@@ -714,10 +781,9 @@ Do not distribute a modified version of this file.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\m,\file,\env,\pkg,\cls}
+% \begin{macro}{\file,\env,\pkg,\cls}
% This list may change\dots this is just my preference for markup.
% \begin{macrocode}
-\cs_set_eq:NN \m \meta
\cs_set_eq:NN \file \nolinkurl
\DeclareRobustCommand \env {\texttt}
\DeclareRobustCommand \pkg {\textsf}
@@ -738,11 +804,11 @@ Do not distribute a modified version of this file.
% \end{environment}
%
% \begin{macro}{\tn}
-% As \cs{cs}. Use this to mark up all \TeX\ and \LaTeXe\ commands; they
+% As \cs{cs}. Use this to mark up all \TeX\ and \LaTeXe\ commands; they
% then end up together in the index. TODO: hyperlinks in the index entries.
% \begin{macrocode}
\newcommand\tn[1]{
- \texttt{\bslash #1}
+ \texttt { \char`\\ #1 }
\index{TeX~and~LaTeX2e~commands\actualchar
\string\TeX{}~and~\string\LaTeXe{}~commands:\levelchar
#1\actualchar{\string\ttfamily\string\bslash{}#1}}}
@@ -756,9 +822,11 @@ Do not distribute a modified version of this file.
% \begin{macrocode}
\cs_new:Npn \doc_implementation: {
\cs_set:Npn \variable {\macro[var]}
+ \cs_set_eq:NN \endvariable \endmacro
}
\cs_new:Npn \doc_docu: {
\cs_set_eq:NN \variable \variabledoc
+ \cs_set_eq:NN \endvariable \endvariabledoc
}
\AtEndOfPackage{\doc_docu:}
\newenvironment{documentation}{\doc_docu:}{}
@@ -799,6 +867,35 @@ Do not distribute a modified version of this file.
% \end{macrocode}
% \end{environment}
%
+% \begin{macrocode}
+\keys_define:nn { l3doc/function }
+ {
+ TF .code:n =
+ {
+ \bool_gset_true:N \l_doc_meta_TF_bool
+ } ,
+ EXP .code:n =
+ {
+ \bool_gset_true:N \l_doc_meta_EXP_bool
+ \bool_gset_false:N \l_doc_meta_rEXP_bool
+ } ,
+ rEXP .code:n =
+ {
+ \bool_gset_false:N \l_doc_meta_EXP_bool
+ \bool_gset_true:N \l_doc_meta_rEXP_bool
+ } ,
+ pTF .code:n =
+ {
+ \bool_gset_true:N \l_doc_meta_pTF_bool
+ \bool_gset_true:N \l_doc_meta_TF_bool
+ \bool_gset_true:N \l_doc_meta_EXP_bool
+ } ,
+ added .tl_set:N = \l_doc_date_added_tl ,
+ updated .tl_set:N = \l_doc_date_updated_tl ,
+ }
+% \end{macrocode}
+%
+%
% \begin{environment}{function}
% \begin{environment}{variabledoc}
% Environment for documenting function(s).
@@ -807,107 +904,189 @@ Do not distribute a modified version of this file.
% Ignore spaces and sanitize with catcodes before reading argument.
% \begin{macrocode}
\char_set_catcode_active:N \<
-\DeclareDocumentCommand \function { O{} } {
+\DeclareDocumentEnvironment {function} { O{} } {
+ \par\bigskip\noindent
\phantomsection
-
+
+ \coffin_clear:N \l_doc_descr_coffin
+ \coffin_clear:N \l_doc_syntax_coffin
+ \coffin_clear:N \l_doc_names_coffin
+
\bool_gset_false:N \l_doc_meta_TF_bool
\bool_gset_false:N \l_doc_meta_pTF_bool
\bool_gset_false:N \l_doc_meta_EXP_bool
\bool_gset_false:N \l_doc_meta_rEXP_bool
- \cs_set_nopar:Npn \KV_key_no_value_elt:n ##1 { \use:c {doc_meta_opt_##1:} }
- \keyval_parse:NNn \KV_key_no_value_elt:n \use_none:nn {#1}
+ \keys_set:nn { l3doc/function } {#1}
\char_set_catcode_active:N \<
\cs_set_eq:NN < \doc_open_meta:n
-
+
\group_begin:
\MakePrivateLetters
\char_set_catcode_other:N \|
- \char_set_catcode_other:N \\
\char_set_catcode_space:N \~
\char_set_catcode_ignore:N \ % space
\char_set_catcode_ignore:N \^^M
\char_set_catcode_ignore:N \^^I
+
\function_aux:n
-}
+ }
+ {
+ \vcoffin_set_end:
+ \hcoffin_set:Nn \l_doc_names_coffin
+ {
+ \exp_args:NV \function_typeset:n \l_doc_function_input_tl
+ }
+ \bool_if:NTF \l_doc_long_name_bool
+ {
+ \coffin_join:NnnNnnnn
+ \l_doc_output_box {hc} {vc}
+ \l_doc_syntax_coffin {l} {T}
+ {0pt} {0pt}
+ \coffin_join:NnnNnnnn
+ \l_doc_output_box {l} {t}
+ \l_doc_names_coffin {r} {t}
+ {-\marginparsep} {0pt}
+ \coffin_join:NnnNnnnn
+ \l_doc_output_box {l} {b}
+ \l_doc_descr_coffin {l} {t}
+ {0.75\marginparwidth + \marginparsep} {-\medskipamount}
+
+ \coffin_typeset:Nnnnn \l_doc_output_box {\l_doc_descr_coffin-l} {\l_doc_descr_coffin-t} {0pt} {0pt}
+ }
+ {
+ \coffin_join:NnnNnnnn
+ \l_doc_output_box {hc} {vc}
+ \l_doc_syntax_coffin {l} {t}
+ {0pt} {0pt}
+ \coffin_join:NnnNnnnn
+ \l_doc_output_box {l} {b}
+ \l_doc_descr_coffin {l} {t}
+ {0pt} {-\medskipamount}
+ \coffin_join:NnnNnnnn
+ \l_doc_output_box {l} {t}
+ \l_doc_names_coffin {r} {t}
+ {-\marginparsep} {0pt}
+
+ \coffin_typeset:Nnnnn
+ \l_doc_output_box {\l_doc_syntax_coffin-l} {\l_doc_syntax_coffin-T}
+ {0pt} {0pt}
+ }
+ \par
+ \allowbreak
+ }
\char_set_catcode_other:N \<
\cs_set_eq:NN \variabledoc \function
+\cs_set_eq:NN \endvariabledoc \endfunction
% \end{macrocode}
%
-% \begin{macrocode}
-\cs_set:Nn \doc_meta_opt_TF: {
- \bool_gset_true:N \l_doc_meta_TF_bool
-}
-\cs_set:Nn \doc_meta_opt_EXP: {
- \bool_gset_true:N \l_doc_meta_EXP_bool
- \bool_gset_false:N \l_doc_meta_rEXP_bool
-}
-\cs_set:Nn \doc_meta_opt_rEXP: {
- \bool_gset_false:N \l_doc_meta_EXP_bool
- \bool_gset_true:N \l_doc_meta_rEXP_bool
-}
-\cs_set:Nn \doc_meta_opt_pTF: {
- \bool_gset_true:N \l_doc_meta_pTF_bool
- \bool_gset_true:N \l_doc_meta_TF_bool
- \bool_gset_true:N \l_doc_meta_EXP_bool
-}
-% \end{macrocode}
%
% \begin{macro}{\function_aux:n}
% \begin{arguments}
-% \item Vertical bar--separated list of functions with optional metadata;
+% \item Comma-separated list of functions;
% input has already been sanitised by catcode changes before reading
% the argument.
% \end{arguments}
-% Because vertical bars are odd delimiters to choose, we also now iterate over commas!
% \begin{macrocode}
-\group_begin:
-\char_set_catcode_other:N \|
-\cs_gset_nopar:Npn \function_aux:n #1 {
- \cs_set_nopar:Npn \nextnewline{\cs_gset_nopar:Npn\nextnewline{\\}}
- \tl_gset_eq:NN \g_doc_macro_tl \c_empty_tl
- \bigskip\endgraf\noindent\ttfamily
- \tabular[b]{ | l @{} c | }
- \hline
- \clist_map_inline:nn {#1} {\doc_showmacro:w ##1 | \q_stop} \\
- \hline
- \endtabular
+\cs_set_nopar:Npn \function_aux:n #1 {
+
\group_end:
+
+ \tl_set:Nn \l_doc_function_input_tl {#1}
+
+ \dim_zero:N \l_doc_trial_width_dim
+ \hcoffin_set:Nn \l_doc_names_coffin { \function_typeset:n {#1} }
+ \dim_set:Nn \l_doc_trial_width_dim { \box_wd:N \l_doc_names_coffin }
+
+ \bool_set:Nn \l_doc_long_name_bool
+ { \dim_compare_p:nNn \l_doc_trial_width_dim > \marginparwidth }
+
+ \vcoffin_set:Nnw \l_doc_descr_coffin {\textwidth}
+ \noindent\ignorespaces
}
-\group_end:
+\cs_gset_nopar:Npn \function_typeset:n #1
+ {
+
+ \cs_set_nopar:Npn \nextnewline{\cs_gset_nopar:Npn\nextnewline{\\}}
+ \tl_gclear:N \g_doc_macro_tl
+
+ \prop_clear:N \l_doc_functions_block_prop
+
+ \clist_map_function:nN {#1} \doc_parse_functions:n
+
+ \small\ttfamily
+ \begin{tabular}{ @{} l @{} r @{} }
+ \toprule
+ \prop_map_function:NN \l_doc_functions_block_prop \doc_show_functions:nn
+ \\
+
+ \bool_if:nF { \tl_if_empty_p:N \l_doc_date_added_tl &&
+ \tl_if_empty_p:N \l_doc_date_updated_tl }
+ { \midrule }
+
+ \tl_if_empty:NF \l_doc_date_added_tl
+ {
+ \multicolumn{2}{@{}r@{}}
+ { \scriptsize New:\,\l_doc_date_added_tl } \\
+ }
+
+ \tl_if_empty:NF \l_doc_date_updated_tl
+ {
+ \multicolumn{2}{@{}r@{}}
+ { \scriptsize Updated:\,\l_doc_date_updated_tl } \\
+ }
+ \bottomrule
+ \end{tabular}
+ \normalfont\normalsize
+ }
+
+\prop_new:N \l_doc_functions_block_prop
+\cs_generate_variant:Nn \prop_put:Nnn {Nxx}
+\cs_new:Nn \doc_parse_functions:n
+ {
+ \exp_args:Nxx \tl_if_head_eq_charcode:nNTF { \token_to_str:N #1 } {\cs_to_str:N \\}
+ {
+ \tl_gset_eq:NN \l_doc_function_name_prefix_tl \@backslashchar
+ % for the weird functions named "\::N" and so on:
+ \exp_args:Nx \tl_if_head_eq_charcode:nNTF { \cs_to_str:N #1 } {:}
+ {
+ % again, no variants:
+ \prop_put:Nxx \l_doc_functions_block_prop { \cs_to_str:N #1 } { }
+ }
+ {
+ % finally, for regular old csnames:
+ \exp_args:NNf \prop_get:NnNTF
+ \l_doc_functions_block_prop
+ { \cs_get_function_name:N #1 } \l_doc_tmp_tl
+ {
+ \prop_put:Nxx \l_doc_functions_block_prop
+ { \cs_get_function_name:N #1 }
+ { \l_doc_tmp_tl , \cs_get_function_signature:N #1 }
+ }
+ {
+ \prop_put:Nxx \l_doc_functions_block_prop
+ { \cs_get_function_name:N #1 }
+ { \cs_get_function_signature:N #1 }
+ }
+ }
+ }
+ % for keys and things that aren't actually csnames:
+ {
+ % for now don't bother splitting into variants:
+ \tl_gclear:N \l_doc_function_name_prefix_tl
+ \prop_put:Nxx \l_doc_functions_block_prop { #1 } { }
+ }
+ }
+
% \end{macrocode}
% \end{macro}
% \end{environment}
% \end{environment}
%
-% \begin{macro}{\doc_showmacro:w}
-% This function reads in a "|"-separated list, passing each item to
-% the auxiliary function "\doc_showmacro_aux:w".
-% \begin{macrocode}
-\group_begin:
-\char_set_catcode_other:N \|
-\cs_gset_nopar:Npn \doc_showmacro:w #1 | {
- \tl_if_blank:nTF {#1} {
- \use_none:n
- }{
- \doc_showmacro_aux:w #1 / \q_stop
- \peek_meaning:NTF \q_stop { \use_none:n } { \doc_showmacro:w }
- }
-}
-\group_end:
-% \end{macrocode}
-% \end{macro}
%
-% \begin{macrocode}
-\bool_new:N \l_doc_meta_TF_bool
-\bool_new:N \l_doc_meta_pTF_bool
-\bool_new:N \l_doc_meta_EXP_bool
-\bool_new:N \l_doc_meta_rEXP_bool
-% \end{macrocode}
-%
-% \begin{macro}[aux]{\doc_showmacro_aux:w}
+% \begin{macro}{\doc_showmacro:n}
% This macro is passed one of:
% \begin{quote}
% "\abc:cnx / (EXP) / \q_stop" \\
@@ -919,115 +1098,117 @@ Do not distribute a modified version of this file.
% \item Function/macro/variable name \item Metadata tags (if any)
% \end{arguments}
% \begin{macrocode}
-\cs_new_nopar:Npn \doc_showmacro_aux:w #1 / #2 \q_stop {
-
- \tl_if_in:nnT {#2} { (TF) } {
- \bool_gset_true:N \l_doc_meta_TF_bool
- }
-
- \tl_if_in:nnT {#2} { (EXP) } {
- \bool_gset_true:N \l_doc_meta_EXP_bool
- }
- \tl_if_in:nnT {#2} { (rEXP) } {
- \bool_gset_true:N \l_doc_meta_rEXP_bool
- }
-
- \tl_if_in:nnT {#2} { (pTF) } {
- \bool_gset_true:N \l_doc_meta_TF_bool
- \bool_gset_true:N \l_doc_meta_pTF_bool
- \bool_gset_true:N \l_doc_meta_EXP_bool
+\cs_new:Nn \doc_show_functions:nn
+ {
+ \clist_gset:Nn \l_doc_variants_clist {#2}
+ \clist_gpop:NN \l_doc_variants_clist \l_doc_tmp_tl
+ \exp_args:Nx \doc_showmacro:n
+ { \exp_not:c {#1 \tl_if_empty:NF \l_doc_tmp_tl { : \l_doc_tmp_tl } } }
}
+\cs_new_nopar:Nn \doc_showmacro:n {
\bool_if:NT \l_doc_meta_pTF_bool {
- \tl_set:Nx \l_doc_pTF_name_tl { \doc_predicate_from_base:w #1 \q_nil }
- \doc_special_main_index:o { \l_doc_pTF_name_tl }
+ \tl_set:Nx \l_doc_pTF_name_tl { \doc_predicate_from_base:N #1 }
+ \doc_special_main_index:o { \token_to_str:N \l_doc_pTF_name_tl }
\seq_gput_right:Nx \g_doc_functions_seq { \tl_to_str:N \l_doc_pTF_name_tl }
}
\bool_if:NTF \l_doc_meta_TF_bool {
- \doc_special_main_index:o { #1 TF }
+ \doc_special_main_index:o { \token_to_str:N #1 TF }
\seq_gput_right:Nx \g_doc_functions_seq { \tl_to_str:n { #1 TF } }
\seq_gput_right:Nx \g_doc_functions_seq { \tl_to_str:n { #1 T } }
\seq_gput_right:Nx \g_doc_functions_seq { \tl_to_str:n { #1 F } }
}{
- \doc_special_main_index:o { #1 }
+ \doc_special_main_index:o { \token_to_str:N #1 }
\seq_gput_right:Nx \g_doc_functions_seq { \tl_to_str:n { #1 } }
}
\bool_if:NTF \l_doc_meta_pTF_bool {
\bool_gset_false:N \l_doc_meta_TF_bool
- \exp_after:wN \doc_showmacro_aux_ii:w \l_doc_pTF_name_tl ::\q_stop
+ \exp_args:Nc \doc_showmacro_aux_ii:N \l_doc_pTF_name_tl
\bool_gset_true:N \l_doc_meta_TF_bool
- \doc_showmacro_aux_ii:w #1::\q_stop
+ \exp_args:Nc \doc_showmacro_aux_ii:N { \cs_to_str:N #1 }
}{
- \exp_args:Nf \tl_if_head_eq_charcode:nNTF { \use_none:n #1 } {:}
- { \doc_showmacro_aux_iii:n {#1} }
- { \doc_showmacro_aux_ii:w #1::\q_stop }
+ \exp_args:Nx \tl_if_head_eq_charcode:nNTF { \exp_after:wN \use_none:n \token_to_str:N #1 } {:}
+ { \doc_showmacro_aux_iii:N #1 }
+ { \doc_showmacro_aux_ii:N #1 }
}
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\doc_showmacro_aux_ii:w}
-% This macro is passed arguments in the following ways:
-% \begin{quote}
-% "\doc_showmacro_aux_ii:w "^^A
-% \makebox[\widthof{\texttt{123456}}]{\meta{name}}^^A
-% " ::\q_stop" \\
-% "\doc_showmacro_aux_ii:w \foo ::\q_stop" \\
-% "\doc_showmacro_aux_ii:w \foo: ::\q_stop" \\
-% "\doc_showmacro_aux_ii:w \foo:Z ::\q_stop" \\
-% \end{quote}
-% Notice that for "\foo", "#2" and "#3" are empty,\\
-% for "\foo:", "#2" is empty, and "#3" is `":"'\\
-% for "\foo:Z", "#2" is `"Z"' and "#3" is `":"' .
-% \begin{arguments}
-% \item Function name \item Possible arg.\ spec. \item Possible colon
-% \end{arguments}
+% \begin{macro}[aux]{\doc_showmacro_aux_ii:N}
% \begin{macrocode}
-\cs_set_nopar:Npn \doc_showmacro_aux_ii:w #1:#2:#3 \q_stop {
+\cs_set_nopar:Nn \doc_showmacro_aux_ii:N {
\nextnewline
- \str_if_eq:xxTF {#1} {\g_doc_macro_tl} {
- \doc_typeset_aux:n
- }{
- \tl_gset:Nn \g_doc_macro_tl {#1}
- \use:n
- }
- { \g_doc_macro_tl }
- #3
- #2
+ \tl_gset:Nx \l_doc_function_name_tl { \cs_get_function_name:N #1 }
+ \tl_gset:Nx \l_doc_function_sig_tl { \cs_get_function_signature:N #1 }
+ \tl_gset:Nx \g_doc_macro_tl { \l_doc_function_name_prefix_tl \l_doc_function_name_tl }
+
+ \g_doc_macro_tl
+ \tl_if_empty:NF \l_doc_function_sig_tl { : \l_doc_function_sig_tl }
\bool_if:NT \l_doc_meta_TF_bool { \doc_typeset_TF: }
+
&
\bool_if:NT \l_doc_meta_EXP_bool {
\hspace{\tabcolsep}
- \hyperlink{expstar}{$\star$}
+ \hyperlink{expstar} {$\star$}
}
\bool_if:NT \l_doc_meta_rEXP_bool {
\hspace{\tabcolsep}
- \hyperlink{rexpstar}{\ding{73}}% hollow star
+ \hyperlink{rexpstar} {\ding{73}} % hollow star
}
- \tl_set:Nx \g_doc_macro_tl { \tl_to_str:N \g_doc_macro_tl }
+
+ \clist_if_empty:NF \l_doc_variants_clist
+ {
+ \\
+ \doc_typeset_aux:n \g_doc_macro_tl :
+ \int_compare:nTF { \clist_length:N \l_doc_variants_clist == 1 }
+ { \l_doc_variants_clist }
+ {
+ \textrm(
+ \clist_pop:NN \l_doc_variants_clist \l_doc_tmp_tl
+ \l_doc_tmp_tl
+ \clist_map_inline:Nn \l_doc_variants_clist {\textrm|##1}
+ \textrm)
+ }
+ \bool_if:NT \l_doc_meta_TF_bool { \doc_typeset_TF: }
+ &
+ \bool_if:NT \l_doc_meta_EXP_bool {
+ \hspace{\tabcolsep}
+ \hyperlink{expstar} {$\star$}
+ }
+ \bool_if:NT \l_doc_meta_rEXP_bool {
+ \hspace{\tabcolsep}
+ \hyperlink{rexpstar} {\ding{73}} % hollow star
+ }
+ }
+
\exp_args:NNf \tl_replace_all:Nnn \g_doc_macro_tl {\token_to_str:N _} {/}
\exp_args:NNf \tl_replace_all:Nnn \g_doc_macro_tl {\@backslashchar} {}
\bool_if:NT \g_doc_full_bool {
- \exp_args:Nf\label{doc/function/\g_doc_macro_tl#3#2}
+ \exp_args:Nx \label
+ {
+ doc/function//\g_doc_macro_tl
+ \tl_if_empty:NF \l_doc_function_sig_tl { : \l_doc_function_sig_tl }
+ }
}
}
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}[aux]{\doc_showmacro_aux_iii:w}
+%
+% \begin{macro}[aux]{\doc_showmacro_aux_iii:N}
% This is for the case when the function is one of the weird ones like \cs{::N}.
% \begin{macrocode}
-\cs_set_nopar:Nn \doc_showmacro_aux_iii:n {
+\cs_set_nopar:Nn \doc_showmacro_aux_iii:N {
\nextnewline
- \tl_gset:Nx \g_doc_macro_tl {#1}
- #1 &
- \tl_set:Nx \g_doc_macro_tl { \tl_to_str:N \g_doc_macro_tl }
+ \tl_gset:Nx \g_doc_macro_tl { \token_to_str:N #1}
+ \token_to_str:N #1 &
+
\exp_args:NNf \tl_replace_all:Nnn \g_doc_macro_tl {\token_to_str:N _} {/}
\exp_args:NNf \tl_replace_all:Nnn \g_doc_macro_tl {\@backslashchar} {}
\bool_if:NT \g_doc_full_bool {
- \exp_args:Nf\label{doc/function/\g_doc_macro_tl}
+ \exp_args:Nx \label { doc/function//\g_doc_macro_tl }
}
}
% \end{macrocode}
@@ -1036,16 +1217,33 @@ Do not distribute a modified version of this file.
% \begin{environment}{syntax}
% Syntax block placed next to the list of functions to illustrate their use.
% \begin{macrocode}
-\dim_new:N \g_doc_syntax_dim
-\dim_set:Nn \g_doc_syntax_dim {0.7\textwidth}
\newenvironment{syntax}{
- \minipage[b]{\g_doc_syntax_dim}
- \small\ttfamily\raggedright
- \obeyspaces\obeylines
+ \small\ttfamily
+ \bool_if:NTF \l_doc_long_name_bool
+ {
+ \hcoffin_set:Nw \l_doc_syntax_coffin
+ \arrayrulecolor{white}
+ \begin{tabular}{@{}l@{}}
+ \toprule
+ \begin{minipage}
+ { \textwidth+0.75\marginparwidth-\l_doc_trial_width_dim }
+ }
+ {
+ \hcoffin_set:Nw \l_doc_syntax_coffin
+ \arrayrulecolor{white}
+ \begin{tabular}{@{}l@{}}
+ \toprule
+ \begin{minipage}{ \textwidth }
+ }
+ \raggedright
+ \obeyspaces\obeylines
}{
- \endminipage
- \hfil\break
- \global\@ignoretrue
+ \end{minipage}
+ \end{tabular}
+ \arrayrulecolor{black}
+ \hcoffin_set_end:
+ \coffin_gset_eq:NN \l_doc_syntax_coffin \l_doc_syntax_coffin
+ \ignorespacesafterend
}
% \end{macrocode}
% \end{environment}
@@ -1112,13 +1310,12 @@ Do not distribute a modified version of this file.
\bool_set_false:N \l_doc_macro_pTF_bool
\bool_set_false:N \l_doc_macro_var_bool
\bool_set_false:N \l_doc_tested_bool
-
+
\cs_set_eq:NN \doc_macroname_prefix:n \use:n
\cs_set_eq:NN \doc_macroname_suffix: \c_empty_tl
-
- \cs_set_nopar:Npn \KV_key_no_value_elt:n ##1 { \use:c {doc_macro_opt_##1:} }
- \keyval_parse:NNn \KV_key_no_value_elt:n \use_none:nn {#1}
-
+
+ \keys_set:nn { l3doc/macro } {#1}
+
\cs_set_eq:NN \testfile \doc_print_testfile:n
\group_begin:
@@ -1129,6 +1326,10 @@ Do not distribute a modified version of this file.
\char_set_catcode_ignore:N \^^I
\doc_macro_aux:n
}
+\keys_define:nn { l3doc/macro }
+ {
+ unknown .code:n = { \use:c{doc_macro_opt_#1:} }
+ }
% \end{macrocode}
% After changing the catcodes, parse the arguments:
% \begin{macrocode}
@@ -1139,30 +1340,17 @@ Do not distribute a modified version of this file.
{
\clist_map_inline:nn {#1}
{
- \tl_if_blank:nF {##1}
- {
- \exp_args:Nf \doc_macro_single
- { \doc_predicate_from_base:w ##1 \q_nil }
- }
+ \exp_args:Nf \doc_macro_single { \doc_predicate_from_base:w ##1 }
}
\bool_set_true:N \l_doc_macro_TF_bool
- \clist_map_inline:nn {#1}
- { \tl_if_blank:nF {##1} { \doc_macro_single {##1} } }
+ \clist_map_function:nN {#1} \doc_macro_single
\bool_set_false:N \l_doc_macro_TF_bool
}
- {
- \clist_map_inline:nn {#1}
- { \tl_if_blank:nF {##1} { \doc_macro_single {##1} } }
- }
+ { \clist_map_function:nN {#1} \doc_macro_single }
}
% \end{macrocode}
%
% \begin{macrocode}
-\bool_new:N \l_doc_macro_internal_bool
-\bool_new:N \l_doc_macro_aux_bool
-\bool_new:N \l_doc_macro_TF_bool
-\bool_new:N \l_doc_macro_pTF_bool
-\bool_new:N \l_doc_macro_var_bool
\cs_set_nopar:Npn \doc_macro_opt_aux: { \bool_set_true:N \l_doc_macro_aux_bool }
\cs_set_nopar:Npn \doc_macro_opt_internal: { \bool_set_true:N \l_doc_macro_internal_bool }
\cs_set_nopar:Npn \doc_macro_opt_TF: { \bool_set_true:N \l_doc_macro_TF_bool }
@@ -1172,7 +1360,10 @@ Do not distribute a modified version of this file.
% \end{environment}
%
% \begin{macrocode}
-\cs_set:Npn \doc_predicate_from_base:w #1:#2 \q_nil {#1_p:#2}
+\cs_set:Nn \doc_predicate_from_base:N
+ {
+ \cs_get_function_name:N #1 _p: \cs_get_function_signature:N #1
+ }
% \end{macrocode}
%
% \begin{environment}{doc_macro_single}
@@ -1183,7 +1374,6 @@ Do not distribute a modified version of this file.
% \item Macro/function/whatever name; input has already been sanitised.
% \end{arguments}
% \begin{macrocode}
-\int_new:N \l_doc_macro_int
\cs_set_nopar:Npn \doc_macro_single #1 {
\int_incr:N \l_doc_macro_int
\tl_set:Nx \saved@macroname { \token_to_str:N #1 }
@@ -1211,7 +1401,7 @@ Do not distribute a modified version of this file.
\bool_if:NT \l_doc_macro_TF_bool {
\cs_set_eq:NN \doc_macroname_suffix: \doc_typeset_TF:
}
-
+
\bool_if:NF \l_doc_macro_aux_bool {
\tl_gset:Nx \l_doc_macro_tl { \tl_to_str:n {#1} }
\exp_args:NNf \tl_greplace_all:Nnn \l_doc_macro_tl {\token_to_str:N _} {/}
@@ -1241,7 +1431,7 @@ Do not distribute a modified version of this file.
\SpecialMainIndex{#1}\nobreak
\DoNotIndex{#1}
}
-
+
\global\advance \c@CodelineNo \m@ne
\ignorespaces
}
@@ -1252,14 +1442,14 @@ Do not distribute a modified version of this file.
\tl_clear:N \l_doc_macro_tl
\cs_set_nopar:Npn \doc_print_macroname:n #1 {
\strut
- \int_compare:nTF { \tl_elt_count:n {#1} <= 28 }
+ \int_compare:nTF { \tl_length:n {#1} <= 28 }
{ \MacroFont } { \MacroLongFont }
% INEFFICIENT: (!)
\exp_args:NNx \seq_if_in:NnTF \g_doc_functions_seq
{ #1 \bool_if:NT \l_doc_macro_TF_bool { \tl_to_str:n {TF} } }
{
- \hyperref [doc/function/\l_doc_macro_tl]
+ \hyperref [doc/function//\l_doc_macro_tl]
}
{ \use:n }
{
@@ -1293,7 +1483,7 @@ Do not distribute a modified version of this file.
}
}
\cs_set_nopar:Npn \doc_typeset_aux:n #1 {
- {\color[gray]{0.5} #1}
+ {\color[gray]{0.7} #1}
}
% \end{macrocode}
% \end{macro}
@@ -1313,7 +1503,6 @@ Do not distribute a modified version of this file.
}
}
}
-\seq_new:N \g_doc_testfiles_seq
% \end{macrocode}
% \end{macro}
%
@@ -1340,7 +1529,6 @@ Do not distribute a modified version of this file.
% \begin{macro}{\TestMissing}
% \begin{macrocode}
\cs_generate_variant:Nn \prop_gput:Nnn {NVx}
-\prop_new:N \g_doc_missing_tests_prop
\DeclareDocumentCommand \TestMissing {m} {
\prop_if_in:NVTF \g_doc_missing_tests_prop \l_doc_macro_input_clist
{
@@ -1359,7 +1547,6 @@ Do not distribute a modified version of this file.
%
% \begin{macro}{\endmacro}
% \begin{macrocode}
-\int_new:N \g_doc_nested_macro_int
\cs_set:Nn \doc_texttt_comma:n {\,,~\texttt{#1}}
\cs_set:Npn \endmacro {
\int_compare:nT {\g_doc_nested_macro_int<1}
@@ -1399,7 +1586,7 @@ Do not distribute a modified version of this file.
\bool_if:NTF \l_doc_macro_var_bool{variable}{function}
\int_compare:nNnTF \l_doc_macro_int=1 {~is~}{s~are~}
documented~on~page~
- \exp_args:Nx\pageref{doc/function/\l_doc_macro_tl}.
+ \exp_args:Nx\pageref{doc/function//\l_doc_macro_tl}.
}
})\par}
}
@@ -1573,7 +1760,6 @@ Do not distribute a modified version of this file.
%
% \begin{macro}{\StopEventually,\Finale,\AlsoImplementation,\OnlyDescription}
% \begin{macrocode}
-\bool_new:N \g_doc_implementation_bool
\cs_set_nopar:Npn \AlsoImplementation {
\bool_set_true:N \g_doc_implementation_bool
\cs_set:Npn \StopEventually ##1 {
@@ -1601,7 +1787,6 @@ Do not distribute a modified version of this file.
% \begin{macro}{\DocInput}
% From \pkg{doc}. Now accepts comma-list input (who has commas in filenames?).
% \begin{macrocode}
-\clist_new:N \g_docinput_clist
\cs_set:Npn \DocInput #1 {
\clist_map_inline:nn {#1} {
\clist_put_right:Nn \g_docinput_clist {##1}
@@ -1744,12 +1929,6 @@ Do not distribute a modified version of this file.
% Print all defined and documented macros/functions.
%
% \begin{macrocode}
-\seq_new:N \g_doc_functions_seq
-\seq_new:N \g_doc_macros_seq
-\seq_new:N \g_doc_not_tested_seq
-% \end{macrocode}
-%
-% \begin{macrocode}
\iow_open:Nn \g_write_func_stream { \jobname.cmds }
% \end{macrocode}
%
@@ -1820,7 +1999,7 @@ Do not distribute a modified version of this file.
{
\tl_put_right:Nn \l_tmpa_tl
{^^J\space\space\space\space ##1
- ^^J\space\space\space\space\space\space ##2}
+ ^^J\space\space\space\space\space\space ##2}
}
}
\seq_if_empty:NF \g_doc_not_tested_seq
@@ -2013,49 +2192,90 @@ page_precedence "rnaA"
% \end{macrocode}
%
% \section{Testing}
-%\ExplSyntaxOn
+%\ExplSyntaxOn
%\cs_set_eq:NN\g_saved_doc_functions_seq\g_doc_functions_seq
%\cs_set_eq:NN\g_saved_doc_macros_seq\g_doc_macros_seq
%\ExplSyntaxOff
%
-% \begin{function}{\example_foo:N|\example_foo:c}
+% \begin{function}{.bool_set:N}
+% blah
+% \end{function}
+%
+% \lipsum[2]
+% \ExplSyntaxOn \cs_set_eq:NN \c_alignment_token @ \ExplSyntaxOff
+% \begin{variabledoc}
+% {
+% \c_alignment_token,
+% }
+% \end{variabledoc}
+% \ExplSyntaxOn \cs_set_eq:NN \c_alignment_token & \ExplSyntaxOff
+%
+% \begin{function}[added=2011-09-06]{\example_foo:N,\example_foo:c}
% \begin{syntax}
% "\example_foo:N" <arg1>
+% "\example_foo:c" \Arg{arg1}
% \end{syntax}
% <0123456789> <\0\1\2\3\4\5\6\7\8\9> \Arg{arg1} ":("
% \end{function}
%
-% \begin{function}{ \foo | \foo: | \foo:x | \barrz: }
+% \begin{function}[added=2011-09-06]{ \foo , \foo: , \foo:x , \barrz: }
% \begin{syntax}
% "\example_foo:N" <arg1>
% \end{syntax}
% <0123456789> <\0\1\2\3\4\5\6\7\8\9>
% \end{function}
%
-% \begin{function}{\foo:N / (TF) | \foo_if:c / (TF) (EXP)}
+% \begin{function}[TF]{\foo:N , \foo_if:c }
+% Test.
+% \end{function}
+% \begin{function}[TF,EXP]{\foo:N , \foo_if:c }
% Test.
% \end{function}
%
-% \begin{function}[EXP]{\fffoo:N}
+% \begin{function}[added=2011-09-06,EXP]{\fffoo:N}
+% Test.
+% \end{function}
+% \begin{function}[added=2011-09-06,updated=2011-09-07,EXP]{\fffoo:N}
+% Test.
+% \end{function}
+% \begin{function}[updated=2011-09-06,EXP]{\fffoo:N}
% Test.
% \end{function}
% \begin{function}[TF]{\ffffoo:N}
% Test.
% \end{function}
% \begin{function}[pTF]{\ffoo:N}
-% Test.
+% \lipsum[6]
+% \end{function}
+% \begin{function}[pTF]{\ffoo:N,\ffoo:c,\ffoo:V}
+% \lipsum[6]
+% \end{function}
+% \begin{function}[pTF]{\ffoo:N,\ffoo:c}
+% \lipsum[6]
+% \end{function}
+%
+%
+% \begin{function}[TF]{\ffffoo_with_very_very_very_long_name:N}
+% \lipsum[1]
+% \end{function}
+%
+% \begin{function}[TF]{\ffffoo_with_very_very_very_long_name:N,\ffffoo_with_very_very_very_long_name:c,\ffffoo_with_very_very_very_long_name:V}
+% \lipsum[1]
% \end{function}
%
-% \begin{function}{ \bar / (EXP) | \bar: / (EXP) | \bar:x / (EXP) | }
+% \begin{function}[TF]{\ffffoo_with_very_very_very_long_name:N,\ffffoo_with_very_very_very_long_name:c,\ffffoo_with_very_very_very_long_name:V}
% \begin{syntax}
-% "\example_foo:N" <arg1>
+% this is how you use it
% \end{syntax}
-% <0123456789> <\0\1\2\3\4\5\6\7\8\9>
+% \lipsum[1]
% \end{function}
%
-% \begin{macro}{ \foo , \foo: , \foo:x }
-% Testing.
-% \end{macro}
+% \begin{function}[TF]{\ffffoo_with_very_very_very_long_name:N,\ffffoo_with_very_very_very_long_name:V}
+% \begin{syntax}
+% this is how you use it
+% \end{syntax}
+% \lipsum[1]
+% \end{function}
%
% \bigskip\bigskip
%
@@ -2081,18 +2301,25 @@ page_precedence "rnaA"
% \end{macrocode}
% \end{macro}
%
-%
% \begin{function}{\::N}
% this is (no longer) weird
% \end{function}
-%
+%
% \begin{macro}{\::N}
% this is (no longer) weird
% \end{macro}
-%
+%
+%
+%
% \begin{function}[EXP]{\foo}\end{function}
% \begin{function}[rEXP]{\foo}\end{function}
-%
+%
+% here is some verbatim text:
+% \begin{verbatim}
+% a & B # c
+% \end{verbatim}
+% without overriding this with fancyvrb there would be extraneous whitespace.
+%
% \begin{macro}{\c_minus_one,
% \c_zero,
% \c_one,
@@ -2121,8 +2348,8 @@ page_precedence "rnaA"
% Another test.
% \end{macro}
%
-%
-%\ExplSyntaxOn
+%
+%\ExplSyntaxOn
%\cs_set_eq:NN\g_doc_functions_seq\g_saved_doc_functions_seq
%\cs_set_eq:NN\g_doc_macros_seq\g_saved_doc_macros_seq
%\ExplSyntaxOff
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
index d2449c5cb94..5cf76d9b972 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
@@ -1,5 +1,5 @@
% \iffalse meta-comment
-%
+%
%% File: l3drivers.dtx Copyright(C) 2011 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
@@ -36,7 +36,7 @@
%
%<*driver>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3drivers.dtx 2717 2011-09-03 13:40:31Z joseph $
+\GetIdInfo$Id: l3drivers.dtx 2776 2011-09-07 18:33:19Z joseph $
{L3 Experimental drivers}
%</driver>
%<*driver>
@@ -46,13 +46,13 @@
\end{document}
%</driver>
% \fi
-%
+%
% \title{^^A
% The \textsf{l3drivers} package\\ Drivers^^A
% \thanks{This file describes v\ExplFileVersion,
% last revised \ExplFileDate.}^^A
% }
-%
+%
% \author{^^A
% The \LaTeX3 Project\thanks
% {^^A
@@ -67,7 +67,7 @@
% \maketitle
%
% \begin{documentation}
-%
+%
% \TeX{} relies on drivers in order to carry out a number of tasks, such
% as using colour, including graphics and setting up hyper-links. The nature
% of the code required depends on the exact driver in use. Currently,
@@ -80,16 +80,17 @@
% \pdfTeX{} or \LuaTeX{} in DVI mode.
% \item \texttt{xdvipdfmx}: The driver used by \XeTeX{}.
% \end{itemize}
-%
+%
% The code here is all very low-level, and should not in general be used
% outside of the kernel. It is also important to note that many of the
% functions here are closely tied to the immediate level \enquote{up}:
% several variable values must be in the correct locations for the driver
% code to function.
-%
+%
% \section{Box rotation and scaling}
-%
-% \begin{function}{\driver_box_rotate_begin:, \driver_box_rotate_end:}
+%
+% \begin{function}[added = 2011-09-01]
+% {\driver_box_rotate_begin:, \driver_box_rotate_end:}
% \begin{syntax}
% \cs{driver_box_rotate_begin:}
% \cs{box_use:N} \cs{l_box_tmp_box}
@@ -103,8 +104,9 @@
% and end markers will be stored in \cs{l_box_tmp_box}: this fact is
% required by some drivers to obtain the correct output.
% \end{function}
-%
-% \begin{function}{\driver_box_scale_begin:, \driver_box_scale_end:}
+%
+% \begin{function}[added = 2011-09-02]
+% {\driver_box_scale_begin:, \driver_box_scale_end:}
% \begin{syntax}
% \cs{driver_box_scale_begin:}
% \meta{box material}
@@ -118,32 +120,32 @@
% supported and so the higher-level code must convert the absolute sizes
% to scale factors.
% \end{function}
-%
+%
% \section{Colour support}
-%
-% \begin{function}{\driver_color_ensure_current:}
+%
+% \begin{function}[added = 2011-09-03]{\driver_color_ensure_current:}
% \begin{syntax}
% \cs{driver_color_ensure_current:}
% \end{syntax}
% Ensures that the colour used to typeset material is that which was
% set when the material was placed in a box. This function is therefore
% required inside any \enquote{colour safe} box to ensure that the box may
-% be inserted in a location where the foreground colour has been altered,
+% be inserted in a location where the foreground colour has been altered,
% while preserving the colour used in the box.
% \end{function}
-%
+%
% \end{documentation}
%
% \begin{implementation}
%
% \section{\pkg{l3drivers} Implementation}
-%
+%
% \begin{macrocode}
%<*initex>
% \end{macrocode}
-%
+%
% \subsection{Settings for direct PDF output}
-%
+%
% If the driver loaded is \texttt{pdfmode} then direct PDF output is required.
% (This may of course alter: it might be that the driver is picked based on the
% value of \cs{pdfmode_pdfoutput:D}.)
@@ -168,7 +170,7 @@
\pdftex_pdfobjcompresslevel:D = 2 \scan_stop:
%</pdfmode>
% \end{macrocode}
-%
+%
% \subsection{Box rotation and scaling}
%
% \begin{variable}{\l_driver_box_matrix_tl}
@@ -179,7 +181,7 @@
%</pdfmode>
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}{\l_driver_tmp_fp}
% Needed for a safe sign inversion in PDF mode.
% \begin{macrocode}
@@ -188,7 +190,7 @@
%</pdfmode>
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{macro}{\driver_box_rotate_begin:, \driver_box_rotate_end:}
% Systems which require only the rotation angle have simple drivers.
% On the other hand, in PDF mode the affine transformation matrix is
@@ -210,10 +212,10 @@
%</dvips>
%<*pdfmode>
\fp_set_eq:NN \l_driver_tmp_fp \l_box_sin_fp
- \fp_neg:N \l_driver_tmp_fp
+ \fp_neg:N \l_driver_tmp_fp
\tl_set:Nx \l_driver_box_matrix_tl
- {
- \fp_use:N \l_box_cos_fp \c_space_tl
+ {
+ \fp_use:N \l_box_cos_fp \c_space_tl
\fp_use:N \l_box_sin_fp \c_space_tl
\fp_use:N \l_driver_tmp_fp \c_space_tl
\fp_use:N \l_box_cos_fp
@@ -242,10 +244,10 @@
%</xdvipdfmx>
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\driver_box_scale_begin:, \driver_box_scale_end:}
% Scaling is not dissimilar to rotation, but the calculations are somewhat
-% less complex.
+% less complex.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \driver_box_scale_begin:
{
@@ -262,8 +264,8 @@
%</dvips>
%<*pdfmode>
\tl_set:Nx \l_driver_box_matrix_tl
- {
- \fp_use:N \l_box_scale_x_fp \c_space_tl
+ {
+ \fp_use:N \l_box_scale_x_fp \c_space_tl
0 ~ 0 ~
\fp_use:N \l_box_scale_y_fp
}
@@ -293,7 +295,7 @@
1~\fp_use:N \l_box_scale_y_fp \c_space_tl div~
scale~neg~exch~neg~exch~
translate
- }
+ }
}
%</dvips>
%<*pdfmode>
@@ -304,9 +306,9 @@
%</xdvipdfmx>
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Colour support}
-%
+%
% \begin{variable}{\l_driver_current_color_tl}
% The current colour is needed by all of the engines, but the way this
% is stored varies.
@@ -333,13 +335,13 @@
%</pdfmode>
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{macro}{\driver_color_group_begin:, \driver_color_group_end:}
% \begin{macrocode}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\driver_color_ensure_current:}
% \begin{macro}[aux]{\driver_color_reset:}
% Setting the current colour depends on the nature of the colour stack
@@ -374,4 +376,4 @@
%
% \end{implementation}
%
-% \PrintIndex \ No newline at end of file
+% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
index 915e48dec15..ee3d43b91b9 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3expan.dtx 2545 2011-08-11 13:47:19Z bruno $
+\GetIdInfo$Id: l3expan.dtx 2812 2011-09-12 09:19:26Z bruno $
{L3 Experimental argument expansion}
%</driver|package>
%<*driver>
@@ -117,8 +117,7 @@
%
% \begin{function}{\cs_generate_variant:Nn}
% \begin{syntax}
-% \cs{cs_generate_variant:Nn} \meta{parent control sequence}
-% ~~\Arg{variant argument specifiers}
+% \cs{cs_generate_variant:Nn} \meta{parent control sequence} \Arg{variant argument specifiers}
% \end{syntax}
% This function is used to define argument-specifier variants of the
% \meta{parent control sequence} for \LaTeX3 code-level macros. The
@@ -203,7 +202,7 @@
% \end{quote}
% Unfortunately this only puts
% |\exp_args:NNc \cs_set_eq:NN \aaa {b \l_tmpa_tl b}| into |\l_tmpb_tl|
-% and not |\cs_set_eq:NwN \aaa = \blurb| as we probably wanted. Using
+% and not |\cs_set_eq:NN \aaa = \blurb| as we probably wanted. Using
% |\tl_set:Nx| is not an option as that will die horribly. Instead
% we can do a
% \begin{quote}
@@ -343,7 +342,7 @@
% by the expansion of the second and third arguments.
% These functions need special (slower) processing.
% \end{function}
-%
+%
% \begin{function}
% {
% \exp_args:NNx,
@@ -375,8 +374,7 @@
% \exp_args:Ncco
% }
% \begin{syntax}
-% \cs{exp_args:NNNo} \meta{token1} \meta{token2} \meta{token3}
-% ~~\Arg{tokens}
+% \cs{exp_args:NNNo} \meta{token1} \meta{token2} \meta{token3} \Arg{tokens}
% \end{syntax}
% These optimized functions absorb four arguments and expand the second, third
% and fourth as detailed by their argument specifier. The first
@@ -393,8 +391,7 @@
% \exp_args:Nooo,
% }
% \begin{syntax}
-% \cs{exp_args:NNNo} \meta{token1} \meta{token2} \meta{token3}
-% ~~\Arg{tokens}
+% \cs{exp_args:NNNo} \meta{token1} \meta{token2} \meta{token3} \Arg{tokens}
% \end{syntax}
% These functions absorb four arguments and expand the second, third
% and fourth as detailed by their argument specifier. The first
@@ -414,8 +411,7 @@
% \exp_args:Nccx
% }
% \begin{syntax}
-% \cs{exp_args:NNnx} \meta{token1} \meta{token2} \meta{tokens1}
-% ~~\Arg{tokens2}
+% \cs{exp_args:NNnx} \meta{token1} \meta{token2} \meta{tokens1} \Arg{tokens2}
% \end{syntax}
% These functions absorb four arguments and expand the second, third
% and fourth as detailed by their argument specifier. The first
@@ -425,7 +421,7 @@
%
% \section{Unbraced expansion}
%
-% \begin{function}
+% \begin{function}[EXP]
% {
% \exp_last_unbraced:Nf,
% \exp_last_unbraced:NV,
@@ -434,6 +430,8 @@
% \exp_last_unbraced:NcV,
% \exp_last_unbraced:NNV,
% \exp_last_unbraced:NNo,
+% \exp_last_unbraced:Nno,
+% \exp_last_unbraced:Noo,
% \exp_last_unbraced:Nfo,
% \exp_last_unbraced:NNNV,
% \exp_last_unbraced:NNNo
@@ -445,9 +443,10 @@
% specification, carry out the expansion
% indicated and leave the the results in the input stream, with the
% last argument not surrounded by the usual braces.
-% Of these, \cs{exp_last_unbraced:Nfo} needs special (slower) processing.
+% Of these, the \texttt{:Nno}, \texttt{:Noo}, and \texttt{:Nfo}
+% variants need special (slower) processing.
% \end{function}
-%
+%
% \begin{function}[EXP]{\exp_last_two_unbraced:Noo}
% \begin{syntax}
% \cs{exp_last_two_unbraced:Noo} \meta{token} \meta{tokens1} \Arg{tokens2}
@@ -474,24 +473,29 @@
% appropriate argument specifier variant or the appropriate
% \cs{exp_arg:N} function.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{expandafter} renamed.
+% This is the \TeX{} primitive \tn{expandafter} renamed.
% \end{texnote}
% \end{function}
%
% \section{Preventing expansion}
%
-% \begin{function}{\exp_not:N}
+% Despite the fact that the following functions are all about preventing
+% expansion, they're designed to be used in an expandable context and hence
+% are all marked as being `expandable' since they themselves will not appear
+% after the expansion has completed.
+%
+% \begin{function}[EXP]{\exp_not:N}
% \begin{syntax}
% \cs{exp_not:N} \meta{token}
% \end{syntax}
% Prevents expansion of the \meta{token} in a context where it would otherwise
% be expanded, for example an |x|-type argument.
% \begin{texnote}
-% This is the \TeX{} \cs{noexpand} primitive.
+% This is the \TeX{} \tn{noexpand} primitive.
% \end{texnote}
% \end{function}
%
-% \begin{function}{\exp_not:c}
+% \begin{function}[EXP]{\exp_not:c}
% \begin{syntax}
% \cs{exp_not:c} \Arg{tokens}
% \end{syntax}
@@ -500,7 +504,7 @@
% sequence is then inhibited.
% \end{function}
%
-% \begin{function}{\exp_not:n}
+% \begin{function}[EXP]{\exp_not:n}
% \begin{syntax}
% \cs{exp_not:n} \Arg{tokens}
% \end{syntax}
@@ -508,11 +512,11 @@
% otherwise
% be expanded, for example an |x|-type argument.
% \begin{texnote}
-% This is the \eTeX{} \cs{unexpanded} primitive.
+% This is the \eTeX{} \tn{unexpanded} primitive.
% \end{texnote}
% \end{function}
%
-% \begin{function}{\exp_not:V}
+% \begin{function}[EXP]{\exp_not:V}
% \begin{syntax}
% \cs{exp_not:V} \meta{variable}
% \end{syntax}
@@ -521,7 +525,7 @@
% be expanded, for example an |x|-type argument.
% \end{function}
%
-% \begin{function}{\exp_not:v}
+% \begin{function}[EXP]{\exp_not:v}
% \begin{syntax}
% \cs{exp_not:v} \Arg{tokens}
% \end{syntax}
@@ -532,7 +536,7 @@
% be expanded, for example an |x|-type argument.
% \end{function}
%
-% \begin{function}{\exp_not:o}
+% \begin{function}[EXP]{\exp_not:o}
% \begin{syntax}
% \cs{exp_not:o} \Arg{tokens}
% \end{syntax}
@@ -543,7 +547,7 @@
%
% \begin{function}[EXP]{\exp_not:f}
% \begin{syntax}
-% \cs{exp_not:f} \meta{tokens}
+% \cs{exp_not:f} \Arg{tokens}
% \end{syntax}
% Expands \meta{tokens} fully until the first unexpandable token
% is found. Expansion then stops, and the result of the expansion
@@ -551,7 +555,7 @@
% further expansion.
% \end{function}
%
-% \begin{function}[EXP]{\exp_stop_f:}
+% \begin{function}[updated = 2011-06-03, EXP]{\exp_stop_f:}
% \begin{syntax}
% \cs{function:f} \meta{tokens} \cs{exp_stop_f:} \meta{more tokens}
% \end{syntax}
@@ -578,7 +582,7 @@
% \end{syntax}
% These functions evaluates a \meta{variable} as part of a |V| or |v|
% expansion (respectively), preceeded by \cs{c_zero} which stops
-% the expansion of a previous \cs{tex_romannumeral:D}.
+% the expansion of a previous \tn{romannumeral}.
% A \meta{variable} might exist as
% one of two things: a parameter-less non-long, non-protected macro
% or a built-in \TeX{} register such as |\count|.
@@ -726,7 +730,7 @@
% \begin{macro}{\::f}
% \begin{macro}{\exp_stop_f:}
% This function is used to expand a token list until the first
-% unexpandable token is found. The underlying |\tex_romannumeral:D -`0|
+% unexpandable token is found. The underlying \tn{romannumeral} |-`0|
% expands everything in its way to find something terminating the
% number and thereby expands the function in front of it. This
% scanning procedure is terminated once the expansion hits
@@ -735,9 +739,9 @@
% a number, this number also terminates the scanning and is left
% untouched. In the example shown earlier the scanning was stopped
% once \TeX{} had fully expanded |\cs_set_eq:Nc \aaa { b \l_tmpa_tl b }|
-% into |\cs_set_eq:NwN \aaa = \blurb| which then turned out to contain
-% the non-expandable token |\cs_set_eq:NwN|. Since the expansion of
-% |\tex_romannumeral:D -`0| is \meta{null}, we wind up with a fully
+% into |\cs_set_eq:NN \aaa = \blurb| which then turned out to contain
+% the non-expandable token |\cs_set_eq:NN|. Since the expansion of
+% \tn{romannumeral} |-`0| is \meta{null}, we wind up with a fully
% expanded list, only \TeX{} has not tried to execute any of the
% non-expandable tokens. This is what differentiates this function
% from the |x| argument type.
@@ -770,7 +774,7 @@
% |tl|, |num|, |int|, |skip|, |dim| and |muskip|. The |V| version
% expects a single token whereas |v| like |c| creates a csname from
% its argument given in braces and then evaluates it as if it was a
-% |V|. The primitive \cs{tex_romannumeral:D} sets off an expansion
+% |V|. The primitive \tn{romannumeral} sets off an expansion
% similar to an |f| type expansion, which we will terminate using
% \cs{c_zero}. The argument is returned in braces.
% \begin{macrocode}
@@ -795,9 +799,9 @@
% This function evaluates a register. Now a register might exist as
% one of two things: A parameter-less macro or a built-in \TeX{}
% register such as |\count|. For the \TeX{} registers we have to
-% utilize a |\tex_the:D| whereas for the macros we merely have to
+% utilize a \tn{the} whereas for the macros we merely have to
% expand them once. The trick is to find out when to use
-% |\tex_the:D| and when not to. What we do here is try to find out
+% \tn{the} and when not to. What we do here is try to find out
% whether the token will expand to something else when hit with
% |\exp_after:wN|. The technique is to compare the meaning of the
% register in question when it has been prefixed with |\exp_not:N|
@@ -824,7 +828,7 @@
\fi:
% \end{macrocode}
% The next bit requires some explanation. The function must be
-% initiated by the primitive \cs{tex_romannumeral:D} and we want to
+% initiated by the primitive \tn{romannumeral} and we want to
% terminate this expansion chain by inserting the \cs{c_zero} integer
% constant. However, we have to expand the register |#1| before we do
% that. If it is a \TeX{} register, we need to execute the sequence
@@ -866,7 +870,7 @@
%
% One of the most important features of these functions is that they
% are fully expandable and therefore allow to prefix them with
-% |\pref_global:D| for example.
+% |\tex_global:D| for example.
%
% \begin{macro}{\exp_args:No}
% \begin{macro}{\exp_args:NNo}
@@ -1008,7 +1012,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Definitions with the automated technique}
% \label{sec:gendef}
%
@@ -1119,6 +1123,7 @@
% \begin{macro}{\exp_last_unbraced:NcV}
% \begin{macro}{\exp_last_unbraced:NNV}
% \begin{macro}{\exp_last_unbraced:NNo}
+% \begin{macro}{\exp_last_unbraced:Nno}
% \begin{macro}{\exp_last_unbraced:Noo}
% \begin{macro}{\exp_last_unbraced:Nfo}
% \begin{macro}{\exp_last_unbraced:NNNV}
@@ -1147,6 +1152,7 @@
}
\cs_new:Npn \exp_last_unbraced:NNo #1#2#3
{ \exp_after:wN #1 \exp_after:wN #2 #3 }
+\cs_new_nopar:Npn \exp_last_unbraced:Nno { \::n \::o_unbraced \::: }
\cs_new_nopar:Npn \exp_last_unbraced:Noo { \::o \::o_unbraced \::: }
\cs_new_nopar:Npn \exp_last_unbraced:Nfo { \::f \::o_unbraced \::: }
\cs_new:Npn \exp_last_unbraced:NNNV #1#2#3#4
@@ -1170,7 +1176,8 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
+% \end{macro}
+%
% \begin{macro}{\exp_last_two_unbraced:Noo}
% If |#2| is a single token then this can be implemented as
% \begin{verbatim}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index d124905c547..2c043f66ec0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3file.dtx 2665 2011-08-25 22:15:27Z joseph $
+\GetIdInfo$Id: l3file.dtx 2776 2011-09-07 18:33:19Z joseph $
{L3 Experimental file operations}
%</driver|package>
%<*driver>
@@ -183,7 +183,12 @@
%
% \begin{variable}{\l_file_search_path_saved_seq}
% When loaded on top of \LaTeXe{}, there is a need to save the search
-% path so that \cs{input@path} can be used as appropriate.
+% path so that \tn{input@path} can be used as appropriate.
+% \end{variable}
+%
+% \begin{variable}[added = 2011-09-06]{\l_file_tmpa_seq}
+% When loaded on top of \LaTeXe{}, there is a need to convert
+% the comma lists \tn{input@path} and \tn{@filelist} to sequences.
% \end{variable}
%
% \end{documentation}
@@ -275,6 +280,15 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\l_file_tmpa_seq}
+% Scratch space for comma list conversion in package mode.
+% \begin{macrocode}
+%<*package>
+\seq_new:N \l_file_tmpa_seq
+%</package>
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macro}{\file_add_path:nN}
% \begin{variable}{\g_file_test_stream}
% \begin{macro}[aux]{\file_add_path_search:nN}
@@ -302,8 +316,9 @@
\cs_if_exist:NT \input@path
{
\seq_set_eq:NN \l_file_search_path_saved_seq \l_file_search_path_seq
- \clist_map_inline:Nn \input@path
- { \seq_put_right:Nn \l_file_search_path_seq {##1} }
+ \seq_set_from_clist:NN \l_file_tmpa_seq \input@path
+ \seq_concat:NNN \l_file_search_path_seq
+ \l_file_search_path_seq \l_file_tmpa_seq
}
%</package>
\seq_map_inline:Nn \l_file_search_path_seq
@@ -359,7 +374,7 @@
%</package>
\seq_gpush:NV \g_file_stack_seq \g_file_current_name_tl
\tl_gset:Nn \g_file_current_name_tl {#1}
- \exp_after:wN \tex_input:D \l_file_name_tl ~
+ \exp_after:wN \tex_input:D \l_file_name_tl \c_space_tl
\seq_gpop:NN \g_file_stack_seq \g_file_current_name_tl
}
}
@@ -400,8 +415,8 @@
%<*package>
\AtBeginDocument
{
- \clist_map_inline:Nn \@filelist
- { \seq_put_right:Nn \g_file_record_seq {#1} }
+ \seq_set_from_clist:NN \l_file_tmpa_seq \@filelist
+ \seq_gconcat:NNN \g_file_record_seq \g_file_record_seq \l_file_tmpa_seq
}
%</package>
% \end{macrocode}
@@ -412,4 +427,4 @@
%
% \end{implementation}
%
-% \PrintIndex \ No newline at end of file
+% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
index 1645cbcd487..60cf7b81b84 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3final.dtx 2499 2011-07-29 12:49:30Z joseph $
+\GetIdInfo$Id: l3final.dtx 2772 2011-09-07 15:07:41Z joseph $
{L3 Experimental format finalisation}
%</driver|package>
%<*driver>
@@ -69,9 +69,9 @@
%
% This module is the end of the \LaTeX3 format file. Currently, there
% is not a lot happening here.
-%
+%
% \end{documentation}
-%
+%
% \begin{implementation}
%
% \section{\pkg{l3final} Implementation}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
index 69646c165a1..01c9c23adcb 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3fp.dtx 2665 2011-08-25 22:15:27Z joseph $
+\GetIdInfo$Id: l3fp.dtx 2812 2011-09-12 09:19:26Z bruno $
{L3 Experimental floating-point operations}
%</driver|package>
%<*driver>
@@ -197,7 +197,7 @@
% assignment is global.
% \end{function}
%
-% \begin{function}[EXP]{\fp_use:N, \fp_use:c}
+% \begin{function}[rEXP]{\fp_use:N, \fp_use:c}
% \begin{syntax}
% \cs{fp_use:N} \meta{floating point variable}
% \end{syntax}
@@ -231,7 +231,7 @@
% should also be consulted in this context, as it will insert the
% value of the floating point variable as a real number.
%
-% \begin{function}[EXP]{\fp_to_dim:N, \fp_to_dim:c}
+% \begin{function}[rEXP]{\fp_to_dim:N, \fp_to_dim:c}
% \begin{syntax}
% \cs{fp_to_dim:N} \meta{floating point variable}
% \end{syntax}
@@ -239,7 +239,7 @@
% into the input stream converted into a dimension in points.
% \end{function}
%
-% \begin{function}[EXP]{\fp_to_int:N, \fp_to_int:c}
+% \begin{function}[rEXP]{\fp_to_int:N, \fp_to_int:c}
% \begin{syntax}
% \cs{fp_to_int:N} \meta{floating point variable}
% \end{syntax}
@@ -248,7 +248,7 @@
% included, but will be used to round the integer.
% \end{function}
%
-% \begin{function}[EXP]{\fp_to_tl:N, \fp_to_tl:c}
+% \begin{function}[rEXP]{\fp_to_tl:N, \fp_to_tl:c}
% \begin{syntax}
% \cs{fp_to_tl:N} \meta{floating point variable}
% \end{syntax}
@@ -323,15 +323,14 @@
%
% \begin{function}[EXP,pTF]{\fp_if_undefined:N}
% \begin{syntax}
-% \cs{fp_if_undefined_p:N} \meta{fixed-point}
-% \cs{fp_if_undefined:NTF} \meta{fixed-point}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{fp_if_undefined_p:N} \meta{fixed-point} \\
+% \cs{fp_if_undefined:NTF} \meta{fixed-point} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if \meta{floating point} is undefined (\emph{i.e.}~equal to the
% special \cs{c_undefined_fp} variable).
% \end{function}
%
-% \begin{function}[EXP]{\fp_if_zero:N}
+% \begin{function}[EXP,pTF]{\fp_if_zero:N}
% \begin{syntax}
% \cs{fp_if_zero_p:N} \meta{fixed-point}
% \cs{fp_if_zero:NTF} \meta{fixed-point} \Arg{true code} \Arg{false code}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
index c0b8c5b0179..525fb40cfe8 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3int.dtx 2666 2011-08-26 06:10:09Z joseph $
+\GetIdInfo$Id: l3int.dtx 2812 2011-09-12 09:19:26Z bruno $
{L3 Experimental integers}
%</driver|package>
%<*driver>
@@ -311,7 +311,7 @@
% \meta{integer} is required (such as in the first and third arguments
% of \cs{int_compare:nNnTF}).
% \begin{texnote}
-% \cs{int_use:N} is the \TeX{} primitive \cs{the}: this is one of
+% \cs{int_use:N} is the \TeX{} primitive \tn{the}: this is one of
% several \LaTeX3 names for this primitive.
% \end{texnote}
% \end{function}
@@ -320,8 +320,7 @@
%
% \begin{function}[EXP,pTF]{\int_compare:nNn}
% \begin{syntax}
-% \cs{int_compare_p:nNn}
-% ~~\Arg{intexpr1} \meta{relation} \Arg{intexpr2}
+% \cs{int_compare_p:nNn} \Arg{intexpr1} \meta{relation} \Arg{intexpr2} \\
% \cs{int_compare:nNnTF}
% ~~\Arg{intexpr1} \meta{relation} \Arg{intexpr2}
% ~~\Arg{true code} \Arg{false code}
@@ -340,8 +339,7 @@
%
% \begin{function}[EXP,pTF]{\int_compare:n}
% \begin{syntax}
-% \cs{int_compare_p:n}
-% ~~\{ \meta{intexpr1} \meta{relation} \meta{intexpr2} \}
+% \cs{int_compare_p:n} \{ \meta{intexpr1} \meta{relation} \meta{intexpr2} \} \\
% \cs{int_compare:nTF}
% ~~\{ \meta{intexpr1} \meta{relation} \meta{intexpr2} \}
% ~~\Arg{true code} \Arg{false code}
@@ -374,7 +372,7 @@
%
% \section{Integer expression loops}
%
-% \begin{function}[EXP]{\int_do_while:nNnn}
+% \begin{function}[rEXP]{\int_do_while:nNnn}
% \begin{syntax}
% \cs{int_do_while:nNnn}
% ~~\Arg{intexpr1} \meta{relation} \Arg{intexpr2} \Arg{code}
@@ -387,7 +385,7 @@
% \texttt{false}.
% \end{function}
%
-% \begin{function}[EXP]{\int_do_until:nNnn}
+% \begin{function}[rEXP]{\int_do_until:nNnn}
% \begin{syntax}
% \cs{int_do_until:nNnn}
% ~~\Arg{intexpr1} \meta{relation} \Arg{intexpr2} \Arg{code}
@@ -400,7 +398,7 @@
% \texttt{true}.
% \end{function}
%
-% \begin{function}[EXP]{\int_until_do:nNnn}
+% \begin{function}[rEXP]{\int_until_do:nNnn}
% \begin{syntax}
% \cs{int_until_do:nNnn}
% ~~\Arg{intexpr1} \meta{relation} \Arg{intexpr2} \Arg{code}
@@ -413,7 +411,7 @@
% \meta{relation} is \texttt{true}.
% \end{function}
%
-% \begin{function}[EXP]{\int_while_do:nNnn}
+% \begin{function}[rEXP]{\int_while_do:nNnn}
% \begin{syntax}
% \cs{int_while_do:nNnn} \
% ~~\Arg{intexpr1} \meta{relation} \Arg{intexpr2} \Arg{code}
@@ -426,7 +424,7 @@
% \meta{relation} is \texttt{false}.
% \end{function}
%
-% \begin{function}[EXP]{\int_do_while:nn}
+% \begin{function}[rEXP]{\int_do_while:nn}
% \begin{syntax}
% \cs{int_do_while:nNnn}
% ~~\{ \meta{intexpr1} \meta{relation} \meta{intexpr2} \} \Arg{code}
@@ -439,7 +437,7 @@
% \texttt{false}.
% \end{function}
%
-% \begin{function}[EXP]{\int_do_until:nn}
+% \begin{function}[rEXP]{\int_do_until:nn}
% \begin{syntax}
% \cs{int_do_until:nn}
% ~~\{ \meta{intexpr1} \meta{relation} \meta{intexpr2} \} \Arg{code}
@@ -452,7 +450,7 @@
% \texttt{true}.
% \end{function}
%
-% \begin{function}[EXP]{\int_until_do:nn}
+% \begin{function}[rEXP]{\int_until_do:nn}
% \begin{syntax}
% \cs{int_until_do:nn}
% ~~\{ \meta{intexpr1} \meta{relation} \meta{intexpr2} \} \Arg{code}
@@ -465,7 +463,7 @@
% \meta{relation} is \texttt{true}.
% \end{function}
%
-% \begin{function}[EXP]{\int_while_do:nn}
+% \begin{function}[rEXP]{\int_while_do:nn}
% \begin{syntax}
% \cs{int_while_do:nn} \
% ~~\{ \meta{intexpr1} \meta{relation} \meta{intexpr2} \} \Arg{code}
@@ -491,14 +489,15 @@
% stream as digits, with category code $12$ (other).
% \end{function}
%
-% \begin{function}[EXP]{\int_to_alph:n, \int_to_Alph:n}
+% \begin{function}[rEXP]{\int_to_alph:n, \int_to_Alph:n}
% \begin{syntax}
% \cs{int_to_alph:n} \Arg{integer expression}
% \end{syntax}
% Evaluates the \meta{integer expression} and converts the result
% into a series of letters, which are then left in the input stream.
% The conversion rule uses the $26$ letters of the English
-% alphabet, in order. Thus
+% alphabet, in order, adding letters when necessary to increase the total
+% possible range of representable numbers. Thus
% \begin{verbatim}
% \int_to_alph:n { 1 }
% \end{verbatim}
@@ -516,7 +515,7 @@
% functions should not be modified.
% \end{function}
%
-% \begin{function}[EXP]{\int_to_symbols:nnn}
+% \begin{function}[rEXP]{\int_to_symbols:nnn}
% \begin{syntax}
% \cs{int_to_symbols:nnn}
% ~~\Arg{integer expression} \Arg{total symbols}
@@ -537,36 +536,14 @@
% {
% { 1 } { a }
% { 2 } { b }
-% { 3 } { c }
-% { 4 } { d }
-% { 5 } { e }
-% { 6 } { f }
-% { 7 } { g }
-% { 8 } { h }
-% { 9 } { i }
-% { 10 } { j }
-% { 11 } { k }
-% { 12 } { l }
-% { 13 } { m }
-% { 14 } { n }
-% { 15 } { o }
-% { 16 } { p }
-% { 17 } { q }
-% { 18 } { r }
-% { 19 } { s }
-% { 20 } { t }
-% { 21 } { u }
-% { 22 } { v }
-% { 23 } { w }
-% { 24 } { x }
-% { 25 } { y }
+% ...
% { 26 } { z }
% }
% }
% \end{verbatim}
% \end{function}
%
-% \begin{function}[EXP]{\int_to_binary:n}
+% \begin{function}[updated = 2011-08-16, rEXP]{\int_to_binary:n}
% \begin{syntax}
% \cs{int_to_binary:n} \Arg{integer expression}
% \end{syntax}
@@ -574,7 +551,7 @@
% the binary representation of the result in the input stream.
% \end{function}
%
-% \begin{function}[EXP]{\int_to_hexadecimal:n}
+% \begin{function}[updated = 2011-08-16, rEXP]{\int_to_hexadecimal:n}
% \begin{syntax}
% \cs{int_to_binary:n} \Arg{integer expression}
% \end{syntax}
@@ -583,7 +560,7 @@
% input stream. Upper case letters are used for digits beyond $9$.
% \end{function}
%
-% \begin{function}[EXP]{\int_to_octal:n}
+% \begin{function}[updated = 2011-08-16, rEXP]{\int_to_octal:n}
% \begin{syntax}
% \cs{int_to_octal:n} \Arg{integer expression}
% \end{syntax}
@@ -592,7 +569,7 @@
% stream.
% \end{function}
%
-% \begin{function}[EXP]{\int_to_base:nn}
+% \begin{function}[updated = 2011-08-16, rEXP]{\int_to_base:nn}
% \begin{syntax}
% \cs{int_to_base:nn} \Arg{integer expression} \Arg{base}
% \end{syntax}
@@ -607,7 +584,7 @@
% \end{texnote}
% \end{function}
%
-% \begin{function}[EXP]{\int_to_roman:n, \int_to_Roman:n}
+% \begin{function}[rEXP]{\int_to_roman:n, \int_to_Roman:n}
% \begin{syntax}
% \cs{int_to_roman:n} \Arg{integer expression}
% \end{syntax}
@@ -669,8 +646,7 @@
%
% \begin{function}[EXP]{\int_from_base:nn}
% \begin{syntax}
-% \cs{int_from_base:nn} \Arg{number}
-% ~~\Arg{base}
+% \cs{int_from_base:nn} \Arg{number} \Arg{base}
% \end{syntax}
% Converts the \meta{number} in \meta{base} into the appropriate
% value in base $10$. The \meta{number} should consist of
@@ -747,7 +723,7 @@
%
% \section{Internal functions}
%
-% \begin{function}[EXP]{int_get_digits:n}
+% \begin{function}[EXP]{\int_get_digits:n}
% \begin{syntax}
% \cs{int_get_digits:n} \meta{value}
% \end{syntax}
@@ -757,7 +733,7 @@
% (which may be symbolic).
% \end{function}
%
-% \begin{function}[EXP]{int_get_sign:n}
+% \begin{function}[rEXP]{\int_get_sign:n}
% \begin{syntax}
% \cs{int_get_sign:n} \meta{value}
% \end{syntax}
@@ -766,7 +742,7 @@
% to sanitise sign tokens from the \meta{value} (which may be symbolic).
% \end{function}
%
-% \begin{function}[EXP]{int_to_letter:n}
+% \begin{function}[EXP]{\int_to_letter:n}
% \begin{syntax}
% \cs{int_to_letter:n} \meta{integer value}
% \end{syntax}
@@ -779,8 +755,7 @@
%
% \begin{function}[EXP]{\int_to_roman:w}
% \begin{syntax}
-% \cs{int_to_roman:w} \meta{integer}
-% ~~\meta{space} \textit{or} \meta{non-expandable token}
+% \cs{int_to_roman:w} \meta{integer} \meta{space} \textit{or} \meta{non-expandable token}
% \end{syntax}
% Converts \meta{integer} to it lower case Roman representation. Expansion
% ends when a space or non-expandable token is found.
@@ -806,7 +781,7 @@
% |=|, |<| or |>| with category code $12$.
% The \cs{else:} branch is optional.
% \begin{texnote}
-% These are both names for the \TeX{} primitive \cs{ifnum}.
+% These are both names for the \TeX{} primitive \tn{ifnum}.
% \end{texnote}
% \end{function}
%
@@ -824,7 +799,7 @@
% \meta{integer} may be a literal, a constant or an integer
% expression (\emph{e.g.}~using \cs{int_eval:n}).
% \begin{texnote}
-% These are the \TeX{} primitives \cs{ifcase} and \cs{or}.
+% These are the \TeX{} primitives \tn{ifcase} and \tn{or}.
% \end{texnote}
% \end{function}
%
@@ -836,7 +811,7 @@
% Expands \meta{tokens} until an \meta{integer} is formed. One space may be
% gobbled in the process.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{number}.
+% This is the \TeX{} primitive \tn{number}.
% \end{texnote}
% \end{function}
%
@@ -851,7 +826,7 @@
% \cs{int_eval_end:} itself is unexpandable but used correctly
% the entire construct is expandable.
% \begin{texnote}
-% This is the \eTeX{} primitive \cs{numexpr}.
+% This is the \eTeX{} primitive \tn{numexpr}.
% \end{texnote}
% \end{function}
%
@@ -867,7 +842,7 @@
% tests whether the resulting \meta{integer} is odd. If so, \meta{true code}
% is executed. The \cs{else:} branch is optional.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{ifodd}.
+% This is the \TeX{} primitive \tn{ifodd}.
% \end{texnote}
% \end{function}
%
@@ -890,7 +865,7 @@
\package_check_loaded_expl:
%</package>
% \end{macrocode}
-%
+%
% \begin{macro}{\int_to_roman:w}
% \begin{macro}{\if_int_compare:w}
% Done in \pkg{l3basics}.
@@ -1053,8 +1028,8 @@
%
% \begin{macro}{\int_const:Nn, \int_const:cn}
% \UnitTested
-% As stated, most constants can be defined as \cs{tex_chardef:D} or
-% \cs{tex_mathchardef:D} but that's engine dependent.
+% As stated, most constants can be defined as \tn{chardef} or
+% \tn{mathchardef} but that's engine dependent.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \int_const:Nn #1#2
{
@@ -1067,7 +1042,7 @@
}
{
\chk_if_free_cs:N #1
- \pref_global:D \tex_mathchardef:D #1 =
+ \tex_global:D \tex_mathchardef:D #1 =
\int_eval:w #2 \int_eval_end:
}
}
@@ -1087,7 +1062,7 @@
% Functions that reset an \meta{integer} register to zero.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \int_zero:N #1 { #1 = \c_zero }
-\cs_new_protected_nopar:Npn \int_gzero:N #1 { \pref_global:D #1 = \c_zero }
+\cs_new_protected_nopar:Npn \int_gzero:N #1 { \tex_global:D #1 = \c_zero }
\cs_generate_variant:Nn \int_zero:N { c }
\cs_generate_variant:Nn \int_gzero:N { c }
% \end{macrocode}
@@ -1105,7 +1080,7 @@
\cs_new_protected_nopar:Npn \int_set_eq:NN #1#2 { #1 = #2 }
\cs_generate_variant:Nn \int_set_eq:NN { c }
\cs_generate_variant:Nn \int_set_eq:NN { Nc , cc }
-\cs_new_protected_nopar:Npn \int_gset_eq:NN #1#2 { \pref_global:D #1 = #2 }
+\cs_new_protected_nopar:Npn \int_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
\cs_generate_variant:Nn \int_gset_eq:NN { c }
\cs_generate_variant:Nn \int_gset_eq:NN { Nc , cc }
% \end{macrocode}
@@ -1129,9 +1104,9 @@
\cs_new_nopar:Npn \int_sub:Nn #1#2
{ \tex_advance:D #1 by - \int_eval:w #2 \int_eval_end: }
\cs_new_protected_nopar:Npn \int_gadd:Nn
- { \pref_global:D \int_add:Nn }
+ { \tex_global:D \int_add:Nn }
\cs_new_protected_nopar:Npn \int_gsub:Nn
- { \pref_global:D \int_sub:Nn }
+ { \tex_global:D \int_sub:Nn }
\cs_generate_variant:Nn \int_add:Nn { c }
\cs_generate_variant:Nn \int_gadd:Nn { c }
\cs_generate_variant:Nn \int_sub:Nn { c }
@@ -1158,9 +1133,9 @@
\cs_new_protected_nopar:Npn \int_decr:N #1
{ \tex_advance:D #1 \c_minus_one }
\cs_new_protected_nopar:Npn \int_gincr:N
- { \pref_global:D \int_incr:N }
+ { \tex_global:D \int_incr:N }
\cs_new_protected_nopar:Npn \int_gdecr:N
- { \pref_global:D \int_decr:N }
+ { \tex_global:D \int_decr:N }
\cs_generate_variant:Nn \int_incr:N { c }
\cs_generate_variant:Nn \int_decr:N { c }
\cs_generate_variant:Nn \int_gincr:N { c }
@@ -1181,7 +1156,7 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \int_set:Nn #1#2
{ #1 ~ \int_eval:w #2\int_eval_end: }
-\cs_new_protected_nopar:Npn \int_gset:Nn { \pref_global:D \int_set:Nn }
+\cs_new_protected_nopar:Npn \int_gset:Nn { \tex_global:D \int_set:Nn }
\cs_generate_variant:Nn \int_set:Nn { c }
\cs_generate_variant:Nn \int_gset:Nn { c }
% \end{macrocode}
@@ -2134,6 +2109,7 @@
% \begin{macrocode}
\cs_new_nopar:Npn \int_to_symbol:n
{
+ \scan_align_safe_stop:
\mode_if_math:TF
{ \int_to_symbol_math:n }
{ \int_to_symbol_text:n }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3io.dtx b/Master/texmf-dist/source/latex/l3kernel/l3io.dtx
index 880b32b5080..e406ab611a0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3io.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3io.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3io.dtx 2724 2011-09-05 18:51:51Z bruno $
+\GetIdInfo$Id: l3io.dtx 2799 2011-09-10 15:46:33Z will $
{L3 Experimental input-output operations}
%</driver|package>
%<*driver>
@@ -156,7 +156,7 @@
% on expansion of \cs{iow_now:Nn}).
% \begin{texnote}
% \cs{iow_now:Nx} is a protected macro which expands to
-% the two \TeX{} primitives \cs{immediate}\cs{write}.
+% the two \TeX{} primitives \tn{immediate}\tn{write}.
% \end{texnote}
% \end{function}
%
@@ -208,7 +208,7 @@
% these functions suitable for including material finalised during
% the page building process (such as the page number integer).
% \begin{texnote}
-% \cs{iow_shipout_x:Nn} is the \TeX{} primitive \cs{write} renamed.
+% \cs{iow_shipout_x:Nn} is the \TeX{} primitive \tn{write} renamed.
% \end{texnote}
% \end{function}
%
@@ -237,10 +237,9 @@
%
% \section{Wrapping lines in output}
%
-% \begin{function}{\iow_wrap:xnnnN}
+% \begin{function}[updated = 2011-06-03]{\iow_wrap:xnnnN}
% \begin{syntax}
-% \cs{iow_wrap:xnnnN} \Arg{text} \Arg{run-on text} \Arg{run-on length}
-% ~~\Arg{set up} \meta{function}
+% \cs{iow_wrap:xnnnN} \Arg{text} \Arg{run-on text} \Arg{run-on length} \Arg{set up} \meta{function}
% \end{syntax}
% This function will wrap the \meta{text} to a fixed number of
% characters per line. At the start of each line which is wrapped,
@@ -271,7 +270,7 @@
% and MiK\TeX{} systems.
% \end{variable}
%
-% \begin{variable}{\c_catcode_other_space_tl}
+% \begin{variable}[added = 2011-09-05]{\c_catcode_other_space_tl}
% Token list containing one character with category code $12$,
% (\enquote{other}), and character code $32$ (space).
% \end{variable}
@@ -290,7 +289,7 @@
% \TeX{} according to the category codes in force when the function
% is used.
% \begin{texnote}
-% The is protected macro which expands to the \TeX{} primitive \cs{read}
+% The is protected macro which expands to the \TeX{} primitive \tn{read}
% along with the |to| keyword.
% \end{texnote}
% \end{function}
@@ -308,7 +307,7 @@
% is used.
% \begin{texnote}
% The is protected macro which expands to the \TeX{} primitives
-% \cs{global} \cs{read} along with the |to| keyword.
+% \tn{global}\tn{read} along with the |to| keyword.
% \end{texnote}
% \end{function}
%
@@ -325,7 +324,7 @@
% characters which are given category code $10$ (space).
% \begin{texnote}
% The is protected macro which expands to the \eTeX{} primitive
-% \cs{readline} along with the |to| keyword.
+% \tn{readline} along with the |to| keyword.
% \end{texnote}
% \end{function}
%
@@ -342,13 +341,13 @@
% characters which are given category code $10$ (space).
% \begin{texnote}
% The is protected macro which expands to the primitives
-% \cs{global} \cs{readline} along with the |to| keyword.
+% \tn{global}\tn{readline} along with the |to| keyword.
% \end{texnote}
% \end{function}
%
%\begin{function}[EXP,pTF]{\ior_if_eof:N}
% \begin{syntax}
-% \cs{ior_if_eof_p:N} \meta{stream}
+% \cs{ior_if_eof_p:N} \meta{stream} \\
% \cs{ior_if_eof:NTF} \meta{stream} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the end of a \meta{stream} has been reached during a reading
@@ -358,7 +357,7 @@
%\end{function}
%
% \section{Internal input--output functions}
-%
+%
% \begin{function}[EXP]{\if_eof:w}
% \begin{syntax}
% \cs{if_eof:w} \meta{stream}
@@ -370,7 +369,7 @@
% Tests if the \meta{stream} returns \enquote{end of file}, which is true
% for non-existent files. The \cs{else:} branch is optional.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{ifeof}.
+% This is the \TeX{} primitive \tn{ifeof}.
% \end{texnote}
% \end{function}
%
@@ -409,7 +408,7 @@
\package_check_loaded_expl:
%</package>
% \end{macrocode}
-%
+%
% \subsection{Primitives}
%
% \begin{macro}{\if_eof:w}
@@ -1083,7 +1082,7 @@
\if_catcode:w X #9
\exp_after:wN \use_none_delimit_by_q_stop:w
\else:
- 9 +
+ 9 +
\exp_after:wN \str_length_loop:NNNNNNNNN
\fi:
}
@@ -1138,7 +1137,7 @@
\cs_new_protected_nopar:Npn \ior_to:NN #1#2
{ \tex_read:D #1 to #2 }
\cs_new_protected_nopar:Npn \ior_gto:NN #1#2
- { \pref_global:D \tex_read:D #1 to #2 }
+ { \tex_global:D \tex_read:D #1 to #2 }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1150,7 +1149,7 @@
\cs_new_protected_nopar:Npn \ior_str_to:NN #1#2
{ \etex_readline:D #1 to #2 }
\cs_new_protected_nopar:Npn \ior_str_gto:NN #1#2
- { \pref_global:D \etex_readline:D #1 to #2 }
+ { \tex_global:D \etex_readline:D #1 to #2 }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1163,10 +1162,12 @@
% This is much more easily done using the wrapping system: there is
% an expansion there, so a bit of a hack is needed.
% \begin{macrocode}
+%<*deprecated>
\cs_new_protected:Npn \iow_now_buffer_safe:Nn #1#2
{ \iow_wrap:xnnnN { \exp_not:n {#2} } { } \c_zero { } \iow_now:Nn #1 }
\cs_new_protected:Npn \iow_now_buffer_safe:Nx #1#2
{ \iow_wrap:xnnnN {#2} { } \c_zero { } \iow_now:Nn #1 }
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
@@ -1175,10 +1176,12 @@
% As input--output operations are done using a stack, |new| operations seem
% out-of-place. They are therefore set up just to gobble the input.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \ior_new:N \use_none:n
\cs_new_eq:NN \ior_new:c \use_none:n
\cs_new_eq:NN \iow_new:N \use_none:n
\cs_new_eq:NN \iow_new:c \use_none:n
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1187,8 +1190,10 @@
% \begin{macro}{\iow_open_streams:}
% Slightly misleading names.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \ior_open_streams: \ior_list_streams:
\cs_new_eq:NN \iow_open_streams: \iow_list_streams:
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
index 631faf966d9..c2069873a77 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3keys.dtx Copyright (C) 2009-2011 The LaTeX3 Project
+%% File: l3keys.dtx Copyright (C) 2006-2011 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3keys.dtx 2722 2011-09-05 08:49:40Z joseph $
+\GetIdInfo$Id: l3keys.dtx 2800 2011-09-10 16:54:36Z will $
{L3 Experimental key-value interfaces}
%</driver|package>
%<*driver>
@@ -189,8 +189,8 @@
% does not exist, it will be created at the point that the key is
% set up. The \meta{boolean} will be assigned globally.
% \end{function}
-%
-% \begin{function}{.bool_set_inverse:N}
+%
+% \begin{function}[added = 2011-08-28]{.bool_set_inverse:N}
% \begin{syntax}
% \meta{key} .bool_set_inverse:N = \meta{boolean}
% \end{syntax}
@@ -199,7 +199,7 @@
% \texttt{false}).
% If the \meta{boolean} does not exist, it will be created at the point
% that the key is set up. The \meta{boolean} will be assigned locally.
-%
+%
% \textbf{This property is experimental.}
% \end{function}
%
@@ -212,7 +212,7 @@
% \texttt{false}).
% If the \meta{boolean} does not exist, it will be created at the point
% that the key is set up. The \meta{boolean} will be assigned globally.
-%
+%
% \textbf{This property is experimental.}
% \end{function}
%
@@ -224,8 +224,8 @@
% for \meta{key} must then be created, as discussed in
% section~\ref{sec:choice}.
% \end{function}
-%
-% \begin{function}{.choices:nn}
+%
+% \begin{function}[added = 2011-08-21]{.choices:nn}
% \begin{syntax}
% \meta{key} .choices:nn \meta{choices} \meta{code}
% \end{syntax}
@@ -235,7 +235,7 @@
% \cs{l_keys_choice_int} will be the position of the choice in the list
% of \meta{choices} (indexed from $0$).
% Choices are discussed in detail in section~\ref{sec:choice}.
-%
+%
% \textbf{This property is experimental.}
% \end{function}
%
@@ -251,6 +251,26 @@
% detail in section~\ref{sec:choice}.
% \end{function}
%
+% \begin{function}[added=2011/09/11]{.clist_set:N, .clist_set:c}
+% \begin{syntax}
+% \meta{key} .clist_set:N = \meta{comma list variable}
+% \end{syntax}
+% Defines \meta{key} to locally set \meta{comma list variable} to \meta{value}.
+% Spaces around commas and empty items will be stripped.
+% If the variable does not exist, it
+% will be created at the point that the key is set up.
+% \end{function}
+%
+% \begin{function}[added=2011/09/11]{.clist_gset:N, .clist_gset:c}
+% \begin{syntax}
+% \meta{key} .clist_gset:N = \meta{comma list variable}
+% \end{syntax}
+% Defines \meta{key} to globally set \meta{comma list variable} to \meta{value}.
+% Spaces around commas and empty items will be stripped.
+% If the variable does not exist, it
+% will be created at the point that the key is set up.
+% \end{function}
+%
% \begin{function}{.code:n, .code:x}
% \begin{syntax}
% \meta{key} .code:n = \meta{code}
@@ -365,19 +385,19 @@
% is used, then the value will be passed through to the subsidiary
% \meta{keys} for processing (as |#1|).
% \end{function}
-%
-% \begin{function}{.multichoice:}
+%
+% \begin{function}[added = 2011-08-21]{.multichoice:}
% \begin{syntax}
% \meta{key} .multichoice:
% \end{syntax}
% Sets \meta{key} to act as a multiple choice key. Each valid choice
% for \meta{key} must then be created, as discussed in
% section~\ref{sec:choice}.
-%
+%
% \textbf{This property is experimental.}
% \end{function}
-%
-% \begin{function}{.multichoice:nn}
+%
+% \begin{function}[added = 2011-08-21]{.multichoice:nn}
% \begin{syntax}
% \meta{key} .multichoice:nn \meta{choices} \meta{code}
% \end{syntax}
@@ -388,7 +408,7 @@
% \cs{l_keys_choice_int} will be the position of the choice in the list
% of \meta{choices} (indexed from $0$).
% Choices are discussed in detail in section~\ref{sec:choice}.
-%
+%
% \textbf{This property is experimental.}
% \end{function}
%
@@ -535,7 +555,7 @@
% indexed from $0$ (as an offset), so that the value of
% \cs{l_keys_choice_int} for the first choice in a list will be
% zero.
-%
+%
% The same approach is also implemented by the \emph{experimental}
% property \texttt{.choices:nn}. This combines the functionality of
% \texttt{.choice_code:n} and \texttt{.generate_choices:n} into one
@@ -550,7 +570,7 @@
% which~is~in~position~
% \int_use:N \l_keys_choice_int \c_space_tl
% in~the~list.
-% }
+% }
% }
% \end{verbatim}
% Note that the \texttt{.choices:nn} property should \emph{not} be mixed with
@@ -584,7 +604,7 @@
% These variables do not have defined behaviour when used outside of
% code created using \texttt{.generate_choices:n}
% (\emph{i.e.}~anything might happen).
-%
+%
% Multiple choices are created in a very similar manner to mutually-exclusive
% choices, using the properties \texttt{.multichoice:} and
% \texttt{.multichoices:nn}. As with mutually exclusive choices, multiple
@@ -599,7 +619,7 @@
% which~is~in~position~
% \int_use:N \l_keys_choice_int \c_space_tl
% in~the~list.
-% }
+% }
% }
% \end{verbatim}
% and
@@ -615,28 +635,29 @@
% are valid. The \texttt{.multichoices:nn} property causes
% \cs{l_keys_choice_tl} and \cs{l_keys_choice_int} to be set in exactly
% the same way as described for \texttt{.choices:nn}.
-%
+%
% When multiple choice keys are set, the value is treated as a comma-separated
% list:
% \begin{verbatim}
% \keys_set:nn { module }
% {
% key = { a , b , c } % 'key' defined as a multiple choice
-% }
+% }
%\end{verbatim}
% Each choice will be applied in turn, with the usual handling of unknown
% values.
%
% \section{Setting keys}
%
-% \begin{function}{\keys_set:nn, \keys_set:nV, \keys_set:nv, \keys_set:no}
+% \begin{function}
+% {\keys_set:nn, \keys_set:nV, \keys_set:nv, \keys_set:no}
% \begin{syntax}
% \cs{keys_set:nn} \Arg{module} \Arg{keyval list}
% \end{syntax}
% Parses the \meta{keyval list}, and sets those keys which are defined
% for \meta{module}. The behaviour on finding an unknown key can be set
% by defining a special \texttt{unknown} key: this will be illustrated
-% later.
+% later.
% \end{function}
%
% If a key is not known, \cs{keys_set:nn} will look for a special
@@ -661,19 +682,19 @@
% as \cs{l_keys_path_tl}. Note that this will have been processed
% using \cs{tl_to_str:n}.
% \end{variable}
-%
+%
% \begin{variable}{\l_keys_value_tl}
% When processing an unknown key, the value of the key is available as
% \cs{l_keys_value_tl}. Note that this will be empty if no value was given
% for the key.
% \end{variable}
-%
+%
% \section{Setting known keys only}
-%
+%
% The functionality described in this section is experimental and may be
% altered or removed, depending on feedback.
%
-% \begin{function}
+% \begin{function}[added = 2011-08-23]
% {
% \keys_set_known:nnN, \keys_set_known:nVN,
% \keys_set_known:nvN, \keys_set_known:noN
@@ -692,19 +713,17 @@
%
% \begin{function}[EXP,pTF]{\keys_if_exist:nn}
% \begin{syntax}
-% \cs{keys_if_exist_p:nn} \meta{module} \meta{key}
-% \cs{keys_if_exist:nnTF} \meta{module} \meta{key}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{keys_if_exist_p:nn} \meta{module} \meta{key} \\
+% \cs{keys_if_exist:nnTF} \meta{module} \meta{key} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{key} exists for \meta{module}, \emph{i.e.}~if any code
% has been defined for \meta{key}.
% \end{function}
-%
-% \begin{function}[EXP,pTF]{\keys_if_choice_exist:nn}
+%
+% \begin{function}[added = 2011-08-21,EXP,pTF]{\keys_if_choice_exist:nn}
% \begin{syntax}
-% \cs{keys_if_exist_p:nnn} \meta{module} \meta{key} \meta{choice}
-% \cs{keys_if_exist:nnnTF} \meta{module} \meta{key} \meta{choice}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{keys_if_exist_p:nnn} \meta{module} \meta{key} \meta{choice} \\
+% \cs{keys_if_exist:nnnTF} \meta{module} \meta{key} \meta{choice} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{choice} is defined for the \meta{key} within the
% \meta{module},, \emph{i.e.}~if any code has been defined for
@@ -761,10 +780,9 @@
% \end{verbatim}
% are treated identically.
%
-% \begin{function}{\keyval_parse:NNn}
+% \begin{function}[updated = 2011-09-08]{\keyval_parse:NNn}
% \begin{syntax}
-% \cs{keyval_parse:NNn} \meta{function1} \meta{function2}
-% ~~\Arg{key--value list}
+% \cs{keyval_parse:NNn} \meta{function1} \meta{function2} \Arg{key--value list}
% \end{syntax}
% Parses the \meta{key--value list} into a series of \meta{keys} and
% associated \meta{values}, or keys alone (if no \meta{value} was
@@ -788,10 +806,11 @@
% \end{verbatim}
% Note that there is a difference between an empty value (an equals
% sign followed by nothing) and a missing value (no equals sign at
-% all).
+% all). Spaces are trimmed from the ends of the \meta{key} and \meta{value},
+% and any \emph{outer} set of braces are removed from the \meta{value} as
+% part of the processing.
% \end{function}
%
-%
% \end{documentation}
%
% \begin{implementation}
@@ -928,42 +947,16 @@
% \end{macro}
%
% \begin{macro}{\keyval_split_key:w}
-% \begin{macro}{\keyval_remove_spaces:w}
-% \begin{macro}[aux]{\keyval_split_key_aux:w}
-% \begin{macro}[aux]{\keyval_remove_spaces_aux:w}
% The aim here is to remove spaces and also exactly one set of braces.
-% The spaces are trimmed off from each end using a \enquote{funny}
-% |Q|, which will never turn up in normal use. The idea is that
-% the \texttt{f}-type expansion will stop if it finds an unexpandable
-% token or a space, and will gobble the space. To avoid expanding
-% anything else, the \cs{exp_not:N} works by ensuring that the first
-% non-space token in the setting will stop the \texttt{f}-type
-% expansion. The \cs{use_none:n} is needed to remove the leading
-% quark, while the second setting of \cs{l_keyval_key_tl}
-% removes exactly one set of braces.
+% There is also a quark to remove, hence the \cs{use_none:n} appearing before
+% application of \cs{tl_trim_spaces:n}.
% \begin{macrocode}
-\group_begin:
- \char_set_catcode_math_toggle:n { `\Q }
- \cs_new_protected:Npn \keyval_split_key:w #1 \q_stop
- {
- \exp_args:NNf \tl_set:Nn \l_keyval_key_tl
- {
- \exp_after:wN \keyval_remove_spaces:w \exp_after:wN
- \exp_not:N \use_none:n #1 Q ~ Q
- }
- \tl_set:Nx \l_keyval_key_tl
- { \exp_after:wN \keyval_split_key_aux:w \l_keyval_key_tl \q_stop }
- }
- \cs_gset:Npn \keyval_split_key_aux:w #1 \q_stop { \exp_not:n {#1} }
- \cs_gset:Npn \keyval_remove_spaces:w #1 ~ Q
- { \keyval_remove_spaces_aux:w #1 Q }
- \cs_gset:Npn \keyval_remove_spaces_aux:w #1 Q #2 {#1}
-\group_end:
+\cs_new_protected:Npn \keyval_split_key:w #1 \q_stop
+ {
+ \tl_set:Nx \l_keyval_key_tl
+ { \exp_after:wN \tl_trim_spaces:n \exp_after:wN { \use_none:n #1 } }
+ }
% \end{macrocode}
-% Fixme: use \cs{tl_trim_spaces} instead of the aux function above?
-% \end{macro}
-% \end{macro}
-% \end{macro}
% \end{macro}
%
% \begin{macro}{\keyval_split_value:w}
@@ -1002,16 +995,12 @@
% A similar idea to the key code: remove the spaces from each end and
% deal with one set of braces.
% \begin{macrocode}
-\group_begin:
- \char_set_catcode_math_toggle:n { `\Q }
- \cs_new_protected:Npn \keyval_split_value_aux:w \q_nil #1 \q_stop
- {
- \exp_args:NNf \tl_set:Nn \l_keyval_value_tl
- { \keyval_remove_spaces:w \exp_not:N #1 Q ~ Q }
- \tl_put_right:Nx \l_keyval_parse_tl
- { { \exp_not:o \l_keyval_value_tl } }
- }
-\group_end:
+\cs_new_protected:Npn \keyval_split_value_aux:w \q_nil #1 \q_stop
+ {
+ \tl_set:Nx \l_keyval_value_tl { \tl_trim_spaces:n {#1} }
+ \tl_put_right:Nx \l_keyval_parse_tl
+ { { \exp_not:o \l_keyval_value_tl } }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -1042,7 +1031,6 @@
}
% \end{macrocode}
%
-%
% \subsection{Constants and variables}
%
% \begin{variable}{\c_keys_code_root_tl, \c_keys_vars_root_tl}
@@ -1114,7 +1102,7 @@
\tl_new:N \l_keys_property_tl
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}{\l_keys_unknown_clist}
% Used when setting only known keys to store those left over.
% \begin{macrocode}
@@ -1135,7 +1123,8 @@
% \begin{macro}[aux]{\keys_define_aux:nnn, \keys_define_aux:onn}
% The public function for definitions is just a wrapper for the lower
% level mechanism, more or less. The outer function is designed to
-% keep a track of the current module, to allow safe nesting.
+% keep a track of the current module, to allow safe nesting. The module is set
+% removing any leading |/| (which is not needed here).
% \begin{macrocode}
\cs_new_protected:Npn \keys_define:nn
{ \keys_define_aux:onn \l_keys_module_tl }
@@ -1262,7 +1251,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}[int]{\keys_bool_set_inverse:NN}
% Inverse boolean setting is much the same.
% \begin{macrocode}
@@ -1300,7 +1289,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}[int]{\keys_choices_make:nn}
% Auto-generating choices means setting up the root key as a choice, then
% defining each choice in turn.
@@ -1425,7 +1414,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}[int]{\keys_multichoice_find:n}
% \begin{macro}[int]{\keys_multichoice_make:}
% \begin{macro}[int]{\keys_multichoices_make:nn}
@@ -1517,7 +1506,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{.bool_set_inverse:N}
% \begin{macro}{.bool_gset_inverse:N}
% One function for this.
@@ -1538,7 +1527,7 @@
{ \keys_choice_make: }
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{.choices:nn}
% For auto-generation of a series of mutually-exclusive choices.
% Here, |#1| will consist of two separate
@@ -1571,6 +1560,21 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{.clist_set:N, .clist_set:c}
+% \begin{macro}{.clist_gset:N, .clist_gset:c}
+% \begin{macrocode}
+\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_set:N } #1
+ { \keys_variable_set:NnN #1 { clist } n }
+\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_set:c } #1
+ { \keys_variable_set:cnN {#1} { clist } n }
+\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_gset:N } #1
+ { \keys_variable_set:NnNN #1 { clist } g n }
+\cs_new_protected_nopar:cpn { \c_keys_props_root_tl .clist_gset:c } #1
+ { \keys_variable_set:cnNN {#1} { clist } g n }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{.default:n, .default:V}
% Expansion is left to the internal functions.
% \begin{macrocode}
@@ -1646,7 +1650,7 @@
{ \keys_meta_make:x {#1} }
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{.multichoice:}
% \begin{macro}{.multichoices:nn}
% The same idea as \texttt{.choice:} and \texttt{.choices:nn}, but
@@ -1727,7 +1731,7 @@
{ \keys_set_aux:onn { \l_keys_module_tl } }
\cs_new_protected:Npn \keys_set_aux:nnn #1#2#3
{
- \tl_set:Nn \l_keys_module_tl {#2}
+ \tl_set:Nx \l_keys_module_tl { \tl_to_str:n {#2} }
\keyval_parse:NNn \keys_set_elt:n \keys_set_elt:nn {#3}
\tl_set:Nn \l_keys_module_tl {#1}
}
@@ -1736,7 +1740,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}
% {
% \keys_set_known:nnN, \keys_set_known:nVN,
@@ -1748,7 +1752,7 @@
{ \keys_set_known_aux:onnN { \l_keys_module_tl } }
\cs_new_protected:Npn \keys_set_known_aux:nnnN #1#2#3#4
{
- \tl_set:Nn \l_keys_module_tl {#2}
+ \tl_set:Nx \l_keys_module_tl { \tl_to_str:n {#2} }
\clist_clear:N \l_keys_unknown_clist
\cs_set_eq:NN \keys_execute_unknown: \keys_execute_unknown_alt:
\keyval_parse:NNn \keys_set_elt:n \keys_set_elt:nn {#3}
@@ -1918,7 +1922,7 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}[EXP,pTF]{\keys_if_choice_exist:nnn}
% Just an alternative view on \cs{keys_if_exist:nn(TF)}.
% \begin{macrocode}
@@ -2017,9 +2021,11 @@
% \begin{macro}{\KV_process_no_space_removal_no_sanitize:NNn}
% There is just one function for this now.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \KV_process_space_removal_sanitize:NNn \keyval_parse:NNn
\cs_new_eq:NN \KV_process_space_removal_no_sanitize:NNn \keyval_parse:NNn
\cs_new_eq:NN \KV_process_no_space_removal_no_sanitize:NNn \keyval_parse:NNn
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2031,4 +2037,4 @@
%
%\end{implementation}
%
-%\PrintIndex \ No newline at end of file
+%\PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
index b2f12568bb1..12110fb86c2 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3luatex.dtx 2617 2011-08-18 08:13:44Z joseph $
+\GetIdInfo$Id: l3luatex.dtx 2798 2011-09-10 15:42:13Z will $
{L3 Experimental LuaTeX-specific functions}
%</driver|package>
%<*driver>
@@ -69,26 +69,26 @@
%
% \section{Breaking out to \Lua{}}
%
-% The \LuaTeX{} engine provides access to the \Lua{} programming language,
-% and with it access to the \enquote{internals} of \TeX{}. In order to use
+% The \LuaTeX{} engine provides access to the \Lua{} programming language,
+% and with it access to the \enquote{internals} of \TeX{}. In order to use
% this within the framework provided here, a family of functions is
% available. When used with \pdfTeX{} or \XeTeX{} these will raise an
% error: use \cs{luatex_if_engine:T} to avoid this. Details of coding
% the \LuaTeX{} engine are detailed in the \LuaTeX{} manual.
-%
+%
% \begin{function}[EXP]{\lua_now:n, \lua_now:x}
% \begin{syntax}
% \cs{lua_now:n} \Arg{token list}
% \end{syntax}
% The \meta{token list} is first tokenized by \TeX{}, which will include
% converting line ends to spaces in the usual \TeX{} manner and which
-% respects currently-applicable \TeX\ category codes. The resulting
+% respects currently-applicable \TeX\ category codes. The resulting
% \meta{\Lua{} input} is passed to the \Lua{} interpreter for processing.
% Each \cs{lua_now:n} block is treated by \Lua{} as a separate chunk.
-% The \Lua{} interpreter will execute the \meta{\Lua{} input} immediately,
+% The \Lua{} interpreter will execute the \meta{\Lua{} input} immediately,
% and in an expandable manner.
% \begin{texnote}
-% \cs{lua_now:x} is the \LuaTeX{} primitive \cs{directlua} renamed.
+% \cs{lua_now:x} is the \LuaTeX{} primitive \tn{directlua} renamed.
% \end{texnote}
% \end{function}
%
@@ -98,15 +98,15 @@
% \end{syntax}
% The \meta{token list} is first tokenized by \TeX{}, which will include
% converting line ends to spaces in the usual \TeX{} manner and which
-% respects currently-applicable \TeX{} category codes. The resulting
-% \meta{\Lua{} input} is passed to the \Lua\ interpreter when the
+% respects currently-applicable \TeX{} category codes. The resulting
+% \meta{\Lua{} input} is passed to the \Lua\ interpreter when the
% current page is finalised (\emph{i.e.}~at shipout). Each
% \cs{lua_shipout:n} block is treated by \Lua{} as a separate chunk.
% The \Lua{} interpreter will execute the \meta{\Lua{} input} during the
% page-building routine: no \TeX{} expansion of the \meta{\Lua{} input}
% will occur at this stage.
% \begin{texnote}
-% At a \TeX{} level, the \meta{\Lua{} input} is stored as a
+% At a \TeX{} level, the \meta{\Lua{} input} is stored as a
% \enquote{whatsit}.
% \end{texnote}
% \end{function}
@@ -117,8 +117,8 @@
% \end{syntax}
% The \meta{token list} is first tokenized by \TeX{}, which will include
% converting line ends to spaces in the usual \TeX{} manner and which
-% respects currently-applicable \TeX{} category codes. The resulting
-% \meta{\Lua{} input} is passed to the \Lua{} interpreter when the
+% respects currently-applicable \TeX{} category codes. The resulting
+% \meta{\Lua{} input} is passed to the \Lua{} interpreter when the
% current page is finalised (\emph{i.e.}~at shipout). Each
% \cs{lua_shipout:n} block is treated by \Lua{} as a separate chunk.
% The \Lua{} interpreter will execute the \meta{\Lua{} input} during the
@@ -127,10 +127,10 @@
% makes these functions suitable for including material finalised
% during the page building process (such as the page number).
% \begin{texnote}
-% \cs{lua_shipout_x:n} is the \LuaTeX{} primitive \cs{latelua}
+% \cs{lua_shipout_x:n} is the \LuaTeX{} primitive \tn{latelua}
% named using the \LaTeX3 scheme.
-%
-% At a \TeX{} level, the \meta{\Lua{} input} is stored as a
+%
+% At a \TeX{} level, the \meta{\Lua{} input} is stored as a
% \enquote{whatsit}.
% \end{texnote}
% \end{function}
@@ -138,13 +138,13 @@
% \section{Category code tables}
%
% As well as providing methods to break out into \Lua{}, there are
-% places where additional \LaTeX3 functions are provided by the
-% \LuaTeX{} engine. In particular, \LuaTeX{} provides category code
+% places where additional \LaTeX3 functions are provided by the
+% \LuaTeX{} engine. In particular, \LuaTeX{} provides category code
% tables. These can be used to ensure that a set of category codes
-% are in force in a more robust way than is possible with other
+% are in force in a more robust way than is possible with other
% engines. These are therefore used by \cs{ExplSyntaxOn} and
% \pkg{ExplSyntaxOff} when using the \LuaTeX{} engine.
-%
+%
% \begin{function}{\cctab_new:N}
% \begin{syntax}
% \cs{cctab_new:N} \meta{category code table}
@@ -155,8 +155,7 @@
%
% \begin{function}{\cctab_gset:Nn}
% \begin{syntax}
-% \cs{cctab_gset:Nn} \meta{category code table}
-% \Arg{category code set up}
+% \cs{cctab_gset:Nn} \meta{category code table} \Arg{category code set up}
% \end{syntax}
% Sets the \meta{category code table} to apply the category codes
% which apply when the prevailing regime is modified by the
@@ -165,13 +164,13 @@
% The assignment of the table is global: the underlying primitive does
% not respect grouping.
% \end{function}
-%
+%
% \begin{function}{\cctab_begin:N}
% \begin{syntax}
% \cs{cctab_begin:N} \meta{category code table}
% \end{syntax}
% Switches the category codes in force to those stored in the
-% \meta{category code table}. The prevailing codes before the
+% \meta{category code table}. The prevailing codes before the
% function is called are added to a stack, for use with
% \cs{cctab_end:}.
% \end{function}
@@ -192,8 +191,8 @@
% \end{variable}
%
% \begin{variable}{\c_document_cctab}
-% Category code table for a standard \LaTeX{} document. This does not
-% include setting the behaviour of the line-end character, which is
+% Category code table for a standard \LaTeX{} document. This does not
+% include setting the behaviour of the line-end character, which is
% only altered by \cs{ExplSyntaxOff}.
% \end{variable}
%
@@ -217,11 +216,11 @@
% \begin{implementation}
%
% \section{\pkg{l3luatex} implementation}
-%
+%
% \begin{macrocode}
%<*initex|package>
% \end{macrocode}
-%
+%
% Announce and ensure that the required packages are loaded.
% \begin{macrocode}
%<*package>
@@ -230,7 +229,7 @@
\package_check_loaded_expl:
%</package>
% \end{macrocode}
-%
+%
% \begin{macro}{\lua_now:n, \lua_now:x}
% \begin{macro}{\lua_shipout_x:n, \lua_shipout_x:x}
% \begin{macro}{\lua_shipout:n, \lua_shipout:x}
@@ -273,7 +272,7 @@
% \begin{variable}{\g_cctab_allocate_int}
% \begin{variable}{\g_cctab_stack_int}
% \begin{variable}{\g_cctab_stack_seq}
-% To allocate category code tables, both the read-only and stack
+% To allocate category code tables, both the read-only and stack
% tables need to be followed. There is also a sequence stack for the
% dynamic tables themselves.
% \begin{macrocode}
@@ -283,13 +282,13 @@
\seq_new:N \g_cctab_stack_seq
% \end{macrocode}
% \end{variable}
-% \end{variable}
-% \end{variable}
+% \end{variable}
+% \end{variable}
%
% \begin{macro}{\cctab_new:N}
% Creating a new category code table is done slightly differently
% from other registers. Low-numbered tables are more efficiently-stored
-% than high-numbered ones. There is also a need to have a stack of
+% than high-numbered ones. There is also a need to have a stack of
% flexible tables as well as the set of read-only ones. To satisfy both
% of these requirements, odd numbered tables are used for read-only
% tables, and even ones for the stack. Here, therefore, the odd numbers
@@ -298,28 +297,28 @@
\cs_new_protected_nopar:Npn \cctab_new:N #1
{
\cs_if_free:NTF #1
- {
+ {
\int_gadd:Nn \g_cctab_allocate_int { 2 }
- \int_compare:nNnTF
+ \int_compare:nNnTF
{ \g_cctab_allocate_int } < { \c_max_register_int + 1 }
- {
- \pref_global:D \tex_mathchardef:D #1 \g_cctab_allocate_int
+ {
+ \tex_global:D \tex_mathchardef:D #1 \g_cctab_allocate_int
\luatex_initcatcodetable:D #1
}
- { \msg_kernel_fatal:nnx { alloc } { out-of-registers } { cctab } }
+ { \msg_kernel_fatal:nnx { alloc } { out-of-registers } { cctab } }
}
{
- \msg_kernel_error:nnx { code } { variable-already-defined }
- { \token_to_str:N #1 }
+ \msg_kernel_error:nnx { code } { variable-already-defined }
+ { \token_to_str:N #1 }
}
- }
+ }
\luatex_if_engine:F
{ \cs_set_protected_nopar:Npn \cctab_new:N #1 { \lua_wrong_engine: } }
%<*package>
\luatex_if_engine:T
{
- \cs_set_protected_nopar:Npn \cctab_new:N #1
- {
+ \cs_set_protected_nopar:Npn \cctab_new:N #1
+ {
\newcatcodetable #1
\luatex_initcatcodetable:D #1
}
@@ -342,8 +341,8 @@
\int_gadd:Nn \g_cctab_stack_int { 2 }
\int_compare:nNnT { \g_cctab_stack_int } > { 268 435 453 }
{ \msg_kernel_error:nn { code } { cctab-stack-full } }
- \luatex_savecatcodetable:D \g_cctab_stack_int
- \luatex_catcodetable:D \g_cctab_stack_int
+ \luatex_savecatcodetable:D \g_cctab_stack_int
+ \luatex_catcodetable:D \g_cctab_stack_int
}
\cs_new_protected_nopar:Npn \cctab_end:
{
@@ -397,7 +396,7 @@
% The \texttt{other} and \texttt{string} ones are done by completely
% ignoring the existing codes as this makes life a lot less complex. The
% table for \pkg{expl3} category codes is always needed, whereas when in
-% package mode the rest can be copied from the existing \LaTeXe{} package
+% package mode the rest can be copied from the existing \LaTeXe{} package
% \pkg{luatex}.
% \begin{macrocode}
\luatex_if_engine:T
@@ -405,7 +404,7 @@
\cctab_new:N \c_code_cctab
\cctab_gset:Nn \c_code_cctab { }
}
-%<*package>
+%<*package>
\luatex_if_engine:T
{
\cs_new_eq:NN \c_document_cctab \CatcodeTableLaTeX
@@ -413,8 +412,8 @@
\cs_new_eq:NN \c_other_cctab \CatcodeTableOther
\cs_new_eq:NN \c_string_cctab \CatcodeTableString
}
-%</package>
-%<*initex>
+%</package>
+%<*initex>
\luatex_if_engine:T
{
\cctab_new:N \c_document_cctab
@@ -432,13 +431,13 @@
{
\prg_stepwise_inline:nnnn { 0 } { 1 } { 127 }
{ \char_set_catcode_other:n {#1} }
- }
+ }
\cctab_gset:Nn \c_string_cctab
{
\prg_stepwise_inline:nnnn { 0 } { 1 } { 127 }
{ \char_set_catcode_other:n {#1} }
- \char_set_catcode_space:n { 32 }
- }
+ \char_set_catcode_space:n { 32 }
+ }
}
%</initex>
% \end{macrocode}
@@ -447,11 +446,11 @@
% \end{variable}
% \end{variable}
% \end{variable}
-%
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
%
%\end{implementation}
%
-%\PrintIndex \ No newline at end of file
+%\PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index fd58910af9a..4b75c2ce925 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3msg.dtx 2728 2011-09-05 19:13:18Z joseph $
+\GetIdInfo$Id: l3msg.dtx 2812 2011-09-12 09:19:26Z bruno $
{L3 Experimental messages}
%</driver|package>
%<*driver>
@@ -100,7 +100,7 @@
% where it will help to show meaning. In particular, |\\| may be
% used to force a new line and \verb*|\ | forces an explicit space.
%
-% \begin{function}{\msg_new:nnnn, \msg_new:nnn}
+% \begin{function}[updated = 2011-08-16]{\msg_new:nnnn, \msg_new:nnn}
% \begin{syntax}
% \cs{msg_new:nnnn} \Arg{module} \Arg{message} \Arg{text}
% ~~\Arg{more text}
@@ -134,7 +134,7 @@
%
% \section{Contextual information for messages}
%
-% \begin{function}[EXP]{\msg_line_context:}
+% \begin{function}[rEXP]{\msg_line_context:}
% \begin{syntax}
% \cs{msg_line_context:}
% \end{syntax}
@@ -239,7 +239,7 @@
% Messages behave differently depending on the message class. A number
% of standard message classes are supplied, but more can be
% created.
-%
+%
% When issuing messages, any arguments passed should use
% \cs{tl_to_str:n} or \cs{token_to_str:N} to prevent unwanted expansion
% of the material.
@@ -388,7 +388,7 @@
% \end{function}
%
% \section{Redirecting messages}
-%
+%
% Each message has a \enquote{name}, which can be used to alter the behaviour
% of the message when it is given. Thus we might have
% \begin{verbatim}
@@ -397,7 +397,7 @@
% to define a message, with
% \begin{verbatim}
% \msg_error:nn { module } { my-message }
-% \end{verbatim}
+% \end{verbatim}
% when it is used. With no filtering, this will raise an error. However, we
% could alter the behaviour with
% \begin{verbatim}
@@ -411,7 +411,7 @@
% \begin{verbatim}
% \msg_redirect_name:nnn { module } { my-message } { warning }
% \end{verbatim}
-% to target just one message.
+% to target just one message.
%
% \begin{function}{\msg_redirect_class:nn}
% \begin{syntax}
@@ -426,8 +426,7 @@
%
% \begin{function}{\msg_redirect_module:nnn}
% \begin{syntax}
-% \cs{msg_redirect_module:nnn} \Arg{module} \Arg{class one}
-% ~~\Arg{class two}
+% \cs{msg_redirect_module:nnn} \Arg{module} \Arg{class one} \Arg{class two}
% \end{syntax}
% Redirects message of \meta{class one} for \meta{module} to act as
% though they were from \meta{class two}. Messages of \meta{class one}
@@ -467,7 +466,7 @@
% will not include any additional printing information in the message:
% contrast with |\\| in messages. The |two| version adds two lines.
% \end{function}
-%
+%
% \begin{function}{\msg_interrupt:xxx}
% \begin{syntax}
% \cs{msg_interrupt:xxx} \Arg{first line} \Arg{text} \Arg{extra text}
@@ -478,12 +477,12 @@
% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
% !
% ! <first line>
-% !
+% !
% ! <text>
-% !...............................................
+% !...............................................
% \end{verbatim}
% where the \meta{text} will be wrapped to fit within the current
-% line length. The user may then request more information, at which
+% line length. The user may then request more information, at which
% stage the \meta{extra text} will be shown in the terminal in the
% format
% \begin{verbatim}
@@ -506,7 +505,7 @@
% .................................................
% \end{verbatim}
% where the \meta{text} will be wrapped to fit within the current
-% line length.
+% line length.
% \end{function}
%
% \begin{function}{\msg_term:x}
@@ -521,7 +520,7 @@
% *************************************************
% \end{verbatim}
% where the \meta{text} will be wrapped to fit within the current
-% line length.
+% line length.
% \end{function}
%
% \section{Kernel-specific functions}
@@ -530,10 +529,10 @@
% but have their own functions. This allows some text to be pre-defined,
% and also ensures that serious errors can be handled properly.
%
-% \begin{function}{\msg_kernel_new:nnnn, \msg_kernel_new:nnn}
+% \begin{function}[updated = 2011-08-16]
+% {\msg_kernel_new:nnnn, \msg_kernel_new:nnn}
% \begin{syntax}
-% \cs{msg_kernel_new:nnnn} \Arg{module} \Arg{message} \Arg{text}
-% ~~\Arg{more text}
+% \cs{msg_kernel_new:nnnn} \Arg{module} \Arg{message} \Arg{text} \Arg{more text}
% \end{syntax}
% Creates a kernel \meta{message} for a given \meta{module}.
% The message will be defined to first give \meta{text} and then
@@ -548,8 +547,7 @@
%
% \begin{function}{\msg_kernel_set:nnnn, \msg_kernel_set:nnn}
% \begin{syntax}
-% \cs{msg_kernel_set:nnnn} \Arg{module} \Arg{message} \Arg{text}
-% ~~\Arg{more text}
+% \cs{msg_kernel_set:nnnn} \Arg{module} \Arg{message} \Arg{text} \Arg{more text}
% \end{syntax}
% Sets up the text for a kernel \meta{message} for a given \meta{module}.
% The message will be defined to first give \meta{text} and then
@@ -641,7 +639,8 @@
% normal error messages, as none of the tools to print to the terminal
% or the log file are expandable.
%
-% \begin{function}{\msg_expandable_error:n}
+% \begin{function}[added = 2011-08-11, updated = 2011-08-13]
+% {\msg_expandable_error:n}
% \begin{syntax}
% \cs{msg_expandable_error:n} \Arg{error message}
% \end{syntax}
@@ -673,7 +672,7 @@
\package_check_loaded_expl:
%</package>
% \end{macrocode}
-%
+%
% \begin{variable}{\l_msg_tmp_tl}
% A general scratch for the module.
% \begin{macrocode}
@@ -1537,7 +1536,7 @@
\c_msg_return_text_tl
}
% \end{macrocode}
-%
+%
% Messages for earlier kernel modules.
% \begin{macrocode}
\msg_kernel_new:nnnn { kernel } { bad-number-of-arguments }
@@ -1631,7 +1630,7 @@
% (with category code $7$) and keep tokens until that space character,
% dropping everything else until \cs{q_stop}. The \cs{c_zero} prevents
% losing braces around the user-inserted text if any, and stops the
-% expansion of \cs{tex_romannumeral:D}.
+% expansion of \tn{romannumeral}.
% \begin{macrocode}
\group_begin:
\char_set_catcode_math_superscript:N \^
@@ -1667,7 +1666,9 @@
% \begin{macro}{\msg_class_new:nn}
% This is only ever used in a |set| fashion.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \msg_class_new:nn \msg_class_set:nn
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
@@ -1679,11 +1680,13 @@
% The performance here is never going to be good enough for tracing
% code, so let's be realistic.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \msg_trace:nnxxxx \msg_log:nnxxxx
\cs_new_eq:NN \msg_trace:nnxxx \msg_log:nnxxx
\cs_new_eq:NN \msg_trace:nnxx \msg_log:nnxx
\cs_new_eq:NN \msg_trace:nnx \msg_log:nnx
\cs_new_eq:NN \msg_trace:nn \msg_log:nn
+%</deprecated>
% \end{macrocode}
%\end{macro}
%
@@ -1696,6 +1699,7 @@
% \begin{macro}{\msg_direct_term:xx}
% These were all too low-level.
% \begin{macrocode}
+%<*deprecated>
\cs_new_protected:Npn \msg_generic_new:nnn #1#2#3 { \deprecated }
\cs_new_protected:Npn \msg_generic_new:nn #1#2 { \deprecated }
\cs_new_protected:Npn \msg_generic_set:nnn #1#2#3 { \deprecated }
@@ -1703,6 +1707,7 @@
\cs_new_protected:Npn \msg_direct_interrupt:xxxxx #1#2#3#4#5 { \deprecated }
\cs_new_protected:Npn \msg_direct_log:xx #1#2 { \deprecated }
\cs_new_protected:Npn \msg_direct_term:xx #1#2 { \deprecated }
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index 46f7734e2d4..54b31433dca 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3names.dtx 2538 2011-08-10 19:37:10Z joseph $
+\GetIdInfo$Id: l3names.dtx 2776 2011-09-07 18:33:19Z joseph $
{L3 Experimental namespace for primitives}
%</package>
%<*driver>
@@ -119,8 +119,8 @@
% be marked here as \enquote{taken}.
% \end{macro}
%
-% The \cs{let} primitive is renamed by hand first as it is essential for
-% the entire process to follow. This also uses \cs{global}, as that way
+% The \tn{let} primitive is renamed by hand first as it is essential for
+% the entire process to follow. This also uses \tn{global}, as that way
% we avoid leaving an unneeded csname in the hash table.
% \begin{macrocode}
\let \tex_global:D \global
@@ -582,8 +582,8 @@
% \begin{macrocode}
\name_primitive:NN \pdfstrcmp \pdftex_strcmp:D
% \end{macrocode}
-% \XeTeX{}-specific primitives. Note that \XeTeX{}'s \cs{strcmp} is
-% handled earlier and is \enquote{rolled up} into \cs{pdfstrcmp}.
+% \XeTeX{}-specific primitives. Note that \XeTeX{}'s \tn{strcmp} is
+% handled earlier and is \enquote{rolled up} into \tn{pdfstrcmp}.
% \begin{macrocode}
\name_primitive:NN \XeTeXversion \xetex_XeTeXversion:D
% \end{macrocode}
@@ -627,4 +627,4 @@
%
% \end{implementation}
%
-% \PrintIndex \ No newline at end of file
+% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index dfed4100ac0..b57e130efd2 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3prg.dtx 2720 2011-09-05 08:12:39Z bruno $
+\GetIdInfo$Id: l3prg.dtx 2827 2011-09-15 19:37:32Z joseph $
{L3 Experimental control structures}
%</driver|package>
%<*driver>
@@ -97,34 +97,35 @@
% \prg_new_conditional:Nnn, \prg_set_conditional:Nnn
% }
% \begin{syntax}
-% \cs{prg_set_conditional:Npnn} \cs{\meta{name}:\meta{arg spec}}
-% ~~\meta{parameters} \Arg{conditions} \Arg{code}
-% \cs{prg_set_conditional:Nnn} \cs{\meta{name}:\meta{arg spec}}
-% ~~\Arg{conditions} \Arg{code}
+% \cs{prg_set_conditional:Npnn} \cs{\meta{name}:\meta{arg spec}} \meta{parameters} \Arg{conditions} \Arg{code} \\
+% \cs{prg_set_conditional:Nnn} \cs{\meta{name}:\meta{arg spec}} \Arg{conditions} \Arg{code}
% \end{syntax}
% These functions creates a family of conditionals using the same
% \Arg{code} to perform the test created. The \texttt{new} version will
% check for existing definitions (\emph{cf.}~\cs{cs_new:Npn}) whereas
% the \texttt{set} version will not (\emph{cf.}~\cs{cs_set:Npn}). The
-% conditionals created are depended on the comma-separated list of
+% conditionals created are dependent on the comma-separated list of
% \meta{conditions}, which should be one or more of \texttt{p},
-% \texttt{T}, \texttt{F} and \texttt{TF}. The conditionals are then
-% defined in the obvious way as:
+% \texttt{T}, \texttt{F} and \texttt{TF}.
+% \end{function}
+%
+% The conditionals are defined by \cs{prg_new_conditional:Npnn} and friends
+% as:
% \begin{itemize}
-% \item \cs{\meta{name}_p:\meta{arg spec}}, a predicate function
+% \item \cs{\meta{name}_p:\meta{arg spec}} --- a predicate function
% which will supply either a logical \texttt{true} or
% logical \texttt{false}. This function is intended for use
% in cases where one or more logical tests are combined to
% lead to a final outcome.
-% \item \cs{\meta{name}:\meta{arg spec}T}, a function with one
+% \item \cs{\meta{name}:\meta{arg spec}T} --- a function with one
% more argument than the original \meta{arg spec} demands. The
% \meta{true branch} code in this additional argument will be
% left on the input stream only if the test is \texttt{true}.
-% \item \cs{\meta{name}:\meta{arg spec}F}, a function with one
+% \item \cs{\meta{name}:\meta{arg spec}F} --- a function with one
% more argument than the original \meta{arg spec} demands. The
% \meta{false branch} code in this additional argument will be
% left on the input stream only if the test is \texttt{false}.
-% \item \cs{\meta{name}:\meta{arg spec}TF} , a function with two
+% \item \cs{\meta{name}:\meta{arg spec}TF} --- a function with two
% more argument than the original \meta{arg spec} demands. The
% \meta{true branch} code in the first additional argument will
% be left on the input stream if the test is \texttt{true}, while
@@ -164,7 +165,6 @@
% returning the state. There must be a return statement for each
% branch, failing to do so will result in an error if that branch is
% executed.
-% \end{function}
%
% \begin{function}
% {
@@ -173,8 +173,7 @@
% }
% \begin{syntax}
% \cs{prg_set_protected_conditional:Npnn}
-% ~~\cs{\meta{name}:\meta{arg spec}} \meta{parameters}
-% ~~\meta{conditions} \Arg{code}
+% ~~\cs{\meta{name}:\meta{arg spec}} \meta{parameters} \meta{conditions} \Arg{code} \\
% \cs{prg_set_protected_conditional:Nnn}
% ~~\cs{\meta{name}:\meta{arg spec}} \meta{conditions} \Arg{code}
% \end{syntax}
@@ -184,18 +183,21 @@
% the \texttt{set} version will not (\emph{cf.}~\cs{cs_set:Npn}). The
% conditionals created are depended on the comma-separated list of
% \meta{conditions}, which should be one or more of \texttt{T},
-% \texttt{F} and \texttt{TF}. The conditionals are then defined in the
-% obvious way as:
+% \texttt{F} and \texttt{TF}.
+% \end{function}
+%
+% The conditionals are defined by \cs{prg_new_protected_conditional:Npnn}
+% and friends as:
% \begin{itemize}
-% \item \cs{\meta{name}:\meta{arg spec}T}, a function with one
+% \item \cs{\meta{name}:\meta{arg spec}T} --- a function with one
% more argument than the original \meta{arg spec} demands. The
% \meta{true branch} code in this additional argument will be
% left on the input stream only if the test is \texttt{true}.
-% \item \cs{\meta{name}:\meta{arg spec}F}, a function with one
+% \item \cs{\meta{name}:\meta{arg spec}F} --- a function with one
% more argument than the original \meta{arg spec} demands. The
% \meta{false branch} code in this additional argument will be
% left on the input stream only if the test is \texttt{false}.
-% \item \cs{\meta{name}:\meta{arg spec}TF} , a function with two
+% \item \cs{\meta{name}:\meta{arg spec}TF} --- a function with two
% more argument than the original \meta{arg spec} demands. The
% \meta{true branch} code in the first additional argument will
% be left on the input stream if the test is \texttt{true}, while
@@ -212,23 +214,20 @@
% the test. \cs{prg_set_protected_conditional:Npn} will generate
% a family of protected conditional functions, and so \meta{code}
% does not need to be expandable. All of the functions are created
-% globally.
-%\end{function}
-%
+% globally.%
% \begin{function}{\prg_new_eq_conditional:NN, \prg_set_eq_conditional:NN}
% \begin{syntax}
-% \cs{prg_new_eq_conditional:NN}
-% ~~\cs{\meta{name1}:\meta{arg spec1}} \cs{\meta{name2}:\meta{arg spec2}}
+% \cs{prg_new_eq_conditional:NN} \cs{\meta{name1}:\meta{arg spec1}} \cs{\meta{name2}:\meta{arg spec2}}
% \end{syntax}
% These will set the definitions of the functions
-% \begin{itemize}
+% \begin{itemize}\parskip=0pt
% \item \cs{\meta{name1}_p:\meta{arg spec1}}
% \item \cs{\meta{name1}:\meta{arg spec1}T}
% \item \cs{\meta{name1}:\meta{arg spec1}F}
% \item \cs{\meta{name1}:\meta{arg spec1}TF}
% \end{itemize}
% equal to those for
-% \begin{itemize}
+% \begin{itemize}\parskip=0pt
% \item \cs{\meta{name2}_p:\meta{arg spec2}}
% \item \cs{\meta{name2}:\meta{arg spec2}T}
% \item \cs{\meta{name2}:\meta{arg spec2}F}
@@ -398,8 +397,7 @@
% \begin{function}[EXP,pTF]{\bool_if:n}
% \begin{syntax}
% \cs{bool_if_p:n} \Arg{boolean expression}
-% \cs{bool_if:nTF} \Arg{boolean expression} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{bool_if:nTF} \Arg{boolean expression} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests the current truth of \meta{boolean expression}, and
% continues expansion based on this result. The
@@ -451,7 +449,7 @@
%
% Loops using either boolean expressions or stored boolean values.
%
-% \begin{function}[EXP]{\bool_until_do:Nn, \bool_until_do:cn}
+% \begin{function}[rEXP]{\bool_until_do:Nn, \bool_until_do:cn}
% \begin{syntax}
% \cs{bool_until_do:Nn} \Arg{boolean} \Arg{code}
% \end{syntax}
@@ -462,7 +460,7 @@
% until the \meta{boolean} is \texttt{true}.
% \end{function}
%
-% \begin{function}[EXP]{\bool_while_do:Nn, \bool_while_do:cn}
+% \begin{function}[rEXP]{\bool_while_do:Nn, \bool_while_do:cn}
% \begin{syntax}
% \cs{bool_while_do:Nn} \Arg{boolean} \Arg{code}
% \end{syntax}
@@ -473,7 +471,7 @@
% until the \meta{boolean} is \texttt{false}.
% \end{function}
%
-% \begin{function}[EXP]{\bool_until_do:nn}
+% \begin{function}[rEXP]{\bool_until_do:nn}
% \begin{syntax}
% \cs{bool_until_do:nn} \Arg{boolean expression} \Arg{code}
% \end{syntax}
@@ -485,7 +483,7 @@
% then loop until the \meta{boolean expression} is \texttt{true}.
% \end{function}
%
-% \begin{function}[EXP]{\bool_while_do:nn}
+% \begin{function}[rEXP]{\bool_while_do:nn}
% \begin{syntax}
% \cs{bool_while_do:nn} \Arg{boolean expression} \Arg{code}
% \end{syntax}
@@ -502,16 +500,15 @@
% For cases where a number of cases need to be considered a family of
% case-selecting functions are available.
%
-% \begin{function}[EXP]{\prg_case_int:nnn}
+% \begin{function}[updated = 2011-07-06, EXP]{\prg_case_int:nnn}
% \begin{syntax}
-% \cs{prg_case_int:nnn}
-% ~~\Arg{test integer expression}
-% ~~|{|
-% ~~~~\Arg{intexpr case1} \Arg{code case1}
-% ~~~~\Arg{intexpr case2} \Arg{code case2}
-% ~~~~\ldots
-% ~~~~\Arg{intexpr case$_n$} \Arg{code case$_n$}
-% ~~|}|
+% \cs{prg_case_int:nnn} \Arg{test integer expression} \\
+% ~~|{| \\
+% ~~~~\Arg{intexpr case1} \Arg{code case1} \\
+% ~~~~\Arg{intexpr case2} \Arg{code case2} \\
+% ~~~~\ldots \\
+% ~~~~\Arg{intexpr case$_n$} \Arg{code case$_n$} \\
+% ~~|}| \\
% ~~\Arg{else case}
% \end{syntax}
% This function evaluates the \meta{test integer expression} and
@@ -519,7 +516,10 @@
% \meta{integer expression cases}. If the two are equal then the
% associated \meta{code} is left in the input stream. If none of
% the tests are \texttt{true} then the \texttt{else code} will be
-% left in the input stream. For example
+% left in the input stream.
+% \end{function}
+%
+% As an example of \cs{prg_case_int:nnn}:
% \begin{verbatim}
% \prg_case_int:nnn
% { 2 * 5 }
@@ -531,18 +531,16 @@
% { No idea! }
% \end{verbatim}
% will leave \enquote{\texttt{Medium}} in the input stream.
-% \end{function}
%
-% \begin{function}[EXP]{\prg_case_dim:nnn}
+% \begin{function}[updated = 2011-07-06, EXP]{\prg_case_dim:nnn}
% \begin{syntax}
-% \cs{prg_case_dim:nnn}
-% ~~\Arg{test dimension expression}
-% ~~|{|
-% ~~~~\Arg{dimexpr case1} \Arg{code case1}
-% ~~~~\Arg{dimexpr case2} \Arg{code case2}
-% ~~~~\ldots
-% ~~~~\Arg{dimexpr case$_n$} \Arg{code case$_n$}
-% ~~|}|
+% \cs{prg_case_dim:nnn} \Arg{test dimension expression} \\
+% ~~|{| \\
+% ~~~~\Arg{dimexpr case1} \Arg{code case1} \\
+% ~~~~\Arg{dimexpr case2} \Arg{code case2} \\
+% ~~~~\ldots \\
+% ~~~~\Arg{dimexpr case$_n$} \Arg{code case$_n$} \\
+% ~~|}| \\
% ~~\Arg{else case}
% \end{syntax}
% This function evaluates the \meta{test dimension expression} and
@@ -553,17 +551,16 @@
% left in the input stream.
% \end{function}
%
-% \begin{function}[EXP]
+% \begin{function}[updated = 2011-08-12, EXP]
% {\prg_case_str:nnn, \prg_case_str:onn, \prg_case_str:xxn}
% \begin{syntax}
-% \cs{prg_case_str:nnn}
-% ~~\Arg{test string}
-% ~~|{|
-% ~~~~\Arg{string case1} \Arg{code case1}
-% ~~~~\Arg{string case2} \Arg{code case2}
-% ~~~~\ldots
-% ~~~~\Arg{string case$_n$} \Arg{code case$_n$}
-% ~~|}|
+% \cs{prg_case_str:nnn} \Arg{test string} \\
+% ~~|{| \\
+% ~~~~\Arg{string case1} \Arg{code case1} \\
+% ~~~~\Arg{string case2} \Arg{code case2} \\
+% ~~~~\ldots \\
+% ~~~~\Arg{string case$_n$} \Arg{code case$_n$} \\
+% ~~|}| \\
% ~~\Arg{else case}
% \end{syntax}
% This function compares the \meta{test string} in turn with each
@@ -575,16 +572,16 @@
% in the same way as the underlying \cs{str_if_eq:xxTF} test.
% \end{function}
%
-% \begin{function}[EXP]{\prg_case_tl:Nnn, \prg_case_tl:cnn}
+% \begin{function}[updated = 2011-07-06, EXP]
+% {\prg_case_tl:Nnn, \prg_case_tl:cnn}
% \begin{syntax}
-% \cs{prg_case_tl:Nnn}
-% ~~\meta{test token list variable}
-% ~~"{"
-% ~~~~\meta{token list variable case1} \Arg{code case1}
-% ~~~~\meta{token list variable case2} \Arg{code case2}
-% ~~~~\ldots
-% ~~~~\meta{token list variable case$_n$} \Arg{code case$_n$}
-% ~~"}"
+% \cs{prg_case_tl:Nnn} \meta{test token list variable} \\
+% ~~"{" \\
+% ~~~~\meta{token list variable case1} \Arg{code case1} \\
+% ~~~~\meta{token list variable case2} \Arg{code case2} \\
+% ~~~~\ldots \\
+% ~~~~\meta{token list variable case$_n$} \Arg{code case$_n$} \\
+% ~~"}" \\
% ~~\Arg{else case}
% \end{syntax}
% This function compares the \meta{test token list variable} in turn
@@ -598,7 +595,7 @@
%
% \section{Producing $n$ copies}
%
-% \begin{function}[EXP]{\prg_replicate:nn}
+% \begin{function}[updated = 2011-07-04, EXP]{\prg_replicate:nn}
% \begin{syntax}
% \cs{prg_replicate:nn} \Arg{integer expression} \Arg{tokens}
% \end{syntax}
@@ -608,10 +605,9 @@
% nesting. It yields its result after two expansion steps.
% \end{function}
%
-% \begin{function}[EXP]{\prg_stepwise_function:nnnN}
+% \begin{function}[updated = 2011-09-06,rEXP]{\prg_stepwise_function:nnnN}
% \begin{syntax}
-% \cs{prg_stepwise_function:nnnN} \Arg{initial value} \Arg{step}
-% ~~\Arg{final value} \meta{function}
+% \cs{prg_stepwise_function:nnnN} \Arg{initial value} \Arg{step} \Arg{final value} \meta{function}
% \end{syntax}
% This function first evaluates the \meta{initial value}, \meta{step}
% and \meta{final value}, all of which should be integer expressions.
@@ -620,23 +616,22 @@
% (using \meta{step} between each \meta{value}). Thus \meta{function}
% should absorb one numerical argument. For example
% \begin{verbatim}
-% \cs_set_nopar:Npn \my_func:n #1 { I~saw~#1 \\ }
+% \cs_set_nopar:Npn \my_func:n #1 { [I~saw~#1] \quad }
% \prg_stepwise_function:nnnN { 1 } { 5 } { 1 } \my_func:n
% \end{verbatim}
% would print
% \begin{quote}
-% I saw 1 \\
-% I saw 2 \\
-% I saw 3 \\
-% I saw 4 \\
-% I saw 5 \\
+% [I saw 1] \quad
+% [I saw 2] \quad
+% [I saw 3] \quad
+% [I saw 4] \quad
+% [I saw 5] \quad
% \end{quote}
% \end{function}
%
-% \begin{function}{\prg_stepwise_inline:nnnn}
+% \begin{function}[updated = 2011-09-06]{\prg_stepwise_inline:nnnn}
% \begin{syntax}
-% \cs{prg_stepwise_inline:nnnn} \Arg{initial value} \Arg{step}
-% ~~\Arg{final value} \Arg{code}
+% \cs{prg_stepwise_inline:nnnn} \Arg{initial value} \Arg{step} \Arg{final value} \Arg{code}
% \end{syntax}
% This function first evaluates the \meta{initial value}, \meta{step}
% and \meta{final value}, all of which should be integer expressions.
@@ -646,10 +641,10 @@
% should define a function of one argument (|#1|).
% \end{function}
%
-% \begin{function}{\prg_stepwise_variable:nnnNn}
+% \begin{function}[updated = 2011-09-06]{\prg_stepwise_variable:nnnNn}
% \begin{syntax}
-% \cs{prg_stepwise_variable:nnnNn} \Arg{initial value} \Arg{step}
-% ~~\Arg{final value} \meta{tl~var} \Arg{code}
+% \cs{prg_stepwise_variable:nnnNn} \\
+% ~~\Arg{initial value} \Arg{step} \Arg{final value} \meta{tl~var} \Arg{code}
% \end{syntax}
% This function first evaluates the \meta{initial value}, \meta{step}
% and \meta{final value}, all of which should be integer expressions.
@@ -676,7 +671,7 @@
% Detects if \TeX{} is currently in inner mode.
% \end{function}
%
-% \begin{function}[EXP,TF]{\mode_if_math:}
+% \begin{function}[updated = 2011-09-05, EXP,pTF]{\mode_if_math:}
% \begin{syntax}
% \cs{mode_if_math:TF} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -693,7 +688,8 @@
%
% \section{Internal programming functions}
%
-% \begin{function}[EXP]{\group_align_safe_begin:, \group_align_safe_end:}
+% \begin{function}[updated = 2011-08-11, EXP]
+% {\group_align_safe_begin:, \group_align_safe_end:}
% \begin{syntax}
% \cs{group_align_safe_begin:}
% \ldots
@@ -703,22 +699,32 @@
% environment within a specially-constructed group. This group is
% designed in such a way that it does not add brace groups to the
% output but does act as a group for the |&| token inside
-% \cs{tex_halign:D}. This is necessary to allow grabbing of tokens
+% \tn{halign}. This is necessary to allow grabbing of tokens
% for testing purposes, as \TeX{} uses group level to determine the
% effect of alignment tokens. Without the special grouping, the use of
% a function such as \cs{peek_after:Nw} will result in a forbidden
-% comparison of the internal \cs{endtemplate} token, yielding a
+% comparison of the internal \tn{endtemplate} token, yielding a
% fatal error. Each \cs{group_align_safe_begin:} must be matched by a
% \cs{group_align_safe_end:}, although this does not have to occur
% within the same function.
% \end{function}
%
-% \begin{function}{\scan_align_safe_stop:}
+% \begin{function}[updated = 2011-09-06]{\scan_align_safe_stop:}
% \begin{syntax}
% \cs{scan_align_safe_stop:}
% \end{syntax}
-% This function gets \TeX{} on the right track inside an alignment
-% cell but without destroying any kerning.
+% Stops \TeX{}'s scanner looking for expandable control sequences at
+% the beginning of an alignment cell. This function is required, for
+% example, to obtain the expected output when testing \cs{mode_if_math:TF}
+% at the start of a math array cell: placing
+% \cs{scan_align_safe_stop:} before \cs{mode_if_math:TF} will give the
+% correct result. This function does not destroy any kerning if used in
+% other locations, but \emph{does} render functions non-expandable.
+% \begin{texnote}
+% This is a protected version of \cs{prg_do_nothing:}, which therefore
+% stops \TeX{}'s scanner in the circumstances described without producing
+% any affect on the output.
+% \end{texnote}
% \end{function}
%
% \begin{function}[EXP]{\prg_variable_get_scope:N}
@@ -736,7 +742,7 @@
% Returns the type of \meta{variable} (\texttt{tl}, \texttt{int},
% \emph{etc.})
% \end{function}
-%
+%
% \section{Experimental programmings functions}
%
% \begin{function}{\prg_quicksort:n}
@@ -751,7 +757,7 @@
% \end{function}
%
% \begin{function}{
-% \prg_quicksort_function:n |
+% \prg_quicksort_function:n ,
% \prg_quicksort_compare:nnTF
% }
% \begin{syntax}
@@ -762,7 +768,7 @@
% |\prg_quicksort:n|. As an example we could define
% \begin{quote}
% |\cs_set_nopar:Npn\prg_quicksort_function:n #1{{#1}}|\\
-% |\cs_set_nopar:Npn\prg_quicksort_compare:nnTF #1#2#3#4 {\int_compare:nNnTF{#1}>{#2}}|
+% |\cs_set_nopar:Npn\prg_quicksort_compare:nnTF #1#2 {\int_compare:nNnTF{#1}>{#2}}|
% \end{quote}
% Then the function call
% \begin{quote}
@@ -1565,7 +1571,6 @@
\cs_new_nopar:Npn \prg_replicate_first_aux:N #1
{ \cs:w prg_replicate_first_ #1 :n \prg_replicate_aux:N }
% \end{macrocode}
-% \end{macro}
% Then comes all the functions that do the hard work of inserting all
% the copies.
% \begin{macrocode}
@@ -1608,6 +1613,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\prg_stepwise_function:nnnN}
% \begin{macro}[aux]
@@ -1616,12 +1622,16 @@
% of the steps. After that, do the function for the start value
% then step and loop around.
% \begin{macrocode}
-\cs_new:Npn \prg_stepwise_function:nnnN #1#2
+\cs_new:Npn \prg_stepwise_function:nnnN #1#2#3#4
{
- \int_compare:nNnTF {#2} > { 0 }
- { \exp_args:Nf \prg_stepwise_function_incr:nnnN }
- { \exp_args:Nf \prg_stepwise_function_decr:nnnN }
- { \int_eval:n {#1} } {#2}
+ \int_compare:nNnTF {#2} = \c_zero
+ { \msg_expandable_error:n { Zero~step~size~for~stepwise~function. } }
+ {
+ \int_compare:nNnTF {#2} > \c_zero
+ { \exp_args:Nf \prg_stepwise_function_incr:nnnN }
+ { \exp_args:Nf \prg_stepwise_function_decr:nnnN }
+ { \int_eval:n {#1} } {#2} {#3} #4
+ }
}
\cs_new:Npn \prg_stepwise_function_incr:nnnN #1#2#3#4
{
@@ -1634,7 +1644,7 @@
}
\cs_new:Npn \prg_stepwise_function_decr:nnnN #1#2#3#4
{
- \int_compare:nNnF {#1} < {#3}
+ \int_compare:nNnF {#1} < {#3}
{
#4 {#1}
\exp_args:Nf \prg_stepwise_function_decr:nnnN
@@ -1645,67 +1655,48 @@
% \end{macro}
% \end{macro}
%
-%\begin{macro}[aux]{\g_prg_stepwise_level_int}
-% For nesting, the usual approach of using a counter.
+% \begin{macro}[aux]{\g_prg_stepwise_level_int}
+% For nesting, the usual approach of using a counter.
% \begin{macrocode}
\int_new:N \g_prg_stepwise_level_int
% \end{macrocode}
-%\end{macro}
+% \end{macro}
%
-%\begin{macro}{\prg_stepwise_inline:nnnn}
-%\begin{macro}[aux]
-% {\prg_stepwise_inline_incr:Nnnn, \prg_stepwise_inline_decr:Nnnn}
-% The approach here is similar but with a global integer required
-% to make the nesting safe (as seen in other in line functions).
+% \begin{macro}{\prg_stepwise_inline:nnnn}
+% \begin{macro}{\prg_stepwise_variable:nnnNn}
+% \UnitTested
+% \begin{macro}[aux]{\prg_stepwise_aux:NNnnnn}
+% The approach here is to build a function, with a global integer required
+% to make the nesting safe (as seen in other in line functions),
+% and map that function using \cs{prg_stepwise_function:nnnN}.
% \begin{macrocode}
-\cs_new_protected:Npn \prg_stepwise_inline:nnnn #1#2#3#4
+\cs_new_protected:Npn \prg_stepwise_inline:nnnn
{
- \int_gincr:N \g_prg_stepwise_level_int
- \cs_gset_nopar:cpn
+ \exp_args:NNc \prg_stepwise_aux:NNnnnn
+ \cs_gset_nopar:Npn
{ g_prg_stepwise_ \int_use:N \g_prg_stepwise_level_int :n }
- ##1 {#4}
- \int_compare:nNnTF {#2} > { 0 }
- { \exp_args:Ncf \prg_stepwise_inline_incr:Nnnn }
- { \exp_args:Ncf \prg_stepwise_inline_decr:Nnnn }
- { g_prg_stepwise_ \int_use:N \g_prg_stepwise_level_int :n }
- { \int_eval:n {#1} } {#2} {#3}
- \int_gdecr:N \g_prg_stepwise_level_int
}
-\cs_new_protected:Npn \prg_stepwise_inline_incr:Nnnn #1#2#3#4
+\cs_new_protected:Npn \prg_stepwise_variable:nnnNn #1#2#3#4#5
{
- \int_compare:nNnF {#2} > {#4}
+ \exp_args:NNc \prg_stepwise_aux:NNnnnn
+ \cs_gset_nopar:Npx
+ { g_prg_stepwise_ \int_use:N \g_prg_stepwise_level_int :n }
+ {#1}{#2}{#3}
{
- #1 {#2}
- \exp_args:NNf \prg_stepwise_inline_incr:Nnnn #1
- { \int_eval:n { #2 + #3 } } {#3} {#4}
+ \tl_set:Nn \exp_not:N #4 {##1}
+ \exp_not:n {#5}
}
}
-\cs_new_protected:Npn \prg_stepwise_inline_decr:Nnnn #1#2#3#4
+\cs_new_protected:Npn \prg_stepwise_aux:NNnnnn #1#2#3#4#5#6
{
- \int_compare:nNnF {#2} < {#4}
- {
- #1 {#2}
- \exp_args:NNf \prg_stepwise_inline_decr:Nnnn #1
- { \int_eval:n { #2 + #3 } } {#3} {#4}
- }
+ #1 #2 ##1 {#6}
+ \int_gincr:N \g_prg_stepwise_level_int
+ \prg_stepwise_function:nnnN {#3}{#4}{#5} #2
+ \int_gdecr:N \g_prg_stepwise_level_int
}
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
-% \begin{macro}{\prg_stepwise_variable:nnnNn}
-% \UnitTested
-% A wrapper for the above.
-% \begin{macrocode}
-\cs_new_protected:Npn \prg_stepwise_variable:nnnNn #1#2#3#4#5
- {
- \prg_stepwise_inline:nnnn {#1} {#2} {#3}
- {
- \tl_set:Nn #4 {##1}
- #5
- }
- }
-% \end{macrocode}
% \end{macro}
%
% \subsection{Detecting \TeX{}'s mode}
@@ -1744,14 +1735,12 @@
%
% \begin{macro}[pTF]{\mode_if_math:}
% \UnitTested
-% For testing math mode: without \cs{scan_align_safe_stop:}
-% things go wrong in alignments.
+% For testing math mode. At the beginning of an alignment cell,
+% the programmer should insert \cs{scan_align_safe_stop:} before
+% the test.
% \begin{macrocode}
\prg_new_conditional:Npnn \mode_if_math: { p , T , F , TF }
- {
- \scan_align_safe_stop:
- \if_mode_math: \prg_return_true: \else: \prg_return_false: \fi:
- }
+ { \if_mode_math: \prg_return_true: \else: \prg_return_false: \fi: }
% \end{macrocode}
% \end{macro}
%
@@ -1760,12 +1749,12 @@
% \begin{macro}[int]{\group_align_safe_begin:, \group_align_safe_end:}
% \TeX{}'s alignment structures present many problems. As Knuth says
% himself in \emph{\TeX : The Program}: \enquote{It's sort of a miracle
-% whenever \cs{halign} or \cs{valign} work, [\ldots]} One problem relates
+% whenever \tn{halign} or \tn{valign} work, [\ldots]} One problem relates
% to commands that internally issues a |\cr| but also peek ahead for
% the next character for use in, say, an optional argument. If the
% next token happens to be a |&| with category code~4 we will get some
% sort of weird error message because the underlying
-% |\tex_futurelet:D| will store the token at the end of the alignment
+% \tn{futurelet} will store the token at the end of the alignment
% template. This could be a |&|$_4$ giving a message like
% |! Misplaced \cr.| or even worse: it could be the |\endtemplate|
% token causing even more trouble! To solve this we have to open a
@@ -1788,30 +1777,39 @@
% \begin{macro}[int]{\scan_align_safe_stop:}
% When \TeX{} is in the beginning of an align cell (right after the
% |\cr|) it is in a somewhat strange mode as it is looking ahead to
-% find an |\tex_omit:D| or |\tex_noalign:D| and hasn't looked at the
-% preamble yet. Thus an |\tex_ifmmode:D| test will always fail unless
+% find an \tn{omit} or \tn{noalign} and hasn't looked at the
+% preamble yet. Thus an \tn{ifmmode} test will always fail unless
% we insert |\scan_stop:| to stop \TeX{}'s scanning ahead. On the other
% hand we don't want to insert a |\scan_stop:| every time as that will
% destroy kerning between letters\footnote{Unless we enforce an extra
-% pass with an appropriate value of \cs{pretolerance}.}
+% pass with an appropriate value of \tn{pretolerance}.}
% Unfortunately there is no way to detect if we're in the beginning of
% an alignment cell as they have different characteristics depending
% on column number, \emph{etc.} However we \emph{can} detect if we're in an
% alignment cell by checking the current group type and we can also
% check if the previous node was a character or ligature. What is done
% here is that |\scan_stop:| is only inserted if an only
-% if a)~we're in the
-% outer part of an alignment cell and b)~the last node \emph{wasn't} a
-% char node or a ligature node.
+% if a)~we're in the outer part of an alignment cell and b)~the last node
+% \emph{wasn't} a char node or a ligature node. Thus an older definition
+% here was
+% \begin{verbatim}
+% \cs_new_nopar:Npn \scan_align_safe_stop:
+% {
+% \int_compare:nNnT \etex_currentgrouptype:D = \c_six
+% {
+% \int_compare:nNnF \etex_lastnodetype:D = \c_zero
+% {
+% \int_compare:nNnF \etex_lastnodetype:D = \c_seven
+% { \scan_stop: }
+% }
+% }
+% }
+% \end{verbatim}
+% However, this is not truly expandable, as there are places where the
+% \cs{scan_stop:} ends up in the result. A simpler alternative, which
+% can be used selectively, is therefore defined.
% \begin{macrocode}
-\cs_new_nopar:Npn \scan_align_safe_stop:
- {
- \int_compare:nNnT \etex_currentgrouptype:D = \c_six
- {
- \int_compare:nNnF \etex_lastnodetype:D = \c_zero
- { \int_compare:nNnF \etex_lastnodetype:D = \c_seven { \scan_stop: } }
- }
- }
+\cs_new_protected_nopar:Npn \scan_align_safe_stop: { }
% \end{macrocode}
% \end{macro}
%
@@ -1862,7 +1860,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
% \subsection{Experimental programmings functions}
%
%
@@ -2012,8 +2010,10 @@
% As we have restructured the structured variables, these are no
% longer needed.
% \begin{macrocode}
+%<*deprecated>
\cs_new_protected:Npn \prg_new_map_functions:Nn #1#2 { \deprecated }
\cs_new_protected:Npn \prg_set_map_functions:Nn #1#2 { \deprecated }
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2024,4 +2024,4 @@
%
% \end{implementation}
%
-% \PrintIndex \ No newline at end of file
+% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
index d7409586cac..9a8624bc7c7 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3prop.dtx 2725 2011-09-05 18:53:03Z bruno $
+\GetIdInfo$Id: l3prop.dtx 2820 2011-09-12 18:56:29Z bruno $
{L3 Experimental property lists}
%</driver|package>
%<*driver>
@@ -78,7 +78,7 @@
% added to a property list which already contains the \meta{key} then the new
% entry will overwrite the existing one. The \meta{keys} are compared on a
% string basis, using the same method as \cs{str_if_eq:nn}.
-%
+%
% Property lists are intended for storing key-based information for use within
% code. This is in contrast to key--value lists, which are a form of
% \emph{input} parsed by the \pkg{keys} module.
@@ -219,7 +219,7 @@
%
% \section{Recovering values from property lists}
%
-% \begin{function}
+% \begin{function}[updated = 2011-08-28]
% {
% \prop_get:NnN, \prop_get:NVN, \prop_get:NoN,
% \prop_get:cnN, \prop_get:cVN, \prop_get:coN,
@@ -236,7 +236,8 @@
% \cs{prop_get:NnNTF}.
% \end{function}
%
-% \begin{function}{\prop_pop:NnN, \prop_pop:NoN, \prop_pop:cnN, \prop_pop:coN}
+% \begin{function}[updated = 2011-08-18]
+% {\prop_pop:NnN, \prop_pop:NoN, \prop_pop:cnN, \prop_pop:coN}
% \begin{syntax}
% \cs{prop_pop:NnN} \meta{property list} \Arg{key} \meta{tl var}
% \end{syntax}
@@ -249,7 +250,7 @@
% assignments are local.
% \end{function}
%
-% \begin{function}
+% \begin{function}[updated = 2011-08-18]
% {\prop_gpop:NnN, \prop_gpop:NoN, \prop_gpop:cnN, \prop_gpop:coN}
% \begin{syntax}
% \cs{prop_gpop:NnN} \meta{property list} \Arg{key} \meta{tl var}
@@ -294,8 +295,7 @@
% \begin{function}[EXP,pTF]{\prop_if_empty:N, \prop_if_empty:c}
% \begin{syntax}
% \cs{prop_if_empty_p:N} \meta{property list}
-% \cs{prop_if_empty:NTF} \meta{property list}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{prop_if_empty:NTF} \meta{property list} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{property list} is empty (containing no entries).
% \end{function}
@@ -306,8 +306,7 @@
% \prop_if_in:cn, \prop_if_in:cV, \prop_if_in:co
% }
% \begin{syntax}
-% \cs{prop_if_in:NnTF} \meta{property list} \Arg{key}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{prop_if_in:NnTF} \meta{property list} \Arg{key} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{key} is present in the \meta{property list},
% making the comparison using the method described by \cs{str_if_eq:nnTF}.
@@ -317,23 +316,23 @@
% non-expandable \cs{prop_get:NnNTF}.
% \end{texnote}
% \end{function}
-%
+%
% \section{Recovering values from property lists with branching}
-%
+%
% The functions in this section combine tests for the presence of a key
% in a property list with recovery of the associated valued. This makes them
% useful for cases where different cases follow dependent on the presence
% or absence of a key in a property list. They offer increased readability
% and performance over separate testing and recovery phases.
%
-% \begin{function}[TF]
+% \begin{function}[updated = 2011-08-28, TF]
% {
% \prop_get:NnN, \prop_get:NVN, \prop_get:NoN,
% \prop_get:cnN, \prop_get:cVN, \prop_get:coN
% }
% \begin{syntax}
-% \cs{prop_get:NnNTF} \meta{property list} \Arg{key}
-% ~~\meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{prop_get:NnNTF} \meta{property list} \Arg{key} \meta{token list variable} \\
+% ~~\Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{key} is not present in the \meta{property list}, leaves
% the \meta{false code} in the input stream and leaves the
@@ -343,17 +342,17 @@
% \meta{property list}. The \meta{token list variable} is assigned locally.
% \end{function}
%
-% \begin{function}[TF]{\prop_pop:NnN, \prop_pop:cnN}
+% \begin{function}[added = 2011-08-18,TF]{\prop_pop:NnN, \prop_pop:cnN}
% \begin{syntax}
-% \cs{prop_pop:NnNTF} \meta{property list} \Arg{key}
-% ~~\meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{prop_pop:NnNTF} \meta{property list} \Arg{key} \meta{token list variable} \\
+% ~~\Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{key} is not present in the \meta{property list}, leaves
% the \meta{false code} in the input stream and leaves the
% \meta{token list variable} unchanged. If the \meta{key} is present in
% the \meta{property list}, pops the corresponding \meta{value}
% in the \meta{token list variable}, \emph{i.e.}~removes the item from
-% the \meta{property list}.
+% the \meta{property list}.
% Both the \meta{property list} and the \meta{token list variable}
% are assigned locally.
% \end{function}
@@ -404,7 +403,7 @@
% level \TeX{} errors.
% \end{function}
%
-% \begin{function}[EXP]{\prop_map_break:n}
+% \begin{function}[rEXP]{\prop_map_break:n}
% \begin{syntax}
% \cs{prop_map_break:n} \Arg{tokens}
% \end{syntax}
@@ -440,22 +439,23 @@
% This section contains functions which may or may not be retained, depending
% on how useful they are found to be.
%
-% \begin{function}[TF]{\prop_gpop:NnN, \prop_gpop:cnN}
+% \begin{function}[added = 2011-08-18,TF]{\prop_gpop:NnN, \prop_gpop:cnN}
% \begin{syntax}
-% \cs{prop_gpop:NnNTF} \meta{property list} \Arg{key}
-% ~~\meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{prop_gpop:NnNTF} \meta{property list} \Arg{key} \meta{token list variable} \\
+% ~~\Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{key} is not present in the \meta{property list}, leaves
% the \meta{false code} in the input stream and leaves the
% \meta{token list variable} unchanged. If the \meta{key} is present in
% the \meta{property list}, pops the corresponding \meta{value}
% in the \meta{token list variable}, \emph{i.e.}~removes the item from
-% the \meta{property list}.
+% the \meta{property list}.
% The \meta{property list} is modified globally, while the
% \meta{token list variable} is assigned locally.
% \end{function}
%
-% \begin{function}[EXP]{\prop_map_tokens:Nn, \prop_map_tokens:cn}
+% \begin{function}[added = 2011-08-18,rEXP]
+% {\prop_map_tokens:Nn, \prop_map_tokens:cn}
% \begin{syntax}
% \cs{prop_map_tokens:Nn} \meta{property list} \Arg{code}
% \end{syntax}
@@ -464,7 +464,7 @@
% property list while keeping track of a given key.
% \end{function}
%
-% \begin{function}[EXP]{\prop_get:Nn, \prop_get:cn}
+% \begin{function}[updated = 2011-08-18,EXP]{\prop_get:Nn, \prop_get:cn}
% \begin{syntax}
% \cs{prop_get:Nn} \meta{property list} \Arg{key}
% \end{syntax}
@@ -490,7 +490,7 @@
%
% \begin{function}{\prop_split:Nnn}
% \begin{syntax}
-% \cs{prop_spilt:Nnn} \meta{property list} \Arg{key} \Arg{code}
+% \cs{prop_split:Nnn} \meta{property list} \Arg{key} \Arg{code}
% \end{syntax}
% Splits the \meta{property list} at the \meta{key}, giving three
% groups: the \meta{extract} of \meta{property list} before the
@@ -511,8 +511,7 @@
%
% \begin{function}{\prop_split:NnTF}
% \begin{syntax}
-% \cs{prop_spilt:NnTF} \meta{property list} \Arg{key}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{prop_split:NnTF} \meta{property list} \Arg{key} \Arg{true code} \Arg{false code}
% \end{syntax}
% Splits the \meta{property list} at the \meta{key}, giving three
% groups: the \meta{extract} of \meta{property list} before the
@@ -908,7 +907,7 @@
}
\cs_new:Npn \prop_if_in_aux:nwn #1 \q_prop #2 \q_prop #3
{
- \if_catcode:w A #2
+ \if_meaning:w A #2
\prg_return_false:
\exp_after:wN \use_none_delimit_by_q_stop:w
\fi:
@@ -930,9 +929,9 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \subsection{Recovering values from property lists with branching}
-%
+%
% \begin{macro}[TF]
% {
% \prop_get:NnN, \prop_get:NVN, \prop_get:NoN,
@@ -973,7 +972,7 @@
% }
% \begin{macro}[aux]{\prop_map_function_aux:Nwn}
% The fastest way to do a recursion here is to use an
-% \cs{if_catcode:w} test: the keys are strings, and thus
+% \cs{if_meaning:w} test: the keys are strings, and thus
% cannot match the marker |A| (which has catcode \enquote{letter}).
% \begin{macrocode}
\cs_new_nopar:Npn \prop_map_function:NN #1#2
@@ -983,7 +982,7 @@
}
\cs_new:Npn \prop_map_function_aux:Nwn #1 \q_prop #2 \q_prop #3
{
- \if_catcode:w A #2
+ \if_meaning:w A #2
\exp_after:wN \prop_map_break:
\fi:
#1 {#2} {#3}
@@ -1123,7 +1122,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP]{\prop_map_tokens:Nn, \prop_map_tokens:cn}
+% \begin{macro}[rEXP]{\prop_map_tokens:Nn, \prop_map_tokens:cn}
% \begin{macro}[aux]{\prop_map_tokens_aux:nwn}
% The mapping grabs one key--value pair at a time, and stops when
% reaching the marker key |A|, with catcode \enquote{letter}, which
@@ -1137,7 +1136,7 @@
}
\cs_new:Npn \prop_map_tokens_aux:nwn #1 \q_prop #2 \q_prop #3
{
- \if_catcode:w A #2
+ \if_meaning:w A #2
\exp_after:wN \prop_map_break:
\fi:
\use:n {#1} {#2} {#3}
@@ -1174,8 +1173,10 @@
% \begin{macro}{\prop_display:N, \prop_display:c}
% An older name for \cs{prop_show:N}.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \prop_display:N \prop_show:N
\cs_new_eq:NN \prop_display:c \prop_show:c
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
@@ -1184,12 +1185,14 @@
% Getting globally is no longer supported: this is a conceptual change, so
% the necessary code for the transition is provided directly.
% \begin{macrocode}
+%<*deprecated>
\cs_new_protected:Npn \prop_gget:NnN #1#2#3
{ \prop_split:Nnn #1 {#2} { \prop_gget_aux:Nnnn #3 } }
\cs_new_protected:Npn \prop_gget_aux:Nnnn #1#2#3#4
{ \tl_gset:Nn #1 {#3} }
\cs_generate_variant:Nn \prop_gget:NnN { NV }
\cs_generate_variant:Nn \prop_gget:NnN { c , cV }
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1197,23 +1200,29 @@
% \begin{macro}{\prop_get_gdel:NnN}
% This name seems very odd.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \prop_get_gdel:NnN \prop_gpop:NnN
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
% \begin{macro}[TF]{\prop_if_in:cc}
% A hang-over from an ancient implementation
% \begin{macrocode}
+%<*deprecated>
\cs_generate_variant:Nn \prop_if_in:NnT { cc }
\cs_generate_variant:Nn \prop_if_in:NnF { cc }
\cs_generate_variant:Nn \prop_if_in:NnTF { cc }
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\prop_gput:ccx}
% Another one.
% \begin{macrocode}
+%<*deprecated>
\cs_generate_variant:Nn \prop_gput:Nnn { ccx }
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
@@ -1221,10 +1230,12 @@
% {\prop_if_eq:NN, \prop_if_eq:Nc, \prop_if_eq:cN, \prop_if_eq:cc}
% These ones do no even make sense!
% \begin{macrocode}
+%<*deprecated>
\prg_new_eq_conditional:NNn \prop_if_eq:NN \tl_if_eq:NN { p , T , F , TF }
\prg_new_eq_conditional:NNn \prop_if_eq:cN \tl_if_eq:cN { p , T , F , TF }
\prg_new_eq_conditional:NNn \prop_if_eq:Nc \tl_if_eq:Nc { p , T , F , TF }
\prg_new_eq_conditional:NNn \prop_if_eq:cc \tl_if_eq:cc { p , T , F , TF }
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
@@ -1234,4 +1245,4 @@
%
% \end{implementation}
%
-% \PrintIndex \ No newline at end of file
+% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
index 4f8a12c67d4..bf414270bb6 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3quark.dtx 2665 2011-08-25 22:15:27Z joseph $
+\GetIdInfo$Id: l3quark.dtx 2798 2011-09-10 15:42:13Z will $
{L3 Experimental quarks}
%</driver|package>
%<*driver>
@@ -136,7 +136,7 @@
%
% \begin{function}[EXP,pTF]{\quark_if_nil:n, \quark_if_nil:o, \quark_if_nil:V}
% \begin{syntax}
-% \cs{quark_if_nil_p:n} \Arg{token list}
+% \cs{quark_if_nil_p:n} \Arg{token list} \\
% \cs{quark_if_nil:nTF} \Arg{token list} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token list} contains only \cs{q_nil} (distinct
@@ -146,18 +146,16 @@
%
% \begin{function}[EXP,pTF]{\quark_if_no_value:N, \quark_if_no_value:c}
% \begin{syntax}
-% \cs{quark_if_no_value_p:N} \meta{token}
-% \cs{quark_if_no_value:NTF} \meta{token} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{quark_if_no_value_p:N} \meta{token} \\
+% \cs{quark_if_no_value:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is equal to \cs{q_no_value}.
% \end{function}
%
% \begin{function}[EXP,pTF]{\quark_if_no_value:n}
% \begin{syntax}
-% \cs{quark_if_no_value_p:n} \Arg{token list}
-% \cs{quark_if_no_value:nTF} \Arg{token list} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{quark_if_no_value_p:n} \Arg{token list} \\
+% \cs{quark_if_no_value:nTF} \Arg{token list} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token list} contains only \cs{q_no_value}
% (distinct from \meta{token list} being empty or containing
@@ -193,12 +191,12 @@
% and \cs{q_recursion_stop} as the last two items.
% \end{function}
%
-% \begin{function}
+% \begin{function}[updated = 2011-09-06]
% {\quark_if_recursion_tail_stop:n, \quark_if_recursion_tail_stop:o}
% \begin{syntax}
-% \cs{quark_if_recursion_tail_stop:n} \Arg{tokens}
+% \cs{quark_if_recursion_tail_stop:n} \Arg{token list}
% \end{syntax}
-% Tests if \meta{tokens} consists of the single token
+% Tests if the \meta{token list} contains only
% \cs{q_recursion_tail}, and if so terminates the recursion this is
% part of using \cs{use_none_delimit_by_q_recursion_stop:w}. The
% recursion input must include the marker tokens \cs{q_recursion_tail}
@@ -207,7 +205,7 @@
%
% \begin{function}{\quark_if_recursion_tail_stop_do:Nn}
% \begin{syntax}
-% \cs{quark_if_recursion_tail_stop_do:nn} \Arg{token} \Arg{insertion}
+% \cs{quark_if_recursion_tail_stop_do:Nn} \Arg{token} \Arg{insertion}
% \end{syntax}
% Tests if \meta{token} contains only the marker
% \cs{q_recursion_tail}, and if so terminates the recursion this is
@@ -218,12 +216,12 @@
% ended.
% \end{function}
%
-% \begin{function}
+% \begin{function}[updated = 2011-09-06]
% {\quark_if_recursion_tail_stop_do:nn, \quark_if_recursion_tail_stop_do:on}
% \begin{syntax}
-% \cs{quark_if_recursion_tail_stop_do:nn} \Arg{tokens} \Arg{insertion}
+% \cs{quark_if_recursion_tail_stop_do:nn} \Arg{token list} \Arg{insertion}
% \end{syntax}
-% Tests if \meta{tokens} consists of the single token
+% Tests if the \meta{token list} contains only
% \cs{q_recursion_tail}, and if so terminates the recursion this is
% part of using \cs{use_none_delimit_by_q_recursion_stop:w}. The
% recursion input must include the marker tokens \cs{q_recursion_tail}
@@ -236,8 +234,7 @@
%
% \begin{function}{\use_none_delimit_by_q_recursion_stop:w}
% \begin{syntax}
-% \cs{use_none_delimit_by_q_recursion_stop:w}
-% ~~\meta{tokens} \cs{q_recursion_stop}
+% \cs{use_none_delimit_by_q_recursion_stop:w} \meta{tokens} \cs{q_recursion_stop}
% \end{syntax}
% Used to prematurely terminate a recursion using \cs{q_recursion_stop}
% as the end marker, removing any remaining \meta{tokens} from the
@@ -325,14 +322,13 @@
\exp_after:wN \use_none_delimit_by_q_recursion_stop:w
\fi:
}
-\cs_new:Npn \quark_if_recursion_tail_stop_do:Nn #1#2
+\cs_new:Npn \quark_if_recursion_tail_stop_do:Nn #1
{
\if_meaning:w #1 \q_recursion_tail
\exp_after:wN \use_i_delimit_by_q_recursion_stop:nw
\else:
\exp_after:wN \use_none:n
\fi:
- {#2}
}
% \end{macrocode}
% \end{macro}
@@ -345,47 +341,25 @@
% {\quark_if_recursion_tail_stop_do:nn,\quark_if_recursion_tail_stop_do:on}
% \UnitTested
% \begin{macro}[aux]{\quark_if_recursion_tail_aux:w}
-% The same idea applies when testing multiple tokens, but here a little more
-% care is needed. It is possible that |#1| might be something like
-% |{{{a}}}| or |{ab\iffalse}\fi|, which will therefore need to be tested
-% in a detokenized manner. The way that this is done is using
-% \cs{if_catcode:w}, with the idea being that this test will be \texttt{true}
-% provided the auxiliary function returns nothing at all. If the auxiliary
-% returns anything, it will be detokenized and so the test will be both
-% \texttt{false} and safe.
+% The same idea applies when testing multiple tokens, but here we just
+% compare the token list to \cs{q_recursion_tail} as a string.
% \begin{macrocode}
\cs_new:Npn \quark_if_recursion_tail_stop:n #1
{
- \if_catcode:w
- A
- \etex_detokenize:D \exp_after:wN
- {
- \quark_if_recursion_tail_aux:w #1 \q_recursion_stop
- \q_recursion_tail \q_recursion_stop \q_stop
- }
- A
+ \if_int_compare:w \pdftex_strcmp:D
+ { \exp_not:N \q_recursion_tail } { \exp_not:n {#1} } = \c_zero
\exp_after:wN \use_none_delimit_by_q_recursion_stop:w
\fi:
}
-\cs_new:Npn \quark_if_recursion_tail_stop_do:nn #1#2
+\cs_new:Npn \quark_if_recursion_tail_stop_do:nn #1
{
- \if_catcode:w
- A
- \etex_detokenize:D \exp_after:wN
- {
- \quark_if_recursion_tail_aux:w #1 \q_recursion_stop
- \q_recursion_tail \q_recursion_stop \q_stop
- }
- A
+ \if_int_compare:w \pdftex_strcmp:D
+ { \exp_not:N \q_recursion_tail } { \exp_not:n {#1} } = \c_zero
\exp_after:wN \use_i_delimit_by_q_recursion_stop:nw
\else:
\exp_after:wN \use_none:n
\fi:
- {#2}
}
-\cs_new:Npn \quark_if_recursion_tail_aux:w
- #1 \q_recursion_tail #2 \q_recursion_stop #3 \q_stop
- { #1 #2 }
\cs_generate_variant:Nn \quark_if_recursion_tail_stop:n { o }
\cs_generate_variant:Nn \quark_if_recursion_tail_stop_do:nn { o }
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
index 4b9109dbb1d..84ae0a4de56 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3seq.dtx 2725 2011-09-05 18:53:03Z bruno $
+\GetIdInfo$Id: l3seq.dtx 2812 2011-09-12 09:19:26Z bruno $
{L3 Experimental sequences and stacks}
%</driver|package>
%<*driver>
@@ -364,8 +364,7 @@
% \seq_if_in:cn, \seq_if_in:cV, \seq_if_in:cv, \seq_if_in:co, \seq_if_in:cx
% }
% \begin{syntax}
-% \cs{seq_if_in:NnTF} \meta{sequence} \Arg{item}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{seq_if_in:NnTF} \meta{sequence} \Arg{item} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{item} is present in the \meta{sequence}.
% \end{function}
@@ -400,8 +399,7 @@
% \seq_map_variable:cNn, \seq_map_variable:ccn
% }
% \begin{syntax}
-% \cs{seq_map_variable:NNn} \meta{sequence}
-% ~~\meta{tl~var.} \Arg{function using tl~var.}
+% \cs{seq_map_variable:NNn} \meta{sequence} \meta{tl~var.} \Arg{function using tl~var.}
% \end{syntax}
% Stores each entry in the \meta{sequence} in turn in the
% \meta{tl~var.}\ and applies the \meta{function using tl~var.}
@@ -546,8 +544,7 @@
%
% \begin{function}[TF]{\seq_get_left:NN, \seq_get_left:cN}
% \begin{syntax}
-% \cs{seq_get_left:NNTF} \meta{sequence} \meta{token list variable}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{seq_get_left:NNTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{sequence} is empty, leaves the \meta{false code} in the
% input stream and leaves the \meta{token list variable} unchanged. If the
@@ -560,8 +557,7 @@
%
% \begin{function}[TF]{\seq_get_right:NN, \seq_get_right:cN}
% \begin{syntax}
-% \cs{seq_get_right:NNTF} \meta{sequence} \meta{token list variable}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{seq_get_right:NNTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{sequence} is empty, leaves the \meta{false code} in the
% input stream and leaves the \meta{token list variable} unchanged. If the
@@ -574,8 +570,7 @@
%
% \begin{function}[TF]{\seq_pop_left:NN, \seq_pop_left:cN}
% \begin{syntax}
-% \cs{seq_pop_left:NNTF} \meta{sequence} \meta{token list variable}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{seq_pop_left:NNTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{sequence} is empty, leaves the \meta{false code} in the
% input stream and leaves the \meta{token list variable} unchanged. If the
@@ -589,8 +584,7 @@
%
% \begin{function}[TF]{\seq_gpop_left:NN, \seq_gpop_left:cN}
% \begin{syntax}
-% \cs{seq_gpop_left:NNTF} \meta{sequence} \meta{token list variable}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{seq_gpop_left:NNTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{sequence} is empty, leaves the \meta{false code} in the
% input stream and leaves the \meta{token list variable} unchanged. If the
@@ -603,8 +597,7 @@
%
% \begin{function}[TF]{\seq_pop_right:NN, \seq_pop_right:cN}
% \begin{syntax}
-% \cs{seq_pop_right:NNTF} \meta{sequence} \meta{token list variable}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{seq_pop_right:NNTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{sequence} is empty, leaves the \meta{false code} in the
% input stream and leaves the \meta{token list variable} unchanged. If the
@@ -653,7 +646,7 @@
% nothing.
% \end{function}
%
-% \begin{function}[EXP]{\seq_use:N, \seq_use:c}
+% \begin{function}[rEXP]{\seq_use:N, \seq_use:c}
% \begin{syntax}
% \cs{seq_use:N} \meta{sequence}
% \end{syntax}
@@ -664,7 +657,7 @@
% \meta{sequence} will be used from left (top) to right (bottom).
% \end{function}
%
-% \begin{function}[EXP]
+% \begin{function}[rEXP]
% {
% \seq_mapthread_function:NNN, \seq_mapthread_function:NcN,
% \seq_mapthread_function:cNN, \seq_mapthread_function:ccN
@@ -708,7 +701,7 @@
% \meta{comma-list}.
% \end{function}
%
-% \begin{function}{\seq_set_reverse:N,\seq_gset_reverse:N}
+% \begin{function}[added = 2011-08-12]{\seq_set_reverse:N,\seq_gset_reverse:N}
% \begin{syntax}
% \cs{seq_set_reverse:N} \meta{sequence}
% \end{syntax}
@@ -717,11 +710,10 @@
% according to the variant chosen.
% \end{function}
%
-% \begin{function}
+% \begin{function}[added = 2011-08-15]
% {\seq_set_split:Nnn,\seq_gset_split:Nnn}
% \begin{syntax}
-% \cs{seq_set_split:Nnn} \meta{sequence}
-% ~~\Arg{delimiter} \Arg{token list}
+% \cs{seq_set_split:Nnn} \meta{sequence} \Arg{delimiter} \Arg{token list}
% \end{syntax}
% This function splits the \meta{token list} into \meta{items}
% separated by \meta{delimiter}, ignoring all explicit space
@@ -1898,16 +1890,20 @@
% \begin{macro}{\seq_top:NN, \seq_top:cN}
% These are old stack functions.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \seq_top:NN \seq_get_left:NN
\cs_new_eq:NN \seq_top:cN \seq_get_left:cN
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\seq_display:N, \seq_display:c}
% An older name for \cs{seq_show:N}.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \seq_display:N \seq_show:N
\cs_new_eq:NN \seq_display:c \seq_show:c
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
@@ -1917,4 +1913,4 @@
%
% \end{implementation}
%
-% \PrintIndex \ No newline at end of file
+% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
index 8655a41201c..5c3263f4227 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3skip.dtx 2665 2011-08-25 22:15:27Z joseph $
+\GetIdInfo$Id: l3skip.dtx 2818 2011-09-12 14:47:38Z will $
{L3 Experimental dimensions and skips}
%</driver|package>
%<*driver>
@@ -140,7 +140,7 @@
% component (for example |1 cm plus 0.5 cm|. This assignment is
% global and is not limited to the current \TeX{} group level.
% \end{function}
-%
+%
% \begin{function}
% {\dim_set_eq:NN, \dim_set_eq:cN, \dim_set_eq:Nc, \dim_set_eq:cc}
% \begin{syntax}
@@ -214,9 +214,9 @@
% Subtracts the result of the \meta{dimension expression} to the
% current content of the \meta{dimension}. This assignment is global.
% \end{function}
-%
+%
% \section{Utilities for dimension calculations}
-%
+%
% \begin{function}[EXP]{\dim_ratio:nn}
% \begin{syntax}
% \cs{dim_ratio:nn} \Arg{dimexpr1} \Arg{dimexpr2}
@@ -230,7 +230,7 @@
% \end{verbatim}
% The output of \cs{dim_ratio:nn} on full expansion is a ration expression
% between two integers, with all distances converted to scaled points.
-% Thus
+% Thus
% \begin{verbatim}
% \tl_set:Nx \l_my_tl { \dim_ratio:nn { 5 pt } { 10 pt } }
% \tl_show:N \l_my_tl
@@ -242,8 +242,7 @@
%
% \begin{function}[EXP,pTF]{\dim_compare:nNn}
% \begin{syntax}
-% \cs{dim_compare_p:nNn}
-% ~~\Arg{dimexpr1} \meta{relation} \Arg{dimexpr2}
+% \cs{dim_compare_p:nNn} \Arg{dimexpr1} \meta{relation} \Arg{dimexpr2} \\
% \cs{dim_compare:nNnTF}
% ~~\Arg{dimexpr1} \meta{relation} \Arg{dimexpr2}
% ~~\Arg{true code} \Arg{false code}
@@ -262,8 +261,7 @@
%
% \begin{function}[EXP,pTF]{\dim_compare:n}
% \begin{syntax}
-% \cs{dim_compare_p:n}
-% ~~\{ \meta{dimexpr1} \meta{relation} \meta{dimexpr2} \}
+% \cs{dim_compare_p:n} \{ \meta{dimexpr1} \meta{relation} \meta{dimexpr2} \} \\
% \cs{dim_compare:nTF}
% ~~\{ \meta{dimexpr1} \meta{relation} \meta{dimexpr2} \}
% ~~\Arg{true code} \Arg{false code}
@@ -285,10 +283,9 @@
%
% \section{Dimension expression loops}
%
-% \begin{function}[EXP]{\dim_do_while:nNnn}
+% \begin{function}[rEXP]{\dim_do_while:nNnn}
% \begin{syntax}
-% \cs{dim_do_while:nNnn}
-% ~~\Arg{dimexpr1} \meta{relation} \Arg{dimexpr2} \Arg{code}
+% \cs{dim_do_while:nNnn} \Arg{dimexpr1} \meta{relation} \Arg{dimexpr2} \Arg{code}
% \end{syntax}
% Evaluates the relationship between the two \meta{dimension expressions}
% as described for \cs{dim_compare:nNnTF}, and then places the
@@ -298,10 +295,9 @@
% \texttt{false}.
% \end{function}
%
-% \begin{function}[EXP]{\dim_do_until:nNnn}
+% \begin{function}[rEXP]{\dim_do_until:nNnn}
% \begin{syntax}
-% \cs{dim_do_until:nNnn}
-% ~~\Arg{dimexpr1} \meta{relation} \Arg{dimexpr2} \Arg{code}
+% \cs{dim_do_until:nNnn} \Arg{dimexpr1} \meta{relation} \Arg{dimexpr2} \Arg{code}
% \end{syntax}
% Evaluates the relationship between the two \meta{dimension expressions}
% as described for \cs{dim_compare:nNnTF}, and then places the
@@ -311,10 +307,9 @@
% \texttt{true}.
% \end{function}
%
-% \begin{function}[EXP]{\dim_until_do:nNnn}
+% \begin{function}[rEXP]{\dim_until_do:nNnn}
% \begin{syntax}
-% \cs{dim_until_do:nNnn}
-% ~~\Arg{dimexpr1} \meta{relation} \Arg{dimexpr2} \Arg{code}
+% \cs{dim_until_do:nNnn} \Arg{dimexpr1} \meta{relation} \Arg{dimexpr2} \Arg{code}
% \end{syntax}
% Places the \meta{code} in the input stream for \TeX{} to process, and
% then evaluates the relationship between the two
@@ -324,10 +319,9 @@
% \meta{relation} is \texttt{true}.
% \end{function}
%
-% \begin{function}[EXP]{\dim_while_do:nNnn}
+% \begin{function}[rEXP]{\dim_while_do:nNnn}
% \begin{syntax}
-% \cs{dim_while_do:nNnn}
-% ~~\Arg{dimexpr1} \meta{relation} \Arg{dimexpr2} \Arg{code}
+% \cs{dim_while_do:nNnn} \Arg{dimexpr1} \meta{relation} \Arg{dimexpr2} \Arg{code}
% \end{syntax}
% Places the \meta{code} in the input stream for \TeX{} to process, and
% then evaluates the relationship between the two
@@ -337,10 +331,9 @@
% \meta{relation} is \texttt{false}.
% \end{function}
%
-% \begin{function}[EXP]{\dim_do_while:nn}
+% \begin{function}[rEXP]{\dim_do_while:nn}
% \begin{syntax}
-% \cs{dim_do_while:nNnn}
-% ~~\{ \meta{dimexpr1} \meta{relation} \meta{dimexpr2} \} \Arg{code}
+% \cs{dim_do_while:nNnn} \{ \meta{dimexpr1} \meta{relation} \meta{dimexpr2} \} \Arg{code}
% \end{syntax}
% Evaluates the relationship between the two \meta{dimension expressions}
% as described for \cs{dim_compare:nTF}, and then places the
@@ -350,10 +343,9 @@
% \texttt{false}.
% \end{function}
%
-% \begin{function}[EXP]{\dim_do_until:nn}
+% \begin{function}[rEXP]{\dim_do_until:nn}
% \begin{syntax}
-% \cs{dim_do_until:nn}
-% ~~\{ \meta{dimexpr1} \meta{relation} \meta{dimexpr2} \} \Arg{code}
+% \cs{dim_do_until:nn} \{ \meta{dimexpr1} \meta{relation} \meta{dimexpr2} \} \Arg{code}
% \end{syntax}
% Evaluates the relationship between the two \meta{dimension expressions}
% as described for \cs{dim_compare:nTF}, and then places the
@@ -363,10 +355,9 @@
% \texttt{true}.
% \end{function}
%
-% \begin{function}[EXP]{\dim_until_do:nn}
+% \begin{function}[rEXP]{\dim_until_do:nn}
% \begin{syntax}
-% \cs{dim_until_do:nn}
-% ~~\{ \meta{dimexpr1} \meta{relation} \meta{dimexpr2} \} \Arg{code}
+% \cs{dim_until_do:nn} \{ \meta{dimexpr1} \meta{relation} \meta{dimexpr2} \} \Arg{code}
% \end{syntax}
% Places the \meta{code} in the input stream for \TeX{} to process, and
% then evaluates the relationship between the two
@@ -376,10 +367,9 @@
% \meta{relation} is \texttt{true}.
% \end{function}
%
-% \begin{function}[EXP]{\dim_while_do:nn}
+% \begin{function}[rEXP]{\dim_while_do:nn}
% \begin{syntax}
-% \cs{dim_while_do:nn}
-% ~~\{ \meta{dimexpr1} \meta{relation} \meta{dimexpr2} \} \Arg{code}
+% \cs{dim_while_do:nn} \{ \meta{dimexpr1} \meta{relation} \meta{dimexpr2} \} \Arg{code}
% \end{syntax}
% Places the \meta{code} in the input stream for \TeX{} to process, and
% then evaluates the relationship between the two
@@ -416,7 +406,7 @@
% \meta{dimension} is required (such as in the argument of
% \cs{dim_eval:n}).
% \begin{texnote}
-% \cs{dim_use:N} is the \TeX{} primitive \cs{the}: this is one of
+% \cs{dim_use:N} is the \TeX{} primitive \tn{the}: this is one of
% several \LaTeX3 names for this primitive.
% \end{texnote}
% \end{function}
@@ -512,16 +502,6 @@
% restricted to the current \TeX{} group.
% \end{function}
%
-% \begin{function}
-% {\skip_gset_eq:NN, \skip_gset_eq:cN, \skip_gset_eq:Nc, \skip_gset_eq:cc}
-% \begin{syntax}
-% \cs{skip_gset_eq:NN} \meta{skip1} \meta{skip2}
-% \end{syntax}
-% Sets the content of \meta{skip1} equal to that of \meta{skip2}.
-% This assignment is global and so is not limited by the current
-% \TeX{} group level.
-% \end{function}
-%
% \begin{function}{\skip_gset:Nn, \skip_gset:cn}
% \begin{syntax}
% \cs{skip_gset:Nn} \meta{skip} \Arg{skip expression}
@@ -531,7 +511,7 @@
% component (for example |1 cm plus 0.5 cm|. This assignment is
% global and is not limited to the current \TeX{} group level.
% \end{function}
-%
+%
% \begin{function}
% {\skip_set_eq:NN, \skip_set_eq:cN, \skip_set_eq:Nc, \skip_set_eq:cc}
% \begin{syntax}
@@ -542,6 +522,16 @@
% \TeX{} group level.
% \end{function}
%
+% \begin{function}
+% {\skip_gset_eq:NN, \skip_gset_eq:cN, \skip_gset_eq:Nc, \skip_gset_eq:cc}
+% \begin{syntax}
+% \cs{skip_gset_eq:NN} \meta{skip1} \meta{skip2}
+% \end{syntax}
+% Sets the content of \meta{skip1} equal to that of \meta{skip2}.
+% This assignment is global and so is not limited by the current
+% \TeX{} group level.
+% \end{function}
+%
% \begin{function}{\skip_sub:Nn, \skip_sub:cn}
% \begin{syntax}
% \cs{skip_sub:Nn} \meta{skip} \Arg{skip expression}
@@ -562,10 +552,9 @@
%
% \begin{function}[EXP,pTF]{\skip_if_eq:nn}
% \begin{syntax}
-% \cs{skip_if_eq_p:nn}
-% ~~\Arg{skipexpr1} \Arg{skipexpr2}
+% \cs{skip_if_eq_p:nn} \Arg{skipexpr1} \Arg{skipexpr2}
% \cs{dim_compare:nTF}
-% ~~\Arg{skipexpr1} \Arg{skipexpr2}
+% ~~\Arg{skip expr1} \Arg{skip expr2}
% ~~\Arg{true code} \Arg{false code}
% \end{syntax}
% This function first evaluates each of the
@@ -578,8 +567,7 @@
% \begin{function}[EXP,pTF]{\skip_if_infinite_glue:n}
% \begin{syntax}
% \cs{skip_if_infinite_glue_p:n} \Arg{skipexpr}
-% \cs{skip_if_infinite_glue:nTF} \Arg{skipexpr}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{skip_if_infinite_glue:nTF} \Arg{skipexpr} \Arg{true code} \Arg{false code}
% \end{syntax}
% Evaluates the \meta{skip expression} as described for \cs{skip_eval:n},
% and then tests if this contains an infinite stretch or shrink
@@ -612,7 +600,7 @@
% \meta{dimension} is required (such as in the argument of
% \cs{skip_eval:n}).
% \begin{texnote}
-% \cs{skip_use:N} is the \TeX{} primitive \cs{the}: this is one of
+% \cs{skip_use:N} is the \TeX{} primitive \tn{the}: this is one of
% several \LaTeX3 names for this primitive.
% \end{texnote}
% \end{function}
@@ -717,7 +705,7 @@
% component (for example |1 mu plus 0.5 mu|. This assignment is
% global and is not limited to the current \TeX{} group level.
% \end{function}
-%
+%
% \begin{function}
% {
% \muskip_set_eq:NN, \muskip_set_eq:cN,
@@ -786,7 +774,7 @@
% \meta{dimension} is required (such as in the argument of
% \cs{muskip_eval:n}).
% \begin{texnote}
-% \cs{muskip_use:N} is the \TeX{} primitive \cs{the}: this is one of
+% \cs{muskip_use:N} is the \TeX{} primitive \tn{the}: this is one of
% several \LaTeX3 names for this primitive.
% \end{texnote}
% \end{function}
@@ -800,7 +788,7 @@
% \end{syntax}
% Inserts a horizontal \meta{skip} into the current list.
% \begin{texnote}
-% \cs{skip_horizontal:N} is the \TeX{} primitive \cs{hskip} renamed.
+% \cs{skip_horizontal:N} is the \TeX{} primitive \tn{hskip} renamed.
% \end{texnote}
% \end{function}
%
@@ -811,7 +799,7 @@
% \end{syntax}
% Inserts a vertical \meta{skip} into the current list.
% \begin{texnote}
-% \cs{skip_vertical:N} is the \TeX{} primitive \cs{vskip} renamed.
+% \cs{skip_vertical:N} is the \TeX{} primitive \tn{vskip} renamed.
% \end{texnote}
% \end{function}
%
@@ -837,10 +825,10 @@
% Compare two dimensions. The \meta{relation} is one of
% |<|, |=| or |>| with category code $12$.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{ifdim}.
+% This is the \TeX{} primitive \tn{ifdim}.
% \end{texnote}
% \end{function}
-%
+%
% \begin{function}[EXP]{\dim_eval:w, \dim_eval_end:}
% \begin{syntax}
% \cs{dim_eval:w} \meta{dimexpr} \cs{dim_eval_end:}
@@ -852,7 +840,7 @@
% \cs{dim_eval_end:} itself is unexpandable but used correctly
% the entire construct is expandable.
% \begin{texnote}
-% This is the \eTeX{} primitive \cs{dimexpr}.
+% This is the \eTeX{} primitive \tn{dimexpr}.
% \end{texnote}
% \end{function}
%
@@ -926,7 +914,7 @@
% Reset the register to zero.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \dim_zero:N #1 { #1 \c_zero_dim }
-\cs_new_protected_nopar:Npn \dim_gzero:N { \pref_global:D \dim_zero:N }
+\cs_new_protected_nopar:Npn \dim_gzero:N { \tex_global:D \dim_zero:N }
\cs_generate_variant:Nn \dim_zero:N { c }
\cs_generate_variant:Nn \dim_gzero:N { c }
% \end{macrocode}
@@ -941,13 +929,13 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \dim_set:Nn #1#2
{ #1 ~ \dim_eval:w #2 \dim_eval_end: }
-\cs_new_protected_nopar:Npn \dim_gset:Nn { \pref_global:D \dim_set:Nn }
+\cs_new_protected_nopar:Npn \dim_gset:Nn { \tex_global:D \dim_set:Nn }
\cs_generate_variant:Nn \dim_set:Nn { c }
\cs_generate_variant:Nn \dim_gset:Nn { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{\dim_set_eq:NN,\dim_set_eq:cN, \dim_set_eq:Nc,\dim_set_eq:cc}
% \begin{macro}
% {\dim_gset_eq:NN,\dim_gset_eq:cN, \dim_gset_eq:Nc,\dim_gset_eq:cc}
@@ -956,7 +944,7 @@
\cs_new_protected_nopar:Npn \dim_set_eq:NN #1#2 { #1 = #2 }
\cs_generate_variant:Nn \dim_set_eq:NN { c }
\cs_generate_variant:Nn \dim_set_eq:NN { Nc , cc }
-\cs_new_protected_nopar:Npn \dim_gset_eq:NN #1#2 { \pref_global:D #1 = #2 }
+\cs_new_protected_nopar:Npn \dim_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
\cs_generate_variant:Nn \dim_gset_eq:NN { c }
\cs_generate_variant:Nn \dim_gset_eq:NN { Nc , cc }
% \end{macrocode}
@@ -996,12 +984,12 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \dim_add:Nn #1#2
{ \tex_advance:D #1 by \dim_eval:w #2 \dim_eval_end: }
-\cs_new_protected_nopar:Npn \dim_gadd:Nn { \pref_global:D \dim_add:Nn }
+\cs_new_protected_nopar:Npn \dim_gadd:Nn { \tex_global:D \dim_add:Nn }
\cs_generate_variant:Nn \dim_add:Nn { c }
\cs_generate_variant:Nn \dim_gadd:Nn { c }
\cs_new_protected_nopar:Npn \dim_sub:Nn #1#2
{ \tex_advance:D #1 by - \dim_eval:w #2 \dim_eval_end: }
-\cs_new_protected_nopar:Npn \dim_gsub:Nn { \pref_global:D \dim_sub:Nn }
+\cs_new_protected_nopar:Npn \dim_gsub:Nn { \tex_global:D \dim_sub:Nn }
\cs_generate_variant:Nn \dim_sub:Nn { c }
\cs_generate_variant:Nn \dim_gsub:Nn { c }
% \end{macrocode}
@@ -1009,7 +997,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
% \subsection{Utilities for dimension calculations}
%
% \begin{macro}{\dim_ratio:nn}
@@ -1273,7 +1261,7 @@
% The source for these depends on whether we are in package mode.
% \begin{macrocode}
%<*initex>
-\dim_new:N \c_zero_dim
+\dim_new:N \c_zero_dim
\dim_new:N \c_max_dim
\dim_set:Nn \c_max_dim { 16383.99999 pt }
%</initex>
@@ -1322,7 +1310,7 @@
% Reset the register to zero.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \skip_zero:N #1 { #1 \c_zero_skip }
-\cs_new_protected_nopar:Npn \skip_gzero:N { \pref_global:D \skip_zero:N }
+\cs_new_protected_nopar:Npn \skip_gzero:N { \tex_global:D \skip_zero:N }
\cs_generate_variant:Nn \skip_zero:N { c }
\cs_generate_variant:Nn \skip_gzero:N { c }
% \end{macrocode}
@@ -1337,13 +1325,13 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \skip_set:Nn #1#2
{ #1 ~ \etex_glueexpr:D #2 \scan_stop: }
-\cs_new_protected_nopar:Npn \skip_gset:Nn { \pref_global:D \skip_set:Nn }
+\cs_new_protected_nopar:Npn \skip_gset:Nn { \tex_global:D \skip_set:Nn }
\cs_generate_variant:Nn \skip_set:Nn { c }
\cs_generate_variant:Nn \skip_gset:Nn { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}
% {\skip_set_eq:NN,\skip_set_eq:cN, \skip_set_eq:Nc,\skip_set_eq:cc}
% \begin{macro}
@@ -1353,7 +1341,7 @@
\cs_new_protected_nopar:Npn \skip_set_eq:NN #1#2 { #1 = #2 }
\cs_generate_variant:Nn \skip_set_eq:NN { c }
\cs_generate_variant:Nn \skip_set_eq:NN { Nc , cc }
-\cs_new_protected_nopar:Npn \skip_gset_eq:NN #1#2 { \pref_global:D #1 = #2 }
+\cs_new_protected_nopar:Npn \skip_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
\cs_generate_variant:Nn \skip_gset_eq:NN { c }
\cs_generate_variant:Nn \skip_gset_eq:NN { Nc , cc }
% \end{macrocode}
@@ -1368,12 +1356,12 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \skip_add:Nn #1#2
{ \tex_advance:D #1 by \etex_glueexpr:D #2 \scan_stop: }
-\cs_new_protected_nopar:Npn \skip_gadd:Nn { \pref_global:D \skip_add:Nn }
+\cs_new_protected_nopar:Npn \skip_gadd:Nn { \tex_global:D \skip_add:Nn }
\cs_generate_variant:Nn \skip_add:Nn { c }
\cs_generate_variant:Nn \skip_gadd:Nn { c }
\cs_new_protected_nopar:Npn \skip_sub:Nn #1#2
{ \tex_advance:D #1 by - \etex_glueexpr:D #2 \scan_stop: }
-\cs_new_protected_nopar:Npn \skip_gsub:Nn { \pref_global:D \skip_sub:Nn }
+\cs_new_protected_nopar:Npn \skip_gsub:Nn { \tex_global:D \skip_sub:Nn }
\cs_generate_variant:Nn \skip_sub:Nn { c }
\cs_generate_variant:Nn \skip_gsub:Nn { c }
% \end{macrocode}
@@ -1519,7 +1507,7 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \muskip_zero:N #1
{ #1 \c_zero_muskip }
-\cs_new_protected_nopar:Npn \muskip_gzero:N { \pref_global:D \muskip_zero:N }
+\cs_new_protected_nopar:Npn \muskip_gzero:N { \tex_global:D \muskip_zero:N }
\cs_generate_variant:Nn \muskip_zero:N { c }
\cs_generate_variant:Nn \muskip_gzero:N { c }
% \end{macrocode}
@@ -1534,13 +1522,13 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \muskip_set:Nn #1#2
{ #1 ~ \etex_muexpr:D #2 \scan_stop: }
-\cs_new_protected_nopar:Npn \muskip_gset:Nn { \pref_global:D \muskip_set:Nn }
+\cs_new_protected_nopar:Npn \muskip_gset:Nn { \tex_global:D \muskip_set:Nn }
\cs_generate_variant:Nn \muskip_set:Nn { c }
\cs_generate_variant:Nn \muskip_gset:Nn { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}
% {
% \muskip_set_eq:NN, \muskip_set_eq:cN,
@@ -1556,7 +1544,7 @@
\cs_new_protected_nopar:Npn \muskip_set_eq:NN #1#2 { #1 = #2 }
\cs_generate_variant:Nn \muskip_set_eq:NN { c }
\cs_generate_variant:Nn \muskip_set_eq:NN { Nc , cc }
-\cs_new_protected_nopar:Npn \muskip_gset_eq:NN #1#2 { \pref_global:D #1 = #2 }
+\cs_new_protected_nopar:Npn \muskip_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
\cs_generate_variant:Nn \muskip_gset_eq:NN { c }
\cs_generate_variant:Nn \muskip_gset_eq:NN { Nc , cc }
% \end{macrocode}
@@ -1571,12 +1559,12 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \muskip_add:Nn #1#2
{ \tex_advance:D #1 by \etex_muexpr:D #2 \scan_stop: }
-\cs_new_protected_nopar:Npn \muskip_gadd:Nn { \pref_global:D \muskip_add:Nn }
+\cs_new_protected_nopar:Npn \muskip_gadd:Nn { \tex_global:D \muskip_add:Nn }
\cs_generate_variant:Nn \muskip_add:Nn { c }
\cs_generate_variant:Nn \muskip_gadd:Nn { c }
\cs_new_protected_nopar:Npn \muskip_sub:Nn #1#2
{ \tex_advance:D #1 by - \etex_muexpr:D #2 \scan_stop: }
-\cs_new_protected_nopar:Npn \muskip_gsub:Nn { \pref_global:D \muskip_sub:Nn }
+\cs_new_protected_nopar:Npn \muskip_gsub:Nn { \tex_global:D \muskip_sub:Nn }
\cs_generate_variant:Nn \muskip_sub:Nn { c }
\cs_generate_variant:Nn \muskip_gsub:Nn { c }
% \end{macrocode}
@@ -1617,7 +1605,7 @@
%
% \begin{macro}{\skip_split_finite_else_action:nnNN}
% This macro is useful when performing error checking in certain
-% circumstances. If the \m{skip} register holds finite glue it sets
+% circumstances. If the \meta{skip} register holds finite glue it sets
% |#3| and |#4| to the stretch and shrink component, resp. If it holds
% infinite glue set |#3| and |#4| to zero and issue the special action
% |#2| which is probably an error message.
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index cfe96ac73af..af58f1055ea 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3tl.dtx 2686 2011-08-29 19:41:06Z joseph $
+\GetIdInfo$Id: l3tl.dtx 2812 2011-09-12 09:19:26Z bruno $
{L3 Experimental token lists}
%</driver|package>
%<*driver>
@@ -66,7 +66,7 @@
% \maketitle
%
% \begin{documentation}
-%
+%
% \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:
@@ -266,10 +266,10 @@
%
% \section{Modifying token list variables}
%
-% \begin{function}{\tl_replace_once:Nnn, \tl_replace_once:cnn}
+% \begin{function}[updated = 2011-08-11]
+% {\tl_replace_once:Nnn, \tl_replace_once:cnn}
% \begin{syntax}
-% \cs{tl_replace_once:Nnn} \meta{tl~var} \Arg{old tokens}
-% ~~\Arg{new tokens}
+% \cs{tl_replace_once:Nnn} \meta{tl~var} \Arg{old tokens} \Arg{new tokens}
% \end{syntax}
% Replaces the first (leftmost) occurrence of \meta{old tokens} in the
% \meta{tl~var} with \meta{new tokens}. \meta{Old tokens}
@@ -278,10 +278,10 @@
% restricted to the current \TeX{} group.
% \end{function}
%
-% \begin{function}{\tl_greplace_once:Nnn, \tl_greplace_once:cnn}
+% \begin{function}[updated = 2011-08-11]
+% {\tl_greplace_once:Nnn, \tl_greplace_once:cnn}
% \begin{syntax}
-% \cs{tl_greplace_once:Nnn} \meta{tl~var} \Arg{old tokens}
-% ~~\Arg{new tokens}
+% \cs{tl_greplace_once:Nnn} \meta{tl~var} \Arg{old tokens} \Arg{new tokens}
% \end{syntax}
% Replaces the first (leftmost) occurrence of \meta{old tokens} in the
% \meta{tl~var} with \meta{new tokens}. \meta{Old tokens}
@@ -290,10 +290,10 @@
% applied globally.
% \end{function}
%
-% \begin{function}{\tl_replace_all:Nnn, \tl_replace_all:cnn}
+% \begin{function}[updated = 2011-08-11]
+% {\tl_replace_all:Nnn, \tl_replace_all:cnn}
% \begin{syntax}
-% \cs{tl_replace_all:Nnn} \meta{tl~var} \Arg{old tokens}
-% ~~\Arg{new tokens}
+% \cs{tl_replace_all:Nnn} \meta{tl~var} \Arg{old tokens} \Arg{new tokens}
% \end{syntax}
% Replaces all occurrences of \meta{old tokens} in the
% \meta{tl~var} with \meta{new tokens}. \meta{Old tokens}
@@ -305,10 +305,10 @@
% restricted to the current \TeX{} group.
% \end{function}
%
-% \begin{function}{\tl_greplace_all:Nnn, \tl_greplace_all:cnn}
+% \begin{function}[updated = 2011-08-11]
+% {\tl_greplace_all:Nnn, \tl_greplace_all:cnn}
% \begin{syntax}
-% \cs{tl_greplace_all:Nnn} \meta{tl~var} \Arg{old tokens}
-% ~~\Arg{new tokens}
+% \cs{tl_greplace_all:Nnn} \meta{tl~var} \Arg{old tokens} \Arg{new tokens}
% \end{syntax}
% Replaces all occurrences of \meta{old tokens} in the
% \meta{tl~var} with \meta{new tokens}. \meta{Old tokens}
@@ -319,7 +319,8 @@
% for an example). The assignment is applied globally.
% \end{function}
%
-% \begin{function}{\tl_remove_once:Nn, \tl_remove_once:cn}
+% \begin{function}[updated = 2011-08-11]
+% {\tl_remove_once:Nn, \tl_remove_once:cn}
% \begin{syntax}
% \cs{tl_remove_once:Nn} \meta{tl~var} \Arg{tokens}
% \end{syntax}
@@ -329,7 +330,8 @@
% restricted to the current \TeX{} group.
% \end{function}
%
-% \begin{function}{\tl_gremove_once:Nn, \tl_gremove_once:cn}
+% \begin{function}[updated = 2011-08-11]
+% {\tl_gremove_once:Nn, \tl_gremove_once:cn}
% \begin{syntax}
% \cs{tl_gremove_once:Nn} \meta{tl~var} \Arg{tokens}
% \end{syntax}
@@ -339,7 +341,8 @@
% applied globally.
% \end{function}
%
-% \begin{function}{\tl_remove_all:Nn, \tl_remove_all:cn}
+% \begin{function}[updated = 2011-08-11]
+% {\tl_remove_all:Nn, \tl_remove_all:cn}
% \begin{syntax}
% \cs{tl_remove_all:Nn} \meta{tl~var} \Arg{tokens}
% \end{syntax}
@@ -356,7 +359,8 @@
% The assignment is restricted to the current \TeX{} group.
% \end{function}
%
-% \begin{function}{\tl_gremove_all:Nn, \tl_gremove_all:cn}
+% \begin{function}[updated = 2011-08-11]
+% {\tl_gremove_all:Nn, \tl_gremove_all:cn}
% \begin{syntax}
% \cs{tl_gremove_all:Nn} \meta{tl~var} \Arg{tokens}
% \end{syntax}
@@ -371,14 +375,13 @@
%
% \section{Reassigning token list category codes}
%
-% \begin{function}
+% \begin{function}[updated = 2011-08-11]
% {
% \tl_set_rescan:Nnn, \tl_set_rescan:Nno, \tl_set_rescan:Nnx,
% \tl_set_rescan:cnn, \tl_set_rescan:cno, \tl_set_rescan:cnx,
% }
% \begin{syntax}
-% \cs{tl_set_rescan:Nnn} \meta{tl~var} \Arg{setup}
-% ~~\Arg{tokens}
+% \cs{tl_set_rescan:Nnn} \meta{tl~var} \Arg{setup} \Arg{tokens}
% \end{syntax}
% Sets \meta{tl~var} to contain \meta{tokens},
% applying the category code r\'egime specified in the
@@ -389,14 +392,13 @@
% \cs{tl_rescan:nn}.
% \end{function}
%
-% \begin{function}
+% \begin{function}[updated = 2011-08-11]
% {
% \tl_gset_rescan:Nnn, \tl_gset_rescan:Nno, \tl_gset_rescan:Nnx,
% \tl_gset_rescan:cnn, \tl_gset_rescan:cno, \tl_gset_rescan:cnx,
% }
% \begin{syntax}
-% \cs{tl_gset_rescan:Nnn} \meta{tl~var} \Arg{setup}
-% ~~\Arg{tokens}
+% \cs{tl_gset_rescan:Nnn} \meta{tl~var} \Arg{setup} \Arg{tokens}
% \end{syntax}
% Sets \meta{tl~var} to contain \meta{tokens},
% applying the category code r\'egime specified in the
@@ -406,7 +408,7 @@
% assignment is global. See also \cs{tl_rescan:nn}.
% \end{function}
%
-% \begin{function}{\tl_rescan:nn}
+% \begin{function}[updated = 2011-08-11]{\tl_rescan:nn}
% \begin{syntax}
% \cs{tl_rescan:nn} \Arg{setup} \Arg{tokens}
% \end{syntax}
@@ -427,7 +429,7 @@
% unchanged. This process does not alter the category code assigned
% to the \meta{tokens}.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{lowercase} renamed.
+% This is the \TeX{} primitive \tn{lowercase} renamed.
% As a result, this function takes place on execution and
% not on expansion.
% \end{texnote}
@@ -443,7 +445,7 @@
% unchanged. This process does not alter the category code assigned
% to the \meta{tokens}.
% \begin{texnote}
-% This is the \TeX{} primitive \cs{uppercase} renamed.
+% This is the \TeX{} primitive \tn{uppercase} renamed.
% As a result, this function takes place on execution and
% not on expansion.
% \end{texnote}
@@ -484,8 +486,7 @@
% {\tl_if_eq:NN, \tl_if_eq:Nc, \tl_if_eq:cN, \tl_if_eq:cc}
% \begin{syntax}
% \cs{tl_if_eq_p:NN} \Arg{tl var1} \Arg{tl var2}
-% \cs{tl_if_eq:NNTF} \Arg{tl var1} \Arg{tl var2} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{tl_if_eq:NNTF} \Arg{tl var1} \Arg{tl var2} \Arg{true code} \Arg{false code}
% \end{syntax}
% Compares the content of two \meta{token list variables} and
% is logically \texttt{true} if the two contain the same list of
@@ -501,8 +502,7 @@
%
% \begin{function}[TF]{\tl_if_eq:nn}
% \begin{syntax}
-% \cs{tl_if_eq:nnTF} \meta{token list1} \Arg{token list2} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{tl_if_eq:nnTF} \meta{token list1} \Arg{token list2} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if \meta{token list1} and \meta{token list2} are equal, both in
% respect of character codes and category codes.
@@ -510,8 +510,7 @@
%
% \begin{function}[TF]{\tl_if_in:Nn, \tl_if_in:cn}
% \begin{syntax}
-% \cs{tl_if_in:NnTF} \meta{tl~var} \Arg{token list} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{tl_if_in:NnTF} \meta{tl~var} \Arg{token list} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token list} is found in the content of the
% \meta{token list variable}. The \meta{token list} cannot contain
@@ -520,17 +519,17 @@
% \end{function}
%
% \begin{function}[TF]
-% {\tl_if_in:nn, \tl_if_in:Vn, \tl_if_in:on, \tl_if_in:on}
+% {\tl_if_in:nn, \tl_if_in:Vn, \tl_if_in:on, \tl_if_in:no}
% \begin{syntax}
-% \cs{tl_if_in:nnTF} \Arg{token list1} \Arg{token list2} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{tl_if_in:nnTF} \Arg{token list1} \Arg{token list2} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if <token list2> is found inside <token list1>.
% The \meta{token list} cannot contain the tokens |{|, |}| or |#|
% (assuming the usual \TeX{} category codes apply).
% \end{function}
%
-% \begin{function}[EXP,pTF]{\tl_if_single:N, \tl_if_single:c}
+% \begin{function}[updated = 2011-08-13, EXP,pTF]
+% {\tl_if_single:N, \tl_if_single:c}
% \begin{syntax}
% \cs{tl_if_single_p:N} \Arg{tl~var}
% \cs{tl_if_single:NTF} \Arg{tl~var} \Arg{true code} \Arg{false code}
@@ -542,11 +541,10 @@
% $1$ according to \cs{tl_length:N}.
% \end{function}
%
-% \begin{function}[EXP,pTF]{\tl_if_single:n}
+% \begin{function}[updated = 2011-08-13, EXP,pTF]{\tl_if_single:n}
% \begin{syntax}
% \cs{tl_if_single_p:n} \Arg{token list}
-% \cs{tl_if_single:nTF} \Arg{token list}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{tl_if_single:nTF} \Arg{token list} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the token list has exactly one item, \emph{i.e.}~is either
% a single normal token or a single brace group, surrounded by
@@ -554,11 +552,10 @@
% has length $1$ according to \cs{tl_length:n}.
% \end{function}
%
-% \begin{function}[EXP,pTF]{\tl_if_single_token:n}
+% \begin{function}[added = 2011-08-11,EXP,pTF]{\tl_if_single_token:n}
% \begin{syntax}
% \cs{tl_if_single_token_p:n} \Arg{token list}
-% \cs{tl_if_single_token:nTF} \Arg{token list}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{tl_if_single_token:nTF} \Arg{token list} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the token list consists of exactly one token, \emph{i.e.}~is
% either a single space character or a single \enquote{normal} token.
@@ -567,7 +564,7 @@
%
% \section{Mapping to token lists}
%
-% \begin{function}[EXP]{\tl_map_function:NN, \tl_map_function:cN}
+% \begin{function}[rEXP]{\tl_map_function:NN, \tl_map_function:cN}
% \begin{syntax}
% \cs{tl_map_function:NN} \meta{tl~var} \meta{function}
% \end{syntax}
@@ -578,7 +575,7 @@
% \texttt{n}-type arguments. See also \cs{tl_map_function:nN}.
% \end{function}
%
-% \begin{function}[EXP]{\tl_map_function:nN}
+% \begin{function}[rEXP]{\tl_map_function:nN}
% \begin{syntax}
% \cs{tl_map_function:nN} \meta{token list} \meta{function}
% \end{syntax}
@@ -631,7 +628,7 @@
% \cs{tl_map_inline:nn}.
% \end{function}
%
-% \begin{function}[EXP]{\tl_map_break:}
+% \begin{function}[rEXP]{\tl_map_break:}
% \begin{syntax}
% \cs{tl_map_break:}
% \end{syntax}
@@ -674,7 +671,7 @@
% in the input stream. Note that this function requires only a single
% expansion.
% \begin{texnote}
-% This is the \eTeX{} primitive \cs{detokenize}.
+% This is the \eTeX{} primitive \tn{detokenize}.
% \end{texnote}
% \end{function}
%
@@ -690,7 +687,7 @@
%
% \section{Working with the content of token lists}
%
-% \begin{function}[EXP]
+% \begin{function}[updated = 2011-08-13, EXP]
% {\tl_length:n, \tl_length:V, \tl_length:o}
% \begin{syntax}
% \cs{tl_length:n} \Arg{tokens}
@@ -703,7 +700,7 @@
% giving an \meta{integer denotation}.
% \end{function}
%
-% \begin{function}[EXP]{\tl_length:N, \tl_length:c}
+% \begin{function}[updated = 2011-08-13, EXP]{\tl_length:N, \tl_length:c}
% \begin{syntax}
% \cs{tl_length:N} \Arg{tl~var}
% \end{syntax}
@@ -715,7 +712,8 @@
% giving an \meta{integer denotation}.
% \end{function}
%
-% \begin{function}[EXP]{\tl_reverse:n, \tl_reverse:V, \tl_reverse:o}
+% \begin{function}[updated = 2011-08-13, EXP]
+% {\tl_reverse:n, \tl_reverse:V, \tl_reverse:o}
% \begin{syntax}
% \cs{tl_reverse:n} \Arg{token list}
% \end{syntax}
@@ -730,7 +728,7 @@
% See also \cs{tl_reverse:N}.
% \end{function}
%
-% \begin{function}{\tl_reverse:N, \tl_reverse:c}
+% \begin{function}[updated = 2011-08-13]{\tl_reverse:N, \tl_reverse:c}
% \begin{syntax}
% \cs{tl_reverse:N} \Arg{tl~var}
% \end{syntax}
@@ -744,7 +742,7 @@
% \TeX{} group. See also \cs{tl_reverse:n}.
% \end{function}
%
-% \begin{function}[EXP]{\tl_reverse_items:n}
+% \begin{function}[added = 2011-08-13, EXP]{\tl_reverse_items:n}
% \begin{syntax}
% \cs{tl_reverse_items:n} \Arg{token list}
% \end{syntax}
@@ -759,7 +757,8 @@
% consider \cs{tl_reverse:n} or \cs{tl_reverse_tokens:n}.
% \end{function}
%
-% \begin{function}[EXP]{\tl_trim_spaces:n}
+% \begin{function}[added = 2011-07-09, updated = 2011-08-13, EXP]
+% {\tl_trim_spaces:n}
% \begin{syntax}
% \cs{tl_trim_spaces:n} \meta{token list}
% \end{syntax}
@@ -767,22 +766,22 @@
% from the \meta{token list} and leaves the result in the input
% stream. This process requires two expansions.
% \begin{texnote}
-% The result is return within the \cs{etex_unexpanded:D}
+% The result is return within the \tn{unexpanded}
% primitive (\cs{exp_not:n}), which means that the token
% list will not expand further when appearing in an x-type
% argument expansion.
% \end{texnote}
% \end{function}
%
-% \begin{function}{\tl_trim_spaces:N, \tl_trim_spaces:c}
+% \begin{function}[added = 2011-07-09]{\tl_trim_spaces:N, \tl_trim_spaces:c}
% \begin{syntax}
% \cs{tl_trim_spaces:N} \meta{tl~var}
% \end{syntax}
% Removes any leading and trailing explicit space characters
% from the content of the \meta{tl~var} within the current \TeX{} group.
% \end{function}
-%
-% \begin{function}{\tl_gtrim_spaces:N, \tl_gtrim_spaces:c}
+%
+% \begin{function}[added = 2011-07-09]{\tl_gtrim_spaces:N, \tl_gtrim_spaces:c}
% \begin{syntax}
% \cs{tl_gtrim_spaces:N} \meta{tl~var}
% \end{syntax}
@@ -795,7 +794,8 @@
% Functions which deal with either only the very first token of a
% token list or everything except the first token.
%
-% \begin{function}[EXP]{\tl_head:n, \tl_head:V, \tl_head:v, \tl_head:f}
+% \begin{function}[updated = 2011-08-09, EXP]
+% {\tl_head:n, \tl_head:V, \tl_head:v, \tl_head:f}
% \begin{syntax}
% \cs{tl_head:n} \Arg{tokens}
% \end{syntax}
@@ -829,7 +829,8 @@
% is not critical.
% \end{function}
%
-% \begin{function}[EXP]{\tl_tail:n, \tl_tail:V, \tl_tail:v, \tl_tail:f}
+% \begin{function}[updated = 2011-08-09, EXP]
+% {\tl_tail:n, \tl_tail:V, \tl_tail:v, \tl_tail:f}
% \begin{syntax}
% \cs{tl_tail:n} \Arg{tokens}
% \end{syntax}
@@ -865,7 +866,7 @@
% is not critical.
% \end{function}
%
-% \begin{function}[EXP]{\str_head:n,\str_tail:n}
+% \begin{function}[added = 2011-08-10, EXP]{\str_head:n,\str_tail:n}
% \begin{syntax}
% \cs{str_head:n} \Arg{tokens}
% \cs{str_tail:n} \Arg{tokens}
@@ -879,7 +880,7 @@
% nothing is left in the input stream.
% \end{function}
%
-% \begin{function}[EXP,pTF]{\tl_if_head_eq_catcode:nN}
+% \begin{function}[updated = 2011-08-10, EXP,pTF]{\tl_if_head_eq_catcode:nN}
% \begin{syntax}
% \cs{tl_if_head_eq_catcode_p:nN} \Arg{token list} \meta{test token}
% \cs{tl_if_head_eq_catcode:nNTF} \Arg{token list} \meta{test token}
@@ -891,7 +892,7 @@
% and the test will be true if \meta{test token} is a control sequence.
% \end{function}
%
-% \begin{function}[EXP,pTF]
+% \begin{function}[updated = 2011-08-10, EXP,pTF]
% {\tl_if_head_eq_charcode:nN, \tl_if_head_eq_charcode:fN}
% \begin{syntax}
% \cs{tl_if_head_eq_charcode_p:nN} \Arg{token list} \meta{test token}
@@ -904,7 +905,7 @@
% and the test will be true if \meta{test token} is a control sequence.
% \end{function}
%
-% \begin{function}[EXP,pTF]{\tl_if_head_eq_meaning:nN}
+% \begin{function}[updated = 2011-08-10, EXP,pTF]{\tl_if_head_eq_meaning:nN}
% \begin{syntax}
% \cs{tl_if_head_eq_meaning_p:nN} \Arg{token list} \meta{test token}
% \cs{tl_if_head_eq_meaning:nNTF} \Arg{token list} \meta{test token}
@@ -915,12 +916,11 @@
% is empty, its head is considered to be \cs{q_nil}, and the test will
% be true if \meta{test token} has the same meaning as \cs{q_nil}.
% \end{function}
-%
-% \begin{function}[EXP,pTF,int]{\tl_if_head_group:n}
+%
+% \begin{function}[updated = 2011-08-11, EXP,pTF]{\tl_if_head_group:n}
% \begin{syntax}
% \cs{tl_if_head_group_p:n} \Arg{token list}
-% \cs{tl_if_head_group:nTF} \Arg{token list}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{tl_if_head_group:nTF} \Arg{token list} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the first \meta{token} in the \meta{token list}
% is an explicit begin-group character (with category code~1
@@ -932,11 +932,10 @@
% a token by token basis.
% \end{function}
%
-% \begin{function}[EXP,pTF,int]{\tl_if_head_N_type:n}
+% \begin{function}[added = 2011-08-11,EXP,pTF]{\tl_if_head_N_type:n}
% \begin{syntax}
% \cs{tl_if_head_N_type_p:n} \Arg{token list}
-% \cs{tl_if_head_N_type:nTF} \Arg{token list}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{tl_if_head_N_type:nTF} \Arg{token list} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the first \meta{token} in the \meta{token list}
% is a normal \texttt{N}-type argument. In other words,
@@ -949,11 +948,10 @@
% a token by token basis.
% \end{function}
%
-% \begin{function}[EXP,pTF,int]{\tl_if_head_space:n}
+% \begin{function}[updated = 2011-08-11,EXP,pTF]{\tl_if_head_space:n}
% \begin{syntax}
% \cs{tl_if_head_space_p:n} \Arg{token list}
-% \cs{tl_if_head_space:nTF} \Arg{token list}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{tl_if_head_space:nTF} \Arg{token list} \Arg{true code} \Arg{false code}
% \end{syntax}
%^^A We need to add a discussion of
%^^A explicit vs implicit tokens somewhere in the doc.
@@ -969,7 +967,7 @@
% first time, it is converted to an explicit space token, with
% character code $32$, regardless of the initial character code.
% \enquote{Funny} spaces with a different category code, can be produced
-% using \cs{tex_lowercase:D}. Explicit spaces are also produced
+% using \tn{lowercase}. Explicit spaces are also produced
% as a result of \cs{token_to_str:N}, \cs{tl_to_str:n}, etc.
% \end{texnote}
% \end{function}
@@ -982,7 +980,7 @@
% \end{syntax}
% Displays the content of the \meta{tl~var} on the terminal.
% \begin{texnote}
-% \cs{tl_show:N} is the \TeX{} primitive \cs{show}.
+% \cs{tl_show:N} is the \TeX{} primitive \tn{show}.
% \end{texnote}
% \end{function}
%
@@ -992,16 +990,16 @@
% \end{syntax}
% Displays the \meta{token list} on the terminal.
% \begin{texnote}
-% \cs{tl_show:n} is the \eTeX{} primitive \cs{showtokens}.
+% \cs{tl_show:n} is the \eTeX{} primitive \tn{showtokens}.
% \end{texnote}
% \end{function}
%
% \section{Constant token lists}
%
-% \begin{variable}{\c_job_name_tl}
+% \begin{variable}[updated = 2011-08-18]{\c_job_name_tl}
% Constant that gets the \enquote{job name} assigned when \TeX{} starts.
% \begin{texnote}
-% This is the new name for the primitive \cs{jobname}. It is a constant
+% This is the new name for the primitive \tn{jobname}. It is a constant
% that is set by \TeX{} and should not be overwritten by the package.
% \end{texnote}
% \end{variable}
@@ -1033,7 +1031,7 @@
%
% \section{Experimental token list functions}
%
-% \begin{function}[EXP]{\tl_reverse_tokens:n}
+% \begin{function}[added = 2011-08-11, EXP]{\tl_reverse_tokens:n}
% \begin{syntax}
% \cs{tl_reverse_tokens:n} \Arg{tokens}
% \end{syntax}
@@ -1047,19 +1045,20 @@
% two steps of expansion.
% \end{function}
%
-% \begin{function}[EXP]{\tl_length_tokens:n}
+% \begin{function}[added = 2011-08-11, EXP]{\tl_length_tokens:n}
% \begin{syntax}
% \cs{tl_length_tokens:n} \Arg{tokens}
% \end{syntax}
% Counts the number of \TeX{} tokens in the \meta{tokens} and leaves
% this information in the input stream. Every token, including spaces and
% braces, contributes one to the total; thus for instance, the length of
-% |a~{bc}| is $6$.
+% |a~{bc}| is $6$.
% This function requires three expansions,
% giving an \meta{integer denotation}.
% \end{function}
%
-% \begin{function}[EXP]{\tl_expandable_uppercase:n,\tl_expandable_lowercase:n}
+% \begin{function}[added = 2011-08-13, EXP]
+% {\tl_expandable_uppercase:n,\tl_expandable_lowercase:n}
% \begin{syntax}
% \cs{tl_expandable_uppercase:n} \Arg{tokens}
% \cs{tl_expandable_lowercase:n} \Arg{tokens}
@@ -1076,9 +1075,9 @@
% |{| and |}|, respectively.
% \end{texnote}
% \end{function}
-%
+%
% \section{Internal functions}
-%
+%
% \begin{variable}{\q_tl_act_mark,\q_tl_act_stop}
% Quarks which are only used for the particular purposes of
% \cs{tl_act_...} functions.
@@ -1103,7 +1102,7 @@
% \end{macrocode}
%
% A token list variable is a \TeX{} macro that holds tokens. By using the
-% \eTeX{} primitive \cs{unexpanded} inside a \TeX{} \cs{edef} it is
+% \eTeX{} primitive \tn{unexpanded} inside a \TeX{} \tn{edef} it is
% possible to store any tokens, including |#|, in this way.
%
% \subsection{Functions}
@@ -1348,7 +1347,7 @@
% \begin{macro}[aux]{\tl_set_rescan_aux:NNnn}
% \begin{macro}[aux]{\tl_rescan_aux:w}
% The idea here is to deal cleanly with the problem that
-% \cs{tex_scantokens:D} treats the argument as a file, and without
+% \tn{scantokens} treats the argument as a file, and without
% the correct settings a \TeX{} error occurs:
% \begin{verbatim}
% ! File ended while scanning definition of ...
@@ -1359,8 +1358,8 @@
% within the token list which is scanned: two |@| symbols with different
% category codes. The rescanned token list cannot contain the end marker,
% because all |@| present in the token list are read with the same category
-% code. As every character with charcode \cs{tex_newlinechar:D} is replaced
-% by the \cs{tex_endlinechar:D}, and an extra \cs{tex_endlinechar:D} is
+% code. As every character with charcode \tn{newlinechar} is replaced
+% by the \tn{endlinechar}, and an extra \tn{endlinechar} is
% added at the end, we need to set both of those to $-1$,
% \enquote{unprintable}.
% \begin{macrocode}
@@ -1400,7 +1399,7 @@
% \begin{macro}{\tl_set_rescan:Nnx, \tl_set_rescan:cnx}
% \begin{macro}{\tl_gset_rescan:Nnx, \tl_gset_rescan:cnx}
% \begin{macro}[aux]{\tl_set_rescan_aux:NNnx}
-% With \texttt{x}-type expansion the \cs{tex_everyoef:D} method
+% With \texttt{x}-type expansion the \tn{everyeof} method
% does apply and the code is simple.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \tl_set_rescan:Nnx
@@ -1512,7 +1511,7 @@
{
\tl_if_empty:nTF {#4}
{
- \msg_kernel_error:nnx { tl } { empty-search-pattern }
+ \msg_kernel_error:nnx { tl } { empty-search-pattern }
{ \tl_to_str:n {#5} }
}
{
@@ -1608,7 +1607,7 @@
% argument for \cs{use_none:n}. The similar construction
% \cs{exp_after:wN} \cs{use_none:n} \cs{tl_to_str:n} \Arg{token list} |?|
% would fail if the token list contains the control sequence \cs{ },
-% while \cs{tex_escapechar:D} is a space or is unprintable.
+% while \tn{escapechar} is a space or is unprintable.
% \begin{macrocode}
\prg_new_conditional:Npnn \tl_if_blank:n #1 { p , T , F , TF }
{ \tl_if_empty_return:o { \use_none:n #1 ? } }
@@ -1775,15 +1774,9 @@
\tl_if_empty:oTF { \tl_tmp:w #1 {} {} #2 }
{ \prg_return_false: } { \prg_return_true: }
}
-\cs_generate_variant:Nn \tl_if_in:nnT { V }
-\cs_generate_variant:Nn \tl_if_in:nnF { V }
-\cs_generate_variant:Nn \tl_if_in:nnTF { V }
-\cs_generate_variant:Nn \tl_if_in:nnT { o }
-\cs_generate_variant:Nn \tl_if_in:nnF { o }
-\cs_generate_variant:Nn \tl_if_in:nnTF { o }
-\cs_generate_variant:Nn \tl_if_in:nnT { no }
-\cs_generate_variant:Nn \tl_if_in:nnF { no }
-\cs_generate_variant:Nn \tl_if_in:nnTF { no }
+\cs_generate_variant:Nn \tl_if_in:nnT { V , o , no }
+\cs_generate_variant:Nn \tl_if_in:nnF { V , o , no }
+\cs_generate_variant:Nn \tl_if_in:nnTF { V , o , no }
% \end{macrocode}
% \end{macro}
%
@@ -1987,9 +1980,12 @@
% trailing spaces. The end is reached when \verb*+ + \cs{q_nil}
% matches the one present in the definition of \cs{tl_trim_spacs:n}.
% Then \cs{tl_trim_spaces_aux_iv:w} puts the token list into a group,
-% as the argument of the initial \cs{etex_unexpanded:D}.
-% The \cs{etex_unexpanded:D} here is used so that space trimming will
+% as the argument of the initial \tn{unexpanded}.
+% The \tn{unexpanded} here is used so that space trimming will
% behave correctly within an \texttt{x}-type expansion.
+%
+% Some of the auxiliaries used in this code are also used
+% in the \pkg{l3clist} module. Change with care.
% \begin{macrocode}
\cs_set:Npn \tl_tmp:w #1
{
@@ -2170,7 +2166,7 @@
\else:
\prg_return_false:
\fi:
- }
+ }
% \end{macrocode}
% For \cs{tl_if_head_eq_meaning:nN}, again, detect special cases.
% In the normal case, use \cs{tl_head:w}, with no \cs{exp_not:N}
@@ -2446,7 +2442,7 @@
% \begin{macro}[EXP,aux]{\tl_act_loop:w,\tl_act_normal:NwnNNN,
% \tl_act_group:nwnNNN,\tl_act_space:wwnNNN,\tl_act_end:w}
% To help control the expansion, \cs{tl_act:NNNnn} starts with
-% \cs{tex_romannumeral:D} and ends by producing \cs{c_zero}
+% \tn{romannumeral} and ends by producing \cs{c_zero}
% once the result has been obtained. Then loop over tokens,
% groups, and spaces in |#5|. The marker \cs{q_tl_act_mark}
% is used both to avoid losing outer braces and to detect the
@@ -2465,7 +2461,7 @@
% accordingly. In the \enquote{normal} case, we may have
% reached \cs{q_tl_act_mark}, the end of the list. Then
% leave \cs{c_zero} and the result in the input stream,
-% to terminate the expansion of \cs{tex_romannumeral:D}.
+% to terminate the expansion of \tn{romannumeral}.
% Otherwise, apply the relevant function to the
% \enquote{arguments}, |#3|
% and to the head of the token list. Then repeat the loop.
@@ -2594,7 +2590,7 @@
%
% \begin{macro}{\tl_reverse:N, \tl_reverse:c}
% This reverses the list, leaving |{}| in front, which in turn
-% is removed by the \cs{etex_unexpanded:D} primitive.
+% is removed by the \tn{unexpanded} primitive.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \tl_reverse:N #1
{ \tl_set:No #1 { \etex_unexpanded:D \tl_reverse:o { #1 { } } } }
@@ -2661,7 +2657,7 @@
% tests, and converted if necessary to upper/lowercase,
% before being output. For a group, we must perform the
% conversion within the group (the \cs{exp_after:wN} trigger
-% \cs{tex_romannumeral:D}, which expands fully to give the
+% \tn{romannumeral}, which expands fully to give the
% converted group), then output.
% \begin{macrocode}
\cs_new:Npn \tl_expandable_uppercase:n
@@ -2698,6 +2694,7 @@
% \begin{macro}{\tl_new:Nn, \tl_new:cn, \tl_new:Nx}
% Use either \cs{tl_const:Nn} or \cs{tl_new:N}.
% \begin{macrocode}
+%<*deprecated>
\cs_new_protected:Npn \tl_new:Nn #1#2
{
\tl_new:N #1
@@ -2705,6 +2702,7 @@
}
\cs_generate_variant:Nn \tl_new:Nn { c }
\cs_generate_variant:Nn \tl_new:Nn { Nx }
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
@@ -2712,10 +2710,12 @@
% \begin{macro}{\tl_set:Nc}
% This was useful once, but nowadays does not make much sense.
% \begin{macrocode}
+%<*deprecated>
\cs_new_protected_nopar:Npn \tl_gset:Nc
- { \pref_global:D \tl_set:Nc }
+ { \tex_global:D \tl_set:Nc }
\cs_new_protected_nopar:Npn \tl_set:Nc #1#2
{ \tl_set:No #1 { \cs:w #2 \cs_end: } }
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2726,6 +2726,7 @@
% \begin{macro}{\tl_greplace_all_in:Nnn, \tl_greplace_all_in:cnn}
% These are renamed.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \tl_replace_in:Nnn \tl_replace_once:Nnn
\cs_new_eq:NN \tl_replace_in:cnn \tl_replace_once:cnn
\cs_new_eq:NN \tl_greplace_in:Nnn \tl_greplace_once:Nnn
@@ -2734,6 +2735,7 @@
\cs_new_eq:NN \tl_replace_all_in:cnn \tl_replace_all:cnn
\cs_new_eq:NN \tl_greplace_all_in:Nnn \tl_greplace_all:Nnn
\cs_new_eq:NN \tl_greplace_all_in:cnn \tl_greplace_all:cnn
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2746,6 +2748,7 @@
% \begin{macro}{\tl_gremove_all_in:Nn, \tl_gremove_all_in:cn}
% Also renamed.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \tl_remove_in:Nn \tl_remove_once:Nn
\cs_new_eq:NN \tl_remove_in:cn \tl_remove_once:cn
\cs_new_eq:NN \tl_gremove_in:Nn \tl_gremove_once:Nn
@@ -2754,6 +2757,7 @@
\cs_new_eq:NN \tl_remove_all_in:cn \tl_remove_all:cn
\cs_new_eq:NN \tl_gremove_all_in:Nn \tl_gremove_all:Nn
\cs_new_eq:NN \tl_gremove_all_in:cn \tl_gremove_all:cn
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2764,11 +2768,13 @@
% \begin{macro}{\tl_elt_count:N, \tl_elt_count:c}
% Another renaming job.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \tl_elt_count:n \tl_length:n
\cs_new_eq:NN \tl_elt_count:V \tl_length:V
\cs_new_eq:NN \tl_elt_count:o \tl_length:o
\cs_new_eq:NN \tl_elt_count:N \tl_length:N
\cs_new_eq:NN \tl_elt_count:c \tl_length:c
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2780,11 +2786,13 @@
% \begin{macro}{\tl_head_iii:w}
% Two renames, and a few that are rather too specialised.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \tl_head_i:n \tl_head:n
\cs_new_eq:NN \tl_head_i:w \tl_head:w
\cs_new:Npn \tl_head_iii:n #1 { \tl_head_iii:w #1 \q_stop }
\cs_generate_variant:Nn \tl_head_iii:n { f }
\cs_new:Npn \tl_head_iii:w #1#2#3#4 \q_stop {#1#2#3}
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index 293de965779..e267c8c07f5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3token.dtx 2691 2011-08-29 20:08:46Z joseph $
+\GetIdInfo$Id: l3token.dtx 2819 2011-09-12 17:26:47Z will $
{L3 Experimental token manipulation}
%</driver|package>
%<*driver>
@@ -107,7 +107,7 @@
% \begin{verbatim}
% \cs_new:Npn \show_until_if:w #1 \if:w { \tl_show:n {#1} }
% \show_until_if:w \tex_if:D \if_charcode:w \if:w
-% \end{verbatim}
+% \end{verbatim}
%
% \section{Character tokens}
%
@@ -179,7 +179,7 @@
% The first \meta{integer expression}
% is the character code and the second is the category code to apply.
% The setting applies within the current \TeX{} group. In general, the
-% symbolic functions \cs{char_make_\meta{type}} should be preferred,
+% symbolic functions \cs{char_set_catcode_\meta{type}} should be preferred,
% but there are cases where these lower-level functions may be useful.
% \end{function}
%
@@ -343,6 +343,11 @@
% This will be an implicit representation of \meta{token2}.
% \end{function}
%
+% ^^A Because it's late I can't figure out a better way to handle this:
+% \ExplSyntaxOn
+% \cs_set_eq:NN \c_alignment_token @
+% \cs_set_eq:NN \c_parameter_token @
+% \ExplSyntaxOff
% \begin{variable}
% {
% \c_group_begin_token,
@@ -358,7 +363,11 @@
% by their name. They are used internally for test purposes but
% are also available to the programmer for other uses.
% \end{variable}
-%
+% \ExplSyntaxOn
+% \cs_set_eq:NN \c_alignment_token @
+% \cs_set_eq:NN \c_parameter_token #
+% \ExplSyntaxOff
+%
% \begin{variable}
% {
% \c_catcode_letter_token,
@@ -368,15 +377,15 @@
% by their name. They are used internally for test purposes and should
% not be used other than for category code tests.
% \end{variable}
-%
+%
% \begin{variable}{\c_catcode_active_tl}
% A token list containing an active token. This is used internally
% for test purposes and should not be used other than in
% appropriately-constructed category code tests.
% \end{variable}
-%
+%
% \section{Converting tokens}
-%
+%
% \begin{function}[EXP]{\token_to_meaning:N}
% \begin{syntax}
% \cs{token_to_meaning:N} \meta{token}
@@ -391,7 +400,7 @@
% This is the \TeX{} primitive \tn{meaning}.
% \end{texnote}
% \end{function}
-%
+%
% \begin{function}[EXP]{\token_to_str:N, \token_to_str:c}
% \begin{syntax}
% \cs{token_to_str:N} \meta{token}
@@ -402,7 +411,7 @@
% category code $12$ (the escape character is part of the
% \meta{token}). This function requires only a single expansion.
% \begin{texnote}
-% \cs{token_to_str:N} is the \TeX{} primitive \cs{string} renamed.
+% \cs{token_to_str:N} is the \TeX{} primitive \tn{string} renamed.
% \end{texnote}
% \end{function}
%
@@ -410,9 +419,8 @@
%
% \begin{function}[EXP,pTF]{\token_if_group_begin:N}
% \begin{syntax}
-% \cs{token_if_group_begin_p:N} \meta{token}
-% \cs{token_if_group_begin:NTF} \meta{token} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{token_if_group_begin_p:N} \meta{token} \\
+% \cs{token_if_group_begin:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if \meta{token} has the category code of a begin group token
% (|{| when normal \TeX{} category codes are in ^^A }
@@ -423,9 +431,8 @@
%
% \begin{function}[EXP,pTF]{\token_if_group_end:N}
% \begin{syntax}
-% \cs{token_if_group_end_p:N} \meta{token}
-% \cs{token_if_group_end:NTF} \meta{token} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{token_if_group_end_p:N} \meta{token} \\
+% \cs{token_if_group_end:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if \meta{token} has the category code of an end group token
% (^^A {
@@ -436,9 +443,8 @@
%
% \begin{function}[EXP,pTF]{\token_if_math_toggle:N}
% \begin{syntax}
-% \cs{token_if_math_toggle_p:N} \meta{token}
-% \cs{token_if_math_toggle:NTF} \meta{token} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{token_if_math_toggle_p:N} \meta{token} \\
+% \cs{token_if_math_toggle:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if \meta{token} has the category code of a math shift token
% (|$| when normal \TeX{} category codes are in force).
@@ -446,9 +452,8 @@
%
% \begin{function}[EXP,pTF]{\token_if_alignment:N}
% \begin{syntax}
-% \cs{token_if_alignment_p:N} \meta{token}
-% \cs{token_if_alignment:NTF} \meta{token} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{token_if_alignment_p:N} \meta{token} \\
+% \cs{token_if_alignment:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if \meta{token} has the category code of an alignment token
% (|&| when normal \TeX{} category codes are in force).
@@ -456,9 +461,8 @@
%
% \begin{function}[EXP,pTF]{\token_if_parameter:N}
% \begin{syntax}
-% \cs{token_if_parameter_p:N} \meta{token}
-% \cs{token_if_alignment:NTF} \meta{token} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{token_if_parameter_p:N} \meta{token} \\
+% \cs{token_if_alignment:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if \meta{token} has the category code of a macro parameter token
% (|#| when normal \TeX{} category codes are in force).
@@ -466,9 +470,8 @@
%
% \begin{function}[EXP,pTF]{\token_if_math_superscript:N}
% \begin{syntax}
-% \cs{token_if_math_superscript_p:N} \meta{token}
-% \cs{token_if_math_superscript:NTF} \meta{token} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{token_if_math_superscript_p:N} \meta{token} \\
+% \cs{token_if_math_superscript:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if \meta{token} has the category code of a superscript token
% (|^| when normal \TeX{} category codes are in force).
@@ -476,9 +479,8 @@
%
% \begin{function}[EXP,pTF]{\token_if_math_subscript:N}
% \begin{syntax}
-% \cs{token_if_math_subscript_p:N} \meta{token}
-% \cs{token_if_math_subscript:NTF} \meta{token} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{token_if_math_subscript_p:N} \meta{token} \\
+% \cs{token_if_math_subscript:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if \meta{token} has the category code of a subscript token
% (|_| when normal \TeX{} category codes are in force).
@@ -486,9 +488,8 @@
%
% \begin{function}[EXP,pTF]{\token_if_space:N}
% \begin{syntax}
-% \cs{token_if_space_p:N} \meta{token}
-% \cs{token_if_space:NTF} \meta{token} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{token_if_space_p:N} \meta{token} \\
+% \cs{token_if_space:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if \meta{token} has the category code of a space token.
% Note that an explicit space token with character code $32$ cannot
@@ -497,18 +498,16 @@
%
% \begin{function}[EXP,pTF]{\token_if_letter:N}
% \begin{syntax}
-% \cs{token_if_letter_p:N} \meta{token}
-% \cs{token_if_letter:NTF} \meta{token} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{token_if_letter_p:N} \meta{token} \\
+% \cs{token_if_letter:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if \meta{token} has the category code of a letter token.
% \end{function}
%
% \begin{function}[EXP,pTF]{\token_if_other:N}
% \begin{syntax}
-% \cs{token_if_other_p:N} \meta{token}
-% \cs{token_if_other:NTF} \meta{token} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{token_if_other_p:N} \meta{token} \\
+% \cs{token_if_other:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if \meta{token} has the category code of an \enquote{other}
% token.
@@ -516,43 +515,39 @@
%
% \begin{function}[EXP,pTF]{\token_if_active:N}
% \begin{syntax}
-% \cs{token_if_active_p:N} \meta{token}
-% \cs{token_if_active:NTF} \meta{token} \Arg{true code}
-% ~~\Arg{false code}
+% \cs{token_if_active_p:N} \meta{token} \\
+% \cs{token_if_active:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if \meta{token} has the category code of an active character.
% \end{function}
%
% \begin{function}[EXP,pTF]{\token_if_eq_catcode:NN}
% \begin{syntax}
-% \cs{token_if_eq_catcode_p:NN} \meta{token1} \meta{token2}
-% \cs{token_if_eq_catcode:NNTF} \meta{token1} \meta{token2}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_eq_catcode_p:NN} \meta{token1} \meta{token2} \\
+% \cs{token_if_eq_catcode:NNTF} \meta{token1} \meta{token2} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the two \meta{tokens} have the same category code.
% \end{function}
%
% \begin{function}[EXP,pTF]{\token_if_eq_charcode:NN}
% \begin{syntax}
-% \cs{token_if_eq_charcode_p:NN} \meta{token1} \meta{token2}
-% \cs{token_if_eq_charcode:NNTF} \meta{token1} \meta{token2}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_eq_charcode_p:NN} \meta{token1} \meta{token2} \\
+% \cs{token_if_eq_charcode:NNTF} \meta{token1} \meta{token2} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the two \meta{tokens} have the same character code.
% \end{function}
%
% \begin{function}[EXP,pTF]{\token_if_eq_meaning:NN}
% \begin{syntax}
-% \cs{token_if_eq_meaning_p:NN} \meta{token1} \meta{token2}
-% \cs{token_if_eq_meaning:NNTF} \meta{token1} \meta{token2}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_eq_meaning_p:NN} \meta{token1} \meta{token2} \\
+% \cs{token_if_eq_meaning:NNTF} \meta{token1} \meta{token2} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the two \meta{tokens} have the same meaning when expanded.
% \end{function}
%
-% \begin{function}[EXP,pTF]{\token_if_macro:N}
+% \begin{function}[updated = 2001-05-23, EXP,pTF]{\token_if_macro:N}
% \begin{syntax}
-% \cs{token_if_macro_p:N} \meta{token}
+% \cs{token_if_macro_p:N} \meta{token} \\
% \cs{token_if_macro:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is a \TeX{} macro.
@@ -560,7 +555,7 @@
%
% \begin{function}[EXP,pTF]{\token_if_cs:N}
% \begin{syntax}
-% \cs{token_if_cs_p:N} \meta{token}
+% \cs{token_if_cs_p:N} \meta{token} \\
% \cs{token_if_cs:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is a control sequence.
@@ -568,9 +563,8 @@
%
% \begin{function}[EXP,pTF]{\token_if_expandable:N}
% \begin{syntax}
-% \cs{token_if_expandable_p:N} \meta{token}
-% \cs{token_if_expandable:NTF} \meta{token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_expandable_p:N} \meta{token} \\
+% \cs{token_if_expandable:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is expandable. This test returns \meta{false}
% for an undefined token.
@@ -578,18 +572,16 @@
%
% \begin{function}[EXP,pTF]{\token_if_long_macro:N}
% \begin{syntax}
-% \cs{token_if_long_macro_p:N} \meta{token}
-% \cs{token_if_long_macro:NTF} \meta{token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_long_macro_p:N} \meta{token} \\
+% \cs{token_if_long_macro:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is a long macro.
% \end{function}
%
% \begin{function}[EXP,pTF]{\token_if_protected_macro:N}
% \begin{syntax}
-% \cs{token_if_protected_macro_p:N} \meta{token}
-% \cs{token_if_protected_macro:NTF} \meta{token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_protected_macro_p:N} \meta{token} \\
+% \cs{token_if_protected_macro:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is a protected macro: a macro which
% is both protected and long will return logical \texttt{false}.
@@ -597,73 +589,65 @@
%
%% \begin{function}[EXP,pTF]{\token_if_protected_long_macro:N}
% \begin{syntax}
-% \cs{token_if_protected_long_macro_p:N} \meta{token}
-% \cs{token_if_protected_long_macro:NTF} \meta{token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_protected_long_macro_p:N} \meta{token} \\
+% \cs{token_if_protected_long_macro:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is a protected long macro.
% \end{function}
%
% \begin{function}[EXP,pTF]{\token_if_chardef:N}
% \begin{syntax}
-% \cs{token_if_chardef_p:N} \meta{token}
-% \cs{token_if_chardef:NTF} \meta{token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_chardef_p:N} \meta{token} \\
+% \cs{token_if_chardef:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is defined to be a chardef.
% \end{function}
%
% \begin{function}[EXP,pTF]{\token_if_mathchardef:N}
% \begin{syntax}
-% \cs{token_if_mathchardef_p:N} \meta{token}
-% \cs{token_if_mathchardef:NTF} \meta{token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_mathchardef_p:N} \meta{token} \\
+% \cs{token_if_mathchardef:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is defined to be a mathchardef.
% \end{function}
%
% \begin{function}[EXP,pTF]{\token_if_dim_register:N}
% \begin{syntax}
-% \cs{token_if_dim_register_p:N} \meta{token}
-% \cs{token_if_dim_register:NTF} \meta{token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_dim_register_p:N} \meta{token} \\
+% \cs{token_if_dim_register:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is defined to be a dimension register.
% \end{function}
%
% \begin{function}[EXP,pTF]{\token_if_int_register:N}
% \begin{syntax}
-% \cs{token_if_int_register_p:N} \meta{token}
-% \cs{token_if_int_register:NTF} \meta{token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_int_register_p:N} \meta{token} \\
+% \cs{token_if_int_register:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is defined to be a integer register.
% \end{function}
%
% \begin{function}[EXP,pTF]{\token_if_skip_register:N}
% \begin{syntax}
-% \cs{token_if_skip_register_p:N} \meta{token}
-% \cs{token_if_skip_register:NTF} \meta{token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_skip_register_p:N} \meta{token} \\
+% \cs{token_if_skip_register:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is defined to be a skip register.
% \end{function}
%
% \begin{function}[EXP,pTF]{\token_if_toks_register:N}
% \begin{syntax}
-% \cs{token_if_toks_register_p:N} \meta{token}
-% \cs{token_if_toks_register:NTF} \meta{token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_toks_register_p:N} \meta{token} \\
+% \cs{token_if_toks_register:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is defined to be a toks register
% (not used by\LaTeX3).
% \end{function}
%
-% \begin{function}[EXP,pTF]{\token_if_primitive:N}
+% \begin{function}[updated = 2001-05-23, EXP,pTF]{\token_if_primitive:N}
% \begin{syntax}
-% \cs{token_if_primitive_p:N} \meta{token}
-% \cs{token_if_primitive:NTF} \meta{token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{token_if_primitive_p:N} \meta{token} \\
+% \cs{token_if_primitive:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token} is an engine primitive.
% \end{function}
@@ -713,7 +697,7 @@
% as described above.
% \end{variable}
%
-% \begin{function}[TF]{\peek_catcode:N}
+% \begin{function}[updated = 2011-07-02, TF]{\peek_catcode:N}
% \begin{syntax}
% \cs{peek_catcode:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -725,10 +709,9 @@
% result of the test).
% \end{function}
%
-% \begin{function}[TF]{\peek_catcode_ignore_spaces:N}
+% \begin{function}[updated = 2011-07-02, TF]{\peek_catcode_ignore_spaces:N}
% \begin{syntax}
-% \cs{peek_catcode_ignore_spaces:NTF} \meta{test token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{peek_catcode_ignore_spaces:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the next \meta{token} in the input stream has the same
% category code as the \meta{test token} (as defined by the test
@@ -738,10 +721,9 @@
% result of the test).
% \end{function}
%
-% \begin{function}[TF]{\peek_catcode_remove:N}
+% \begin{function}[updated = 2011-07-02, TF]{\peek_catcode_remove:N}
% \begin{syntax}
-% \cs{peek_catcode_remove:NTF} \meta{test token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{peek_catcode_remove:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the next \meta{token} in the input stream has the same
% category code as the \meta{test token} (as defined by the test
@@ -752,10 +734,10 @@
% appropriate to the result of the test).
% \end{function}
%
-% \begin{function}[TF]{\peek_catcode_remove_ignore_spaces:N}
+% \begin{function}[updated = 2011-07-02, TF]
+% {\peek_catcode_remove_ignore_spaces:N}
% \begin{syntax}
-% \cs{peek_catcode_remove_ignore_spaces:NTF} \meta{test token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{peek_catcode_remove_ignore_spaces:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the next \meta{token} in the input stream has the same
% category code as the \meta{test token} (as defined by the test
@@ -766,10 +748,9 @@
% appropriate to the result of the test).
% \end{function}
%
-% \begin{function}[TF]{\peek_charcode:N}
+% \begin{function}[updated = 2011-07-02, TF]{\peek_charcode:N}
% \begin{syntax}
-% \cs{peek_charcode:NTF} \meta{test token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{peek_charcode:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the next \meta{token} in the input stream has the same
% character code as the \meta{test token} (as defined by the test
@@ -779,10 +760,9 @@
% result of the test).
% \end{function}
%
-% \begin{function}[TF]{\peek_charcode_ignore_spaces:N}
+% \begin{function}[updated = 2011-07-02, TF]{\peek_charcode_ignore_spaces:N}
% \begin{syntax}
-% \cs{peek_charcode_ignore_spaces:NTF} \meta{test token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{peek_charcode_ignore_spaces:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the next \meta{token} in the input stream has the same
% character code as the \meta{test token} (as defined by the test
@@ -792,10 +772,9 @@
% result of the test).
% \end{function}
%
-% \begin{function}[TF]{\peek_charcode_remove:N}
+% \begin{function}[updated = 2011-07-02, TF]{\peek_charcode_remove:N}
% \begin{syntax}
-% \cs{peek_charcode_remove:NTF} \meta{test token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{peek_charcode_remove:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the next \meta{token} in the input stream has the same
% character code as the \meta{test token} (as defined by the test
@@ -806,7 +785,8 @@
% appropriate to the result of the test).
% \end{function}
%
-% \begin{function}[TF]{\peek_charcode_remove_ignore_spaces:N}
+% \begin{function}[updated = 2011-07-02, TF]
+% {\peek_charcode_remove_ignore_spaces:N}
% \begin{syntax}
% \cs{peek_charcode_remove_ignore_spaces:NTF} \meta{test token}
% ~~\Arg{true code} \Arg{false code}
@@ -820,7 +800,7 @@
% appropriate to the result of the test).
% \end{function}
%
-% \begin{function}[TF]{\peek_meaning:N}
+% \begin{function}[updated = 2011-07-02, TF]{\peek_meaning:N}
% \begin{syntax}
% \cs{peek_meaning:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -832,10 +812,9 @@
% result of the test).
% \end{function}
%
-% \begin{function}[TF]{\peek_meaning_ignore_spaces:N}
+% \begin{function}[updated = 2011-07-02, TF]{\peek_meaning_ignore_spaces:N}
% \begin{syntax}
-% \cs{peek_meaning_ignore_spaces:NTF} \meta{test token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{peek_meaning_ignore_spaces:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the next \meta{token} in the input stream has the same
% meaning as the \meta{test token} (as defined by the test
@@ -845,10 +824,9 @@
% result of the test).
% \end{function}
%
-% \begin{function}[TF]{\peek_meaning_remove:N}
+% \begin{function}[updated = 2011-07-02, TF]{\peek_meaning_remove:N}
% \begin{syntax}
-% \cs{peek_meaning_remove:NTF} \meta{test token}
-% ~~\Arg{true code} \Arg{false code}
+% \cs{peek_meaning_remove:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the next \meta{token} in the input stream has the same
% meaning as the \meta{test token} (as defined by the test
@@ -859,7 +837,8 @@
% appropriate to the result of the test).
% \end{function}
%
-% \begin{function}[TF]{\peek_meaning_remove_ignore_spaces:N}
+% \begin{function}[updated = 2011-07-02, TF]
+% {\peek_meaning_remove_ignore_spaces:N}
% \begin{syntax}
% \cs{peek_meaning_remove_ignore_spaces:NTF} \meta{test token}
% ~~\Arg{true code} \Arg{false code}
@@ -928,7 +907,7 @@
% will leave |\long| in the input stream. If the \meta{token} is
% not a macro then \cs{scan_stop:} will be left in the input stream
% \end{function}
-%
+%
% \section{Experimental token functions}
%
% \begin{function}{\char_active_set:Npn, \char_active_set:Npx}
@@ -941,7 +920,7 @@
% \emph{etc.}) will be replaced by those absorbed
% This definition is local to the current \TeX{} group.
% \end{function}
-%
+%
% \begin{function}{\char_active_gset:Npn, \char_active_gset:Npx}
% \begin{syntax}
% \cs{char_active_gset:Npn} \meta{char} \meta{parameters} \Arg{code}
@@ -961,7 +940,7 @@
% \meta{fiucntion} (which may itself be an active character). This
% definition is local to the current \TeX{} group.
% \end{function}
-%
+%
% \begin{function}{\char_active_gset_eq:NN}
% \begin{syntax}
% \cs{char_active_gset_eq:NN} \meta{char} \meta{function}
@@ -971,7 +950,7 @@
% definition is global.
% \end{function}
%
-% \begin{function}[TF]{\peek_N_type:}
+% \begin{function}[added = 2011-08-14,TF]{\peek_N_type:}
% \begin{syntax}
% \cs{peek_N_type:TF} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -1032,18 +1011,18 @@
% \char_set_catcode_group_begin:N ,
% \char_set_catcode_group_end:N ,
% \char_set_catcode_math_toggle:N ,
-% \char_set_catcode_alignment:N ,
+% \char_set_catcode_alignment:N ,
% \char_set_catcode_end_line:N ,
% \char_set_catcode_parameter:N ,
% \char_set_catcode_math_superscript:N ,
-% \char_set_catcode_math_subscript:N ,
+% \char_set_catcode_math_subscript:N ,
% \char_set_catcode_ignore:N ,
-% \char_set_catcode_space:N ,
+% \char_set_catcode_space:N ,
% \char_set_catcode_letter:N ,
-% \char_set_catcode_other:N ,
+% \char_set_catcode_other:N ,
% \char_set_catcode_active:N ,
-% \char_set_catcode_comment:N ,
-% \char_set_catcode_invalid:N
+% \char_set_catcode_comment:N ,
+% \char_set_catcode_invalid:N
% }
% \begin{macrocode}
\cs_new_protected_nopar:Npn \char_set_catcode_escape:N #1
@@ -1087,18 +1066,18 @@
% \char_set_catcode_group_begin:n ,
% \char_set_catcode_group_end:n ,
% \char_set_catcode_math_toggle:n ,
-% \char_set_catcode_alignment:n ,
+% \char_set_catcode_alignment:n ,
% \char_set_catcode_end_line:n ,
% \char_set_catcode_parameter:n ,
% \char_set_catcode_math_superscript:n ,
-% \char_set_catcode_math_subscript:n ,
+% \char_set_catcode_math_subscript:n ,
% \char_set_catcode_ignore:n ,
-% \char_set_catcode_space:n ,
+% \char_set_catcode_space:n ,
% \char_set_catcode_letter:n ,
-% \char_set_catcode_other:n ,
+% \char_set_catcode_other:n ,
% \char_set_catcode_active:n ,
-% \char_set_catcode_comment:n ,
-% \char_set_catcode_invalid:n
+% \char_set_catcode_comment:n ,
+% \char_set_catcode_invalid:n
% }
% \begin{macrocode}
\cs_new_protected_nopar:Npn \char_set_catcode_escape:n #1
@@ -1230,7 +1209,7 @@
\group_end:
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{variable}{\c_catcode_active_tl}
% Not an implicit token!
% \begin{macrocode}
@@ -1303,7 +1282,7 @@
\cs_set_eq:NN \c_parameter_token \scan_stop:
\prg_new_conditional:Npnn \token_if_parameter:N #1 { p , T , F , TF }
{
- \if_catcode:w \exp_not:N #1 \c_parameter_token
+ \if_catcode:w \exp_not:N #1 \c_parameter_token
\prg_return_true: \else: \prg_return_false: \fi:
}
\group_end:
@@ -1422,7 +1401,7 @@
% When a token is a macro, |\token_to_meaning:N| will always output
% something like |\long macro:#1->#1| so we could naively check to
% see if the meaning contains |->|. However, this can fail the five
-% \cs{tex_...mark:D} primitives, whose meaning has the form
+% \tn{...mark} primitives, whose meaning has the form
% |...mark:|\meta{user material}. The problem is that the
% \meta{user material} can contain |->|.
%
@@ -1541,7 +1520,7 @@
\group_end:
% \end{macrocode}
% First up is checking if something has been defined with
-% |\tex_chardef:D| or |\tex_mathchardef:D|. This is easy since \TeX{}
+% \tn{chardef} or \tn{mathchardef}. This is easy since \TeX{}
% thinks of such tokens as hexadecimal so it stores them as
% |\char"|\meta{hex~number} or |\mathchar"|\meta{hex~number}.
% \begin{macrocode}
@@ -1682,20 +1661,20 @@
%
% Ten exceptions: on the one hand, \cs{c_undefined:D} is not a
% primitive, but its meaning is |undefined|, only letters;
-% on the other hand, \cs{tex_space:D}, \cs{tex_italiccorr:D},
-% \cs{tex_hyphen:D}, \cs{tex_firstmark:D}, \cs{tex_topmark:D},
-% \cs{tex_botmark:D}, \cs{tex_splitfirstmark:D}, \cs{tex_splitbotmark:D},
-% and \cs{tex_nullfont:D} are primitives, but have non-letters
+% on the other hand, \tn{space}, \tn{italiccorr},
+% \tn{hyphen}, \tn{firstmark}, \tn{topmark},
+% \tn{botmark}, \tn{splitfirstmark}, \tn{splitbotmark},
+% and \tn{nullfont} are primitives, but have non-letters
% in their meaning.
%
% We start by removing the two first (non-space) characters from
% the meaning. This removes the escape character (which may be
-% inexistent depending on \cs{tex_endlinechar:D}), and takes care
-% of three of the exceptions: \cs{tex_space:D}, \cs{tex_italiccorr:D}
-% and \cs{tex_hyphen:D}, whose meaning is at most two characters.
-% This leaves a string terminated by some |:|, and \cs{q_stop}.
+% inexistent depending on \tn{endlinechar}), and takes care
+% of three of the exceptions: \tn{space}, \tn{italiccorr}
+% and \tn{hyphen}, whose meaning is at most two characters.
+% This leaves a string terminated by some |:|, and \cs{q_stop}.
%
-% The meaning of each one of the five \cs{tex_...mark:D} primitives
+% The meaning of each one of the five \tn{...mark} primitives
% has the form \meta{letters}|:|\meta{user material}. In other words,
% the first non-letter is a colon. We remove everything after the first
% colon.
@@ -1703,10 +1682,10 @@
% We are now left with a string, which we must analyze. For primitives,
% it contains only letters. For non-primitives, it contains either
% |"|, or a space, or a digit. Two exceptions remain: \cs{c_undefined:D},
-% which is not a primitive, and \cs{tex_nullfont:D}, which is a primitive.
+% which is not a primitive, and \tn{nullfont}, which is a primitive.
%
% Spaces cannot be grabbed in an undelimited way, so we check them
-% separately. If there is a space, we test for \cs{tex_nullfont:D}.
+% separately. If there is a space, we test for \tn{nullfont}.
% Otherwise, we go through characters one by one, and stop at the
% first character less than |`A| (this is not quite a test for
% \enquote{only letters}, but is close enough to work in this context).
@@ -1830,13 +1809,13 @@
%
% \begin{macro}{\peek_after:Nw}
% \begin{macro}{\peek_after:Nw}
-% Simple wrappers for \cs{tex_futurelet:D}: no arguments absorbed
+% Simple wrappers for \tn{futurelet}: no arguments absorbed
% here.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \peek_after:Nw
{ \tex_futurelet:D \l_peek_token }
\cs_new_protected_nopar:Npn \peek_gafter:Nw
- { \pref_global:D \tex_futurelet:D \g_peek_token }
+ { \tex_global:D \tex_futurelet:D \g_peek_token }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2144,7 +2123,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
% \subsection{Experimental token functions}
%
% \begin{macro}{\char_active_set:Npn,\char_active_set:Npx}
@@ -2153,7 +2132,7 @@
% \begin{macrocode}
\group_begin:
\char_set_catcode_active:N \^^@
- \cs_set:Npn \char_tmp:NN #1#2
+ \cs_set:Npn \char_tmp:NN #1#2
{
\cs_new:Npn #1 ##1
{
@@ -2216,11 +2195,13 @@
% \begin{macro}{\char_set_sfcode:w}
% Primitives renamed.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \char_set_catcode:w \tex_catcode:D
\cs_new_eq:NN \char_set_mathcode:w \tex_mathcode:D
\cs_new_eq:NN \char_set_lccode:w \tex_lccode:D
\cs_new_eq:NN \char_set_uccode:w \tex_uccode:D
\cs_new_eq:NN \char_set_sfcode:w \tex_sfcode:D
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2240,6 +2221,7 @@
% \begin{macro}{\char_show_value_sfcode:w}
% More |w| functions we should not have.
% \begin{macrocode}
+%<*deprecated>
\cs_new_nopar:Npn \char_value_catcode:w { \tex_the:D \char_set_catcode:w }
\cs_new_nopar:Npn \char_show_value_catcode:w
{ \tex_showthe:D \char_set_catcode:w }
@@ -2255,6 +2237,7 @@
\cs_new_nopar:Npn \char_value_sfcode:w { \tex_the:D \char_set_sfcode:w }
\cs_new_nopar:Npn \char_show_value_sfcode:w
{ \tex_showthe:D \char_set_sfcode:w }
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2271,54 +2254,60 @@
% \begin{macro}{\peek_gafter:NN}
% The second argument here must be |w|.
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \peek_after:NN \peek_after:Nw
\cs_new_eq:NN \peek_gafter:NN \peek_gafter:Nw
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% Functions deprecated 2011-05-28 for removal by 2011-08-31.
-%
+%
% \begin{macro}{\c_alignment_tab_token}
% \begin{macro}{\c_math_shift_token}
% \begin{macro}{\c_letter_token}
% \begin{macro}{\c_other_char_token}
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \c_alignment_tab_token \c_alignment_token
\cs_new_eq:NN \c_math_shift_token \c_math_toggle_token
\cs_new_eq:NN \c_letter_token \c_catcode_letter_token
\cs_new_eq:NN \c_other_char_token \c_catcode_other_token
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{\c_active_char_token}
% An odd one: this was never a |token|!
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \c_active_char_token \c_catcode_active_tl
+%</deprecated>
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}
% {
% \char_make_escape:N ,
% \char_make_group_begin:N ,
% \char_make_group_end:N ,
% \char_make_math_toggle:N ,
-% \char_make_alignment:N ,
+% \char_make_alignment:N ,
% \char_make_end_line:N ,
% \char_make_parameter:N ,
% \char_make_math_superscript:N ,
-% \char_make_math_subscript:N ,
+% \char_make_math_subscript:N ,
% \char_make_ignore:N ,
-% \char_make_space:N ,
+% \char_make_space:N ,
% \char_make_letter:N ,
-% \char_make_other:N ,
+% \char_make_other:N ,
% \char_make_active:N ,
-% \char_make_comment:N ,
-% \char_make_invalid:N
+% \char_make_comment:N ,
+% \char_make_invalid:N
% }
% \begin{macro}
% {
@@ -2326,21 +2315,22 @@
% \char_make_group_begin:n ,
% \char_make_group_end:n ,
% \char_make_math_toggle:n ,
-% \char_make_alignment:n ,
+% \char_make_alignment:n ,
% \char_make_end_line:n ,
% \char_make_parameter:n ,
% \char_make_math_superscript:n ,
-% \char_make_math_subscript:n ,
+% \char_make_math_subscript:n ,
% \char_make_ignore:n ,
-% \char_make_space:n ,
+% \char_make_space:n ,
% \char_make_letter:n ,
-% \char_make_other:n ,
+% \char_make_other:n ,
% \char_make_active:n ,
-% \char_make_comment:n ,
-% \char_make_invalid:n
+% \char_make_comment:n ,
+% \char_make_invalid:n
% }
-% Two renames in one block!
+% Two renames in one block!
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \char_make_escape:N \char_set_catcode_escape:N
\cs_new_eq:NN \char_make_begin_group:N \char_set_catcode_group_begin:N
\cs_new_eq:NN \char_make_end_group:N \char_set_catcode_group_end:N
@@ -2377,15 +2367,17 @@
\cs_new_eq:NN \char_make_active:n \char_set_catcode_active:n
\cs_new_eq:NN \char_make_comment:n \char_set_catcode_comment:n
\cs_new_eq:NN \char_make_invalid:n \char_set_catcode_invalid:n
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}[pTF]{\token_if_alignment_tab:N}
% \begin{macro}[pTF]{\token_if_math_shift:N}
% \begin{macro}[pTF]{\token_if_other_char:N}
% \begin{macro}[pTF]{\token_if_active_char:N}
% \begin{macrocode}
+%<*deprecated>
\cs_new_eq:NN \token_if_alignment_tab_p:N \token_if_alignment_p:N
\cs_new_eq:NN \token_if_alignment_tab:NT \token_if_alignment:NT
\cs_new_eq:NN \token_if_alignment_tab:NF \token_if_alignment:NF
@@ -2402,6 +2394,7 @@
\cs_new_eq:NN \token_if_active_char:NT \token_if_active:NT
\cs_new_eq:NN \token_if_active_char:NF \token_if_active:NF
\cs_new_eq:NN \token_if_active_char:NTF \token_if_active:NTF
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3toks.dtx b/Master/texmf-dist/source/latex/l3kernel/l3toks.dtx
index c060225ab31..a7e14bc472c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3toks.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3toks.dtx
@@ -9,7 +9,7 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3toks.dtx 2670 2011-08-27 09:58:02Z will $
+\GetIdInfo$Id: l3toks.dtx 2818 2011-09-12 14:47:38Z will $
{L3 Experimental token registers}
%</driver|package>
%<*driver>
@@ -133,8 +133,8 @@
% \begin{macro}{\toks_set:cv}
% \begin{macro}{\toks_set:cx}
% \begin{macro}{\toks_set:cf}
-% |\toks_set:Nn|\m{toks}\m{stuff} stores \m{stuff} without expansion
-% in \m{toks}. |\toks_set:No| and |\toks_set:Nx| expand \m{stuff} once
+% |\toks_set:Nn|\meta{toks}\meta{stuff} stores \meta{stuff} without expansion
+% in \meta{toks}. |\toks_set:No| and |\toks_set:Nx| expand \meta{stuff} once
% and fully.
% \begin{macrocode}
%<*check>
@@ -142,7 +142,7 @@
\cs_generate_variant:Nn \toks_set:Nn {No,Nf}
%</check>
% \end{macrocode}
-% If we don't check if \m{toks} is a local register then the
+% If we don't check if \meta{toks} is a local register then the
% |\toks_set:Nn| function has nothing to do.
% We implement |\toks_set:No|/|d|/|f| by hand when not checking because this
% is going to be used \emph{extensively} in keyval processing!
@@ -151,10 +151,10 @@
% \begin{macrocode}
%<*!check>
\cs_new_eq:NN \toks_set:Nn \prg_do_nothing:
-\cs_new_protected:Npn \toks_set:NV #1#2 {
+\cs_new_protected:Npn \toks_set:NV #1#2 {
#1 \exp_after:wN { \int_to_roman:w -`0 \exp_eval_register:N #2 }
}
-\cs_new_protected:Npn \toks_set:Nv #1#2 {
+\cs_new_protected:Npn \toks_set:Nv #1#2 {
#1 \exp_after:wN { \int_to_roman:w -`0 \exp_eval_register:c {#2} }
}
\cs_new_protected:Npn \toks_set:No #1#2 { #1 \exp_after:wN {#2} }
@@ -163,7 +163,7 @@
}
%</!check>
% \end{macrocode}
-%
+%
% \begin{macrocode}
\cs_generate_variant:Nn \toks_set:Nn {Nx,cn,cV,cv,co,cx,cf}
% \end{macrocode}
@@ -190,8 +190,8 @@
% \begin{macro}{\toks_gset:cx}
% These functions are the global variants of the above.
% \begin{macrocode}
-%<check>\cs_new_protected_nopar:Npn \toks_gset:Nn #1 { \chk_global:N #1 \pref_global:D #1 }
-%<!check>\cs_new_eq:NN \toks_gset:Nn \pref_global:D
+%<check>\cs_new_protected_nopar:Npn \toks_gset:Nn #1 { \chk_global:N #1 \tex_global:D #1 }
+%<!check>\cs_new_eq:NN \toks_gset:Nn \tex_global:D
\cs_generate_variant:Nn \toks_gset:Nn {NV,No,Nx,cn,cV,co,cx}
% \end{macrocode}
% \end{macro}
@@ -211,8 +211,8 @@
% \begin{macro}{\toks_gset_eq:Nc}
% \begin{macro}{\toks_gset_eq:cN}
% \begin{macro}{\toks_gset_eq:cc}
-% |\toks_set_eq:NN|\m{toks1}\m{toks2} copies the contents of \m{toks2}
-% in \m{toks1}.
+% |\toks_set_eq:NN|\meta{toks1}\meta{toks2} copies the contents of \meta{toks2}
+% in \meta{toks1}.
% \begin{macrocode}
%<*check>
\cs_new_protected_nopar:Npn\toks_set_eq:NN #1#2 {
@@ -223,12 +223,12 @@
\cs_new_protected_nopar:Npn\toks_gset_eq:NN #1#2 {
\chk_global:N #1
\chk_var_or_const:N #2
- \pref_global:D #1 #2
+ \tex_global:D #1 #2
}
%</check>
%<*!check>
\cs_new_eq:NN \toks_set_eq:NN \prg_do_nothing:
-\cs_new_eq:NN \toks_gset_eq:NN \pref_global:D
+\cs_new_eq:NN \toks_gset_eq:NN \tex_global:D
%</!check>
\cs_generate_variant:Nn \toks_set_eq:NN {Nc,cN,cc}
\cs_generate_variant:Nn \toks_gset_eq:NN {Nc,cN,cc}
@@ -247,18 +247,18 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \toks_clear:N #1 {
#1\c_empty_toks
-%<check>\chk_local_or_pref_global:N #1
+%<check>\chk_local_or_tex_global:N #1
}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\cs_new_protected_nopar:Npn \toks_gclear:N {
-%<check> \pref_global_chk:
-%<!check> \pref_global:D
+%<check> \tex_global_chk:
+%<!check> \tex_global:D
\toks_clear:N
}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\cs_generate_variant:Nn \toks_clear:N {c}
\cs_generate_variant:Nn \toks_gclear:N {c}
@@ -283,8 +283,8 @@
%
% \begin{macrocode}
\cs_new_protected_nopar:Npn \toks_use_gclear:N {
-%<check> \pref_global_chk:
-%<!check> \pref_global:D
+%<check> \tex_global_chk:
+%<!check> \tex_global:D
\toks_use_clear:N
}
% \end{macrocode}
@@ -327,7 +327,7 @@
% \begin{macro}[aux]{\toks_put_left_aux:w}
% |\toks_put_left:Nn |\meta{toks}\meta{stuff\/} adds the tokens of
% \textsl{stuff} on the `left-side' of the token register
-% \m{toks}. |\toks_put_left:No| does the same, but expands the
+% \meta{toks}. |\toks_put_left:No| does the same, but expands the
% tokens once. We need to look out for brace stripping so we add a
% token, which is then later removed.
% \begin{macrocode}
@@ -336,19 +336,19 @@
\toks_use:N #1 \q_stop #1
}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\cs_generate_variant:Nn \toks_put_left:Nn {NV,No,Nx,cn,co,cV}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\cs_new_protected_nopar:Npn \toks_gput_left:Nn {
-%<check> \pref_global_chk:
-%<!check> \pref_global:D
+%<check> \tex_global_chk:
+%<!check> \tex_global:D
\toks_put_left:Nn
}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\cs_generate_variant:Nn \toks_gput_left:Nn {NV,No,Nx,cn,cV,co}
% \end{macrocode}
@@ -359,7 +359,7 @@
% \begin{macrocode}
\cs_new:Npn \toks_put_left_aux:w #1\q_stop #2#3 {
#2 \exp_after:wN { \use_i:nn {#3} #1 }
-%<check> \chk_local_or_pref_global:N #2
+%<check> \chk_local_or_tex_global:N #2
}
% \end{macrocode}
% \end{macro}
@@ -396,14 +396,14 @@
% \begin{macrocode}
\cs_new_protected:Npn \toks_put_right:Nn #1#2 {
#1 \exp_after:wN { \toks_use:N #1 #2 }
-%<check> \chk_local_or_pref_global:N #1
+%<check> \chk_local_or_tex_global:N #1
}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\cs_new_protected_nopar:Npn \toks_gput_right:Nn {
-%<check> \pref_global_chk:
-%<!check> \pref_global:D
+%<check> \tex_global_chk:
+%<!check> \tex_global:D
\toks_put_right:Nn
}
% \end{macrocode}
@@ -413,13 +413,13 @@
%<*!check>
\cs_new_protected:Npn \toks_put_right:NV #1#2 {
#1 \exp_after:wN \exp_after:wN \exp_after:wN {
- \exp_after:wN \toks_use:N \exp_after:wN #1
+ \exp_after:wN \toks_use:N \exp_after:wN #1
\int_to_roman:w -`0 \exp_eval_register:N #2
}
}
\cs_new_protected:Npn \toks_put_right:No #1#2 {
- #1 \exp_after:wN \exp_after:wN \exp_after:wN {
- \exp_after:wN \toks_use:N \exp_after:wN #1 #2
+ #1 \exp_after:wN \exp_after:wN \exp_after:wN {
+ \exp_after:wN \toks_use:N \exp_after:wN #1 #2
}
}
%</!check>
@@ -461,9 +461,9 @@
%
% \begin{macro}{\toks_if_empty_p:N,\toks_if_empty_p:c}
% \begin{macro}[TF]{\toks_if_empty:N,\toks_if_empty:c}
-% |\toks_if_empty:NTF|\m{toks}\m{true code}\m{false code} tests if a
-% token register is empty and executes either \m{true code} or
-% \m{false code}. This test had the advantage of being
+% |\toks_if_empty:NTF|\meta{toks}\meta{true code}\meta{false code} tests if a
+% token register is empty and executes either \meta{true code} or
+% \meta{false code}. This test had the advantage of being
% expandable. Otherwise one has to do an |x| type expansion in order
% to prevent problems with parameter tokens.
% \begin{macrocode}