summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/expl3.dtx103
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3.ins71
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx199
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx5
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3box.dtx74
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3clist.dtx93
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx192
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx20
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3expan.dtx274
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx59
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3format.ins77
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp.dtx164
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3int.dtx10
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3io.dtx177
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx14
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3msg.dtx41
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx36
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prop.dtx14
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3quark.dtx5
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3seq.dtx54
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3skip.dtx83
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx160
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx8
24 files changed, 1210 insertions, 727 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
index cbdbe3f76ba..0e0e24dbb60 100644
--- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: expl3.dtx Copyright (C) 1990-2011 The LaTeX3 Project
+%% File: expl3.dtx Copyright (C) 1990-2012 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
@@ -34,11 +34,22 @@
%% -----------------------------------------------------------------------
%
%<*driver|package>
-\RequirePackage{l3names}
+\RequirePackage{l3names}[2011/12/30]
+%<package>\@ifpackagelater{l3names}{2011/12/30}
+%<package> {}
+%<package> {
+%<package> \PackageError{expl3}{Mismatched LaTeX3 packages detected.}
+%<package> {
+%<package> Please install an up to date~version of l3kernel
+%<package> using your TeX package manager or from CTAN.\\ \\
+%<package> Loading expl3 will abort!
+%<package> }
+%<package> \endinput
+%<package> }
\def\ExplFileName{expl3}
\def\ExplFileDescription{L3 Experimental code bundle wrapper}
-\def\ExplFileDate{2011/12/29}
-\def\ExplFileVersion{3109}
+\def\ExplFileDate{2012/01/19}
+\def\ExplFileVersion{3209}
%</driver|package>
%<*driver>
\documentclass[full]{l3doc}
@@ -952,15 +963,14 @@
\RequirePackage{ l3basics, l3expan, l3tl }
% \end{macrocode}
%
-% \begin{macro}{\tl_check_exists:N}
+% \begin{macro}{\cs_check_exists:N}
% When used as a package, there is an option to be picky and to
% check definitions exist. This part of the process is done now, so that
% variable types based on |tl| (for example |clist|, |seq| and |prop|) will
-% inherit
-% the appropriate definitions.
+% inherit the appropriate definitions.
% \begin{macrocode}
\ifodd \l@expl@check@declarations@bool \relax
- \cs_new_protected:Npn \tl_check_exists:N #1
+ \cs_new_protected:Npn \cs_check_exists:N #1
{
\cs_if_exist:NF #1
{
@@ -970,34 +980,34 @@
}
\cs_set_protected:Npn \tl_set:Nn #1#2
{
- \tl_check_exists:N #1
+ \cs_check_exists:N #1
\cs_set_nopar:Npx #1 { \exp_not:n {#2} }
}
\cs_set_protected:Npn \tl_set:Nx #1#2
{
- \tl_check_exists:N #1
+ \cs_check_exists:N #1
\cs_set_nopar:Npx #1 {#2}
}
\cs_set_protected:Npn \tl_gset:Nn #1#2
{
- \tl_check_exists:N #1
+ \cs_check_exists:N #1
\cs_gset_nopar:Npx #1 { \exp_not:n {#2} }
}
\cs_set_protected:Npn \tl_gset:Nx #1#2
{
- \tl_check_exists:N #1
+ \cs_check_exists:N #1
\cs_gset_nopar:Npx #1 {#2}
}
\cs_set_protected:Npn \tl_set_eq:NN #1#2
{
- \tl_check_exists:N #1
- \tl_check_exists:N #2
+ \cs_check_exists:N #1
+ \cs_check_exists:N #2
\cs_set_eq:NN #1 #2
}
\cs_set_protected:Npn \tl_gset_eq:NN #1#2
{
- \tl_check_exists:N #1
- \tl_check_exists:N #2
+ \cs_check_exists:N #1
+ \cs_check_exists:N #2
\cs_gset_eq:NN #1 #2
}
\fi
@@ -1010,7 +1020,66 @@
l3seq,
l3int,
l3quark,
- l3prg,
+ l3prg}
+% \end{macrocode}
+%
+% Booleans are not based on token lists but do need checking: another
+% block of code.
+% \begin{macrocode}
+\ifodd \l@expl@check@declarations@bool \relax
+ \cs_set_protected:Npn \bool_set_true:N #1
+ {
+ \cs_check_exists:N #1
+ \cs_set_eq:NN #1 \c_true_bool
+ }
+ \cs_set_protected:Npn \bool_set_false:N #1
+ {
+ \cs_check_exists:N #1
+ \cs_set_eq:NN #1 \c_false_bool
+ }
+ \cs_set_protected:Npn \bool_gset_true:N #1
+ {
+ \cs_check_exists:N #1
+ \cs_gset_eq:NN #1 \c_true_bool
+ }
+ \cs_set_protected:Npn \bool_gset_false:N #1
+ {
+ \cs_check_exists:N #1
+ \cs_gset_eq:NN #1 \c_false_bool
+ }
+ \cs_set_protected:Npn \bool_set_eq:NN #1
+ {
+ \cs_check_exists:N #1
+ \cs_set_eq:NN #1
+ }
+ \cs_undefine:N \bool_set_eq:cN
+ \cs_undefine:N \bool_set_eq:Nc
+ \cs_undefine:N \bool_set_eq:cc
+ \cs_generate_variant:Nn \bool_set_eq:NN { c , Nc , cc }
+ \cs_set_protected:Npn \bool_gset_eq:NN #1
+ {
+ \cs_check_exists:N #1
+ \cs_set_eq:NN #1
+ }
+ \cs_undefine:N \bool_gset_eq:cN
+ \cs_undefine:N \bool_gset_eq:Nc
+ \cs_undefine:N \bool_gset_eq:cc
+ \cs_generate_variant:Nn \bool_gset_eq:NN { c , Nc , cc }
+ \cs_set_protected:Npn \bool_set:Nn #1#2
+ {
+ \cs_check_exists:N #1
+ \tex_chardef:D #1 = \bool_if_p:n {#2}
+ }
+ \cs_set_protected:Npn \bool_gset:Nn #1#2
+ {
+ \cs_check_exists:N #1
+ \tex_global:D \tex_chardef:D #1 = \bool_if_p:n {#2}
+ }
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\RequirePackage{
l3clist,
l3token,
l3prop,
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3.ins b/Master/texmf-dist/source/latex/l3kernel/l3.ins
new file mode 100644
index 00000000000..b4048d009e5
--- /dev/null
+++ b/Master/texmf-dist/source/latex/l3kernel/l3.ins
@@ -0,0 +1,71 @@
+\iffalse meta-comment
+
+File l3.ins Copyright (C) 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
+license or (at your option) any later version. The latest version
+of this license is in the file
+
+ http://www.latex-project.org/lppl.txt
+
+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.
+
+\fi
+
+\input docstrip.tex
+\askforoverwritefalse
+
+\preamble
+
+EXPERIMENTAL CODE
+
+Do not distribute this file without also distributing the
+source files specified above.
+
+Do not distribute a modified version of this file.
+
+\endpreamble
+% stop docstrip adding \endinput
+\postamble
+\endpostamble
+
+\keepsilent
+
+% ===== PACKAGE ONLY ======
+\generate{\file{expl3.sty} {\from{expl3.dtx} {package}}}
+% ========================
+\generate{\file{l3bootstrap.sty}{\from{l3bootstrap.dtx}{package}}}
+\generate{\file{l3names.sty} {\from{l3names.dtx} {package}}}
+\generate{\file{l3basics.sty} {\from{l3basics.dtx} {package}}}
+\generate{\file{l3expan.sty} {\from{l3expan.dtx} {package}}}
+\generate{\file{l3tl.sty} {\from{l3tl.dtx} {package}}}
+\generate{\file{l3seq.sty} {\from{l3seq.dtx} {package}}}
+\generate{\file{l3int.sty} {\from{l3int.dtx} {package}}}
+\generate{\file{l3quark.sty} {\from{l3quark.dtx} {package}}}
+\generate{\file{l3prg.sty} {\from{l3prg.dtx} {package}}}
+\generate{\file{l3clist.sty} {\from{l3clist.dtx} {package}}}
+\generate{\file{l3token.sty} {\from{l3token.dtx} {package}}}
+\generate{\file{l3prop.sty} {\from{l3prop.dtx} {package}}}
+\generate{\file{l3msg.sty} {\from{l3msg.dtx} {package}}}
+\generate{\file{l3io.sty} {\from{l3io.dtx} {package}}}
+\generate{\file{l3file.sty} {\from{l3file.dtx} {package}}}
+\generate{\file{l3skip.sty} {\from{l3skip.dtx} {package}}}
+\generate{\file{l3keys.sty} {\from{l3keys.dtx} {package}}}
+\generate{\file{l3fp.sty} {\from{l3fp.dtx} {package}}}
+\generate{\file{l3box.sty} {\from{l3box.dtx} {package}}}
+\generate{\file{l3coffins.sty} {\from{l3coffins.dtx} {package}}}
+\generate{\file{l3color.sty} {\from{l3color.dtx} {package}}}
+\generate{\file{l3luatex.sty} {\from{l3luatex.dtx} {package}}}
+
+\generate{\file{l3doc.cls} {\from{l3doc.dtx} {class}}}
+\generate{\file{l3doc.ist} {\from{l3doc.dtx} {docist}}}
+
+\generate{\file{l3dvips.def} {\from{l3drivers.dtx}{package,dvips} }}
+\generate{\file{l3pdfmode.def} {\from{l3drivers.dtx}{package,pdfmode} }}
+\generate{\file{l3xdvipdfmx.def}{\from{l3drivers.dtx}{package,xdvipdfmx}}}
+
+\endbatchfile
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index c6f643eb75a..9a2b94c4a3e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3basics.dtx Copyright (C) 1990-2011 The LaTeX3 project
+%% File: l3basics.dtx Copyright (C) 1990-2012 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
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3basics.dtx 3090 2011-12-23 03:12:53Z bruno $
+\GetIdInfo$Id: l3basics.dtx 3196 2012-01-15 09:44:05Z joseph $
{L3 Experimental basic definitions}
%</driver|package>
%<*driver>
@@ -148,6 +148,41 @@
% 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.
+%
+% There are three ways to define new functions.
+% All classes define a function to expand to the substitution text.
+% Within the substitution text the actual parameters are substituted
+% for the formal parameters (|#1|, |#2|, \ldots).
+% \begin{description}
+% \item[\texttt{new}]
+% Create a new function with the \texttt{new} primitives,
+% such as \cs{cs_new:Npn}. The definition is global and will result in
+% an error if it is already defined.
+% \item[\texttt{set}]
+% Create a new function with the \texttt{set} primitives,
+% such as \cs{cs_set:Npn}. The definition is restricted to the current
+% \TeX{} group and will not result in an error if the function is already
+% defined.
+% \item[\texttt{gset}]
+% Create a new function with the \texttt{gset} primitives,
+% such as \cs{cs_gset:Npn}. The definition is global and
+% will not result in an error if the function is already defined.
+% \end{description}
+%
+% Within each set of primitives there are different ways to define a function.
+% The differences depend on restrictions on the actual parameters and
+% the expandability of the resulting function.
+% \begin{description}
+% \item[\texttt{nopar}]
+% Create a new function with the \texttt{nopar} primitives,
+% such as \cs{cs_set_nopar:Npn}. The parameter may not contain
+% \cs{par} tokens.
+% \item[\texttt{protected}]
+% Create a new function with the \texttt{protected} primitives,
+% such as \cs{cs_set_protected:Npn}. The parameter may contain
+% \cs{par} tokens but the function will not expand within an
+% \texttt{x}-type expansion.
+% \end{description}
%
% \subsection{Defining new functions using primitive parameter text}
%
@@ -184,8 +219,7 @@
% \cs_new_protected:Npx, \cs_new_protected:cpx
% }
% \begin{syntax}
-% \cs{cs_new_protected:Npn} \meta{function} \meta{parameters}
-% ~~\Arg{code}
+% \cs{cs_new_protected: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|,
@@ -548,8 +582,12 @@
% The assignment of a meaning to \meta{function} is global.
% \end{function}
%
-% \begin{function}[updated = 2011-09-05]
-% {\cs_generate_from_arg_count:NNnn, \cs_generate_from_arg_count:cNnn}
+% \begin{function}[updated = 2012-01-14]
+% {
+% \cs_generate_from_arg_count:NNnn,
+% \cs_generate_from_arg_count:cNnn,
+% \cs_generate_from_arg_count:Ncnn
+% }
% \begin{syntax}
% \cs{cs_generate_from_arg_count:NNnn} \meta{function} \meta{creator} \meta{number} \meta{code}
% \end{syntax}
@@ -567,7 +605,7 @@
% here. Making two control sequences equivalent means that the
% 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.
+% tied 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}.
@@ -767,11 +805,14 @@
%
% \begin{function}[EXP]{\use_i:nn, \use_ii:nn}
% \begin{syntax}
-% \cs{use_i:nn} \Arg{group1} \Arg{group2}
-% \end{syntax}
-% These functions will absorb two groups and leave only the
-% first or the second in the input stream. The braces surrounding the
-% arguments will be removed as part of this process. The category code
+% \cs{use_i:nn} \Arg{arg1} \Arg{arg2}
+% \end{syntax}
+% These functions absorb two arguments from the input stream. The function
+% \cs{use_i:nn} discards the second argument, and leaves the content
+% of the first argument in the input stream. \cs{use_ii:nn} discards
+% the first argument and leaves the content of the second argument in
+% the input stream.
+% The category code
% of these tokens will also be fixed (if it has not already been by
% some other absorption). A single expansion is needed for the
% functions to take effect.
@@ -779,36 +820,42 @@
%
% \begin{function}[EXP]{\use_i:nnn, \use_ii:nnn, \use_iii:nnn}
% \begin{syntax}
-% \cs{use_i:nnn} \Arg{group1} \Arg{group2} \Arg{group3}
+% \cs{use_i:nnn} \Arg{arg1} \Arg{arg2} \Arg{arg3}
% \end{syntax}
-% These functions will absorb three groups and leave only of these
-% in the input stream. The braces surrounding the arguments will be
-% removed as part of this process. The category code of these tokens
-% will also be fixed (if it has not already been by some other
-% absorption). A single expansion is needed for the functions to take
-% effect.
+% These functions absorb three arguments from the input stream. The
+% function \cs{use_i:nnn} discards the second and third arguments, and
+% leaves the content of the first argument in the input stream.
+% \cs{use_ii:nnn} and \cs{use_iii:nnn} work similarly, leaving the
+% content of second or third arguments in the input stream, respectively.
+% The category code
+% of these tokens will also be fixed (if it has not already been by
+% some other absorption). A single expansion is needed for the
+% functions to take effect.
% \end{function}
%
% \begin{function}[EXP]
% {\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}
+% \cs{use_i:nnnn} \Arg{arg1} \Arg{arg2} \Arg{arg3} \Arg{arg4}
% \end{syntax}
-% These functions will absorb four groups and leave only of these
-% in the input stream. The braces surrounding the arguments will be
-% removed as part of this process. The category code of these tokens
-% will also be fixed (if it has not already been by some other
-% absorption). A single expansion is needed for the functions to take
-% effect.
+% These functions absorb four arguments from the input stream. The
+% function \cs{use_i:nnnn} discards the second, third and fourth
+% arguments, and leaves the content of the first argument in the input
+% stream.
+% \cs{use_ii:nnnn}, \cs{use_iii:nnnn} and \cs{use_iv:nnnn} work similarly,
+% leaving the content of second, third or fourth arguments in the input
+% stream, respectively. The category code
+% of these tokens will also be fixed (if it has not already been by
+% some other absorption). A single expansion is needed for the
+% functions to take effect.
% \end{function}
%
% \begin{function}[EXP]{\use_i_ii:nnn}
% \begin{syntax}
-% \cs{use_i_ii:nnn} \Arg{group1} \Arg{group2} \Arg{group3}
+% \cs{use_i_ii:nnn} \Arg{arg1} \Arg{arg2} \Arg{arg3}
% \end{syntax}
-% This functions will absorb three groups and leave the first and
-% second in the input stream. The braces surrounding the arguments
-% will be removed as part of this process. The category code of
+% This functions will absorb three arguments and leave the content of the
+% first and second in the input stream. The category code of
% these tokens will also be fixed (if it has not already been by
% some other absorption). A single expansion is needed for the
% functions to take effect. An example:
@@ -845,13 +892,13 @@
% (\emph{i.e.}~an \texttt{N} argument).
% \end{function}
%
-% \begin{function}{\use:x}
+% \begin{function}[updated = 2011-12-31]{\use:x}
% \begin{syntax}
% \cs{use:x} \Arg{expandable tokens}
% \end{syntax}
% Fully expands the \meta{expandable tokens} and inserts the
% result into the input stream at the current location.
-% Any hash characters ("#") in the argument must be doubled.
+% Any hash characters (|#|) in the argument must be doubled.
% \end{function}
%
% \subsection{Selecting tokens from delimited arguments}
@@ -867,8 +914,10 @@
% }
% \begin{syntax}
% \cs{use_none_delimit_by_q_nil:w} \meta{balanced text} \cs{q_nil}
+% \cs{use_none_delimit_by_q_stop:w} \meta{balanced text} \cs{q_stop}
+% \cs{use_none_delimit_by_q_recursion_stop:w} \meta{balanced text} \cs{q_recursion_stop}
% \end{syntax}
-% Absorb the \meta{balanced} text form the input stream delimited by
+% Absorb the \meta{balanced text} form the input stream delimited by
% the marker given in the function name, leaving nothing in the
% input stream.
% \end{function}
@@ -880,10 +929,11 @@
% \use_i_delimit_by_q_recursion_stop:nw
% }
% \begin{syntax}
-% \cs{use_i_delimit_by_q_nil:nw} \Arg{inserted tokens}
-% ~~\meta{balanced text} \cs{q_nil}
+% \cs{use_i_delimit_by_q_nil:nw} \Arg{inserted tokens} \meta{balanced text} \cs{q_nil}
+% \cs{use_i_delimit_by_q_stop:nw} \Arg{inserted tokens} \meta{balanced text} \cs{q_stop}
+% \cs{use_i_delimit_by_q_recursion_stop:nw} \Arg{inserted tokens} \meta{balanced text} \cs{q_recursion_stop}
% \end{syntax}
-% Absorb the \meta{balanced} text form the input stream delimited by
+% Absorb the \meta{balanced text} form the input stream delimited by
% the marker given in the function name, leaving \meta{inserted tokens}
% in the input stream for further processing.
% \end{function}
@@ -894,8 +944,8 @@
% \begin{syntax}
% \cs{cs_get_arg_count_from_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).
+% Splits the \meta{function} into the \meta{name} (\emph{i.e.}~the part
+% before the colon) and the \meta{signature} (\emph{i.e.}~after the colon).
% The \meta{number} of tokens in the \meta{signature} is then left in
% the input stream. If there was no \meta{signature} then the result is
% the marker value $-1$.
@@ -905,8 +955,8 @@
% \begin{syntax}
% \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).
+% Splits the \meta{function} into the \meta{name} (\emph{i.e.}~the part
+% before the colon) and the \meta{signature} (\emph{i.e.}~after the colon).
% The \meta{name} is then left in the input stream without the escape
% character present made up of tokens with category code $12$
% (other).
@@ -916,8 +966,8 @@
% \begin{syntax}
% \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).
+% Splits the \meta{function} into the \meta{name} (\emph{i.e.}~the part
+% before the colon) and the \meta{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}
@@ -926,8 +976,8 @@
% \begin{syntax}
% \cs{cs_split_function:NN} \meta{function} \meta{processor}
% \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).
+% Splits the \meta{function} into the \meta{name} (\emph{i.e.}~the part
+% before the colon) and the \meta{signature} (\emph{i.e.}~after the colon).
% This information is then placed in the input stream after the
% \meta{processor} function in three parts: the \meta{name}, the
% \meta{signature} and a logic token indicating if a colon was found
@@ -945,12 +995,12 @@
% \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 as the \meta{true code} or the
+% \meta{false code}.
% These arguments are denoted with |T| and |F|, respectively. An
% example would be
% \begin{quote}
-% |\cs_if_free:cTF{abc}| \Arg{true code} \Arg{false code}
+% |\cs_if_free:cTF {abc}| \Arg{true code} \Arg{false code}
% \end{quote}
% a function that will turn the first argument into a control sequence
% (since it's marked as |c|) then checks whether this control sequence
@@ -1019,7 +1069,8 @@
% \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.
+% is logically \texttt{true} the same, \emph{i.e.}~if the have exactly
+% the same definition when examined with \cs{cs_show:N}.
% \end{function}
%
% \begin{function}[EXP,pTF]{\cs_if_exist:N, \cs_if_exist:c}
@@ -1129,7 +1180,7 @@
% <arg1> and <arg2> could be functions, variables, tokens; in all cases the
% \emph{unexpanded} definitions are compared.
% \begin{texnote}
-% This is \TeX's |\ifx|.
+% This is \TeX{}'s |\ifx|.
% \end{texnote}
% \end{function}
%
@@ -1197,11 +1248,6 @@
% \begin{syntax}
% \cs{cs_if_exist_use:NTF} \meta{control sequence} \Arg{true code} \Arg{false code}
% \end{syntax}
-% \begin{function}[EXP,added=2011-10-10]
-% {\cs_if_exist_use:N, \cs_if_exist_use:c}
-% \begin{syntax}
-% \cs{cs_if_exist_use:N} \meta{control sequence}
-% \end{syntax}
% If the \meta{control sequence} exists, leave it in the input stream,
% followed by the \meta{true code} (unbraced). Otherwise, leave the
% \meta{false} code in the input stream. For example,
@@ -1217,7 +1263,6 @@
% in the hash table if it is not there.
% \end{texnote}
% \end{function}
-% \end{function}
%
% \end{documentation}
%
@@ -1548,19 +1593,14 @@
% \end{macro}
%
% \begin{macro}{\use:x}
-% \begin{macro}[aux]{\cs_tmp:w}
-% Fully expands its argument and passes it to the input stream.
-% Uses |\cs_tmp:w| as a scratch register but does not affect it.
+% Fully expands its argument and passes it to the input stream. Uses
+% the reserved \cs{l_exp_internal_tl} which will be set up in \pkg{l3expan}.
% \begin{macrocode}
\cs_set_protected:Npn \use:x #1
{
- \group_begin:
- \cs_set_nopar:Npx \cs_tmp:w {#1}
- \exp_after:wN
- \group_end:
- \cs_tmp:w
+ \cs_set_nopar:Npx \l_exp_internal_tl {#1}
+ \l_exp_internal_tl
}
-\cs_set:Npn \cs_tmp:w { }
% \end{macrocode}
% \end{macro}
%
@@ -2194,7 +2234,6 @@
}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macro}[pTF]{\cs_if_free:N,\cs_if_free:c}
% The logical reversal of the above.
@@ -2642,7 +2681,12 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\cs_generate_from_arg_count:NNnn}
+% \begin{macro}[aux]
+% {
+% \cs_generate_from_arg_count:NNnn,
+% \cs_generate_from_arg_count:cNnn,
+% \cs_generate_from_arg_count:Ncnn
+% }
% \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
@@ -2680,15 +2724,18 @@
\cs_generate_from_arg_count_aux:nwn #1 #2 \fi: #3
{ \fi: #3 #1 }
% \end{macrocode}
-% A variant form we need right away.
+% A variant form we need right away, plus one which is used elsewhere but
+% which is most logically created here.
% \begin{macrocode}
-\cs_new_nopar:Npn \cs_generate_from_arg_count:cNnn
+\cs_new_protected_nopar:Npn \cs_generate_from_arg_count:cNnn
{ \exp_args:Nc \cs_generate_from_arg_count:NNnn }
+\cs_new_protected_nopar:Npn \cs_generate_from_arg_count:Ncnn
+ { \exp_args:NNc \cs_generate_from_arg_count:NNnn }
% \end{macrocode}
% The error message. Elsewhere we use the value of $-1$ to signal a
% missing colon in a function, so provide a hint for help on this.
% \begin{macrocode}
-\cs_new:Npn \cs_generate_from_arg_count_error_msg:Nn #1#2
+\cs_new_protected:Npn \cs_generate_from_arg_count_error_msg:Nn #1#2
{
\msg_kernel_error:nnxx { kernel } { bad-number-of-arguments }
{ \token_to_str:N #1 } { \int_eval:n {#2} }
@@ -2936,7 +2983,7 @@
\cs_new:Npn \kernel_register_show:N #1
{
\cs_if_exist:NTF #1
- { \tex_showthe:D #1 }
+ { \tex_showthe:D \use:n #1 }
{
\msg_kernel_error:nnx { kernel } { variable-not-defined }
{ \token_to_str:N #1 }
@@ -3092,7 +3139,7 @@
%</deprecated>
% \end{macrocode}
%
-% Deprecated 2011-09-06, for removal by 2012-09-05.
+% Deprecated 2011-09-06, for removal by 2011-12-31.
%
% \begin{macro}
% {
@@ -3101,14 +3148,14 @@
% }
% Predicates are better
% \begin{macrocode}
+%<*deprecated>
\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:
+%</deprecated>
% \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}
@@ -3117,21 +3164,25 @@
% This is rather specialized, and we want to de-emphasize the use of
% primitive \TeX{} conditionals.
% \begin{macrocode}
+%<*deprecated>
\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 }
+%</deprecated>
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
-% Deprecated 2011-09-07, for removal by 2011-10-07.
+% Deprecated 2011-09-07, for removal by 2011-12-31.
%
% \begin{macro}{\cs_set_eq:NwN}
% \begin{macrocode}
+%<*deprecated>
\tex_let:D \cs_set_eq:NwN \tex_let:D
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
index ad4f1d1eb69..43b2d11689f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
@@ -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 3006 2011-11-25 13:29:59Z joseph $
+\GetIdInfo$Id: l3bootstrap.dtx 3110 2011-12-29 14:23:48Z joseph $
{L3 experimental bootstrap code}
%</package>
%<*driver>
@@ -186,7 +186,8 @@
% details. If you use the \cs{GetIdInfo} command you can use the
% information when loading a package with
% \begin{verbatim}
-% \ProvidesExplPackage{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
+% \ProvidesExplPackage{\ExplFileName}
+% {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
% \end{verbatim}
%
% \end{documentation}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
index 89e41ce8b8b..d00cad8139b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3box.dtx Copyright (C) 2005-2011 The LaTeX3 Project
+%% File: l3box.dtx Copyright (C) 2005-2012 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
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3box.dtx 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3box.dtx 3158 2012-01-09 00:47:42Z bruno $
{L3 Experimental boxes}
%</driver|package>
%<*driver>
@@ -1403,11 +1403,11 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l_box_tmp_box, \l_box_tmp_fp}
+% \begin{variable}{\l_box_internal_box, \l_box_internal_fp}
% Scratch space.
% \begin{macrocode}
-\box_new:N \l_box_tmp_box
-\fp_new:N \l_box_tmp_fp
+\box_new:N \l_box_internal_box
+\fp_new:N \l_box_internal_fp
% \end{macrocode}
% \end{variable}
%
@@ -1521,14 +1521,14 @@
% content of the box is moved such that the reference point of the
% rotated box will be in the same place as the original.
% \begin{macrocode}
- \hbox_set:Nn \l_box_tmp_box { \box_use:N #1 }
- \hbox_set:Nn \l_box_tmp_box
+ \hbox_set:Nn \l_box_internal_box { \box_use:N #1 }
+ \hbox_set:Nn \l_box_internal_box
{
\tex_kern:D -\l_box_left_new_dim
\hbox:n
{
\driver_box_rotate_begin:
- \box_use:N \l_box_tmp_box
+ \box_use:N \l_box_internal_box
\driver_box_rotate_end:
}
}
@@ -1537,11 +1537,11 @@
% the bounding box. The result can then be used to reset the original
% box.
% \begin{macrocode}
- \box_set_ht:Nn \l_box_tmp_box { \l_box_top_new_dim }
- \box_set_dp:Nn \l_box_tmp_box { -\l_box_bottom_new_dim }
- \box_set_wd:Nn \l_box_tmp_box
+ \box_set_ht:Nn \l_box_internal_box { \l_box_top_new_dim }
+ \box_set_dp:Nn \l_box_internal_box { -\l_box_bottom_new_dim }
+ \box_set_wd:Nn \l_box_internal_box
{ \l_box_right_new_dim - \l_box_left_new_dim }
- \box_use:N \l_box_tmp_box
+ \box_use:N \l_box_internal_box
}
% \end{macrocode}
% \end{macro}
@@ -1551,11 +1551,11 @@
% \begin{macrocode}
\cs_new_protected:Npn \box_rotate_set_sin_cos:
{
- \fp_set_eq:NN \l_box_tmp_fp \l_box_angle_fp
- \fp_div:Nn \l_box_tmp_fp { 180 }
- \fp_mul:Nn \l_box_tmp_fp { \c_pi_fp }
- \fp_sin:Nn \l_box_sin_fp { \l_box_tmp_fp }
- \fp_cos:Nn \l_box_cos_fp { \l_box_tmp_fp }
+ \fp_set_eq:NN \l_box_internal_fp \l_box_angle_fp
+ \fp_div:Nn \l_box_internal_fp { 180 }
+ \fp_mul:Nn \l_box_internal_fp { \c_pi_fp }
+ \fp_sin:Nn \l_box_sin_fp { \l_box_internal_fp }
+ \fp_cos:Nn \l_box_cos_fp { \l_box_internal_fp }
}
% \end{macrocode}
% These functions take a general point $(|#1|, |#2|)$ and rotate its
@@ -1572,10 +1572,10 @@
\fp_set_from_dim:Nn \l_box_x_fp {#1}
\fp_set_from_dim:Nn \l_box_y_fp {#2}
\fp_set_eq:NN \l_box_x_new_fp \l_box_x_fp
- \fp_set_eq:NN \l_box_tmp_fp \l_box_y_fp
+ \fp_set_eq:NN \l_box_internal_fp \l_box_y_fp
\fp_mul:Nn \l_box_x_new_fp { \l_box_cos_fp }
- \fp_mul:Nn \l_box_tmp_fp { \l_box_sin_fp }
- \fp_sub:Nn \l_box_x_new_fp { \l_box_tmp_fp }
+ \fp_mul:Nn \l_box_internal_fp { \l_box_sin_fp }
+ \fp_sub:Nn \l_box_x_new_fp { \l_box_internal_fp }
\dim_set:Nn #3 { \fp_to_dim:N \l_box_x_new_fp }
}
\cs_new_protected:Npn \box_rotate_y:nnN #1#2#3
@@ -1583,10 +1583,10 @@
\fp_set_from_dim:Nn \l_box_x_fp {#1}
\fp_set_from_dim:Nn \l_box_y_fp {#2}
\fp_set_eq:NN \l_box_y_new_fp \l_box_y_fp
- \fp_set_eq:NN \l_box_tmp_fp \l_box_x_fp
+ \fp_set_eq:NN \l_box_internal_fp \l_box_x_fp
\fp_mul:Nn \l_box_y_new_fp { \l_box_cos_fp }
- \fp_mul:Nn \l_box_tmp_fp { \l_box_sin_fp }
- \fp_add:Nn \l_box_y_new_fp { \l_box_tmp_fp }
+ \fp_mul:Nn \l_box_internal_fp { \l_box_sin_fp }
+ \fp_add:Nn \l_box_y_new_fp { \l_box_internal_fp }
\dim_set:Nn #3 { \fp_to_dim:N \l_box_y_new_fp }
}
% \end{macrocode}
@@ -1675,15 +1675,15 @@
% new width divided by the old one.
% \begin{macrocode}
\fp_set_from_dim:Nn \l_box_scale_x_fp {#2}
- \fp_set_from_dim:Nn \l_box_tmp_fp { \l_box_right_dim }
- \fp_div:Nn \l_box_scale_x_fp { \l_box_tmp_fp }
+ \fp_set_from_dim:Nn \l_box_internal_fp { \l_box_right_dim }
+ \fp_div:Nn \l_box_scale_x_fp { \l_box_internal_fp }
% \end{macrocode}
% The $y$-scaling needs both the height and the depth of the current box.
% \begin{macrocode}
\fp_set_from_dim:Nn \l_box_scale_y_fp {#3}
- \fp_set_from_dim:Nn \l_box_tmp_fp
+ \fp_set_from_dim:Nn \l_box_internal_fp
{ \l_box_top_dim - \l_box_bottom_dim }
- \fp_div:Nn \l_box_scale_y_fp { \l_box_tmp_fp }
+ \fp_div:Nn \l_box_scale_y_fp { \l_box_internal_fp }
% \end{macrocode}
% At this stage, check for trivial scaling. If both scalings are unity, then
% the code does nothing. Otherwise, pass on to the auxiliary function to
@@ -1751,9 +1751,9 @@
\dim_set:Nn \l_box_right_dim { \box_wd:N #1 }
\dim_zero:N \l_box_left_dim
\fp_set_from_dim:Nn \l_box_scale_y_fp {#2}
- \fp_set_from_dim:Nn \l_box_tmp_fp
+ \fp_set_from_dim:Nn \l_box_internal_fp
{ \l_box_top_dim - \l_box_bottom_dim }
- \fp_div:Nn \l_box_scale_y_fp { \l_box_tmp_fp }
+ \fp_div:Nn \l_box_scale_y_fp { \l_box_internal_fp }
\fp_set_eq:NN \l_box_scale_x_fp \l_box_scale_y_fp
\fp_compare:NNNTF \l_box_scale_y_fp = \c_one_fp
{ \box_use:N #1 }
@@ -1772,8 +1772,8 @@
\dim_set:Nn \l_box_right_dim { \box_wd:N #1 }
\dim_zero:N \l_box_left_dim
\fp_set_from_dim:Nn \l_box_scale_x_fp {#2}
- \fp_set_from_dim:Nn \l_box_tmp_fp { \l_box_right_dim }
- \fp_div:Nn \l_box_scale_x_fp { \l_box_tmp_fp }
+ \fp_set_from_dim:Nn \l_box_internal_fp { \l_box_right_dim }
+ \fp_div:Nn \l_box_scale_x_fp { \l_box_internal_fp }
\fp_set_eq:NN \l_box_scale_y_fp \l_box_scale_x_fp
\fp_compare:NNNTF \l_box_scale_x_fp = \c_one_fp
{ \box_use:N #1 }
@@ -1844,7 +1844,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \box_resize_common:N #1
{
- \hbox_set:Nn \l_box_tmp_box
+ \hbox_set:Nn \l_box_internal_box
{
\driver_box_scale_begin:
\hbox_overlap_right:n { \box_use:N #1 }
@@ -1853,8 +1853,8 @@
% \end{macrocode}
% The new height and depth can be applied directly.
% \begin{macrocode}
- \box_set_ht:Nn \l_box_tmp_box { \l_box_top_new_dim }
- \box_set_dp:Nn \l_box_tmp_box { \l_box_bottom_new_dim }
+ \box_set_ht:Nn \l_box_internal_box { \l_box_top_new_dim }
+ \box_set_dp:Nn \l_box_internal_box { \l_box_bottom_new_dim }
% \end{macrocode}
% Things are not quite as obvious for the width, as the reference point
% needs to remain unchanged. For positive scaling factors resizing the
@@ -1867,13 +1867,13 @@
\hbox_to_wd:nn { \l_box_right_new_dim }
{
\tex_kern:D \l_box_right_new_dim
- \box_use:N \l_box_tmp_box
+ \box_use:N \l_box_internal_box
\tex_hss:D
}
}
{
- \box_set_wd:Nn \l_box_tmp_box { \l_box_right_new_dim }
- \box_use:N \l_box_tmp_box
+ \box_set_wd:Nn \l_box_internal_box { \l_box_right_new_dim }
+ \box_use:N \l_box_internal_box
}
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
index e04b2227944..ade1e0cedc4 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
@@ -2,6 +2,7 @@
%
%% File: l3clist.dtx Copyright (C) 2004-2011 Frank Mittelbach,
%% The LaTeX3 project
+%% (C) 2012 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
@@ -36,7 +37,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3clist.dtx 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3clist.dtx 3157 2012-01-09 00:42:07Z bruno $
{L3 Experimental comma separated lists}
%</driver|package>
%<*driver>
@@ -211,8 +212,8 @@
% \begin{syntax}
% \cs{clist_use:N} \meta{comma list}
% \end{syntax}
-% Places the \meta{comma list} directly into the input stream, thus
-% treating it as a \meta{token list}.
+% Places the \meta{comma list} directly into the input stream,
+% including the commas, thus treating it as a \meta{token list}.
% \end{function}
%
% \section{Modifying comma lists}
@@ -527,7 +528,7 @@
% \emph{i.e.}~every item in a \meta{comma list} is unique.
% \end{function}
%
-% \begin{function}[updated = 2011-09-06, EXP]
+% \begin{function}[updated = 2012-01-08, EXP]
% {\clist_item:Nn, \clist_item:cn, \clist_item:nn}
% \begin{syntax}
% \cs{clist_item:Nn} \meta{comma list} \Arg{integer expression}
@@ -540,6 +541,12 @@
% is larger than the number of items in the \meta{comma list} (as
% calculated by \cs{clist_length:N}) then the function will expand to
% nothing.
+% \begin{texnote}
+% The result is returned within the \tn{unexpanded}
+% primitive (\cs{exp_not:n}), which means that the \meta{item}
+% will not expand further when appearing in an x-type
+% argument expansion.
+% \end{texnote}
% \end{function}
%
% \begin{function}[updated = 2011-08-31]
@@ -616,11 +623,11 @@
%</package>
% \end{macrocode}
%
-% \begin{variable}{\l_clist_tmpa_clist}
+% \begin{variable}{\l_clist_internal_clist}
% Scratch space for various internal uses. This comma list variable
% cannot be declared as such because it comes before \cs{clist_new:N}
% \begin{macrocode}
-\tl_new:N \l_clist_tmpa_clist
+\tl_new:N \l_clist_internal_clist
% \end{macrocode}
% \end{variable}
%
@@ -850,8 +857,8 @@
{ \clist_put_left_aux:NNNn \clist_gconcat:NNN \clist_set:Nn }
\cs_new_protected:Npn \clist_put_left_aux:NNNn #1#2#3#4
{
- #2 \l_clist_tmpa_clist {#4}
- #1 #3 \l_clist_tmpa_clist #3
+ #2 \l_clist_internal_clist {#4}
+ #1 #3 \l_clist_internal_clist #3
}
\cs_generate_variant:Nn \clist_put_left:Nn { NV , No , Nx }
\cs_generate_variant:Nn \clist_put_left:Nn { c , cV , co , cx }
@@ -886,8 +893,8 @@
{ \clist_put_right_aux:NNNn \clist_gconcat:NNN \clist_gset:Nn }
\cs_new_protected:Npn \clist_put_right_aux:NNNn #1#2#3#4
{
- #2 \l_clist_tmpa_clist {#4}
- #1 #3 #3 \l_clist_tmpa_clist
+ #2 \l_clist_internal_clist {#4}
+ #1 #3 #3 \l_clist_internal_clist
}
\cs_generate_variant:Nn \clist_put_right:Nn { NV , No , Nx }
\cs_generate_variant:Nn \clist_put_right:Nn { c , cV , co , cx }
@@ -994,10 +1001,10 @@
%
% \subsection{Modifying comma lists}
%
-% \begin{variable}{\l_clist_remove_clist}
+% \begin{variable}{\l_clist_internal_remove_clist}
% An internal comma list for the removal routines.
% \begin{macrocode}
-\clist_new:N \l_clist_remove_clist
+\clist_new:N \l_clist_internal_remove_clist
% \end{macrocode}
% \end{variable}
%
@@ -1014,13 +1021,13 @@
{ \clist_remove_duplicates_aux:NN \clist_gset_eq:NN }
\cs_new_protected:Npn \clist_remove_duplicates_aux:NN #1#2
{
- \clist_clear:N \l_clist_remove_clist
+ \clist_clear:N \l_clist_internal_remove_clist
\clist_map_inline:Nn #2
{
- \clist_if_in:NnF \l_clist_remove_clist {##1}
- { \clist_put_right:Nn \l_clist_remove_clist {##1} }
+ \clist_if_in:NnF \l_clist_internal_remove_clist {##1}
+ { \clist_put_right:Nn \l_clist_internal_remove_clist {##1} }
}
- #1 #2 \l_clist_remove_clist
+ #1 #2 \l_clist_internal_remove_clist
}
\cs_generate_variant:Nn \clist_remove_duplicates:N { c }
\cs_generate_variant:Nn \clist_gremove_duplicates:N { c }
@@ -1098,13 +1105,6 @@
%
% \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.
@@ -1143,8 +1143,8 @@
}
\prg_new_protected_conditional:Npnn \clist_if_in:nn #1#2 { T , F , TF }
{
- \clist_set:Nn \l_clist_if_in_clist {#1}
- \exp_args:No \clist_if_in_return:nn \l_clist_if_in_clist {#2}
+ \clist_set:Nn \l_clist_internal_clist {#1}
+ \exp_args:No \clist_if_in_return:nn \l_clist_internal_clist {#2}
}
\cs_new_protected:Npn \clist_if_in_return:nn #1#2
{
@@ -1260,8 +1260,8 @@
}
\cs_new_protected:Npn \clist_map_inline:nn #1
{
- \clist_set:Nn \l_clist_tmpa_clist {#1}
- \clist_map_inline:Nn \l_clist_tmpa_clist
+ \clist_set:Nn \l_clist_internal_clist {#1}
+ \clist_map_inline:Nn \l_clist_internal_clist
}
\cs_generate_variant:Nn \clist_map_inline:Nn { c }
% \end{macrocode}
@@ -1291,8 +1291,8 @@
}
\cs_new_protected:Npn \clist_map_variable:nNn #1
{
- \clist_set:Nn \l_clist_tmpa_clist {#1}
- \clist_map_variable:NNn \l_clist_tmpa_clist
+ \clist_set:Nn \l_clist_internal_clist {#1}
+ \clist_map_variable:NNn \l_clist_internal_clist
}
\cs_new_protected:Npn \clist_map_variable_aux:Nnw #1#2#3,
{
@@ -1335,11 +1335,11 @@
}
\cs_new_protected:Npn \clist_show:n #1
{
- \clist_set:Nn \l_clist_tmpa_clist {#1}
+ \clist_set:Nn \l_clist_internal_clist {#1}
\msg_aux_show:Nnx
- \l_clist_tmpa_clist
+ \l_clist_internal_clist
{ clist }
- { \clist_map_function:NN \l_clist_tmpa_clist \msg_aux_show:n }
+ { \clist_map_function:NN \l_clist_internal_clist \msg_aux_show:n }
}
\cs_generate_variant:Nn \clist_show:N { c }
% \end{macrocode}
@@ -1440,7 +1440,7 @@
\cs_new:Npn \clist_item_N_loop:nw #1 #2,
{
\int_compare:nNnTF {#1} = \c_zero
- { \use_i_delimit_by_q_stop:nw {#2} }
+ { \use_i_delimit_by_q_stop:nw { \exp_not:n {#2} } }
{ \exp_args:Nf \clist_item_N_loop:nw { \int_eval:n { #1 - 1 } } }
}
\cs_generate_variant:Nn \clist_item:Nn { c }
@@ -1489,7 +1489,7 @@
\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}
+\cs_new:Npn \clist_item_n_strip:w #1 , { \exp_not:n {#1} }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1506,6 +1506,8 @@
% \clist_gset_from_seq:Nc, \clist_gset_from_seq:cc
% }
% \UnitTested
+% \begin{macro}[aux]{\clist_set_from_seq_aux:NNNN}
+% \begin{macro}[aux]{\clist_wrap_item:n}
% Setting a comma list from a comma-separated list is done using a simple
% 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
@@ -1520,17 +1522,20 @@
\seq_if_empty:NTF #4
{ #1 #3 }
{
- \seq_push_item_def:n
+ #2 #3
{
- ,
- \tl_if_empty:oTF { \clist_set_from_seq_aux:w ##1 ~ , ##1 ~ }
- { \exp_not:n {##1} }
- { \exp_not:n { {##1} } }
+ \exp_last_unbraced:Nf \use_none:n
+ { \seq_map_function:NN #4 \clist_wrap_item:n }
}
- #2 #3 { \exp_last_unbraced:Nf \use_none:n #4 }
- \seq_pop_item_def:
}
}
+\cs_new:Npn \clist_wrap_item:n #1
+ {
+ ,
+ \tl_if_empty:oTF { \clist_set_from_seq_aux:w #1 ~ , #1 ~ }
+ { \exp_not:n {#1} }
+ { \exp_not:n { {#1} } }
+ }
\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 }
@@ -1539,6 +1544,8 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}
% {
@@ -1624,7 +1631,7 @@
% \end{macrocode}
% \end{macro}
%
-% Deprecated on 2011-09-05, for removal by 2011-12-32.
+% Deprecated on 2011-09-05, for removal by 2011-12-31.
%
% \begin{macro}
% {
@@ -1636,10 +1643,12 @@
% The \cs{clist_trim_spaces:n} function is now internal,
% deprecated for use outside the kernel.
% \begin{macrocode}
+%<*deprecated>
\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 }
+%</deprecated>
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
index 75d48a6becb..21aae4e614e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3coffins.dtx Copyright(C) 2010,2011 The LaTeX3 Project
+%% File: l3coffins.dtx Copyright(C) 2010-2012 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
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3coffins.dtx 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3coffins.dtx 3155 2012-01-08 22:53:03Z bruno $
{L3 Experimental coffin code layer}
%</driver|package>
%<*driver>
@@ -336,7 +336,8 @@
% both printed in the \meta{colour} specified.
% \end{function}
%
-% \begin{function}{\coffin_show_structure:N, \coffin_show_structure:c}
+% \begin{function}[updated = 2012-01-01]
+% {\coffin_show_structure:N, \coffin_show_structure:c}
% \begin{syntax}
% \cs{coffin_show_structure:N} \meta{coffin}
% \end{syntax}
@@ -373,16 +374,16 @@
%
% \subsection{Coffins: data structures and general variables}
%
-% \begin{variable}{\l_coffin_tmp_box}
-% \begin{variable}{\l_coffin_tmp_dim}
-% \begin{variable}{\l_coffin_tmp_fp}
-% \begin{variable}{\l_coffin_tmp_tl}
+% \begin{variable}{\l_coffin_internal_box}
+% \begin{variable}{\l_coffin_internal_dim}
+% \begin{variable}{\l_coffin_internal_fp}
+% \begin{variable}{\l_coffin_internal_tl}
% Scratch variables.
% \begin{macrocode}
-\box_new:N \l_coffin_tmp_box
-\dim_new:N \l_coffin_tmp_dim
-\fp_new:N \l_coffin_tmp_fp
-\tl_new:N \l_coffin_tmp_tl
+\box_new:N \l_coffin_internal_box
+\dim_new:N \l_coffin_internal_dim
+\fp_new:N \l_coffin_internal_fp
+\tl_new:N \l_coffin_internal_tl
% \end{macrocode}
% \end{variable}
% \end{variable}
@@ -407,17 +408,17 @@
% based values.
% \begin{macrocode}
\prop_new:N \c_coffin_poles_prop
-\tl_set:Nn \l_coffin_tmp_tl { { 0 pt } { 0 pt } { 0 pt } { 1000 pt } }
-\prop_put:Nno \c_coffin_poles_prop { l } { \l_coffin_tmp_tl }
-\prop_put:Nno \c_coffin_poles_prop { hc } { \l_coffin_tmp_tl }
-\prop_put:Nno \c_coffin_poles_prop { r } { \l_coffin_tmp_tl }
-\tl_set:Nn \l_coffin_tmp_tl { { 0 pt } { 0 pt } { 1000 pt } { 0 pt } }
-\prop_put:Nno \c_coffin_poles_prop { b } { \l_coffin_tmp_tl }
-\prop_put:Nno \c_coffin_poles_prop { vc } { \l_coffin_tmp_tl }
-\prop_put:Nno \c_coffin_poles_prop { t } { \l_coffin_tmp_tl }
-\prop_put:Nno \c_coffin_poles_prop { B } { \l_coffin_tmp_tl }
-\prop_put:Nno \c_coffin_poles_prop { H } { \l_coffin_tmp_tl }
-\prop_put:Nno \c_coffin_poles_prop { T } { \l_coffin_tmp_tl }
+\tl_set:Nn \l_coffin_internal_tl { { 0 pt } { 0 pt } { 0 pt } { 1000 pt } }
+\prop_put:Nno \c_coffin_poles_prop { l } { \l_coffin_internal_tl }
+\prop_put:Nno \c_coffin_poles_prop { hc } { \l_coffin_internal_tl }
+\prop_put:Nno \c_coffin_poles_prop { r } { \l_coffin_internal_tl }
+\tl_set:Nn \l_coffin_internal_tl { { 0 pt } { 0 pt } { 1000 pt } { 0 pt } }
+\prop_put:Nno \c_coffin_poles_prop { b } { \l_coffin_internal_tl }
+\prop_put:Nno \c_coffin_poles_prop { vc } { \l_coffin_internal_tl }
+\prop_put:Nno \c_coffin_poles_prop { t } { \l_coffin_internal_tl }
+\prop_put:Nno \c_coffin_poles_prop { B } { \l_coffin_internal_tl }
+\prop_put:Nno \c_coffin_poles_prop { H } { \l_coffin_internal_tl }
+\prop_put:Nno \c_coffin_poles_prop { T } { \l_coffin_internal_tl }
% \end{macrocode}
% \end{variable}
%
@@ -658,15 +659,15 @@
\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 }
+ \vbox_set_top:Nn \l_coffin_internal_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 } }
+ { \dim_eval:n { \box_ht:N #1 - \box_ht:N \l_coffin_internal_box } }
{ 1000 pt }
{ 0 pt }
}
- \box_clear:N \l_coffin_tmp_box
+ \box_clear:N \l_coffin_internal_box
}
}
\cs_generate_variant:Nn \vcoffin_set:Nnn { c }
@@ -717,17 +718,17 @@
\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 }
+ \vbox_set_top:Nn \l_coffin_internal_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 }
+ \dim_eval:n { \box_ht:N #1 - \box_ht:N \l_coffin_internal_box }
}
{ 1000 pt }
{ 0 pt }
}
- \box_clear:N \l_coffin_tmp_box
+ \box_clear:N \l_coffin_internal_box
}
}
}
@@ -1223,10 +1224,10 @@
\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
+ \dim_set:Nn \l_coffin_internal_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 }
+ \dim_compare:nNnT \l_coffin_internal_dim < \c_zero_dim
+ { \tex_kern:D -\l_coffin_internal_dim }
}
% \end{macrocode}
% The coffin structure is reset, and the corners are cleared: only
@@ -1362,10 +1363,10 @@
\dim_set:Nn \l_coffin_x_dim { #3 + #7 }
\dim_set:Nn \l_coffin_y_dim { #4 + #8 }
\tl_if_in:nnTF {#2} { - }
- { \tl_set:Nn \l_coffin_tmp_tl { {#2} } }
- { \tl_set:Nn \l_coffin_tmp_tl { { #1 - #2 } } }
+ { \tl_set:Nn \l_coffin_internal_tl { {#2} } }
+ { \tl_set:Nn \l_coffin_internal_tl { { #1 - #2 } } }
\exp_last_unbraced:NNo \coffin_set_pole:Nnx \l_coffin_aligned_coffin
- { \l_coffin_tmp_tl }
+ { \l_coffin_internal_tl }
{
{ \dim_use:N \l_coffin_x_dim } { \dim_use:N \l_coffin_y_dim }
{#5} {#6}
@@ -1507,11 +1508,11 @@
% \begin{macrocode}
\cs_new_protected:Npn \coffin_rotate:Nn #1#2
{
- \fp_set:Nn \l_coffin_tmp_fp {#2}
- \fp_div:Nn \l_coffin_tmp_fp { 180 }
- \fp_mul:Nn \l_coffin_tmp_fp { \c_pi_fp }
- \fp_sin:Nn \l_coffin_sin_fp { \l_coffin_tmp_fp }
- \fp_cos:Nn \l_coffin_cos_fp { \l_coffin_tmp_fp }
+ \fp_set:Nn \l_coffin_internal_fp {#2}
+ \fp_div:Nn \l_coffin_internal_fp { 180 }
+ \fp_mul:Nn \l_coffin_internal_fp { \c_pi_fp }
+ \fp_sin:Nn \l_coffin_sin_fp { \l_coffin_internal_fp }
+ \fp_cos:Nn \l_coffin_cos_fp { \l_coffin_internal_fp }
% \end{macrocode}
% The corners and poles of the coffin can now be rotated around the
% origin. This is best achieved using mapping functions.
@@ -1585,11 +1586,11 @@
{ { 0 pt } { \dim_use:N \box_ht:N #1 } }
\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 }
+ \dim_set:Nn \l_coffin_internal_dim { - \box_dp:N #1 }
\prop_put:Nnx \l_coffin_bounding_prop { bl }
- { { 0 pt } { \dim_use:N \l_coffin_tmp_dim } }
+ { { 0 pt } { \dim_use:N \l_coffin_internal_dim } }
\prop_put:Nnx \l_coffin_bounding_prop { br }
- { { \dim_use:N \box_wd:N #1 } { \dim_use:N \l_coffin_tmp_dim } }
+ { { \dim_use:N \box_wd:N #1 } { \dim_use:N \l_coffin_internal_dim } }
}
% \end{macrocode}
% \end{macro}
@@ -1650,15 +1651,15 @@
\fp_set_from_dim:Nn \l_coffin_x_fp {#1}
\fp_set_from_dim:Nn \l_coffin_y_fp {#2}
\fp_set_eq:NN \l_coffin_x_prime_fp \l_coffin_x_fp
- \fp_set_eq:NN \l_coffin_tmp_fp \l_coffin_y_fp
+ \fp_set_eq:NN \l_coffin_internal_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_mul:Nn \l_coffin_internal_fp { \l_coffin_sin_fp }
+ \fp_sub:Nn \l_coffin_x_prime_fp { \l_coffin_internal_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_set_eq:NN \l_coffin_internal_fp \l_coffin_x_fp
\fp_mul:Nn \l_coffin_y_prime_fp { \l_coffin_cos_fp }
- \fp_mul:Nn \l_coffin_tmp_fp { \l_coffin_sin_fp }
- \fp_add:Nn \l_coffin_y_prime_fp { \l_coffin_tmp_fp }
+ \fp_mul:Nn \l_coffin_internal_fp { \l_coffin_sin_fp }
+ \fp_add:Nn \l_coffin_y_prime_fp { \l_coffin_internal_fp }
\dim_set:Nn #3 { \fp_to_dim:N \l_coffin_x_prime_fp }
\dim_set:Nn #4 { \fp_to_dim:N \l_coffin_y_prime_fp }
}
@@ -1772,11 +1773,11 @@
\coffin_set_user_dimensions:N #1
\box_resize:Nnn #1 {#2} {#3}
\fp_set_from_dim:Nn \l_coffin_scale_x_fp {#2}
- \fp_set_from_dim:Nn \l_coffin_tmp_fp { \Width }
- \fp_div:Nn \l_coffin_scale_x_fp { \l_coffin_tmp_fp }
+ \fp_set_from_dim:Nn \l_coffin_internal_fp { \Width }
+ \fp_div:Nn \l_coffin_scale_x_fp { \l_coffin_internal_fp }
\fp_set_from_dim:Nn \l_coffin_scale_y_fp {#3}
- \fp_set_from_dim:Nn \l_coffin_tmp_fp { \TotalHeight }
- \fp_div:Nn \l_coffin_scale_y_fp { \l_coffin_tmp_fp }
+ \fp_set_from_dim:Nn \l_coffin_internal_fp { \TotalHeight }
+ \fp_div:Nn \l_coffin_scale_y_fp { \l_coffin_internal_fp }
\coffin_resize_common:Nnn #1 {#2} {#3}
}
\cs_generate_variant:Nn \coffin_resize:Nnn { c }
@@ -1842,12 +1843,12 @@
% \begin{macrocode}
\cs_new_protected:Npn \coffin_scale_vector:nnNN #1#2#3#4
{
- \fp_set_from_dim:Nn \l_coffin_tmp_fp {#1}
- \fp_mul:Nn \l_coffin_tmp_fp { \l_coffin_scale_x_fp }
- \dim_set:Nn #3 { \fp_to_dim:N \l_coffin_tmp_fp }
- \fp_set_from_dim:Nn \l_coffin_tmp_fp {#2}
- \fp_mul:Nn \l_coffin_tmp_fp { \l_coffin_scale_y_fp }
- \dim_set:Nn #4 { \fp_to_dim:N \l_coffin_tmp_fp }
+ \fp_set_from_dim:Nn \l_coffin_internal_fp {#1}
+ \fp_mul:Nn \l_coffin_internal_fp { \l_coffin_scale_x_fp }
+ \dim_set:Nn #3 { \fp_to_dim:N \l_coffin_internal_fp }
+ \fp_set_from_dim:Nn \l_coffin_internal_fp {#2}
+ \fp_mul:Nn \l_coffin_internal_fp { \l_coffin_scale_y_fp }
+ \dim_set:Nn #4 { \fp_to_dim:N \l_coffin_internal_fp }
}
% \end{macrocode}
% \end{macro}
@@ -2003,14 +2004,6 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l_coffin_handles_tmp_prop}
-% Used for displaying coffins, as the handles need to be stored in this
-% case, at least temporarily.
-% \begin{macrocode}
-\prop_new:N \l_coffin_handles_tmp_prop
-% \end{macrocode}
-% \end{variable}
-%
% \begin{macro}{\coffin_mark_handle:Nnnn, \coffin_mark_handle:cnnn}
% \begin{macro}[aux]{\coffin_mark_handle_aux:nnnnNnn}
% Marking a single handle is relatively easy. The standard attachment
@@ -2045,12 +2038,12 @@
( \tl_to_str:n { #2 , #3 } )
}
\prop_get:NnN \l_coffin_display_handles_prop
- { #2 #3 } \l_coffin_tmp_tl
- \quark_if_no_value:NTF \l_coffin_tmp_tl
+ { #2 #3 } \l_coffin_internal_tl
+ \quark_if_no_value:NTF \l_coffin_internal_tl
{
\prop_get:NnN \l_coffin_display_handles_prop
- { #3 #2 } \l_coffin_tmp_tl
- \quark_if_no_value:NTF \l_coffin_tmp_tl
+ { #3 #2 } \l_coffin_internal_tl
+ \quark_if_no_value:NTF \l_coffin_internal_tl
{
\coffin_attach_mark:NnnNnnnn #1 {#2} {#3}
\l_coffin_display_coord_coffin { l } { vc }
@@ -2058,12 +2051,12 @@
}
{
\exp_last_unbraced:No \coffin_mark_handle_aux:nnnnNnn
- \l_coffin_tmp_tl #1 {#2} {#3}
+ \l_coffin_internal_tl #1 {#2} {#3}
}
}
{
\exp_last_unbraced:No \coffin_mark_handle_aux:nnnnNnn
- \l_coffin_tmp_tl #1 {#2} {#3}
+ \l_coffin_internal_tl #1 {#2} {#3}
}
}
\cs_new_protected:Npn \coffin_mark_handle_aux:nnnnNnn #1#2#3#4#5#6#7
@@ -2110,7 +2103,6 @@
\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
- \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}
@@ -2149,12 +2141,12 @@
( \tl_to_str:n { #1 , ##1 } )
}
\prop_get:NnN \l_coffin_display_handles_prop
- { #1 ##1 } \l_coffin_tmp_tl
- \quark_if_no_value:NTF \l_coffin_tmp_tl
+ { #1 ##1 } \l_coffin_internal_tl
+ \quark_if_no_value:NTF \l_coffin_internal_tl
{
\prop_get:NnN \l_coffin_display_handles_prop
- { ##1 #1 } \l_coffin_tmp_tl
- \quark_if_no_value:NTF \l_coffin_tmp_tl
+ { ##1 #1 } \l_coffin_internal_tl
+ \quark_if_no_value:NTF \l_coffin_internal_tl
{
\coffin_display_attach:Nnnnn
\l_coffin_display_coord_coffin { l } { vc }
@@ -2163,12 +2155,12 @@
{
\exp_last_unbraced:No
\coffin_display_handles_aux:nnnn
- \l_coffin_tmp_tl
+ \l_coffin_internal_tl
}
}
{
\exp_last_unbraced:No \coffin_display_handles_aux:nnnn
- \l_coffin_tmp_tl
+ \l_coffin_internal_tl
}
}
}
@@ -2218,8 +2210,6 @@
% \end{macro}
%
% \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
% a way that keeps things relatively readable. If there is no apparent
% structure then the code complains.
@@ -2228,40 +2218,21 @@
{
\cs_if_exist:cTF { l_coffin_poles_ \int_value:w #1 _prop }
{
- \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:
- > ~ dp~=~\dim_use:N \box_dp:N #1 \iow_newline:
- > ~ wd~=~\dim_use:N \box_wd:N #1 \iow_newline:
- }
- \iow_term:x { Poles~of~coffin~\token_to_str:N #1 : }
- \tl_set:Nx \l_coffin_tmp_tl
+ \msg_aux_show:Nnx #1 { coffins }
{
\prop_map_function:cN
{ l_coffin_poles_ \int_value:w #1 _prop }
- \coffin_show_aux:nn
+ \msg_aux_show_unbraced:nn
}
- \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN
- { \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? }
+ \msg_aux_use:nn { LaTeX / coffins } { no-pole }
+ \msg_aux_show:x { }
}
}
-\cs_new:Npn \coffin_show_aux:nn #1#2
- {
- \iow_newline: > \c_space_tl \c_space_tl
- #1 \c_space_tl \c_space_tl => \c_space_tl \c_space_tl \exp_not:n {#2}
- }
-\cs_new:Npn \coffin_show_aux:w #1 > ~ { }
\cs_generate_variant:Nn \coffin_show_structure:N { c }
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \subsection{Messages}
%
@@ -2284,6 +2255,19 @@
LaTeX~was~asked~to~find~a~typesetting~pole~for~a~coffin,~
but~either~the~coffin~does~not~exist~or~the~pole~name~is~wrong.
}
+\msg_kernel_new:nnn { coffins } { show }
+ {
+ Size~of~coffin~\token_to_str:N #1 : \\
+ > ~ ht~=~\dim_use:N \box_ht:N #1 \\
+ > ~ dp~=~\dim_use:N \box_dp:N #1 \\
+ > ~ wd~=~\dim_use:N \box_wd:N #1 \\
+ Poles~of~coffin~\token_to_str:N #1 :
+ }
+\msg_kernel_new:nnn { coffins } { no-pole }
+ {
+ ---~No~poles~found~--- \\
+ Is~this~really~a~coffin?
+ }
% \end{macrocode}
%
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
index 3ea31aac59d..2729cad13ca 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3drivers.dtx Copyright(C) 2011 The LaTeX3 Project
+%% File: l3drivers.dtx Copyright(C) 2011-2012 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
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3drivers.dtx 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3drivers.dtx 3158 2012-01-09 00:47:42Z bruno $
{L3 Experimental drivers}
%</driver|package>
%<*driver>
@@ -105,7 +105,7 @@
% {\driver_box_rotate_begin:, \driver_box_rotate_end:}
% \begin{syntax}
% \cs{driver_box_rotate_begin:}
-% \cs{box_use:N} \cs{l_box_tmp_box}
+% \cs{box_use:N} \cs{l_box_internal_box}
% \cs{driver_box_rotate_end:}
% \end{syntax}
% Rotates the \meta{box material} anti-clockwise around the current
@@ -113,7 +113,7 @@
% and the sine and cosine of this angle should be stored in
% \cs{l_box_angle_fp}, \cs{l_box_sin_fp} and \cs{l_box_cos_fp},
% respectively. Typically, the box material inserted between the beginning
-% and end markers will be stored in \cs{l_box_tmp_box}: this fact is
+% and end markers will be stored in \cs{l_box_internal_box}: this fact is
% required by some drivers to obtain the correct output.
% \end{function}
%
@@ -345,11 +345,11 @@
%
% \subsection{Box rotation and scaling}
%
-% \begin{variable}{\l_driver_tmp_fp}
+% \begin{variable}{\l_driver_internal_fp}
% Needed for a safe sign inversion in PDF mode.
% \begin{macrocode}
%<*pdfmode|xdvipdfmx>
-\fp_new:N \l_driver_tmp_fp
+\fp_new:N \l_driver_internal_fp
%</pdfmode|xdvipdfmx>
% \end{macrocode}
% \end{variable}
@@ -376,9 +376,9 @@
}
%</dvips>
%<*pdfmode|xdvipdfmx>
- \box_set_wd:Nn \l_box_tmp_box \c_zero_dim
- \fp_set_eq:NN \l_driver_tmp_fp \l_box_sin_fp
- \fp_neg:N \l_driver_tmp_fp
+ \box_set_wd:Nn \l_box_internal_box \c_zero_dim
+ \fp_set_eq:NN \l_driver_internal_fp \l_box_sin_fp
+ \fp_neg:N \l_driver_internal_fp
%<*pdfmode>
\pdftex_pdfsetmatrix:D
%</pdfmode>
@@ -388,7 +388,7 @@
{
\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_driver_internal_fp \c_space_tl
\fp_use:N \l_box_cos_fp
%<*xdvipdfmx>
\c_space_tl 0~0~cm
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
index be9c3ea942e..863413fa019 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3expan.dtx Copyright (C) 1990-2011 The LaTeX3 project
+%% File: l3expan.dtx Copyright (C) 1990-2012 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
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3expan.dtx 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3expan.dtx 3196 2012-01-15 09:44:05Z joseph $
{L3 Experimental argument expansion}
%</driver|package>
%<*driver>
@@ -86,9 +86,10 @@
% Internally preprocessing of arguments is done with functions from the
% |\exp_| module. They all look alike, an example would be
% |\exp_args:NNo|. This function has three arguments, the first and the
-% second are a single tokens the third argument gets
-% expanded once. If |\seq_gpush:No| was not defined the example
-% above could be coded in the following way:
+% second are a single tokens, while the third argument should be given
+% in braces. Applying |\exp_args:NNo| will expand the content of third
+% argument once before any expansion of the first and second arguments.
+% If |\seq_gpush:No| was not define it could be coded in the following way:
% \begin{verbatim}
% \exp_args:NNo \seq_gpush:Nn
% \g_file_name_stack
@@ -224,7 +225,7 @@
%
% \begin{function}[EXP]{\exp_args:No}
% \begin{syntax}
-% \cs{exp_args:No} \meta{function} \Arg{tokens} \Arg{tokens2} ...
+% \cs{exp_args:No} \meta{function} \Arg{tokens} ...
% \end{syntax}
% This function absorbs two arguments (the \meta{function} name and
% the \meta{tokens}). The \meta{tokens} are expanded once, and the result
@@ -235,7 +236,7 @@
%
% \begin{function}[EXP]{\exp_args:Nc, \exp_args:cc}
% \begin{syntax}
-% \cs{exp_args:Nc} \meta{function} \Arg{tokens} \Arg{tokens2} ...
+% \cs{exp_args:Nc} \meta{function} \Arg{tokens}
% \end{syntax}
% This function absorbs two arguments (the \meta{function} name and
% the \meta{tokens}). The \meta{tokens} are expanded until only characters
@@ -251,7 +252,7 @@
%
% \begin{function}[EXP]{\exp_args:NV}
% \begin{syntax}
-% \cs{exp_args:NV} \meta{function} \meta{variable} \Arg{tokens2} ...
+% \cs{exp_args:NV} \meta{function} \meta{variable}
% \end{syntax}
% This function absorbs two arguments (the names of the \meta{function} and
% the the \meta{variable}). The content of the \meta{variable} are recovered
@@ -262,7 +263,7 @@
%
% \begin{function}[EXP]{\exp_args:Nv}
% \begin{syntax}
-% \cs{exp_args:Nv} \meta{function} \Arg{tokens} \Arg{tokens2} ...
+% \cs{exp_args:Nv} \meta{function} \Arg{tokens}
% \end{syntax}
% This function absorbs two arguments (the \meta{function} name and
% the \meta{tokens}). The \meta{tokens} are expanded until only characters
@@ -277,7 +278,7 @@
%
% \begin{function}[EXP]{\exp_args:Nf}
% \begin{syntax}
-% \cs{exp_args:Nf} \meta{function} \Arg{tokens} \Arg{tokens2} ...
+% \cs{exp_args:Nf} \meta{function} \Arg{tokens}
% \end{syntax}
% This function absorbs two arguments (the \meta{function} name and
% the \meta{tokens}). The \meta{tokens} are fully expanded until the
@@ -289,7 +290,7 @@
%
% \begin{function}{\exp_args:Nx}
% \begin{syntax}
-% \cs{exp_args:Nx} \meta{function} \Arg{tokens} \Arg{tokens2} ...
+% \cs{exp_args:Nx} \meta{function} \Arg{tokens}
% \end{syntax}
% This function absorbs two arguments (the \meta{function} name and
% the \meta{tokens}) and exhaustively expands the \meta{tokens}
@@ -322,12 +323,13 @@
% by the expansion of the second and third arguments.
% \end{function}
%
-% \begin{function}[EXP]
+% \begin{function}[EXP, updated = 2012-01-14]
% {
% \exp_args:Nno,
% \exp_args:NnV,
% \exp_args:Nnf,
% \exp_args:Noo,
+% \exp_args:Nof,
% \exp_args:Noc,
% \exp_args:Nff,
% \exp_args:Nfo,
@@ -485,7 +487,7 @@
% expansion (for example, if it is a character) then it will be left
% unchanged. It is important to notice that \meta{token1} may be
% \emph{any} single token, including group-opening and -closing
-% tokens (|{| or |}"| assuming normal \TeX{} category codes). Unless
+% tokens (|{| or |}| assuming normal \TeX{} category codes). Unless
% specifically required, expansion should be carried out using an
% appropriate argument specifier variant or the appropriate
% \cs{exp_arg:N} function.
@@ -538,7 +540,7 @@
% \cs{exp_not:V} \meta{variable}
% \end{syntax}
% Recovers the content of the \meta{variable}, then prevents expansion
-% of the this material in a context where it would otherwise
+% of this material in a context where it would otherwise
% be expanded, for example an |x|-type argument.
% \end{function}
%
@@ -587,7 +589,7 @@
%
% \section{Internal functions and variables}
%
-% \begin{variable}{\l_exp_tl}
+% \begin{variable}{\l_exp_internal_tl}
% The |\exp_| module has its private variables to temporarily store
% results of the argument expansion. This is done to avoid interference
% with other functions using temporary variables.
@@ -598,7 +600,7 @@
% \cs{exp_eval_register:N} \meta{variable}
% \end{syntax}
% These functions evaluates a \meta{variable} as part of a |V| or |v|
-% expansion (respectively), preceeded by \cs{c_zero} which stops
+% expansion (respectively), preceded by \cs{c_zero} which stops
% 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
@@ -667,11 +669,11 @@
% In section~\ref{sec:handtune} some common cases are coded by a more direct
% method for efficiency, typically using calls to |\exp_after:wN|.
%
-% \begin{variable}{\l_exp_tl}
+% \begin{variable}{\l_exp_internal_tl}
% We need a scratch token list variable.
% We don't use |tl| methods so that \pkg{l3expan} can be loaded earlier.
% \begin{macrocode}
-\cs_new_nopar:Npn \l_exp_tl { }
+\cs_new_nopar:Npn \l_exp_internal_tl { }
% \end{macrocode}
% \end{variable}
%
@@ -686,8 +688,8 @@
% is the carried over result of the previous expansion steps and |#3| is
% the argument about to be processed.
%
-% \begin{macro}[aux]{\exp_arg_next:nnn}
-% \begin{macro}[aux]{\exp_arg_next_nobrace:nnn}
+% \begin{macro}[aux, EXP]{\exp_arg_next:nnn}
+% \begin{macro}[aux, EXP]{\exp_arg_next:Nnn}
% |#1| is the result of an expansion step, |#2| is the remaining
% argument manipulations and |#3| is the current result of the
% expansion chain. This auxiliary function moves |#1| back after
@@ -699,7 +701,7 @@
% require a set of braces.
% \begin{macrocode}
\cs_new:Npn \exp_arg_next:nnn #1#2#3 { #2 \::: { #3 {#1} } }
-\cs_new:Npn \exp_arg_next_nobrace:nnn #1#2#3 { #2 \::: { #3 #1 } }
+\cs_new:Npn \exp_arg_next:Nnn #1#2#3 { #2 \::: { #3 #1 } }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -711,7 +713,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\::n}
+% \begin{macro}[int, EXP]{\::n}
% This function is used to skip an argument that doesn't need to
% be expanded.
% \begin{macrocode}
@@ -719,7 +721,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\::N}
+% \begin{macro}[int, EXP]{\::N}
% This function is used to skip an argument that consists of a
% single token and doesn't need to be expanded.
% \begin{macrocode}
@@ -727,16 +729,16 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\::c}
+% \begin{macro}[int, EXP]{\::c}
% This function is used to skip an argument that is turned into
% as control sequence without expansion.
% \begin{macrocode}
\cs_new:Npn \::c #1 \::: #2#3
- { \exp_after:wN \exp_arg_next_nobrace:nnn \cs:w #3 \cs_end: {#1} {#2} }
+ { \exp_after:wN \exp_arg_next:Nnn \cs:w #3 \cs_end: {#1} {#2} }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\::o}
+% \begin{macro}[int, EXP]{\::o}
% This function is used to expand an argument once.
% \begin{macrocode}
\cs_new:Npn \::o #1 \::: #2#3
@@ -744,7 +746,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\::f}
+% \begin{macro}[int, EXP]{\::f}
% \begin{macro}{\exp_stop_f:}
% This function is used to expand a token list until the first
% unexpandable token is found. The underlying \tn{romannumeral} |-`0|
@@ -779,16 +781,16 @@
% \begin{macrocode}
\cs_new_protected:Npn \::x #1 \::: #2#3
{
- \cs_set_nopar:Npx \l_exp_tl { {#3} }
- \exp_after:wN \exp_arg_next:nnn \l_exp_tl {#1} {#2}
+ \cs_set_nopar:Npx \l_exp_internal_tl { {#3} }
+ \exp_after:wN \exp_arg_next:nnn \l_exp_internal_tl {#1} {#2}
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\::v}
-% \begin{macro}[int]{\::V}
+% \begin{macro}[int, EXP]{\::v}
+% \begin{macro}[int, EXP]{\::V}
% These functions return the value of a register, i.e., one of
-% |tl|, |num|, |int|, |skip|, |dim| and |muskip|. The |V| version
+% |tl|, |clist|, |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 \tn{romannumeral} sets off an expansion
@@ -811,20 +813,20 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\exp_eval_register:N, \exp_eval_register:c}
-% \begin{macro}[aux]{\exp_eval_error_msg:w}
-% 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 \tn{the} whereas for the macros we merely have to
-% expand them once. The trick is to find out when to use
-% \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|
-% and the register itself. If it is a macro, the prefixed
-% |\exp_not:N| will temporarily turn it into the primitive
-% |\scan_stop:|.
+% \begin{macro}[int, EXP]{\exp_eval_register:N, \exp_eval_register:c}
+% \begin{macro}[aux, EXP]{\exp_eval_error_msg:w}
+% 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 \tn{the} whereas for the macros we merely have to
+% expand them once. The trick is to find out when to use
+% \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|
+% and the register itself. If it is a macro, the prefixed
+% |\exp_not:N| will temporarily turn it into the primitive
+% |\scan_stop:|.
% \begin{macrocode}
\cs_new:Npn \exp_eval_register:N #1
{
@@ -889,9 +891,9 @@
% are fully expandable and therefore allow to prefix them with
% |\tex_global:D| for example.
%
-% \begin{macro}{\exp_args:No}
-% \begin{macro}{\exp_args:NNo}
-% \begin{macro}{\exp_args:NNNo}
+% \begin{macro}[EXP]{\exp_args:No}
+% \begin{macro}[EXP]{\exp_args:NNo}
+% \begin{macro}[EXP]{\exp_args:NNNo}
% Those lovely runs of expansion!
% \begin{macrocode}
\cs_new:Npn \exp_args:No #1#2 { \exp_after:wN #1 \exp_after:wN {#2} }
@@ -904,11 +906,12 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\exp_args:Nc}
+% \begin{macro}[EXP]{\exp_args:Nc}
% In \pkg{l3basics}
%\end{macro}
%
-% \begin{macro}{\exp_args:cc, \exp_args:NNc, \exp_args:Ncc, \exp_args:Nccc}
+% \begin{macro}[EXP]
+% {\exp_args:cc, \exp_args:NNc, \exp_args:Ncc, \exp_args:Nccc}
% Here are the functions that turn their argument into csnames but
% are expandable.
% \begin{macrocode}
@@ -928,7 +931,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\exp_args:Nf, \exp_args:NV, \exp_args:Nv, \exp_args:Nx}
+% \begin{macro}[EXP]{\exp_args:Nf, \exp_args:NV, \exp_args:Nv}
% \begin{macrocode}
\cs_new:Npn \exp_args:Nf #1#2
{ \exp_after:wN #1 \exp_after:wN { \tex_romannumeral:D -`0 #2 } }
@@ -945,13 +948,16 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\exp_args:NNV,\exp_args:NNv,\exp_args:NNf,
-% \exp_args:NVV,
-% \exp_args:Ncf,\exp_args:Nco}
-% Some more hand-tuned function with three arguments.
-% If we force that an |o| argument always has braces,
-% we could implement \cs{exp_args:Nco} with less tokens
-% and only two arguments.
+% \begin{macro}[EXP]
+% {
+% \exp_args:NNV,\exp_args:NNv,\exp_args:NNf,
+% \exp_args:NVV,
+% \exp_args:Ncf,\exp_args:Nco
+% }
+% Some more hand-tuned function with three arguments.
+% If we forced that an |o| argument always has braces,
+% we could implement \cs{exp_args:Nco} with less tokens
+% and only two arguments.
% \begin{macrocode}
\cs_new:Npn \exp_args:NNf #1#2#3
{
@@ -991,12 +997,13 @@
\exp_after:wN { \tex_romannumeral:D \exp_eval_register:N #3 }
}
% \end{macrocode}
-% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\exp_args:Ncco,
-% \exp_args:NcNc,
-% \exp_args:NcNo,
-% \exp_args:NNNV}
+% \begin{macro}[EXP]
+% {
+% \exp_args:Ncco, \exp_args:NcNc, \exp_args:NcNo,
+% \exp_args:NNNV
+% }
% A few more that we can hand-tune.
% \begin{macrocode}
\cs_new:Npn \exp_args:NNNV #1#2#3#4
@@ -1028,7 +1035,7 @@
\exp_after:wN {#4}
}
% \end{macrocode}
-% \end{macro}
+% \end{macro}
%
% \subsection{Definitions with the automated technique}
% \label{sec:gendef}
@@ -1037,21 +1044,25 @@
% coding then becomes an issue. Notice that the auto-generated functions
% are all not long: they don't actually take any arguments themselves.
%
-% \begin{macro}{\exp_args:Nx}
+% \begin{macro}{\exp_args:Nx}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \exp_args:Nx { \::x \::: }
% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\exp_args:NNx,
-% \exp_args:Nnc,
-% \exp_args:Ncx,
-% \exp_args:Nfo,\exp_args:Nff,
-% \exp_args:Nnf,\exp_args:Nno,\exp_args:NnV,\exp_args:Nnx,
-% \exp_args:Noo,\exp_args:Noc,\exp_args:Nox,
-% \exp_args:Nxo,\exp_args:Nxx}
-% Here are the actual function definitions, using the helper functions
-% above.
+% \end{macro}
+%
+% \begin{macro}[EXP]
+% {
+% \exp_args:Nnc,\exp_args:Nfo,\exp_args:Nff,\exp_args:Nnf,
+% \exp_args:Nno,\exp_args:NnV,\exp_args:Noo,\exp_args:Nof,
+% \exp_args:Noc
+% }
+% \begin{macro}
+% {
+% \exp_args:NNx,\exp_args:Ncx,\exp_args:Nnx,
+% \exp_args:Nox,\exp_args:Nxo,\exp_args:Nxx,
+% }
+% Here are the actual function definitions, using the helper functions
+% above.
% \begin{macrocode}
\cs_new_nopar:Npn \exp_args:Nnc { \::n \::c \::: }
\cs_new_nopar:Npn \exp_args:Nfo { \::f \::o \::: }
@@ -1059,8 +1070,9 @@
\cs_new_nopar:Npn \exp_args:Nnf { \::n \::f \::: }
\cs_new_nopar:Npn \exp_args:Nno { \::n \::o \::: }
\cs_new_nopar:Npn \exp_args:NnV { \::n \::V \::: }
-\cs_new_nopar:Npn \exp_args:Noc { \::o \::c \::: }
\cs_new_nopar:Npn \exp_args:Noo { \::o \::o \::: }
+\cs_new_nopar:Npn \exp_args:Nof { \::o \::f \::: }
+\cs_new_nopar:Npn \exp_args:Noc { \::o \::c \::: }
\cs_new_protected_nopar:Npn \exp_args:NNx { \::N \::x \::: }
\cs_new_protected_nopar:Npn \exp_args:Ncx { \::c \::x \::: }
\cs_new_protected_nopar:Npn \exp_args:Nnx { \::n \::x \::: }
@@ -1068,20 +1080,19 @@
\cs_new_protected_nopar:Npn \exp_args:Nxo { \::x \::o \::: }
\cs_new_protected_nopar:Npn \exp_args:Nxx { \::x \::x \::: }
% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\exp_args:Nccx,
-% \exp_args:Ncnx,
-% \exp_args:NNno,
-% \exp_args:Nnno,
-% \exp_args:Nnnx,
-% \exp_args:Nnox,
-% \exp_args:Nooo,
-% \exp_args:Noox,
-% \exp_args:Nnnc,
-% \exp_args:NNnx,
-% \exp_args:NNoo,
-% \exp_args:NNox}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[EXP]
+% {
+% \exp_args:NNno,\exp_args:NNoo,
+% \exp_args:Nnnc,\exp_args:Nnno,\exp_args:Nooo,
+% }
+% \begin{macro}
+% {
+% \exp_args:NNnx,\exp_args:NNox,\exp_args:Nnnx,\exp_args:Nnox,
+% \exp_args:Nccx,\exp_args:Ncnx,\exp_args:Noox,
+% }
% \begin{macrocode}
\cs_new_nopar:Npn \exp_args:NNno { \::N \::n \::o \::: }
\cs_new_nopar:Npn \exp_args:NNoo { \::N \::o \::o \::: }
@@ -1096,16 +1107,17 @@
\cs_new_protected_nopar:Npn \exp_args:Ncnx { \::c \::n \::x \::: }
\cs_new_protected_nopar:Npn \exp_args:Noox { \::o \::o \::x \::: }
% \end{macrocode}
-% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsection{Last-unbraced versions}
%
-% \begin{macro}[aux]{\exp_arg_last_unbraced:nn}
-% \begin{macro}[aux]{\::f_unbraced}
-% \begin{macro}[aux]{\::o_unbraced}
-% \begin{macro}[aux]{\::V_unbraced}
-% \begin{macro}[aux]{\::v_unbraced}
-% \begin{macro}[aux]{\::x_unbraced}
+% \begin{macro}[aux, EXP]{\exp_arg_last_unbraced:nn}
+% \begin{macro}[aux, EXP]{\::f_unbraced}
+% \begin{macro}[aux, EXP]{\::o_unbraced}
+% \begin{macro}[aux, EXP]{\::V_unbraced}
+% \begin{macro}[aux, EXP]{\::v_unbraced}
+% \begin{macro}[aux, EXP]{\::x_unbraced}
% There are a few places where the last argument needs to be available
% unbraced. First some helper macros.
% \begin{macrocode}
@@ -1129,8 +1141,8 @@
}
\cs_new_protected:Npn \::x_unbraced \::: #1#2
{
- \cs_set_nopar:Npx \l_exp_tl { \exp_not:n {#1} #2 }
- \l_exp_tl
+ \cs_set_nopar:Npx \l_exp_internal_tl { \exp_not:n {#1} #2 }
+ \l_exp_internal_tl
}
% \end{macrocode}
% \end{macro}
@@ -1140,19 +1152,19 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\exp_last_unbraced:NV}
-% \begin{macro}{\exp_last_unbraced:Nv}
-% \begin{macro}{\exp_last_unbraced:Nf}
-% \begin{macro}{\exp_last_unbraced:No}
-% \begin{macro}{\exp_last_unbraced:Nco}
-% \begin{macro}{\exp_last_unbraced:NcV}
-% \begin{macro}{\exp_last_unbraced:NNV}
-% \begin{macro}{\exp_last_unbraced:NNo}
-% \begin{macro}{\exp_last_unbraced:NNNV}
-% \begin{macro}{\exp_last_unbraced:NNNo}
-% \begin{macro}{\exp_last_unbraced:Nno}
-% \begin{macro}{\exp_last_unbraced:Noo}
-% \begin{macro}{\exp_last_unbraced:Nfo}
+% \begin{macro}[EXP]{\exp_last_unbraced:NV}
+% \begin{macro}[EXP]{\exp_last_unbraced:Nv}
+% \begin{macro}[EXP]{\exp_last_unbraced:Nf}
+% \begin{macro}[EXP]{\exp_last_unbraced:No}
+% \begin{macro}[EXP]{\exp_last_unbraced:Nco}
+% \begin{macro}[EXP]{\exp_last_unbraced:NcV}
+% \begin{macro}[EXP]{\exp_last_unbraced:NNV}
+% \begin{macro}[EXP]{\exp_last_unbraced:NNo}
+% \begin{macro}[EXP]{\exp_last_unbraced:NNNV}
+% \begin{macro}[EXP]{\exp_last_unbraced:NNNo}
+% \begin{macro}[EXP]{\exp_last_unbraced:Nno}
+% \begin{macro}[EXP]{\exp_last_unbraced:Noo}
+% \begin{macro}[EXP]{\exp_last_unbraced:Nfo}
% \begin{macro}{\exp_last_unbraced:Nx}
% Now the business end: most of these are hand-tuned for speed, but the
% general system is in place.
@@ -1209,7 +1221,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\exp_last_two_unbraced:Noo}
+% \begin{macro}[EXP]{\exp_last_two_unbraced:Noo}
% If |#2| is a single token then this can be implemented as
% \begin{verbatim}
% \cs_new:Npn \exp_last_two_unbraced:Noo #1 #2 #3
@@ -1227,12 +1239,14 @@
%
% \subsection{Preventing expansion}
%
-% \begin{macro}{\exp_not:o}
-% \begin{macro}{\exp_not:f}
-% \begin{macro}{\exp_not:V}
-% \begin{macro}{\exp_not:v}
+% \begin{macro}[EXP]{\exp_not:o}
+% \begin{macro}[EXP]{\exp_not:c}
+% \begin{macro}[EXP]{\exp_not:f}
+% \begin{macro}[EXP]{\exp_not:V}
+% \begin{macro}[EXP]{\exp_not:v}
% \begin{macrocode}
\cs_new:Npn \exp_not:o #1 { \etex_unexpanded:D \exp_after:wN {#1} }
+\cs_new:Npn \exp_not:c #1 { \exp_after:wN \exp_not:N \cs:w #1 \cs_end: }
\cs_new:Npn \exp_not:f #1
{ \etex_unexpanded:D \exp_after:wN { \tex_romannumeral:D -`0 #1 } }
\cs_new:Npn \exp_not:V #1
@@ -1250,13 +1264,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
-%
-% \begin{macro}{\exp_not:c}
-% A helper function.
-% \begin{macrocode}
-\cs_new:Npn \exp_not:c #1 { \exp_after:wN \exp_not:N \cs:w #1 \cs_end: }
-% \end{macrocode}
-% \end{macro}
+% \end{macro}
%
% \subsection{Defining function variants}
%
@@ -1291,7 +1299,7 @@
% We discard the boolean |#3| and then set off a loop through the desired
% variant forms. The original function is retained as |#4| for efficiency.
% \begin{macrocode}
-\cs_new:Npn \cs_generate_variant_aux:nnNNn #1#2#3#4#5
+\cs_new_protected:Npn \cs_generate_variant_aux:nnNNn #1#2#3#4#5
{ \cs_generate_variant_aux:Nnnw #4 {#1}{#2} #5 , ? , \q_recursion_stop }
% \end{macrocode}
% Next is the real work to be done. We now have 1: original function,
@@ -1309,7 +1317,7 @@
% Then build the variant function once, to avoid repeating this
% relatively expensive operation. Then recurse.
% \begin{macrocode}
-\cs_new:Npn \cs_generate_variant_aux:Nnnw #1#2#3#4 ,
+\cs_new_protected:Npn \cs_generate_variant_aux:Nnnw #1#2#3#4 ,
{
\if:w ? #4
\exp_after:wN \use_none_delimit_by_q_recursion_stop:w
@@ -1342,7 +1350,7 @@
% the |\exp_args:N| form needed is defined.
% Otherwise tell that it was already defined.
% \begin{macrocode}
-\cs_new:Npn \cs_generate_variant_aux:NNn #1 #2 #3
+\cs_new_protected:Npn \cs_generate_variant_aux:NNn #1 #2 #3
{
\cs_if_free:NTF #2
{
@@ -1385,7 +1393,7 @@
\tex_lowercase:D
{
\group_end:
- \cs_new:Npn \cs_generate_variant_aux:N #1
+ \cs_new_protected:Npn \cs_generate_variant_aux:N #1
{
\exp_after:wN \cs_generate_variant_aux:w
\token_to_meaning:N #1
@@ -1394,7 +1402,7 @@
\q_mark \cs_new_nopar:Npx
\q_stop
}
- \cs_new:Npn \cs_generate_variant_aux:w
+ \cs_new_protected:Npn \cs_generate_variant_aux:w
#1 ? PROTECTEZ #2 \q_mark #3 #4 \q_stop
{
\cs_set_eq:NN \cs_tmp:w #3
@@ -1405,7 +1413,7 @@
% \end{macro}
%
% \begin{macro}[int]{\cs_generate_internal_variant:n}
-% \begin{macro}[aux]{\cs_generate_internal_variant_aux:N}
+% \begin{macro}[aux, rEXP]{\cs_generate_internal_variant_aux:N}
% Test if |exp_args:N #1| is already defined
% and if not define it via the
% |\::| commands using the chars in |#1|
@@ -1438,7 +1446,7 @@
%
%\subsection{Variants which cannot be created earlier}
%
-% \begin{macro}[pTF]
+% \begin{macro}[EXP,pTF]
% {\str_if_eq:Vn, \str_if_eq:on, \str_if_eq:nV, \str_if_eq:no, \str_if_eq:VV}
% These cannot come earlier as they need \cs{cs_generate_variant:Nn}.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index 30c212d3015..b60d534c225 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3file.dtx Copyright (C) 2009-2011 The LaTeX3 Project
+%% File: l3file.dtx Copyright (C) 2009-2012 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
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3file.dtx 3095 2011-12-26 22:33:23Z joseph $
+\GetIdInfo$Id: l3file.dtx 3158 2012-01-09 00:47:42Z bruno $
{L3 Experimental file operations}
%</driver|package>
%<*driver>
@@ -173,7 +173,7 @@
% sequence.
% \end{variable}
%
-% \begin{variable}{\l_file_name_tl}
+% \begin{variable}{\l_file_internal_name_tl}
% Used to return the full name of a file for internal use.
% \end{variable}
%
@@ -181,12 +181,12 @@
% The sequence of file paths to search when loading a file.
% \end{variable}
%
-% \begin{variable}{\l_file_search_path_saved_seq}
+% \begin{variable}{\l_file_internal_saved_path_seq}
% When loaded on top of \LaTeXe{}, there is a need to save the search
% path so that \tn{input@path} can be used as appropriate.
% \end{variable}
%
-% \begin{variable}[added = 2011-09-06]{\l_file_tmpa_seq}
+% \begin{variable}[added = 2011-09-06]{\l_file_internal_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}
@@ -257,10 +257,10 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l_file_name_tl}
+% \begin{variable}{\l_file_internal_name_tl}
% Used to return the fully-qualified name of a file.
% \begin{macrocode}
-\tl_new:N \l_file_name_tl
+\tl_new:N \l_file_internal_name_tl
% \end{macrocode}
% \end{variable}
%
@@ -271,26 +271,26 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l_file_search_path_saved_seq}
+% \begin{variable}{\l_file_internal_saved_path_seq}
% The current search path has to be saved for package use.
% \begin{macrocode}
%<*package>
-\seq_new:N \l_file_search_path_saved_seq
+\seq_new:N \l_file_internal_saved_path_seq
%</package>
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l_file_tmpa_seq}
+% \begin{variable}{\l_file_internal_seq}
% Scratch space for comma list conversion in package mode.
% \begin{macrocode}
%<*package>
-\seq_new:N \l_file_tmpa_seq
+\seq_new:N \l_file_internal_seq
%</package>
% \end{macrocode}
% \end{variable}
%
% \begin{macro}{\file_add_path:nN}
-% \begin{variable}{\g_file_test_ior}
+% \begin{variable}{\g_file_internal_ior}
% \begin{macro}[aux]{\file_add_path_search:nN}
% The way to test if a file exists is to try to open it: if it does not
% exist then \TeX{} will report end-of-file. For files which are in the
@@ -299,13 +299,14 @@
% location is of course treated as the correct one. If nothing is found,
% |#2| is returned empty.
% \begin{macrocode}
+\ior_new:N \g_file_internal_ior
\cs_new_protected:Npn \file_add_path:nN #1#2
{
- \ior_open:Nn \g_file_test_ior {#1}
- \ior_if_eof:NTF \g_file_test_ior
+ \ior_open:Nn \g_file_internal_ior {#1}
+ \ior_if_eof:NTF \g_file_internal_ior
{ \file_add_path_search:nN {#1} #2 }
{
- \ior_close:N \g_file_test_ior
+ \ior_close:N \g_file_internal_ior
\tl_set:Nx #2 {#1}
}
}
@@ -315,16 +316,16 @@
%<*package>
\cs_if_exist:NT \input@path
{
- \seq_set_eq:NN \l_file_search_path_saved_seq \l_file_search_path_seq
- \seq_set_from_clist:NN \l_file_tmpa_seq \input@path
+ \seq_set_eq:NN \l_file_internal_saved_path_seq \l_file_search_path_seq
+ \seq_set_from_clist:NN \l_file_internal_seq \input@path
\seq_concat:NNN \l_file_search_path_seq
- \l_file_search_path_seq \l_file_tmpa_seq
+ \l_file_search_path_seq \l_file_internal_seq
}
%</package>
\seq_map_inline:Nn \l_file_search_path_seq
{
- \ior_open:Nn \g_file_test_ior { ##1 #1 }
- \ior_if_eof:NF \g_file_test_ior
+ \ior_open:Nn \g_file_internal_ior { ##1 #1 }
+ \ior_if_eof:NF \g_file_internal_ior
{
\tl_set:Nx #2 { ##1 #1 }
\seq_map_break:
@@ -332,9 +333,9 @@
}
%<*package>
\cs_if_exist:NT \input@path
- { \seq_set_eq:NN \l_file_search_path_seq \l_file_search_path_saved_seq }
+ { \seq_set_eq:NN \l_file_search_path_seq \l_file_internal_saved_path_seq }
%</package>
- \ior_close:N \g_file_test_ior
+ \ior_close:N \g_file_internal_ior
}
% \end{macrocode}
% \end{macro}
@@ -349,8 +350,8 @@
% \begin{macrocode}
\prg_new_protected_conditional:Nnn \file_if_exist:n { T , F , TF }
{
- \file_add_path:nN {#1} \l_file_name_tl
- \tl_if_empty:NTF \l_file_name_tl
+ \file_add_path:nN {#1} \l_file_internal_name_tl
+ \tl_if_empty:NTF \l_file_internal_name_tl
{ \prg_return_false: }
{ \prg_return_true: }
}
@@ -363,8 +364,8 @@
% \begin{macrocode}
\cs_new_protected:Npn \file_input:n #1
{
- \file_add_path:nN {#1} \l_file_name_tl
- \tl_if_empty:NF \l_file_name_tl
+ \file_add_path:nN {#1} \l_file_internal_name_tl
+ \tl_if_empty:NF \l_file_internal_name_tl
{
%<*initex>
\seq_gput_right:Nx \g_file_record_seq {#1}
@@ -374,7 +375,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 \c_space_tl
+ \exp_after:wN \tex_input:D \l_file_internal_name_tl \c_space_tl
\seq_gpop:NN \g_file_stack_seq \g_file_current_name_tl
}
}
@@ -415,8 +416,8 @@
%<*package>
\AtBeginDocument
{
- \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
+ \seq_set_from_clist:NN \l_file_internal_seq \@filelist
+ \seq_gconcat:NNN \g_file_record_seq \g_file_record_seq \l_file_internal_seq
}
%</package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3format.ins b/Master/texmf-dist/source/latex/l3kernel/l3format.ins
new file mode 100644
index 00000000000..ef01ceff9c7
--- /dev/null
+++ b/Master/texmf-dist/source/latex/l3kernel/l3format.ins
@@ -0,0 +1,77 @@
+\iffalse meta-comment
+
+File l3format.ins Copyright (C) 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
+license or (at your option) any later version. The latest version
+of this license is in the file
+
+ http://www.latex-project.org/lppl.txt
+
+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.
+
+\fi
+
+\input docstrip.tex
+\askforoverwritefalse
+
+\preamble
+
+EXPERIMENTAL CODE
+
+Do not distribute this file without also distributing the
+source files specified above.
+
+Do not distribute a modified version of this file.
+
+\endpreamble
+% stop docstrip adding \endinput
+\postamble
+\endpostamble
+
+\keepsilent
+
+\generate
+ {
+ \file{l3format.ltx}
+ {
+ \from{l3bootstrap.dtx}{initex}
+ \from{l3names.dtx} {initex}
+ \from{l3basics.dtx} {initex}
+ \from{l3expan.dtx} {initex}
+ \from{l3tl.dtx} {initex}
+ \from{l3seq.dtx} {initex}
+ % ===== FORMAT ONLY ======
+ \from{l3alloc.dtx} {initex}
+ % ========================
+ \from{l3int.dtx} {initex}
+ \from{l3quark.dtx} {initex}
+ \from{l3prg.dtx} {initex}
+ \from{l3clist.dtx} {initex}
+ \from{l3token.dtx} {initex}
+ \from{l3prop.dtx} {initex}
+ \from{l3msg.dtx} {initex}
+ \from{l3io.dtx} {initex}
+ \from{l3file.dtx} {initex}
+ \from{l3skip.dtx} {initex}
+ \from{l3keys.dtx} {initex}
+ \from{l3fp.dtx} {initex}
+ \from{l3box.dtx} {initex}
+ \from{l3coffins.dtx} {initex}
+ \from{l3color.dtx} {initex}
+ \from{l3luatex.dtx} {initex}
+ % ===== FORMAT ONLY ======
+ \from{l3final.dtx} {initex}
+ % ========================
+ }
+ }
+
+\generate{\file{l3dvips.ltx} {\from{l3drivers.dtx}{initex,dvips} }}
+\generate{\file{l3pdfmode.ltx} {\from{l3drivers.dtx}{initex,pdfmode} }}
+\generate{\file{l3xdvipdfmx.ltx}{\from{l3drivers.dtx}{initex,xdvipdfmx}}}
+
+\endbatchfile \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
index 82c1a9f6f59..35213537c69 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3fp.dtx Copyright (C) 2010,2011 The LaTeX3 Project
+%% File: l3fp.dtx Copyright (C) 2010-2012 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
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3fp.dtx 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3fp.dtx 3154 2012-01-08 22:46:28Z bruno $
{L3 Experimental floating-point operations}
%</driver|package>
%<*driver>
@@ -144,6 +144,17 @@
% Sets the \meta{floating point variable} to |+0.000000000e0|.
% \end{function}
%
+% \begin{function}[added = 2012-01-07]
+% {\fp_zero_new:N, \fp_zero_new:c, \fp_gzero_new:N, \fp_gzero_new:c}
+% \begin{syntax}
+% \cs{fp_zero_new:N} \meta{floating point variable}
+% \end{syntax}
+% Ensures that the \meta{floating point variable} exists globally
+% by applying \cs{fp_new:N} if necessary, then applies
+% \cs{fp_(g)zero:N} to leave the \meta{floating point variable}
+% set to zero.
+% \end{function}
+%
% \begin{function}{\fp_set:Nn, \fp_set:cn, \fp_gset:Nn, \fp_gset:cn}
% \begin{syntax}
% \cs{fp_set:Nn} \meta{floating point variable} \Arg{value}
@@ -815,18 +826,18 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l_fp_tmp_int}
+% \begin{variable}{\l_fp_internal_int}
% A scratch \texttt{int}: used only where the value is not carried
% forward.
% \begin{macrocode}
-\int_new:N \l_fp_tmp_int
+\int_new:N \l_fp_internal_int
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l_fp_tmp_tl}
+% \begin{variable}{\l_fp_internal_tl}
% A scratch token list variable for expanding material.
% \begin{macrocode}
-\tl_new:N \l_fp_tmp_tl
+\tl_new:N \l_fp_internal_tl
% \end{macrocode}
% \end{variable}
%
@@ -895,34 +906,34 @@
% \begin{macrocode}
\cs_new_protected:Npn \fp_split:Nn #1#2
{
- \tl_set:Nx \l_fp_tmp_tl {#2}
- \tl_set_rescan:Nno \l_fp_tmp_tl { \char_set_catcode_ignore:n { 32 } }
- { \l_fp_tmp_tl }
+ \tl_set:Nx \l_fp_internal_tl {#2}
+ \tl_set_rescan:Nno \l_fp_internal_tl { \char_set_catcode_ignore:n { 32 } }
+ { \l_fp_internal_tl }
\l_fp_split_sign_int \c_one
\fp_split_sign:
\use:c { l_fp_input_ #1 _sign_int } \l_fp_split_sign_int
- \exp_after:wN \fp_split_exponent:w \l_fp_tmp_tl e e \q_stop #1
+ \exp_after:wN \fp_split_exponent:w \l_fp_internal_tl e e \q_stop #1
}
\cs_new_protected_nopar:Npn \fp_split_sign:
{
\if_int_compare:w \pdftex_strcmp:D
- { \exp_after:wN \tl_head:w \l_fp_tmp_tl ? \q_stop } { - }
+ { \exp_after:wN \tl_head:w \l_fp_internal_tl ? \q_stop } { - }
= \c_zero
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
\exp_after:wN
- \tl_tail:w \l_fp_tmp_tl \prg_do_nothing: \q_stop
+ \tl_tail:w \l_fp_internal_tl \prg_do_nothing: \q_stop
}
\l_fp_split_sign_int -\l_fp_split_sign_int
\exp_after:wN \fp_split_sign:
\else:
\if_int_compare:w \pdftex_strcmp:D
- { \exp_after:wN \tl_head:w \l_fp_tmp_tl ? \q_stop } { + }
+ { \exp_after:wN \tl_head:w \l_fp_internal_tl ? \q_stop } { + }
= \c_zero
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
\exp_after:wN
- \tl_tail:w \l_fp_tmp_tl \prg_do_nothing: \q_stop
+ \tl_tail:w \l_fp_internal_tl \prg_do_nothing: \q_stop
}
\exp_after:wN \exp_after:wN \exp_after:wN \fp_split_sign:
\fi:
@@ -942,9 +953,9 @@
{ \fp_split_aux_iii:w {#1#2#3#4#5#6#7#8#9} }
\cs_new_protected:Npn \fp_split_aux_iii:w #1#2 \q_stop
{
- \l_fp_tmp_int 1 #1 \scan_stop:
+ \l_fp_internal_int 1 #1 \scan_stop:
\exp_after:wN \fp_split_decimal:w
- \int_use:N \l_fp_tmp_int 000000000 \q_stop
+ \int_use:N \l_fp_internal_int 000000000 \q_stop
}
\cs_new_protected:Npn \fp_split_decimal:w #1#2#3#4#5#6#7#8#9
{ \fp_split_decimal_aux:w {#2#3#4#5#6#7#8#9} }
@@ -1029,12 +1040,12 @@
#2 ##1##2##3##4##5##6##7##8 \scan_stop:
\tex_advance:D #3 \c_one_thousand_million
\tex_divide:D #3 \c_ten
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
##9
\exp_after:wN \use_none:n \int_use:N #3
}
- #3 \l_fp_tmp_tl \scan_stop:
+ #3 \l_fp_internal_tl \scan_stop:
\tex_advance:D #4 \c_one
}
\fp_standardise_aux:
@@ -1093,13 +1104,13 @@
\l_fp_input_b_integer_int #1#2#3#4#5#6#7#8 \scan_stop:
\tex_advance:D \l_fp_input_b_decimal_int \c_one_thousand_million
\tex_divide:D \l_fp_input_b_decimal_int \c_ten
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
#9
\exp_after:wN \use_none:n
\int_use:N \l_fp_input_b_decimal_int
}
- \l_fp_input_b_decimal_int \l_fp_tmp_tl \scan_stop:
+ \l_fp_input_b_decimal_int \l_fp_internal_tl \scan_stop:
\tex_advance:D \l_fp_input_b_exponent_int \c_one
}
\cs_new_protected_nopar:Npn \fp_level_input_exponents_b:
@@ -1118,13 +1129,13 @@
\l_fp_input_a_integer_int #1#2#3#4#5#6#7#8 \scan_stop:
\tex_advance:D \l_fp_input_a_decimal_int \c_one_thousand_million
\tex_divide:D \l_fp_input_a_decimal_int \c_ten
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
#9
\exp_after:wN \use_none:n
\int_use:N \l_fp_input_a_decimal_int
}
- \l_fp_input_a_decimal_int \l_fp_tmp_tl \scan_stop:
+ \l_fp_input_a_decimal_int \l_fp_internal_tl \scan_stop:
\tex_advance:D \l_fp_input_a_exponent_int \c_one
}
% \end{macrocode}
@@ -1193,6 +1204,19 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}
+% {\fp_zero_new:N, \fp_zero_new:c, \fp_gzero_new:N, \fp_gzero_new:c}
+% Create a floating point if needed, otherwise clear it.
+% \begin{macrocode}
+\cs_new_protected:Npn \fp_zero_new:N #1
+ { \cs_if_exist:NTF #1 { \fp_zero:N #1 } { \fp_new:N #1 } }
+\cs_new_protected:Npn \fp_gzero_new:N #1
+ { \cs_if_exist:NTF #1 { \fp_gzero:N #1 } { \fp_new:N #1 } }
+\cs_generate_variant:Nn \fp_zero_new:N { c }
+\cs_generate_variant:Nn \fp_gzero_new:N { c }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\fp_set:Nn, \fp_set:cn}
% \UnitTested
% \begin{macro}{\fp_gset:Nn, \fp_gset:cn}
@@ -1250,8 +1274,8 @@
% \UnitTested
% \begin{macro}[aux]{\fp_set_from_dim_aux:NNn}
% \begin{macro}[aux]{\fp_set_from_dim_aux:w}
-% \begin{variable}{\l_fp_tmp_dim}
-% \begin{variable}{\l_fp_tmp_skip}
+% \begin{variable}{\l_fp_internal_dim}
+% \begin{variable}{\l_fp_internal_skip}
% Here, dimensions are converted to fixed-points \emph{via} a
% temporary variable. This ensures that they always convert as points.
% The code is then essentially the same as for \cs{fp_set:Nn}, but with
@@ -1266,12 +1290,12 @@
\cs_new_protected:Npn \fp_set_from_dim_aux:NNn #1#2#3
{
\group_begin:
- \l_fp_tmp_skip \etex_glueexpr:D #3 \scan_stop:
- \l_fp_tmp_dim \l_fp_tmp_skip
+ \l_fp_internal_skip \etex_glueexpr:D #3 \scan_stop:
+ \l_fp_internal_dim \l_fp_internal_skip
\fp_split:Nn a
{
\exp_after:wN \fp_set_from_dim_aux:w
- \dim_use:N \l_fp_tmp_dim
+ \dim_use:N \l_fp_internal_dim
}
\fp_standardise:NNNN
\l_fp_input_a_sign_int
@@ -1307,8 +1331,8 @@
\fp_set_from_dim_aux:w
\cs_generate_variant:Nn \fp_set_from_dim:Nn { c }
\cs_generate_variant:Nn \fp_gset_from_dim:Nn { c }
-\dim_new:N \l_fp_tmp_dim
-\skip_new:N \l_fp_tmp_skip
+\dim_new:N \l_fp_internal_dim
+\skip_new:N \l_fp_internal_skip
% \end{macrocode}
% \end{variable}
% \end{variable}
@@ -2030,15 +2054,15 @@
{
\if_int_compare:w \l_fp_round_position_int < \l_fp_round_target_int
\bool_if:NTF \l_fp_round_carry_bool
- { \l_fp_tmp_int \int_eval:w #1 + \c_one \scan_stop: }
- { \l_fp_tmp_int \int_eval:w #1 \scan_stop: }
- \if_int_compare:w \l_fp_tmp_int = \c_ten
- \l_fp_tmp_int \c_zero
+ { \l_fp_internal_int \int_eval:w #1 + \c_one \scan_stop: }
+ { \l_fp_internal_int \int_eval:w #1 \scan_stop: }
+ \if_int_compare:w \l_fp_internal_int = \c_ten
+ \l_fp_internal_int \c_zero
\else:
\bool_set_false:N \l_fp_round_carry_bool
\fi:
\tl_set:Nx \l_fp_round_decimal_tl
- { \int_use:N \l_fp_tmp_int \l_fp_round_decimal_tl }
+ { \int_use:N \l_fp_internal_int \l_fp_round_decimal_tl }
\else:
\tl_set:Nx \l_fp_round_decimal_tl { 0 \l_fp_round_decimal_tl }
\if_int_compare:w \l_fp_round_position_int = \l_fp_round_target_int
@@ -2114,7 +2138,7 @@
\group_begin:
\fp_read:N #2
\tex_advance:D \l_fp_input_a_decimal_int \c_one_thousand_million
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
\if_int_compare:w \l_fp_input_a_sign_int < \c_zero
+
@@ -2129,7 +2153,7 @@
\int_use:N \l_fp_input_a_exponent_int
}
\exp_after:wN \group_end: \exp_after:wN
- #1 \exp_after:wN #2 \exp_after:wN { \l_fp_tmp_tl }
+ #1 \exp_after:wN #2 \exp_after:wN { \l_fp_internal_tl }
}
% \end{macrocode}
% \end{macro}
@@ -2883,16 +2907,16 @@
% \begin{macrocode}
\cs_new_protected:Npn \fp_div_integer:NNNNN #1#2#3#4#5
{
- \l_fp_tmp_int #1
- \tex_divide:D \l_fp_tmp_int #3
- \l_fp_tmp_int \int_eval:w #1 - \l_fp_tmp_int * #3 \int_eval_end:
+ \l_fp_internal_int #1
+ \tex_divide:D \l_fp_internal_int #3
+ \l_fp_internal_int \int_eval:w #1 - \l_fp_internal_int * #3 \int_eval_end:
#4 #1
\tex_divide:D #4 #3
#5 #2
\tex_divide:D #5 #3
- \tex_multiply:D \l_fp_tmp_int \c_one_thousand
- \tex_divide:D \l_fp_tmp_int #3
- #5 \int_eval:w #5 + \l_fp_tmp_int * \c_one_million \int_eval_end:
+ \tex_multiply:D \l_fp_internal_int \c_one_thousand
+ \tex_divide:D \l_fp_internal_int #3
+ #5 \int_eval:w #5 + \l_fp_internal_int * \c_one_million \int_eval_end:
\if_int_compare:w #5 > \c_one_thousand_million
\tex_advance:D #4 \c_one
\tex_advance:D #5 -\c_one_thousand_million
@@ -2962,21 +2986,21 @@
\if_int_compare:w \l_fp_input_a_integer_int = \c_zero
\l_fp_input_a_decimal_int #1#2#3#4#5#6#7#8 \scan_stop:
\else:
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
\int_use:N \l_fp_input_a_integer_int
#1#2#3#4#5#6#7#8
}
\l_fp_input_a_integer_int \c_zero
- \l_fp_input_a_decimal_int \l_fp_tmp_tl \scan_stop:
+ \l_fp_input_a_decimal_int \l_fp_internal_tl \scan_stop:
\fi:
\tex_divide:D \l_fp_input_a_extended_int \c_ten
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
#9
\int_use:N \l_fp_input_a_extended_int
}
- \l_fp_input_a_extended_int \l_fp_tmp_tl \scan_stop:
+ \l_fp_input_a_extended_int \l_fp_internal_tl \scan_stop:
\tex_advance:D \l_fp_input_a_exponent_int \c_one
}
% \end{macrocode}
@@ -3010,14 +3034,14 @@
{
\l_fp_output_integer_int #1#2#3#4#5#6#7#8 \scan_stop:
\tex_advance:D \l_fp_output_decimal_int \c_one_thousand_million
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
#9
\exp_after:wN \use_none:n
\int_use:N \l_fp_output_decimal_int
}
\exp_after:wN \fp_extended_normalise_output_aux_ii:NNNNNNNNN
- \l_fp_tmp_tl
+ \l_fp_internal_tl
}
\cs_new_protected:Npn \fp_extended_normalise_output_aux_ii:NNNNNNNNN
#1#2#3#4#5#6#7#8#9
@@ -3029,13 +3053,13 @@
{
\tex_advance:D \l_fp_output_extended_int \c_one_thousand_million
\tex_divide:D \l_fp_output_extended_int \c_ten
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
#1
\exp_after:wN \use_none:n
\int_use:N \l_fp_output_extended_int
}
- \l_fp_output_extended_int \l_fp_tmp_tl \scan_stop:
+ \l_fp_output_extended_int \l_fp_internal_tl \scan_stop:
\tex_advance:D \l_fp_output_exponent_int \c_one
}
% \end{macrocode}
@@ -4043,27 +4067,27 @@
\l_fp_exp_exponent_int \c_zero
\exp_after:wN \fp_exp_integer_tens:
\else:
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
\exp_after:wN \use_i:nnn
\int_use:N \l_fp_input_a_integer_int
}
\l_fp_input_a_integer_int
\int_eval:w
- \l_fp_input_a_integer_int - \l_fp_tmp_tl 00
+ \l_fp_input_a_integer_int - \l_fp_internal_tl 00
\int_eval_end:
\if_int_compare:w \l_fp_input_a_sign_int < \c_zero
\if_int_compare:w \l_fp_output_integer_int > 200 \scan_stop:
\fp_exp_const:cx { c_fp_exp ( \l_fp_arg_tl ) _fp }
{ \c_zero_fp }
\else:
- \fp_exp_integer_const:n { - \l_fp_tmp_tl 00 }
+ \fp_exp_integer_const:n { - \l_fp_internal_tl 00 }
\exp_after:wN \exp_after:wN \exp_after:wN
\exp_after:wN \exp_after:wN \exp_after:wN
\exp_after:wN \fp_exp_integer_tens:
\fi:
\else:
- \fp_exp_integer_const:n { \l_fp_tmp_tl 00 }
+ \fp_exp_integer_const:n { \l_fp_internal_tl 00 }
\exp_after:wN \exp_after:wN \exp_after:wN
\exp_after:wN \fp_exp_integer_tens:
\fi:
@@ -4081,19 +4105,19 @@
\l_fp_output_extended_int \l_fp_exp_extended_int
\l_fp_output_exponent_int \l_fp_exp_exponent_int
\if_int_compare:w \l_fp_input_a_integer_int > \c_nine
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
\exp_after:wN \use_i:nn
\int_use:N \l_fp_input_a_integer_int
}
\l_fp_input_a_integer_int
\int_eval:w
- \l_fp_input_a_integer_int - \l_fp_tmp_tl 0
+ \l_fp_input_a_integer_int - \l_fp_internal_tl 0
\int_eval_end:
\if_int_compare:w \l_fp_input_a_sign_int > \c_zero
- \fp_exp_integer_const:n { \l_fp_tmp_tl 0 }
+ \fp_exp_integer_const:n { \l_fp_internal_tl 0 }
\else:
- \fp_exp_integer_const:n { - \l_fp_tmp_tl 0 }
+ \fp_exp_integer_const:n { - \l_fp_internal_tl 0 }
\fi:
\fp_mul:NNNNNNNNN
\l_fp_exp_integer_int \l_fp_exp_decimal_int \l_fp_exp_extended_int
@@ -4562,21 +4586,21 @@
\if_int_compare:w \l_fp_exp_integer_int = \c_zero
\l_fp_exp_decimal_int #1#2#3#4#5#6#7#8 \scan_stop:
\else:
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
\int_use:N \l_fp_exp_integer_int
#1#2#3#4#5#6#7#8
}
\l_fp_exp_integer_int \c_zero
- \l_fp_exp_decimal_int \l_fp_tmp_tl \scan_stop:
+ \l_fp_exp_decimal_int \l_fp_internal_tl \scan_stop:
\fi:
\tex_divide:D \l_fp_exp_extended_int \c_ten
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
#9
\int_use:N \l_fp_exp_extended_int
}
- \l_fp_exp_extended_int \l_fp_tmp_tl \scan_stop:
+ \l_fp_exp_extended_int \l_fp_internal_tl \scan_stop:
\tex_advance:D \l_fp_exp_exponent_int \c_one
}
% \end{macrocode}
@@ -4769,13 +4793,13 @@
\if_int_compare:w \l_fp_output_integer_int = \c_zero
\l_fp_output_decimal_int #1#2#3#4#5#6#7#8 \scan_stop:
\else:
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
\int_use:N \l_fp_output_integer_int
#1#2#3#4#5#6#7#8
}
\l_fp_output_integer_int \c_zero
- \l_fp_output_decimal_int \l_fp_tmp_tl \scan_stop:
+ \l_fp_output_decimal_int \l_fp_internal_tl \scan_stop:
\fi:
\tex_advance:D \l_fp_output_exponent_int \c_one
}
@@ -5350,7 +5374,7 @@
% \begin{macrocode}
\cs_new_protected_nopar:cpn { fp_compare_<: }
{
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
\int_set:Nn \exp_not:N \l_fp_input_a_sign_int
{ \int_use:N \l_fp_input_b_sign_int }
@@ -5369,7 +5393,7 @@
\int_set:Nn \exp_not:N \l_fp_input_b_exponent_int
{ \int_use:N \l_fp_input_a_exponent_int }
}
- \l_fp_tmp_tl
+ \l_fp_internal_tl
\use:c { fp_compare_>: }
}
% \end{macrocode}
@@ -5397,12 +5421,12 @@
\prg_new_protected_conditional:Npnn \fp_compare:n #1 { T , F , TF }
{
\group_begin:
- \tl_set:Nx \l_fp_tmp_tl
+ \tl_set:Nx \l_fp_internal_tl
{
\group_end:
\fp_compare_aux_i:w #1 \exp_not:n { == \q_nil == \q_stop }
}
- \l_fp_tmp_tl
+ \l_fp_internal_tl
}
\cs_new_protected:Npn \fp_compare_aux_i:w #1 == #2 == #3 \q_stop
{
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
index 2d5be22ab66..db82e1993a1 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3int.dtx Copyright (C) 1990-2011 The LaTeX3 Project
+%% File: l3int.dtx Copyright (C) 1990-2012 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
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3int.dtx 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3int.dtx 3139 2012-01-07 19:53:09Z bruno $
{L3 Experimental integers}
%</driver|package>
%<*driver>
@@ -192,7 +192,7 @@
% \end{syntax}
% Ensures that the \meta{integer} exists globally by applying
% \cs{int_new:N} if necessary, then applies \cs{int_(g)zero:N} to leave
-% the \meta{integer} is set to zero.
+% the \meta{integer} set to zero.
% \end{function}
%
% \begin{function}
@@ -302,9 +302,9 @@
% \begin{center}
% \begin{tabular}{ll}
% Equal & |=| or |==| \\
-% Greater than or equal to & |=>| \\
+% Greater than or equal to & |>=| \\
% Greater than & |>| \\
-% Less than or equal to & |=<| \\
+% Less than or equal to & |<=| \\
% Less than & |<| \\
% Not equal & |!=| \\
% \end{tabular}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3io.dtx b/Master/texmf-dist/source/latex/l3kernel/l3io.dtx
index 4eb4829b4df..da17b8f5efb 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3io.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3io.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3io.dtx Copyright (C) 1990-2011 The LaTeX3 Project
+%% File: l3io.dtx Copyright (C) 1990-2012 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
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3io.dtx 3096 2011-12-27 09:09:18Z joseph $
+\GetIdInfo$Id: l3io.dtx 3160 2012-01-09 02:33:23Z bruno $
{L3 Experimental input-output operations}
%</driver|package>
%<*driver>
@@ -305,71 +305,36 @@
%
% \section{Reading from files}
%
-% \begin{function}{\ior_to:NN}
+% \begin{function}{\ior_to:NN,\ior_gto:NN}
% \begin{syntax}
% \cs{ior_to:NN} \meta{stream} \meta{token list variable}
% \end{syntax}
% Functions that reads one or more lines (until an equal number of left
% and right braces are found) from the input \meta{stream} and stores
-% the result locally in the \meta{token list} variable. If the
+% the result in the \meta{token list} variable, locally or globally. If the
% \meta{stream} is not open, input is requested from the terminal.
% The material read from the \meta{stream} will be tokenized by
% \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 \tn{read}
-% along with the |to| keyword.
+% This protected macro expands to the \TeX{} primitives \tn{read}
+% or \tn{global}\tn{read} along with the |to| keyword.
% \end{texnote}
% \end{function}
%
-% \begin{function}{\ior_gto:NN}
-% \begin{syntax}
-% \cs{ior_gto:NN} \meta{stream} \meta{token list variable}
-% \end{syntax}
-% Functions that reads one or more lines (until an equal number of left
-% and right braces are found) from the input \meta{stream} and stores
-% the result globally in the \meta{token list} variable. If the
-% \meta{stream} is not open, input is requested from the terminal.
-% The material read from the \meta{stream} will be tokenized by
-% \TeX{} according to the category codes in force when the function
-% is used.
-% \begin{texnote}
-% The is protected macro which expands to the \TeX{} primitives
-% \tn{global}\tn{read} along with the |to| keyword.
-% \end{texnote}
-% \end{function}
-%
-% \begin{function}{\ior_str_to:NN}
+% \begin{function}{\ior_str_to:NN,\ior_str_gto:NN}
% \begin{syntax}
% \cs{ior_str_to:NN} \meta{stream} \meta{token list variable}
% \end{syntax}
-% Functions that reads one or more lines (until an equal number of left
-% and right braces are found) from the input \meta{stream} and stores
-% the result locally in the \meta{token list} variable. If the
-% \meta{stream} is not open, input is requested from the terminal.
-% The material read from the \meta{stream} as a series of tokens with
-% category code $12$ (other), with the exception of space
-% characters which are given category code $10$ (space).
-% \begin{texnote}
-% The is protected macro which expands to the \eTeX{} primitive
-% \tn{readline} along with the |to| keyword.
-% \end{texnote}
-% \end{function}
-%
-% \begin{function}{\ior_str_gto:NN}
-% \begin{syntax}
-% \cs{ior_str_gto:NN} \meta{stream} \meta{token list variable}
-% \end{syntax}
-% Functions that reads one or more lines (until an equal number of left
-% and right braces are found) from the input \meta{stream} and stores
-% the result globally in the \meta{token list} variable. If the
+% Functions that reads one line from the input \meta{stream} and stores
+% the result in the \meta{token list} variable, locally or globally. If the
% \meta{stream} is not open, input is requested from the terminal.
% The material read from the \meta{stream} as a series of tokens with
% category code $12$ (other), with the exception of space
% characters which are given category code $10$ (space).
% \begin{texnote}
-% The is protected macro which expands to the primitives
-% \tn{global}\tn{readline} along with the |to| keyword.
+% This protected macro expands to the \eTeX{} primitives \tn{readline}
+% or \tn{global}\tn{readline} along with the |to| keyword.
% \end{texnote}
% \end{function}
%
@@ -385,8 +350,8 @@
%\end{function}
%
% \section{Constants}
-%
-% \begin{variable}{\c_ior_term_ior}
+%
+% \begin{variable}{\c_term_ior}
% Constant input stream for reading from the terminal. Reading from this
% stream using \cs{ior_to:NN} or similar will result in a prompt from
% \TeX{} of the form
@@ -394,12 +359,40 @@
% <tl>=
% \end{verbatim}
% \end{variable}
-%
-% \begin{variable}{\c_iow_log_iow, \c_iow_term_iow}
+%
+% \begin{variable}{\c_log_iow, \c_term_iow}
% Constant output streams for writing to the log and to the terminal
% (plus the log), respectively.
% \end{variable}
%
+% \section{Experimental functions}
+%
+% \begin{function}{\ior_map_inline:nn}
+% \begin{syntax}
+% \cs{ior_map_inline:nn} \Arg{file name} \Arg{inline function}
+% \end{syntax}
+% Applies the \meta{inline function} to \meta{items} obtained by
+% reading one or more lines (until an equal number of left and right
+% braces are found) from the \meta{file}. The \meta{inline function}
+% should consist of code which will receive the \meta{line} as |#1|.
+% One in line mapping can be nested inside another.
+% If the file is not found, the \meta{inline function} is never called.
+% \end{function}
+%
+% \begin{function}{\ior_str_map_inline:nn}
+% \begin{syntax}
+% \cs{ior_str_map_inline:nn} \Arg{file name} \Arg{inline function}
+% \end{syntax}
+% Applies the \meta{inline function} to every \meta{line}
+% in the \meta{file}. The material is read from the \meta{file}
+% as a series of tokens with category code $12$ (other), with the
+% exception of space characters which are given category code $10$
+% (space). The \meta{inline function} should consist of code which
+% will receive the \meta{line} as |#1|.
+% One in line mapping can be nested inside another.
+% If the file is not found, the \meta{inline function} is never called.
+% \end{function}
+%
% \section{Internal input--output functions}
%
% \begin{function}[EXP]{\if_eof:w}
@@ -463,7 +456,7 @@
% \end{macro}
%
% \subsection{Variables and constants}
-%
+%
% \begin{variable}{\c_term_ior}
% Reading from the terminal (with a prompt) is done using a positive
% but non-existent stream number. Unlike writing, there is no concept
@@ -642,8 +635,8 @@
% \begin{macro}[aux]{\ior_stream_alloc:N}
% \begin{macro}[aux]{\iow_stream_alloc_aux:}
% \begin{macro}[aux]{\ior_stream_alloc_aux:}
-% \begin{variable}{\g_iow_tmp_stream}
-% \begin{variable}{\g_ior_tmp_stream}
+% \begin{variable}{\g_iow_internal_iow}
+% \begin{variable}{\g_ior_internal_ior}
% Allocating a raw stream is much easier in \IniTeX{} mode than for
% the package. For the format, all streams will be allocated by
% \pkg{l3io} and so there is a simple check to see if a raw
@@ -654,6 +647,8 @@
% one is needed, we get the number allocated by \LaTeXe{} to get
% \enquote{back on track} with allocation.
% \begin{macrocode}
+\iow_new:N \g_iow_internal_iow
+\ior_new:N \g_ior_internal_ior
\cs_new_protected:Npn \iow_stream_alloc:N #1
{
\cs_if_exist:cTF { g_iow_ \int_use:N \l_iow_stream_int _iow }
@@ -663,10 +658,10 @@
\iow_stream_alloc_aux:
\int_compare:nNnT \l_iow_stream_int = \c_sixteen
{
- \iow_raw_new:N \g_iow_tmp_iow
- \int_set:Nn \l_iow_stream_int { \g_iow_tmp_iow }
+ \iow_raw_new:N \g_iow_internal_iow
+ \int_set:Nn \l_iow_stream_int { \g_iow_internal_iow }
\cs_gset_eq:cN
- { g_iow_ \int_use:N \l_iow_stream_int _iow } \g_iow_tmp_iow
+ { g_iow_ \int_use:N \l_iow_stream_int _iow } \g_iow_internal_iow
}
%</package>
%<*initex>
@@ -699,10 +694,10 @@
\ior_stream_alloc_aux:
\int_compare:nNnT \l_ior_stream_int = \c_sixteen
{
- \ior_raw_new:N \g_ior_tmp_ior
- \int_set:Nn \l_ior_stream_int { \g_ior_tmp_ior }
+ \ior_raw_new:N \g_ior_internal_ior
+ \int_set:Nn \l_ior_stream_int { \g_ior_internal_ior }
\cs_gset_eq:cN
- { g_ior_ \int_use:N \l_iow_stream_int _ior } \g_ior_tmp_ior
+ { g_ior_ \int_use:N \l_iow_stream_int _ior } \g_ior_internal_ior
}
%</package>
%<*initex>
@@ -899,7 +894,7 @@
% available for other uses.
%
% \begin{macro}{\l_iow_line_length_int}
-% The is the \enquote{raw} length of a line which can be written to a
+% This is the \enquote{raw} length of a line which can be written to a
% file. The standard value is the line length typically used by
% \TeX{}Live and Mik\TeX{}.
% \begin{macrocode}
@@ -1300,6 +1295,68 @@
% \end{macro}
% \end{macro}
%
+% \subsection{Experimental functions}
+%
+% \begin{macro}{\ior_map_inline:nn}
+% \begin{macro}{\ior_str_map_inline:nn}
+% \begin{macro}[aux]{\ior_str_map_inline_aux:Nnn}
+% \begin{macro}[aux]{\ior_str_map_inline_aux:NNNnn}
+% \begin{macro}[aux]{\ior_str_map_inline_loop:NNN}
+% \begin{variable}{\l_ior_internal_tl}
+% The five arguments of \cs{ior_str_map_inline_aux:NNNnn} are:
+% the read stream used at this level of map nesting;
+% the control sequence which will hold the function to map;
+% either \cs{ior_to:NN} or \cs{ior_str_to:NN}; the file name;
+% and finally the inline function. We make sure to decrease
+% \cs{g_prg_map_int} and close the file after the mapping,
+% even if the mapping exits prematurely because of a
+% \cs{prg_map_break:} instruction. The \cs{ior_if_eof:nF}
+% tests are a little bit tricky to get right: if the file
+% does not exist, we should do nothing, hence the preliminary
+% test. Then the end-of-file test must be done after reading
+% each line.
+% \begin{macrocode}
+\tl_new:N \l_ior_internal_tl
+\cs_new_protected_nopar:Npn \ior_map_inline:nn
+ { \ior_map_inline_aux:Nnn \ior_to:NN }
+\cs_new_protected_nopar:Npn \ior_str_map_inline:nn
+ { \ior_map_inline_aux:Nnn \ior_str_to:NN }
+\cs_new_protected_nopar:Npn \ior_map_inline_aux:Nnn
+ {
+ \exp_args:Ncc \ior_map_inline_aux:NNNnn
+ { g_ior_map_ \int_use:N \g_prg_map_int _ior }
+ { ior_map_ \int_use:N \g_prg_map_int :n }
+ }
+\cs_new_protected:Npn \ior_map_inline_aux:NNNnn #1#2#3#4#5
+ {
+ \cs_if_exist:NF #1 { \ior_new:N #1 }
+ \cs_set:Npn #2 ##1 {#5}
+ \ior_open:Nn #1 {#4}
+ \int_gincr:N \g_prg_map_int
+ \ior_if_eof:NF #1 { \ior_map_inline_loop:NNN #1#2#3 }
+ \prg_break_point:n
+ {
+ \int_gdecr:N \g_prg_map_int
+ \ior_close:N #1
+ }
+ }
+\cs_new_protected:Npn \ior_map_inline_loop:NNN #1#2#3
+ {
+ #3 #1 \l_ior_internal_tl
+ \ior_if_eof:NF #1
+ {
+ \exp_args:No #2 \l_ior_internal_tl
+ \ior_map_inline_loop:NNN #1#2#3
+ }
+ }
+% \end{macrocode}
+% \end{variable}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Deprecated functions}
%
% Deprecated on 2011-05-27, for removal by 2011-08-31.
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
index baf21f14990..15e6c362d75 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3luatex.dtx Copyright (C) 2010,2011 The LaTeX3 Project
+%% File: l3luatex.dtx Copyright (C) 2010-2012 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
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3luatex.dtx 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3luatex.dtx 3158 2012-01-09 00:47:42Z bruno $
{L3 Experimental LuaTeX-specific functions}
%</driver|package>
%<*driver>
@@ -340,7 +340,7 @@
%
% \begin{macro}{\cctab_begin:N}
% \begin{macro}{\cctab_end:}
-% \begin{variable}{\l_cctab_tmp_tl}
+% \begin{variable}{\l_cctab_internal_tl}
% The aim here is to ensure that the saved tables are read-only. This is
% done by using a stack of tables which are not read only, and actually
% having them as \enquote{in use} copies.
@@ -359,9 +359,9 @@
{
\int_gsub:Nn \g_cctab_stack_int { \c_two }
\seq_if_empty:NTF \g_cctab_stack_seq
- { \tl_set:Nn \l_cctab_tmp_tl { 0 } }
- { \seq_gpop:NN \g_cctab_stack_seq \l_cctab_tmp_tl }
- \luatex_catcodetable:D \l_cctab_tmp_tl \scan_stop:
+ { \tl_set:Nn \l_cctab_internal_tl { 0 } }
+ { \seq_gpop:NN \g_cctab_stack_seq \l_cctab_internal_tl }
+ \luatex_catcodetable:D \l_cctab_internal_tl \scan_stop:
}
\luatex_if_engine:F
{
@@ -383,7 +383,7 @@
\cs_set_protected_nopar:Npn \cctab_end: { \EndCatcodeRegime }
}
%</package>
-\tl_new:N \l_cctab_tmp_tl
+\tl_new:N \l_cctab_internal_tl
% \end{macrocode}
% \end{variable}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index 89b6953da83..510747c1068 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3msg.dtx Copyright (C) 2009-2011 The LaTeX3 Project
+%% File: l3msg.dtx Copyright (C) 2009-2012 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
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3msg.dtx 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3msg.dtx 3153 2012-01-08 22:05:30Z bruno $
{L3 Experimental messages}
%</driver|package>
%<*driver>
@@ -719,10 +719,10 @@
%</package>
% \end{macrocode}
%
-% \begin{variable}{\l_msg_tmp_tl}
+% \begin{variable}{\l_msg_internal_tl}
% A general scratch for the module.
% \begin{macrocode}
-\tl_new:N \l_msg_tmp_tl
+\tl_new:N \l_msg_internal_tl
% \end{macrocode}
% \end{variable}
%
@@ -932,10 +932,10 @@
\cs_new_protected:Npn \msg_interrupt_more_text:n #1
{
%<*initex>
- \tl_set:Nx \l_msg_tmp_tl
+ \tl_set:Nx \l_msg_internal_tl
%</initex>
%<*package>
- \protected@edef \l_msg_tmp_tl
+ \protected@edef \l_msg_internal_tl
%</package>
{
|'''''''''''''''''''''''''''''''''''''''''''''''
@@ -943,7 +943,7 @@
\msg_newline:
|...............................................
}
- \tex_errhelp:D \exp_after:wN { \l_msg_tmp_tl }
+ \tex_errhelp:D \exp_after:wN { \l_msg_internal_tl }
}
% \end{macrocode}
% The business end of the process starts by producing some visual
@@ -1661,22 +1661,22 @@
% \begin{macrocode}
\msg_kernel_new:nnn { seq } { show }
{
- Sequence~\token_to_str:N #1~
+ The~sequence~\token_to_str:N #1~
\seq_if_empty:NTF #1
{ is~empty }
{ contains~the~items~(without~outer~braces): }
}
\msg_kernel_new:nnn { prop } { show }
{
- Property~list~\token_to_str:N #1~
+ The~property~list~\token_to_str:N #1~
\prop_if_empty:NTF #1
{ is~empty }
{ contains~the~pairs~(without~outer~braces): }
}
\msg_kernel_new:nnn { clist } { show }
{
- Comma~list~
- \str_if_eq:nnF {#1} { \l_clist_tmpa_clist } { \token_to_str:N #1~}
+ The~comma~list~
+ \str_if_eq:nnF {#1} { \l_clist_internal_clist } { \token_to_str:N #1~}
\clist_if_empty:NTF #1
{ is~empty }
{ contains~the~items~(without~outer~braces): }
@@ -1788,14 +1788,6 @@
% Functions defined in this section are used for diagnostic functions
% in \pkg{l3clist}, \pkg{l3io}, \pkg{l3prop}, \pkg{l3seq}, \pkg{xtemplate}
%
-% \begin{variable}{\l_msg_show_tl}
-% Used to store the material for the diagnostic functions
-% of various modules.
-% \begin{macrocode}
-\tl_new:N \l_msg_show_tl
-% \end{macrocode}
-% \end{variable}
-%
% \begin{macro}[aux]{\msg_aux_use:nn}
% \begin{macro}[aux]{\msg_aux_use:nnxxxx}
% Print the text of a message to the terminal, without formatting.
@@ -1804,11 +1796,12 @@
{ \msg_aux_use:nnxxxx {#1} {#2} { } { } { } { } }
\cs_new_protected:Npn \msg_aux_use:nnxxxx #1#2#3#4#5#6
{
- \iow_term:x
+ \iow_wrap:xnnnN
{
\use:c { \c_msg_text_prefix_tl #1 / #2 }
{#3} {#4} {#5} {#6}
}
+ { } \c_zero { } \iow_term:x
}
% \end{macrocode}
% \end{macro}
@@ -1846,14 +1839,14 @@
}
\cs_new_protected:Npn \msg_aux_show:x #1
{
- \tl_set:Nx \l_msg_show_tl {#1}
- \tl_if_empty:NT \l_msg_show_tl
- { \tl_set:Nx \l_msg_show_tl { > } }
+ \tl_set:Nx \l_msg_internal_tl {#1}
+ \tl_if_empty:NT \l_msg_internal_tl
+ { \tl_set:Nx \l_msg_internal_tl { > } }
\exp_args:Nf \etex_showtokens:D
{
\exp_after:wN \exp_after:wN
\exp_after:wN \msg_aux_show:w
- \exp_after:wN \l_msg_show_tl
+ \exp_after:wN \l_msg_internal_tl
\exp_after:wN
}
\prg_do_nothing:
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index e38406714c5..dc6ff4ba9b6 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -34,8 +34,8 @@
%% -----------------------------------------------------------------------
%
%<*package>
-\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3names.dtx 2944 2011-11-11 07:10:26Z joseph $
+\RequirePackage{l3bootstrap}[2011-12-29]
+\GetIdInfo$Id: l3names.dtx 3113 2011-12-30 09:05:11Z joseph $
{L3 Experimental namespace for primitives}
%</package>
%<*driver>
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index c849e21ab77..ccd95eb2d6f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3prg.dtx 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3prg.dtx 3122 2011-12-31 20:57:36Z joseph $
{L3 Experimental control structures}
%</driver|package>
%<*driver>
@@ -75,17 +75,17 @@
% states are possible, say an \meta{error} state for erroneous
% input, \emph{e.g.}, text as input in a function comparing integers.
%
-% \LaTeX3 has two primary forms of conditional flow processing based
-% on these states. One type is predicate functions that turn the
+% \LaTeX3 has two forms of conditional flow processing based
+% on these states. The firs form is predicate functions that turn the
% returned state into a boolean \meta{true} or \meta{false}. For
% example, the function |\cs_if_free_p:N| checks whether the control
% sequence given as its argument is free and then returns the boolean
% \meta{true} or \meta{false} values to be used in testing with
-% |\if_predicate:w| or in functions to be described below. The other type
+% |\if_predicate:w| or in functions to be described below. The second form
% is the kind of functions choosing a particular argument from the
% input stream based on the result of the testing as in
% |\cs_if_free:NTF| which also takes one argument (the |N|) and then
-% executes either \meta{true} or \meta{false} depending on the
+% executes either \texttt{true} or \texttt{false} depending on the
% result. Important to note here is that the arguments are executed
% after exiting the underlying |\if...\fi:| structure.
%
@@ -100,7 +100,7 @@
% \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
+% These functions create 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
@@ -154,11 +154,11 @@
% \prg_return_true:
% \else:
% \prg_return_false:
-% \fi:
-% \fi:
-% }
+% \fi:
+% \fi:
+% }
% \end{verbatim}
-% This defines the function |\foo_if_bar_p:NN|, |\foo_if_bar:NNTF|,
+% This defines the function |\foo_if_bar_p:NN|, |\foo_if_bar:NNTF| and
% |\foo_if_bar:NNT| but not |\foo_if_bar:NNF| (because |F| is missing from
% the \meta{conds} list). The return statements
% take care of resolving the remaining |\else:| and |\fi:| before
@@ -172,12 +172,10 @@
% \prg_new_protected_conditional:Nnn, \prg_set_protected_conditional:Nnn
% }
% \begin{syntax}
-% \cs{prg_set_protected_conditional:Npnn}
-% ~~\cs{\meta{name}:\meta{arg spec}} \meta{parameters} \Arg{conditions} \Arg{code} \\
-% \cs{prg_set_protected_conditional:Nnn}
-% ~~\cs{\meta{name}:\meta{arg spec}} \Arg{conditions} \Arg{code}
+% \cs{prg_set_protected_conditional:Npnn} \cs{\meta{name}:\meta{arg spec}} \meta{parameters} \Arg{conditions} \Arg{code} \\
+% \cs{prg_set_protected_conditional:Nnn} \cs{\meta{name}:\meta{arg spec}} \Arg{conditions} \Arg{code}
% \end{syntax}
-% These functions creates a family of conditionals using the same
+% These functions create 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
@@ -605,8 +603,8 @@
% (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] \quad }
-% \prg_stepwise_function:nnnN { 1 } { 5 } { 1 } \my_func:n
+% \cs_set:Npn \my_func:n #1 { [I~saw~#1] \quad }
+% \prg_stepwise_function:nnnN { 1 } { 1 } { 5 } \my_func:n
% \end{verbatim}
% would print
% \begin{quote}
@@ -941,9 +939,9 @@
% This function evaluates a boolean expression and assigns the first
% argument the meaning |\c_true_bool| or |\c_false_bool|.
% \begin{macrocode}
-\cs_new:Npn \bool_set:Nn #1#2
+\cs_new_protected:Npn \bool_set:Nn #1#2
{ \tex_chardef:D #1 = \bool_if_p:n {#2} }
-\cs_new:Npn \bool_gset:Nn #1#2
+\cs_new_protected:Npn \bool_gset:Nn #1#2
{ \tex_global:D \tex_chardef:D #1 = \bool_if_p:n {#2} }
\cs_generate_variant:Nn \bool_set:Nn { c }
\cs_generate_variant:Nn \bool_gset:Nn { c }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
index 273e2d102eb..ac7dc25183d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3prop.dtx Copyright (C) 1990-2011 The LaTeX3 Project
+%% File: l3prop.dtx Copyright (C) 1990-2012 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
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3prop.dtx 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3prop.dtx 3158 2012-01-09 00:47:42Z bruno $
{L3 Experimental property lists}
%</driver|package>
%<*driver>
@@ -407,7 +407,7 @@
% property list while keeping track of a given key.
% \end{function}
%
-% \begin{function}[updated = 2011-09-15,EXP]{\prop_get:Nn, \prop_get:cn}
+% \begin{function}[updated = 2012-01-08,EXP]{\prop_get:Nn, \prop_get:cn}
% \begin{syntax}
% \cs{prop_get:Nn} \meta{property list} \Arg{key}
% \end{syntax}
@@ -417,6 +417,10 @@
% \begin{texnote}
% This function is slower than the non-expandable analogue
% \cs{prop_get:NnN}.
+% The result is returned within the \tn{unexpanded}
+% primitive (\cs{exp_not:n}), which means that the \meta{value}
+% will not expand further when appearing in an x-type
+% argument expansion.
% \end{texnote}
% \end{function}
%
@@ -1073,12 +1077,12 @@
\exp_last_unbraced:Noo \prop_get_Nn_aux:nwn
{ \tl_to_str:n {#2} } #1
\tl_to_str:n {#2} \q_prop { }
- \q_recursion_stop
+ \prg_break_point:n { }
}
\cs_new:Npn \prop_get_Nn_aux:nwn #1 \q_prop #2 \q_prop #3
{
\str_if_eq:xxTF {#1} {#2}
- { \use_i_delimit_by_q_recursion_stop:nw {#3} }
+ { \prg_map_break:n { \exp_not:n {#3} } }
{ \prop_get_Nn_aux:nwn {#1} }
}
\cs_generate_variant:Nn \prop_get:Nn { c }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
index cc865cccb6c..a87d1065c61 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3quark.dtx Copyright (C) 1990-2011 The LaTeX3 Project
+%% File: l3quark.dtx Copyright (C) 1990-2012 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
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3quark.dtx 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3quark.dtx 3148 2012-01-08 15:42:18Z bruno $
{L3 Experimental quarks}
%</driver|package>
%<*driver>
@@ -89,6 +89,7 @@
% Scan marks are control sequences set equal to \cs{scan_stop:},
% hence will never expand.
%
+% Like quarks, they can be used as delimiters in weird functions.
% Since they are harmless when executed by \TeX{} in non-expandable
% contexts, they can be used to mark the end of a set of instructions.
% This allows to skip to that point if the end of the instructions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
index 72e6250c070..6d1e8c71991 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3seq.dtx Copyright (C) 1990-2011 The LaTeX3 Project
+%% File: l3seq.dtx Copyright (C) 1990-2012 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
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3seq.dtx 3085 2011-12-22 16:29:26Z bruno $
+\GetIdInfo$Id: l3seq.dtx 3158 2012-01-09 00:47:42Z bruno $
{L3 Experimental sequences and stacks}
%</driver|package>
%<*driver>
@@ -564,7 +564,7 @@
% \emph{i.e.}~every item in a \meta{sequence} is unique.
% \end{function}
%
-% \begin{function}[EXP]{\seq_item:Nn, \seq_item:cn}
+% \begin{function}[EXP, updated = 2012-01-08]{\seq_item:Nn, \seq_item:cn}
% \begin{syntax}
% \cs{seq_item:Nn} \meta{sequence} \Arg{integer expression}
% \end{syntax}
@@ -576,6 +576,12 @@
% is larger than the number of items in the \meta{sequence} (as
% calculated by \cs{seq_length:N}) then the function will expand to
% nothing.
+% \begin{texnote}
+% The result is returned within the \tn{unexpanded}
+% primitive (\cs{exp_not:n}), which means that the \meta{item}
+% will not expand further when appearing in an x-type
+% argument expansion.
+% \end{texnote}
% \end{function}
%
% \begin{function}[rEXP]{\seq_use:N, \seq_use:c}
@@ -771,11 +777,11 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}{\l_seq_tmpa_tl, \l_seq_tmpb_tl}
+% \begin{variable}{\l_seq_internal_a_tl, \l_seq_internal_b_tl}
% Scratch space for various internal uses.
% \begin{macrocode}
-\tl_new:N \l_seq_tmpa_tl
-\tl_new:N \l_seq_tmpb_tl
+\tl_new:N \l_seq_internal_a_tl
+\tl_new:N \l_seq_internal_b_tl
% \end{macrocode}
% \end{variable}
%
@@ -848,7 +854,7 @@
% strip spaces from each item, and remove one set of
% outer braces if after removing leading and trailing
% spaces the item is enclosed within braces. After
-% \cs{tl_replace_all:Nnn}, the token list \cs{l_seq_tmpa_tl}
+% \cs{tl_replace_all:Nnn}, the token list \cs{l_seq_internal_a_tl}
% is a repetition of the pattern
% \cs{seq_set_split_aux_i:w} \cs{prg_do_nothing:}
% \meta{item with spaces} \cs{seq_set_split_aux_end:}.
@@ -872,19 +878,19 @@
\tl_if_empty:nTF {#3}
{ #1 #2 { \tl_map_function:nN {#4} \seq_wrap_item:n } }
{
- \tl_set:Nn \l_seq_tmpa_tl
+ \tl_set:Nn \l_seq_internal_a_tl
{
\seq_set_split_aux_i:w \prg_do_nothing:
#4
\seq_set_split_aux_end:
}
- \tl_replace_all:Nnn \l_seq_tmpa_tl { #3 }
+ \tl_replace_all:Nnn \l_seq_internal_a_tl { #3 }
{
\seq_set_split_aux_end:
\seq_set_split_aux_i:w \prg_do_nothing:
}
- \tl_set:Nx \l_seq_tmpa_tl { \l_seq_tmpa_tl }
- #1 #2 { \l_seq_tmpa_tl }
+ \tl_set:Nx \l_seq_internal_a_tl { \l_seq_internal_a_tl }
+ #1 #2 { \l_seq_internal_a_tl }
}
}
\cs_new:Npn \seq_set_split_aux_i:w #1 \seq_set_split_aux_end:
@@ -982,10 +988,10 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}{\l_seq_remove_seq}
+% \begin{variable}{\l_seq_internal_remove_seq}
% An internal sequence for the removal routines.
% \begin{macrocode}
-\seq_new:N \l_seq_remove_seq
+\seq_new:N \l_seq_internal_remove_seq
% \end{macrocode}
% \end{variable}
%
@@ -1002,13 +1008,13 @@
{ \seq_remove_duplicates_aux:NN \seq_gset_eq:NN }
\cs_new_protected:Npn \seq_remove_duplicates_aux:NN #1#2
{
- \seq_clear:N \l_seq_remove_seq
+ \seq_clear:N \l_seq_internal_remove_seq
\seq_map_inline:Nn #2
{
- \seq_if_in:NnF \l_seq_remove_seq {##1}
- { \seq_put_right:Nn \l_seq_remove_seq {##1} }
+ \seq_if_in:NnF \l_seq_internal_remove_seq {##1}
+ { \seq_put_right:Nn \l_seq_internal_remove_seq {##1} }
}
- #1 #2 \l_seq_remove_seq
+ #1 #2 \l_seq_internal_remove_seq
}
\cs_generate_variant:Nn \seq_remove_duplicates:N { c }
\cs_generate_variant:Nn \seq_gremove_duplicates:N { c }
@@ -1048,16 +1054,16 @@
\str_if_eq:nnT {##1} {#3}
{
\if_false: { \fi: }
- \tl_set:Nn \l_seq_tmpb_tl {##1}
+ \tl_set:Nn \l_seq_internal_b_tl {##1}
#1 #2
{ \if_false: } \fi:
\exp_not:o {#2}
- \tl_if_eq:NNT \l_seq_tmpa_tl \l_seq_tmpb_tl
+ \tl_if_eq:NNT \l_seq_internal_a_tl \l_seq_internal_b_tl
{ \use_none:nn }
}
\seq_wrap_item:n {##1}
}
- \tl_set:Nn \l_seq_tmpa_tl {#3}
+ \tl_set:Nn \l_seq_internal_a_tl {#3}
#1 #2 {#2}
\seq_pop_item_def:
}
@@ -1101,11 +1107,11 @@
{ T , F , TF }
{
\group_begin:
- \tl_set:Nn \l_seq_tmpa_tl {#2}
+ \tl_set:Nn \l_seq_internal_a_tl {#2}
\cs_set_protected:Npn \seq_item:n ##1
{
- \tl_set:Nn \l_seq_tmpb_tl {##1}
- \if_meaning:w \l_seq_tmpa_tl \l_seq_tmpb_tl
+ \tl_set:Nn \l_seq_internal_b_tl {##1}
+ \if_meaning:w \l_seq_internal_a_tl \l_seq_internal_b_tl
\exp_after:wN \seq_if_in_aux:
\fi:
}
@@ -1635,7 +1641,7 @@
{
\use_none:n #2
\int_compare:nNnTF {#1} = \c_zero
- { \seq_break:n {#3} }
+ { \seq_break:n { \exp_not:n {#3} } }
{ \exp_args:Nf \seq_item_aux:nnn { \int_eval:n { #1 - 1 } } }
}
\cs_generate_variant:Nn \seq_item:Nn { c }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
index 419cb6398f6..44e0bf5a45d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
@@ -1,6 +1,7 @@
% \iffalse meta-comment
%
%% File: l3skip.dtx Copyright (C) 2004-2011 Frank Mittelbach, The LaTeX3 Project
+%% (C) 2012 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
@@ -35,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3skip.dtx 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3skip.dtx 3139 2012-01-07 19:53:09Z bruno $
{L3 Experimental dimensions and skips}
%</driver|package>
%<*driver>
@@ -95,6 +96,16 @@
% Sets \meta{dimension} to $0$\,pt.
% \end{function}
%
+% \begin{function}[added = 2012-01-07]
+% {\dim_zero_new:N, \dim_zero_new:c, \dim_gzero_new:N, \dim_gzero_new:c}
+% \begin{syntax}
+% \cs{dim_zero_new:N} \meta{dimension}
+% \end{syntax}
+% Ensures that the \meta{dimension} exists globally by applying
+% \cs{dim_new:N} if necessary, then applies \cs{dim_(g)zero:N} to leave
+% the \meta{dimension} set to zero.
+% \end{function}
+%
% \section{Setting \texttt{dim} variables}
%
% \begin{function}[updated = 2011-10-22]
@@ -221,9 +232,9 @@
% \begin{center}
% \begin{tabular}{ll}
% Equal & |=| or |==| \\
-% Greater than or equal to & |=>| \\
+% Greater than or equal to & |>=| \\
% Greater than & |>| \\
-% Less than or equal to & |=<| \\
+% Less than or equal to & |<=| \\
% Less than & |<| \\
% Not equal & |!=| \\
% \end{tabular}
@@ -421,7 +432,16 @@
% \end{syntax}
% Sets \meta{skip} to $0$\,pt.
% \end{function}
-
+%
+% \begin{function}[added = 2012-01-07]
+% {\skip_zero_new:N, \skip_zero_new:c, \skip_gzero_new:N, \skip_gzero_new:c}
+% \begin{syntax}
+% \cs{skip_zero_new:N} \meta{skip}
+% \end{syntax}
+% Ensures that the \meta{skip} exists globally by applying
+% \cs{skip_new:N} if necessary, then applies \cs{skip_(g)zero:N} to leave
+% the \meta{skip} set to zero.
+% \end{function}
%
% \section{Setting \texttt{skip} variables}
%
@@ -584,6 +604,19 @@
% Sets \meta{muskip} to $0$\,mu.
% \end{function}
%
+% \begin{function}[added = 2012-01-07]
+% {
+% \muskip_zero_new:N, \muskip_zero_new:c,
+% \muskip_gzero_new:N, \muskip_gzero_new:c
+% }
+% \begin{syntax}
+% \cs{muskip_zero_new:N} \meta{muskip}
+% \end{syntax}
+% Ensures that the \meta{muskip} exists globally by applying
+% \cs{muskip_new:N} if necessary, then applies \cs{muskip_(g)zero:N}
+% to leave the \meta{muskip} set to zero.
+% \end{function}
+%
% \section{Setting \texttt{muskip} variables}
%
% \begin{function}[updated = 2011-10-22]
@@ -836,6 +869,19 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}
+% {\dim_zero_new:N, \dim_zero_new:c, \dim_gzero_new:N, \dim_gzero_new:c}
+% Create a register if needed, otherwise clear it.
+% \begin{macrocode}
+\cs_new_protected:Npn \dim_zero_new:N #1
+ { \cs_if_exist:NTF #1 { \dim_zero:N #1 } { \dim_new:N #1 } }
+\cs_new_protected:Npn \dim_gzero_new:N #1
+ { \cs_if_exist:NTF #1 { \dim_gzero:N #1 } { \dim_new:N #1 } }
+\cs_generate_variant:Nn \dim_zero_new:N { c }
+\cs_generate_variant:Nn \dim_gzero_new:N { c }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Setting \texttt{dim} variables}
%
% \begin{macro}{\dim_set:Nn, \dim_set:cn}
@@ -1290,6 +1336,19 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}
+% {\skip_zero_new:N, \skip_zero_new:c, \skip_gzero_new:N, \skip_gzero_new:c}
+% Create a register if needed, otherwise clear it.
+% \begin{macrocode}
+\cs_new_protected:Npn \skip_zero_new:N #1
+ { \cs_if_exist:NTF #1 { \skip_zero:N #1 } { \skip_new:N #1 } }
+\cs_new_protected:Npn \skip_gzero_new:N #1
+ { \cs_if_exist:NTF #1 { \skip_gzero:N #1 } { \skip_new:N #1 } }
+\cs_generate_variant:Nn \skip_zero_new:N { c }
+\cs_generate_variant:Nn \skip_gzero_new:N { c }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Setting \texttt{skip} variables}
%
% \begin{macro}{\skip_set:Nn, \skip_set:cn}
@@ -1495,6 +1554,22 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}
+% {
+% \muskip_zero_new:N, \muskip_zero_new:c,
+% \muskip_gzero_new:N, \muskip_gzero_new:c
+% }
+% Create a register if needed, otherwise clear it.
+% \begin{macrocode}
+\cs_new_protected:Npn \muskip_zero_new:N #1
+ { \cs_if_exist:NTF #1 { \muskip_zero:N #1 } { \muskip_new:N #1 } }
+\cs_new_protected:Npn \muskip_gzero_new:N #1
+ { \cs_if_exist:NTF #1 { \muskip_gzero:N #1 } { \muskip_new:N #1 } }
+\cs_generate_variant:Nn \muskip_zero_new:N { c }
+\cs_generate_variant:Nn \muskip_gzero_new:N { c }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Setting \texttt{muskip} variables}
%
% \begin{macro}{\muskip_set:Nn, \muskip_set:cn}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index 1424199ecd6..42e16e29c9e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3tl.dtx Copyright (C) 1990-2011 The LaTeX3 Project
+%% File: l3tl.dtx Copyright (C) 1990-2012 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
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3tl.dtx 3091 2011-12-25 16:22:59Z bruno $
+\GetIdInfo$Id: l3tl.dtx 3158 2012-01-09 00:47:42Z bruno $
{L3 Experimental token lists}
%</driver|package>
%<*driver>
@@ -596,7 +596,7 @@
% giving an \meta{integer denotation}.
% \end{function}
%
-% \begin{function}[updated = 2011-08-13, EXP]
+% \begin{function}[updated = 2012-01-08, EXP]
% {\tl_reverse:n, \tl_reverse:V, \tl_reverse:o}
% \begin{syntax}
% \cs{tl_reverse:n} \Arg{token list}
@@ -610,9 +610,15 @@
% In situations where performance is important,
% consider \cs{tl_reverse_items:n}.
% See also \cs{tl_reverse:N}.
+% \begin{texnote}
+% The result is returned 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}[updated = 2011-11-22]
+% \begin{function}[updated = 2012-01-08]
% {\tl_reverse:N, \tl_reverse:c, \tl_greverse:N, \tl_greverse:c}
% \begin{syntax}
% \cs{tl_reverse:N} \Arg{tl~var}
@@ -626,7 +632,7 @@
% See also \cs{tl_reverse:n}.
% \end{function}
%
-% \begin{function}[added = 2011-08-13, EXP]{\tl_reverse_items:n}
+% \begin{function}[added = 2012-01-08, EXP]{\tl_reverse_items:n}
% \begin{syntax}
% \cs{tl_reverse_items:n} \Arg{token list}
% \end{syntax}
@@ -639,6 +645,12 @@
% Items which are initially not braced are copied with braces in
% the result. In cases where preserving spaces is important,
% consider \cs{tl_reverse:n} or \cs{tl_reverse_tokens:n}.
+% \begin{texnote}
+% The result is returned 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}[added = 2011-07-09, updated = 2011-08-13, EXP]
@@ -650,7 +662,7 @@
% 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 \tn{unexpanded}
+% The result is returned 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.
@@ -674,7 +686,7 @@
% Functions which deal with either only the very first token of a
% token list or everything except the first token.
%
-% \begin{function}[updated = 2011-08-09, EXP]
+% \begin{function}[updated = 2012-01-08, EXP]
% {\tl_head:n, \tl_head:V, \tl_head:v, \tl_head:f}
% \begin{syntax}
% \cs{tl_head:n} \Arg{tokens}
@@ -693,6 +705,12 @@
% An empty list of \meta{tokens} or one which consists
% only of space (category code $10$) tokens will result in \cs{tl_head:n}
% leaving nothing in the input stream.
+% \begin{texnote}
+% The result is returned 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}[EXP]{\tl_head:w}
@@ -709,7 +727,7 @@
% is not critical.
% \end{function}
%
-% \begin{function}[updated = 2011-08-09, EXP]
+% \begin{function}[updated = 2012-01-08, EXP]
% {\tl_tail:n, \tl_tail:V, \tl_tail:v, \tl_tail:f}
% \begin{syntax}
% \cs{tl_tail:n} \Arg{tokens}
@@ -728,6 +746,12 @@
% An empty list of \meta{tokens} or one which consists
% only of space (category code $10$) tokens will result in \cs{tl_tail:n}
% leaving nothing in the input stream.
+% \begin{texnote}
+% The result is returned 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}[EXP]{\tl_tail:w}
@@ -911,7 +935,7 @@
%
% \section{Experimental token list functions}
%
-% \begin{function}[added = 2011-08-11, EXP]{\tl_reverse_tokens:n}
+% \begin{function}[added = 2012-01-08, EXP]{\tl_reverse_tokens:n}
% \begin{syntax}
% \cs{tl_reverse_tokens:n} \Arg{tokens}
% \end{syntax}
@@ -923,6 +947,12 @@
% list. For instance, \cs{tl_reverse_tokens:n} |{a~{b()}}|
% leaves |{)(b}~a| in the input stream. This function requires
% two steps of expansion.
+% \begin{texnote}
+% The result is returned 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}[added = 2011-08-11, EXP]{\tl_length_tokens:n}
@@ -937,7 +967,7 @@
% giving an \meta{integer denotation}.
% \end{function}
%
-% \begin{function}[added = 2011-08-13, EXP]
+% \begin{function}[added = 2012-01-08, EXP]
% {\tl_expandable_uppercase:n,\tl_expandable_lowercase:n}
% \begin{syntax}
% \cs{tl_expandable_uppercase:n} \Arg{tokens}
@@ -953,10 +983,14 @@
% \begin{texnote}
% Begin-group and end-group characters are normalized and become
% |{| and |}|, respectively.
+% The result is returned 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}[added = 2011-11-21, EXP]
+% \begin{function}[added = 2011-11-21, updated = 2012-01-08, EXP]
% {\tl_item:nn, \tl_item:Nn, \tl_item:cn}
% \begin{syntax}
% \cs{tl_item:nn} \Arg{token list} \Arg{integer expression}
@@ -965,8 +999,14 @@
% function will evaluate the \meta{integer expression} and leave the
% appropriate item from the \meta{token list} in the input stream.
% If the \meta{integer expression} is negative, indexing occurs from
-% the right of the sequence, starting at $-1$ for the right-most item.
+% the right of the token list, starting at $-1$ for the right-most item.
% If the index is out of bounds, then thr function expands to nothing.
+% \begin{texnote}
+% The result is returned within the \tn{unexpanded}
+% primitive (\cs{exp_not:n}), which means that the \meta{item}
+% will not expand further when appearing in an x-type
+% argument expansion.
+% \end{texnote}
% \end{function}
%
% \section{Internal functions}
@@ -1313,14 +1353,6 @@
%
% \subsection{Modifying token list variables}
%
-% \begin{variable}{\l_tl_replace_tl}
-% A scratch variable for doing token replacement.
-% \begin{macrocode}
-\tl_new:N \l_tl_replace_tl
-% \end{macrocode}
-% \end{variable}
-%
-%
% \begin{macro}{\tl_replace_all:Nnn, \tl_replace_all:cnn}
% \begin{macro}{\tl_greplace_all:Nnn, \tl_greplace_all:cnn}
% \begin{macro}{\tl_replace_once:Nnn, \tl_replace_once:cnn}
@@ -1578,15 +1610,15 @@
% \end{macro}
%
% \begin{macro}[TF]{\tl_if_eq:nn}
-% \begin{variable}{\l_tl_tmpa_tl, \l_tl_tmpb_tl}
+% \begin{variable}{\l_tl_internal_a_tl, \l_tl_internal_b_tl}
% A simple store and compare routine.
% \begin{macrocode}
\prg_new_protected_conditional:Npnn \tl_if_eq:nn #1#2 { T , F , TF }
{
\group_begin:
- \tl_set:Nn \l_tl_tmpa_tl {#1}
- \tl_set:Nn \l_tl_tmpb_tl {#2}
- \if_meaning:w \l_tl_tmpa_tl \l_tl_tmpb_tl
+ \tl_set:Nn \l_tl_internal_a_tl {#1}
+ \tl_set:Nn \l_tl_internal_b_tl {#2}
+ \if_meaning:w \l_tl_internal_a_tl \l_tl_internal_b_tl
\group_end:
\prg_return_true:
\else:
@@ -1594,8 +1626,8 @@
\prg_return_false:
\fi:
}
-\tl_new:N \l_tl_tmpa_tl
-\tl_new:N \l_tl_tmpb_tl
+\tl_new:N \l_tl_internal_a_tl
+\tl_new:N \l_tl_internal_b_tl
% \end{macrocode}
% \end{variable}
% \end{macro}
@@ -1795,7 +1827,7 @@
% \begin{macro}[aux]{\tl_reverse_items_aux:nwNwn}
% \begin{macro}[aux]{\tl_reverse_items_aux:wn}
% Reversal of a token list is done by taking one item at a time
-% and putting it after \cs{q_recursion_stop}.
+% and putting it after \cs{q_stop}.
% \begin{macrocode}
\cs_new:Npn \tl_reverse_items:n #1
{
@@ -1811,7 +1843,8 @@
\q_mark \tl_reverse_items_aux:wn
\q_stop { {#1} #5 }
}
-\cs_new:Npn \tl_reverse_items_aux:wn #1 \q_stop #2 { \use_none:nn #2 }
+\cs_new:Npn \tl_reverse_items_aux:wn #1 \q_stop #2
+ { \exp_not:o { \use_none:nn #2 } }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1905,15 +1938,16 @@
% \begin{macro}{\tl_tail:w}
% These functions pick up either the head or the tail of a list. The
% empty brace groups in \cs{tl_head:n} and \cs{tl_tail:n} ensure that
-% a blank argument gives an empty result.
+% a blank argument gives an empty result. The result is returned within
+% the \tn{unexpanded} primitive.
% \begin{macrocode}
\cs_new:Npn \tl_head:w #1#2 \q_stop {#1}
\cs_new:Npn \tl_tail:w #1#2 \q_stop {#2}
\cs_new:Npn \tl_head:n #1
- { \tl_head:w #1 { } \q_stop }
+ { \etex_unexpanded:D \exp_after:wN { \tl_head:w #1 { } \q_stop } }
\cs_new:Npn \tl_tail:n #1
- { \tl_tail_aux:w #1 \q_mark { } \q_mark \q_stop }
-\cs_new:Npn \tl_tail_aux:w #1 #2 \q_mark #3 \q_stop { #2 }
+ { \etex_unexpanded:D \tl_tail_aux:w #1 \q_mark { } \q_mark \q_stop }
+\cs_new:Npn \tl_tail_aux:w #1 #2 \q_mark #3 \q_stop { {#2} }
\cs_generate_variant:Nn \tl_head:n { V , v , f }
\cs_generate_variant:Nn \tl_tail:n { V , v , f }
% \end{macrocode}
@@ -2397,14 +2431,18 @@
% upper/lowercasing action stores the information of whether it
% is uppercasing or lowercasing.
% \begin{macrocode}
-\cs_new:Npn \tl_reverse_tokens:n
+\cs_new:Npn \tl_reverse_tokens:n #1
{
- \tex_romannumeral:D
- \tl_act_aux:NNNnn
- \tl_act_reverse_normal:nN
- \tl_act_reverse_group:nn
- \tl_act_reverse_space:n
- { }
+ \etex_unexpanded:D \exp_after:wN
+ {
+ \tex_romannumeral:D
+ \tl_act_aux:NNNnn
+ \tl_act_reverse_normal:nN
+ \tl_act_reverse_group:nn
+ \tl_act_reverse_space:n
+ { }
+ {#1}
+ }
}
\cs_new:Npn \tl_act_reverse_space:n #1
{ \tl_act_reverse_output:n {~} }
@@ -2426,14 +2464,18 @@
% The only difference with \cs{tl_reverse_tokens:n} is that
% we now simply output groups without entering them.
% \begin{macrocode}
-\cs_new:Npn \tl_reverse:n
+\cs_new:Npn \tl_reverse:n #1
{
- \tex_romannumeral:D
- \tl_act_aux:NNNnn
- \tl_act_reverse_normal:nN
- \tl_act_reverse_group_preserve:nn
- \tl_act_reverse_space:n
- { }
+ \etex_unexpanded:D \exp_after:wN
+ {
+ \tex_romannumeral:D
+ \tl_act_aux:NNNnn
+ \tl_act_reverse_normal:nN
+ \tl_act_reverse_group_preserve:nn
+ \tl_act_reverse_space:n
+ { }
+ {#1}
+ }
}
\cs_new:Npn \tl_act_reverse_group_preserve:nn #1 #2
{ \tl_act_reverse_output:n { {#2} } }
@@ -2447,9 +2489,9 @@
% which stops the \texttt{f}-expansion.
% \begin{macrocode}
\cs_new_protected:Npn \tl_reverse:N #1
- { \tl_set:Nf #1 { \tl_reverse:o { #1 \exp_stop_f: } } }
+ { \tl_set:Nx #1 { \exp_args:No \tl_reverse:n { #1 } } }
\cs_new_protected:Npn \tl_greverse:N #1
- { \tl_gset:Nf #1 { \tl_reverse:o { #1 \exp_stop_f: } } }
+ { \tl_gset:Nx #1 { \exp_args:No \tl_reverse:n { #1 } } }
\cs_generate_variant:Nn \tl_reverse:N { c }
\cs_generate_variant:Nn \tl_greverse:N { c }
% \end{macrocode}
@@ -2517,10 +2559,22 @@
% \tn{romannumeral}, which expands fully to give the
% converted group), then output.
% \begin{macrocode}
-\cs_new:Npn \tl_expandable_uppercase:n
- { \tex_romannumeral:D \tl_act_case_aux:nn { \c_tl_act_uppercase_tl } }
-\cs_new:Npn \tl_expandable_lowercase:n
- { \tex_romannumeral:D \tl_act_case_aux:nn { \c_tl_act_lowercase_tl } }
+\cs_new:Npn \tl_expandable_uppercase:n #1
+ {
+ \etex_unexpanded:D \exp_after:wN
+ {
+ \tex_romannumeral:D
+ \tl_act_case_aux:nn { \c_tl_act_uppercase_tl } {#1}
+ }
+ }
+\cs_new:Npn \tl_expandable_lowercase:n #1
+ {
+ \etex_unexpanded:D \exp_after:wN
+ {
+ \tex_romannumeral:D
+ \tl_act_case_aux:nn { \c_tl_act_lowercase_tl } {#1}
+ }
+ }
\cs_new:Npn \tl_act_case_aux:nn
{
\tl_act_aux:NNNnn
@@ -2572,7 +2626,7 @@
{
\quark_if_recursion_tail_break:n {#2}
\int_compare:nNnTF {#1} = \c_zero
- { \tl_map_break:n {#2} }
+ { \tl_map_break:n { \exp_not:n {#2} } }
{ \exp_args:Nf \tl_item_aux:nn { \int_eval:n { #1 - 1 } } }
}
\cs_new_nopar:Npn \tl_item:Nn { \exp_args:No \tl_item:nn }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index 2dcccabbb4e..0c145dd47ea 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3token.dtx 3099 2011-12-27 21:41:02Z joseph $
+\GetIdInfo$Id: l3token.dtx 3123 2011-12-31 21:51:51Z joseph $
{L3 Experimental token manipulation}
%</driver|package>
%<*driver>
@@ -243,7 +243,7 @@
% \cs{char_set_uccode:nn} \Arg{intexpr1} \Arg{intexpr2}
% \end{syntax}
% This function set up the behaviour of \meta{character} when
-% found inside \cs{tl_to_uppeercase:n}, such that \meta{character1}
+% found inside \cs{tl_to_uppercase:n}, such that \meta{character1}
% will be converted into \meta{character2}. The two \meta{characters}
% may be specified using an \meta{integer expression} for the character code
% concerned. This may include the \TeX{} |`|\meta{character}
@@ -878,9 +878,9 @@
% \end{texnote}
% \end{function}
%
-% \begin{function}[EXP]{\token_get_replacement_text:N}
+% \begin{function}[EXP]{\token_get_replacement_spec:N}
% \begin{syntax}
-% \cs{token_get_replacement_text:N} \meta{token}
+% \cs{token_get_replacement_spec:N} \meta{token}
% \end{syntax}
% If the \meta{token} is a macro, this function will leave
% the replacement text in input stream as