summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-12-21 23:31:35 +0000
committerKarl Berry <karl@freefriends.org>2012-12-21 23:31:35 +0000
commit8bcf0c7ef3cd19666c206271cea9280846b5c7e6 (patch)
treeee538c7e2a14ad105a169fdd2e745356147577cc /Master/texmf-dist/source/latex/l3kernel
parentef0453041a9700a2d974c3c76e3398e40c4e4aeb (diff)
l3 (21dec12)
git-svn-id: svn://tug.org/texlive/trunk@28608 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/expl3.dtx23
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx12
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3box.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx105
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3clist.dtx14
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx9
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3final.dtx3
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx24
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx14
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx98
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx28
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx14
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx12
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx18
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx21
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx24
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3seq.dtx22
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx50
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx216
19 files changed, 409 insertions, 302 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
index 0b1c0fbef94..8ea41c4eb2d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
@@ -33,8 +33,8 @@
%%
%% -----------------------------------------------------------------------
%
-%<package>\RequirePackage{l3names}[2012/07/15]
-%<package>\@ifpackagelater{l3names}{2012/07/15}
+%<package>\RequirePackage{l3names}[2012/12/07]
+%<package>\@ifpackagelater{l3names}{2012/12/07}
%<package> {}
%<package> {%
%<package> \PackageError{expl3}{Mismatched LaTeX3 packages detected.}
@@ -49,8 +49,8 @@
%<*driver|package>
\def\ExplFileName{expl3}
\def\ExplFileDescription{L3 Experimental code bundle wrapper}
-\def\ExplFileDate{2012/11/21}
-\def\ExplFileVersion{4332}
+\def\ExplFileDate{2012/12/21}
+\def\ExplFileVersion{4390}
%</driver|package>
%<*driver>
\documentclass[full]{l3doc}
@@ -630,11 +630,15 @@
% This means that the contents of the register in question is used as the
% argument, be it an integer, a length-type register, a token list variable
% or similar. The value is passed to the function as a braced token list.
+% Can be applied to variables which have a \cs{\meta{var}_use:N} function,
+% and which therefore deliver a single \enquote{value}.
% \item[v] Value of a register, constructed from a character string
% used as a command name.\\
% This is a combination of |c| and |V| which first constructs a
% control sequence from the argument and then passes the value of the
% resulting register to the function.
+% Can be applied to variables which have a \cs{\meta{var}_use:N} function,
+% and which therefore deliver a single \enquote{value}.
% \item[x] Fully-expanded token or braced token list.\\
% This means that the argument is expanded as in the replacement
% text of an~\tn{edef}, and the expansion is passed to the function as
@@ -913,8 +917,8 @@
% \cs_new:Npn \foo_bar:Nn #1#2
% {
% \cs_if_exist:NTF #1
-% { \__foo_bar_aux_i:n {#2} }
-% { \__foo_bar_aux_ii:nn {#2} { literal } }
+% { \__foo_bar:n {#2} }
+% { \__foo_bar:nn {#2} { literal } }
% }
% \end{verbatim}
% where spaces are used around |{| and |}| except for isolated
@@ -1029,9 +1033,14 @@
%
% Load \pkg{etex} as otherwise we are likely to get into trouble
% with registers. Some inserts are reserved also as these have to
-% be from the standard pool.
+% be from the standard pool. The \cs{relax} is here as
+% \cs{reserveinserts} is outer. Most of the time this is fine, but
+% some packages (for example \pkg{catoptions}) redefine \cs{RequirePackage}
+% such that the trailing optional argument is tested for as a macro argument,
+% which will then lead to an error!
% \begin{macrocode}
\RequirePackage{etex}
+\relax
\reserveinserts{32}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index 6eb1fb6b8ee..733beefe452 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3basics.dtx 4306 2012-11-10 12:57:20Z joseph $
+\GetIdInfo$Id: l3basics.dtx 4339 2012-11-24 19:16:43Z joseph $
{L3 Basic definitions}
%</driver|package>
%<*driver>
@@ -2158,7 +2158,7 @@
%
% \begin{macro}[EXP, int]{\__cs_split_function:NN}
% \begin{macro}[aux, EXP]
-% {\__cs_split_function_i:w, \__cs_split_function_ii:w}
+% {\__cs_split_function_auxi:w, \__cs_split_function_auxii:w}
% This function takes a function name and splits it into name with
% the escape char removed and argument specification. In addition to
% this, a third argument, a boolean \meta{true} or \meta{false} is
@@ -2193,14 +2193,14 @@
\cs_set:Npn \__cs_split_function:NN #1
{
\exp_after:wN \exp_after:wN
- \exp_after:wN \__cs_split_function_i:w
+ \exp_after:wN \__cs_split_function_auxi:w
\cs_to_str:N #1 \q_mark \c_true_bool
@ \q_mark \c_false_bool
\q_stop
}
- \cs_set:Npn \__cs_split_function_i:w #1 @ #2 \q_mark #3#4 \q_stop #5
- { \__cs_split_function_ii:w #5 #1 \q_mark \q_stop {#2} #3 }
- \cs_set:Npn \__cs_split_function_ii:w #1#2 \q_mark #3 \q_stop
+ \cs_set:Npn \__cs_split_function_auxi:w #1 @ #2 \q_mark #3#4 \q_stop #5
+ { \__cs_split_function_auxii:w #5 #1 \q_mark \q_stop {#2} #3 }
+ \cs_set:Npn \__cs_split_function_auxii:w #1#2 \q_mark #3 \q_stop
{ #1 {#2} }
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
index f37e6936f62..c6ccdfb12a9 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3box.dtx 4259 2012-11-04 17:15:11Z joseph $
+\GetIdInfo$Id: l3box.dtx 4347 2012-12-08 09:11:29Z joseph $
{L3 Experimental boxes}
%</driver|package>
%<*driver>
@@ -1081,7 +1081,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \hbox_to_wd:nn #1#2
{ \tex_hbox:D to \__dim_eval:w #1 \__dim_eval_end: {#2} }
-\cs_new_protected:Npn \hbox_to_zero:n #1 { \tex_hbox:D to \c_zero_skip {#1} }
+\cs_new_protected:Npn \hbox_to_zero:n #1 { \tex_hbox:D to \c_zero_dim {#1} }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
index c86a1ebeef2..4aa22e27714 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3candidates.dtx 4298 2012-11-09 13:34:43Z joseph $
+\GetIdInfo$Id: l3candidates.dtx 4383 2012-12-20 15:10:48Z bruno $
{L3 Experimental additions to l3kernel}
%</driver|package>
%<*driver>
@@ -803,7 +803,7 @@
% \meta{char} is again made active).
% \end{function}
%
-% \begin{function}[TF]{\peek_N_type:}
+% \begin{function}[TF, updated = 2012-12-20]{\peek_N_type:}
% \begin{syntax}
% \cs{peek_N_type:TF} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -812,7 +812,8 @@
% if the next \meta{token} is either an explicit or implicit
% begin-group or end-group token (with any character code), or
% an explicit or implicit space character (with character code $32$
-% and category code $10$), and \meta{true} in all other cases.
+% and category code $10$), or an outer token (never used in \LaTeX3)
+% and \meta{true} in all other cases.
% Note that a \meta{true} result ensures that the next \meta{token} is
% a valid \texttt{N}-type argument. However, if the next \meta{token}
% is for instance \cs{c_space_token}, the test will take the
@@ -1629,14 +1630,14 @@
%
% \begin{macro}[EXP]{\clist_use:Nnnn}
% \begin{macro}[EXP, aux]
-% {\@@_use:wwn, \@@_use_ii:nwwwwnwn, \@@_use_iii:nwwn}
+% {\@@_use:wwn, \@@_use:nwwwwnwn, \@@_use:nwwn}
% First check that the variable exists. Then count the items in the
% comma list. If it has none, output nothing. If it has one item,
% output that item, brace stripped (note that space-trimming has
% already been done when the comma list was assigned). If it has two,
% place the \meta{separator~between~two} in the middle.
%
-% Otherwise, \cs{@@_use_ii:nwwwwnwn} takes the following arguments; 1:
+% Otherwise, \cs{@@_use:nwwwwnwn} takes the following arguments; 1:
% a \meta{separator}, 2, 3, 4: three items from the comma list (or
% quarks), 5: the rest of the comma list, 6: a \meta{continuation}
% function (\texttt{use_ii} or \texttt{use_iii} with its
@@ -1664,20 +1665,20 @@
{ 2 } { \exp_after:wN \@@_use:wwn #1 , {#2} }
}
{
- \exp_after:wN \@@_use_ii:nwwwwnwn
+ \exp_after:wN \@@_use:nwwwwnwn
\exp_after:wN { \exp_after:wN } #1 ,
- \q_mark , { \@@_use_ii:nwwwwnwn {#3} }
- \q_mark , { \@@_use_iii:nwwn {#4} }
+ \q_mark , { \@@_use:nwwwwnwn {#3} }
+ \q_mark , { \@@_use:nwwn {#4} }
\q_stop { }
}
}
{ \__msg_kernel_expandable_error:nnn { kernel } { bad-variable } {#1} }
}
\cs_new:Npn \@@_use:wwn #1 , #2 , #3 { \exp_not:n { #1 #3 #2 } }
-\cs_new:Npn \@@_use_ii:nwwwwnwn
+\cs_new:Npn \@@_use:nwwwwnwn
#1#2 , #3 , #4 , #5 \q_mark , #6#7 \q_stop #8
{ #6 {#3} , {#4} , #5 \q_mark , {#6} #7 \q_stop { #8 #1 #2 } }
-\cs_new:Npn \@@_use_iii:nwwn #1#2 , #3 \q_stop #4
+\cs_new:Npn \@@_use:nwwn #1#2 , #3 \q_stop #4
{ \exp_not:n { #4 #1 #2 } }
% \end{macrocode}
% \end{macro}
@@ -2526,7 +2527,7 @@
%
% \begin{macro}[EXP]{\seq_use:Nnnn}
% \begin{macro}[EXP, aux]
-% {\@@_use:NnNnn, \@@_use_ii:nwwwwnwn, \@@_use_iii:nwwn}
+% {\@@_use:NnNnn, \@@_use:nwwwwnwn, \@@_use:nwwn}
% See \cs{clist_use:Nnnn} for a general explanation. The main
% difference is that we use \cs{@@_item:n} as a delimiter rather than
% commas. We also need to add \cs{@@_item:n} at various places.
@@ -2542,10 +2543,10 @@
{ 2 } { \exp_after:wN \@@_use:NnNnn #1 {#2} }
}
{
- \exp_after:wN \@@_use_ii:nwwwwnwn
+ \exp_after:wN \@@_use:nwwwwnwn
\exp_after:wN { \exp_after:wN } #1 \@@_item:n
- \q_mark { \@@_use_ii:nwwwwnwn {#3} }
- \q_mark { \@@_use_iii:nwwn {#4} }
+ \q_mark { \@@_use:nwwwwnwn {#3} }
+ \q_mark { \@@_use:nwwn {#4} }
\q_stop { }
}
}
@@ -2553,14 +2554,14 @@
}
\cs_new:Npn \@@_use:NnNnn \@@_item:n #1 \@@_item:n #2#3
{ \exp_not:n { #1 #3 #2 } }
-\cs_new:Npn \@@_use_ii:nwwwwnwn
+\cs_new:Npn \@@_use:nwwwwnwn
#1 \@@_item:n #2 \@@_item:n #3 \@@_item:n #4#5
\q_mark #6#7 \q_stop #8
{
#6 \@@_item:n {#3} \@@_item:n {#4} #5
\q_mark {#6} #7 \q_stop { #8 #1 #2 }
}
-\cs_new:Npn \@@_use_iii:nwwn #1 \@@_item:n #2 #3 \q_stop #4
+\cs_new:Npn \@@_use:nwwn #1 \@@_item:n #2 #3 \q_stop #4
{ \exp_not:n { #4 #1 #2 } }
% \end{macrocode}
% \end{macro}
@@ -2835,24 +2836,66 @@
% \end{macrocode}
%
% \begin{macro}[TF]{\peek_N_type:}
-% \begin{macro}{\@@_execute_branches_N_type:}
-% The next token is normal if it is neither a begin-group token,
-% nor an end-group token, nor a charcode-$32$ space token.
-% Note that implicit begin-group tokens, end-group tokens, and
-% spaces are also recognized as non-\texttt{N}-type.
-% Here, there is no \meta{search token}, so we feed a dummy
-% \cs{scan_stop:} to the \cs{peek_token_generic::NN} functions.
+% \begin{macro}[aux]
+% {\@@_execute_branches_N_type:, \@@_N_type:w, \@@_N_type_aux:nnw}
+% All tokens are \texttt{N}-type tokens, except in four cases:
+% begin-group tokens, end-group tokens, space tokens with character
+% code~$32$, and outer tokens. Since \cs{l_peek_token} might be
+% outer, we cannot use the convenient \cs{bool_if:nTF} function, and
+% must resort to the old trick of using \tn{ifodd} to expand a set of
+% tests. The \texttt{false} branch of this test is taken if the token
+% is one of the first three kinds of non-\texttt{N}-type tokens
+% (explicit or implicit), thus we call \cs{@@_false:w}. In the
+% \texttt{true} branch, we must detect outer tokens, without impacting
+% performance too much for non-outer tokens. The first filter is to
+% search for \texttt{outer} in the \tn{meaning} of \cs{l_peek_token}.
+% If that is absent, \cs{use_none_delimit_by_q_stop:w} cleans up, and
+% we call \cs{@@_true:w}. Otherwise, the token can be a non-outer
+% macro or a primitive mark whose parameter or replacement text
+% contains \texttt{outer}, it can be the primitive \tn{outer}, or it
+% can be an outer token. Macros and marks would have \texttt{ma} in
+% the part before the first occurrence of \texttt{outer}; the meaning
+% of \tn{outer} has nothing after \texttt{outer}, contrarily to outer
+% macros; and that covers all cases, calling \cs{@@_true:w} or
+% \cs{@@_false:w} as appropriate. Here, there is no \meta{search
+% token}, so we feed a dummy \cs{scan_stop:} to the
+% \cs{@@_token_generic:NNTF} function.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \@@_execute_branches_N_type:
+\group_begin:
+ \char_set_catcode_other:N \O
+ \char_set_catcode_other:N \U
+ \char_set_catcode_other:N \T
+ \char_set_catcode_other:N \E
+ \char_set_catcode_other:N \R
+ \tl_to_lowercase:n
+ {
+ \cs_new_protected_nopar:Npn \@@_execute_branches_N_type:
+ {
+ \if_int_odd:w
+ \if_catcode:w \exp_not:N \l_peek_token { \c_two \fi:
+ \if_catcode:w \exp_not:N \l_peek_token } \c_two \fi:
+ \if_meaning:w \l_peek_token \c_space_token \c_two \fi:
+ \c_one
+ \exp_after:wN \@@_N_type:w
+ \token_to_meaning:N \l_peek_token
+ \q_mark \@@_N_type_aux:nnw
+ OUTER \q_mark \use_none_delimit_by_q_stop:w
+ \q_stop
+ \exp_after:wN \@@_true:w
+ \else:
+ \exp_after:wN \@@_false:w
+ \fi:
+ }
+ \cs_new_protected_nopar:Npn \@@_N_type:w #1 OUTER #2 \q_mark #3
+ { #3 {#1} {#2} }
+ }
+\group_end:
+\cs_new_protected_nopar:Npn \@@_N_type_aux:nnw #1 #2 #3 \fi:
{
- \bool_if:nTF
- {
- \token_if_eq_catcode_p:NN \l_peek_token \c_group_begin_token ||
- \token_if_eq_catcode_p:NN \l_peek_token \c_group_end_token ||
- \token_if_eq_meaning_p:NN \l_peek_token \c_space_token
- }
- { \@@_false:w }
+ \fi:
+ \tl_if_in:noTF {#1} { \tl_to_str:n {ma} }
{ \@@_true:w }
+ { \tl_if_empty:nTF {#2} { \@@_true:w } { \@@_false:w } }
}
\cs_new_protected_nopar:Npn \peek_N_type:TF
{ \@@_token_generic:NNTF \@@_execute_branches_N_type: \scan_stop: }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
index 0f76f18b72b..68c36d63a4a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
@@ -37,7 +37,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3clist.dtx 4212 2012-09-09 12:24:04Z bruno $
+\GetIdInfo$Id: l3clist.dtx 4339 2012-11-24 19:16:43Z joseph $
{L3 Comma separated lists}
%</driver|package>
%<*driver>
@@ -729,8 +729,8 @@
% \end{macro}
%
% \begin{macro}[int,rEXP]{\@@_trim_spaces:n}
-% \begin{macro}[aux]{\@@_trim_spaces_ii:nn}
-% The first argument of \cs{@@_trim_spaces_ii:nn} is initially empty,
+% \begin{macro}[aux]{\@@_trim_spaces:nn}
+% The first argument of \cs{@@_trim_spaces:nn} is initially empty,
% and later a comma, namely, as soon as we have added an item to the
% resulting list. The auxiliary tests for the end of the list,
% and also prevents empty arguments from finding their way into the
@@ -739,22 +739,22 @@
\cs_new:Npn \@@_trim_spaces:n #1
{
\@@_trim_spaces_generic:nw
- { \@@_trim_spaces_ii:nn { } }
+ { \@@_trim_spaces:nn { } }
\q_mark #1 ,
\q_recursion_tail, \q_recursion_stop
}
-\cs_new:Npn \@@_trim_spaces_ii:nn #1 #2
+\cs_new:Npn \@@_trim_spaces:nn #1 #2
{
\quark_if_recursion_tail_stop:n {#2}
\tl_if_empty:nTF {#2}
{
\@@_trim_spaces_generic:nw
- { \@@_trim_spaces_ii:nn {#1} } \q_mark
+ { \@@_trim_spaces:nn {#1} } \q_mark
}
{
#1 \exp_not:n {#2}
\@@_trim_spaces_generic:nw
- { \@@_trim_spaces_ii:nn { , } } \q_mark
+ { \@@_trim_spaces:nn { , } } \q_mark
}
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index c9e689f06ca..416fc76cacb 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3file.dtx 4212 2012-09-09 12:24:04Z bruno $
+\GetIdInfo$Id: l3file.dtx 4377 2012-12-20 11:13:29Z bruno $
{L3 File and I/O operations}
%</driver|package>
%<*driver>
@@ -699,7 +699,6 @@
%
% \begin{macro}{\file_input:n}
% \begin{macro}[aux]{\@@_input:n \@@_input:V}
-% \begin{macro}[aux, EXP]{\@@_input_aux:w}
% \begin{macro}[aux]{\@@_input_aux:n, \@@_input_aux:o}
% Loading a file is done in a safe way, checking first that the file
% exists and loading only if it does. Push the file name on the
@@ -718,12 +717,11 @@
}
\cs_new_protected:Npn \@@_input:n #1
{
- \quark_if_nil:oTF { \@@_input_aux:w #1 . \q_nil . \q_stop }
- { \@@_input_aux:o { \tl_to_str:n { #1 .tex } } }
+ \tl_if_in:nnTF {#1} { . }
{ \@@_input_aux:n {#1} }
+ { \@@_input_aux:o { \tl_to_str:n { #1 . tex } } }
}
\cs_generate_variant:Nn \@@_input:n { V }
-\cs_new:Npn \@@_input_aux:w #1 . #2 . #3 \q_stop { #2 }
\cs_new_protected:Npn \@@_input_aux:n #1
{
%<*initex>
@@ -745,7 +743,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{\file_path_include:n}
% \begin{macro}{\file_path_remove:n}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
index 9d023c21224..b368842dae3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3final.dtx 3991 2012-07-16 19:00:35Z joseph $
+\GetIdInfo$Id: l3final.dtx 4364 2012-12-12 20:30:39Z joseph $
{L3 Experimental format finalisation}
%</driver|package>
%<*driver>
@@ -103,6 +103,7 @@
\char_set_catcode_other:n { 58 } % colon
\char_set_catcode_active:n { 126 } % tilde
\tex_endlinechar:D = 13 \scan_stop:
+ \tex_newlinechar:D = 10 \scan_stop:
\tex_dump:D
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
index 53a6456c5ac..bacb6065b5a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
@@ -36,7 +36,7 @@
%
%<*driver>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-aux.dtx 4181 2012-08-31 17:33:08Z bruno $
+\GetIdInfo$Id: l3fp-aux.dtx 4339 2012-11-24 19:16:43Z joseph $
{L3 Floating-point support functions}
\documentclass[full]{l3doc}
\begin{document}
@@ -650,17 +650,17 @@
%
% \begin{macro}[aux, EXP]
% {
-% \@@_decimate_i:Nnnnn, \@@_decimate_ii:Nnnnn,
-% \@@_decimate_iii:Nnnnn, \@@_decimate_iv:Nnnnn,
-% \@@_decimate_v:Nnnnn, \@@_decimate_vi:Nnnnn,
-% \@@_decimate_vii:Nnnnn, \@@_decimate_viii:Nnnnn,
-% \@@_decimate_ix:Nnnnn, \@@_decimate_x:Nnnnn,
-% \@@_decimate_xi:Nnnnn, \@@_decimate_xii:Nnnnn,
-% \@@_decimate_xiii:Nnnnn, \@@_decimate_xiv:Nnnnn,
-% \@@_decimate_xv:Nnnnn, \@@_decimate_xvi:Nnnnn
+% \\@@_decimate_auxi:Nnnnn, \\@@_decimate_auxii:Nnnnn,
+% \\@@_decimate_auxiii:Nnnnn, \\@@_decimate_auxiv:Nnnnn,
+% \\@@_decimate_auxv:Nnnnn, \\@@_decimate_auxvi:Nnnnn,
+% \\@@_decimate_auxvii:Nnnnn, \\@@_decimate_auxviii:Nnnnn,
+% \\@@_decimate_auxix:Nnnnn, \\@@_decimate_auxx:Nnnnn,
+% \\@@_decimate_auxxi:Nnnnn, \\@@_decimate_auxxii:Nnnnn,
+% \\@@_decimate_auxxiii:Nnnnn, \\@@_decimate_auxxiv:Nnnnn,
+% \\@@_decimate_auxxv:Nnnnn, \\@@_decimate_auxxvi:Nnnnn
% }
% \begin{syntax}
-% \cs{@@_decimate_i:Nnnnn} \meta{f_1} \Arg{X_1} \Arg{X_2} \Arg{X_3} \Arg{X_4}
+% \cs{\@@_decimate_auxi:Nnnnn} \meta{f_1} \Arg{X_1} \Arg{X_2} \Arg{X_3} \Arg{X_4}
% \end{syntax}
% Shifting happens in two steps: compute the \meta{rounding} digit,
% and repack digits into two blocks of $8$. The sixteen functions
@@ -731,8 +731,8 @@
% structure. This is followed by some digits and a semicolon.
% \begin{macrocode}
\cs_new:Npn \@@_decimate_pack:nnnnnnnnnnw #1#2#3#4#5
- { \@@_decimate_pack_ii:nnnnnnw { #1#2#3#4#5 } }
-\cs_new:Npn \@@_decimate_pack_ii:nnnnnnw #1 #2#3#4#5#6
+ { \@@_decimate_pack:nnnnnnw { #1#2#3#4#5 } }
+\cs_new:Npn \@@_decimate_pack:nnnnnnw #1 #2#3#4#5#6
{ {#1} {#2#3#4#5#6} }
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
index 7bb9f89a507..10cf4d2d03b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
@@ -36,7 +36,7 @@
%
%<*driver>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-convert.dtx 4234 2012-09-26 09:43:31Z bruno $
+\GetIdInfo$Id: l3fp-convert.dtx 4339 2012-11-24 19:16:43Z joseph $
{L3 Floating-point conversion}
\documentclass[full]{l3doc}
\begin{document}
@@ -404,8 +404,8 @@
% {
% \@@_from_dim_test:N,
% \@@_from_dim:Nw,
-% \@@_from_dim_ii:wNNnnnnnn,
-% \@@_from_dim_iii:wnnnnwN,
+% \@@_from_dim:wNNnnnnnn,
+% \@@_from_dim:wnnnnwN,
% }
% The dimension expression (which can in fact be a glue expression) is
% evaluated, converted to a number (\emph{i.e.}, expressed in scaled
@@ -437,12 +437,12 @@
}
\cs_new:Npn \@@_from_dim:Nw #1 #2;
{
- \@@_pack_twice_four:wNNNNNNNN \@@_from_dim_ii:wNNnnnnnn ;
+ \@@_pack_twice_four:wNNNNNNNN \@@_from_dim:wNNnnnnnn ;
#2 000 0000 00 {10}987654321; #1
}
-\cs_new:Npn \@@_from_dim_ii:wNNnnnnnn #1; #2#3#4#5#6#7#8#9
- { \@@_from_dim_iii:wnnnnwN #1 {#2#300} {0000} ; }
-\cs_new:Npn \@@_from_dim_iii:wnnnnwN #1; #2#3#4#5#6; #7
+\cs_new:Npn \@@_from_dim:wNNnnnnnn #1; #2#3#4#5#6#7#8#9
+ { \@@_from_dim:wnnnnwN #1 {#2#300} {0000} ; }
+\cs_new:Npn \@@_from_dim:wnnnnwN #1; #2#3#4#5#6; #7
{
\@@_mul_npos_o:Nww #7
\s_@@ \@@_chk:w 1 #7 {#5} #1 ;
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
index b3952ea8aa5..9d5ff40b7ca 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
@@ -36,7 +36,7 @@
%
%<*driver>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-extended.dtx 4151 2012-08-28 11:51:52Z bruno $
+\GetIdInfo$Id: l3fp-extended.dtx 4339 2012-11-24 19:16:43Z joseph $
{L3 Floating-point extended precision fixed-points}
\documentclass[full]{l3doc}
\begin{document}
@@ -173,8 +173,8 @@
% \begin{macro}[int, EXP]{\@@_fixed_div_int:wwN}
% \begin{macro}[aux, EXP]
% {
-% \@@_fixed_div_int_i:wnN, \@@_fixed_div_int_ii:wnn,
-% \@@_fixed_div_int_iii:wnn, \@@_fixed_div_int_pack:Nw,
+% \@@_fixed_div_int:wnN, \@@_fixed_div_int_auxi:wnn,
+% \@@_fixed_div_int_auxii:wnn, \@@_fixed_div_int_pack:Nw,
% \@@_fixed_div_int_after:Nw
% }
% \begin{syntax}
@@ -208,7 +208,7 @@
% \cs{@@_fixed_div_int_pack:Nw} $9999 + Q_{4}$ \\
% \cs{@@_fixed_div_int_pack:Nw} $9999 + Q_{5}$ \\
% \cs{@@_fixed_div_int_pack:Nw} $9999$ \\
-% \cs{@@_fixed_div_int_iii:wnn} $Q_{6}$ |;| \Arg{n} \Arg{a_{6}}
+% \cs{@@_fixed_div_int_auxii:wnn} $Q_{6}$ |;| \Arg{n} \Arg{a_{6}}
% \end{quote}
% where expansion is happening from the last line up. The
% \texttt{iii} auxiliary adds $Q_{6} + 2 \simeq a_{6}/n + 1$ to the
@@ -226,30 +226,30 @@
\exp_after:wN \@@_fixed_div_int_after:Nw
\exp_after:wN #8
\int_use:N \__int_eval:w \c_minus_one
- \@@_fixed_div_int_i:wnN
- #1; {#7} \@@_fixed_div_int_ii:wnn
- #2; {#7} \@@_fixed_div_int_ii:wnn
- #3; {#7} \@@_fixed_div_int_ii:wnn
- #4; {#7} \@@_fixed_div_int_ii:wnn
- #5; {#7} \@@_fixed_div_int_ii:wnn
- #6; {#7} \@@_fixed_div_int_iii:wnn ;
+ \@@_fixed_div_int:wnN
+ #1; {#7} \@@_fixed_div_int_auxi:wnn
+ #2; {#7} \@@_fixed_div_int_auxi:wnn
+ #3; {#7} \@@_fixed_div_int_auxi:wnn
+ #4; {#7} \@@_fixed_div_int_auxi:wnn
+ #5; {#7} \@@_fixed_div_int_auxi:wnn
+ #6; {#7} \@@_fixed_div_int_auxii:wnn ;
}
-\cs_new:Npn \@@_fixed_div_int_i:wnN #1; #2 #3
+\cs_new:Npn \@@_fixed_div_int:wnN #1; #2 #3
{
\exp_after:wN #3
\int_use:N \__int_eval:w #1 / #2 - \c_one ;
{#2}
{#1}
}
-\cs_new:Npn \@@_fixed_div_int_ii:wnn #1; #2 #3
+\cs_new:Npn \@@_fixed_div_int_auxi:wnn #1; #2 #3
{
+ #1
\exp_after:wN \@@_fixed_div_int_pack:Nw
\int_use:N \__int_eval:w 9999
- \exp_after:wN \@@_fixed_div_int_i:wnN
+ \exp_after:wN \@@_fixed_div_int:wnN
\int_use:N \__int_eval:w #3 - #1*#2 \__int_eval_end:
}
-\cs_new:Npn \@@_fixed_div_int_iii:wnn #1; #2 #3 { + #1 + \c_two ; }
+\cs_new:Npn \@@_fixed_div_int_auxii:wnn #1; #2 #3 { + #1 + \c_two ; }
\cs_new:Npn \@@_fixed_div_int_pack:Nw #1 #2; { + #1; {#2} }
\cs_new:Npn \@@_fixed_div_int_after:Nw #1 #2; { #1 {#2} }
% \end{macrocode}
@@ -261,8 +261,8 @@
% \begin{macro}[int, EXP]{\@@_fixed_add:wwn, \@@_fixed_sub:wwn}
% \begin{macro}[aux, EXP]
% {
-% \@@_fixed_add_i:Nnnnnwnn,
-% \@@_fixed_add_ii:nnNnnnwn,
+% \@@_fixed_add:Nnnnnwnn,
+% \@@_fixed_add:nnNnnnwn,
% \@@_fixed_add_pack:NNNNNwn,
% \@@_fixed_add_after:NNNNNwn
% }
@@ -283,17 +283,17 @@
% \meta{continuation} (|#8|, then |#7|) from the end of the argument
% list to its start.
% \begin{macrocode}
-\cs_new_nopar:Npn \@@_fixed_add:wwn { \@@_fixed_add_i:Nnnnnwnn + }
-\cs_new_nopar:Npn \@@_fixed_sub:wwn { \@@_fixed_add_i:Nnnnnwnn - }
-\cs_new:Npn \@@_fixed_add_i:Nnnnnwnn #1 #2#3#4#5 #6; #7#8
+\cs_new_nopar:Npn \@@_fixed_add:wwn { \@@_fixed_add:Nnnnnwnn + }
+\cs_new_nopar:Npn \@@_fixed_sub:wwn { \@@_fixed_add:Nnnnnwnn - }
+\cs_new:Npn \@@_fixed_add:Nnnnnwnn #1 #2#3#4#5 #6; #7#8
{
\exp_after:wN \@@_fixed_add_after:NNNNNwn
\int_use:N \__int_eval:w 9 9999 9998 + #2#3 #1 #7#8
\exp_after:wN \@@_fixed_add_pack:NNNNNwn
\int_use:N \__int_eval:w 1 9999 9998 + #4#5
- \@@_fixed_add_ii:nnNnnnwn #6 #1
+ \@@_fixed_add:nnNnnnwn #6 #1
}
-\cs_new:Npn \@@_fixed_add_ii:nnNnnnwn #1#2 #3 #4#5 #6#7 ; #8
+\cs_new:Npn \@@_fixed_add:nnNnnnwn #1#2 #3 #4#5 #6#7 ; #8
{
#3 #4#5
\exp_after:wN \@@_fixed_add_pack:NNNNNwn
@@ -310,7 +310,7 @@
% \subsection{Multiplying fixed points}
%
% \begin{macro}[int, EXP]{\@@_fixed_mul:wwn}
-% \begin{macro}[aux, EXP]{\@@_fixed_mul_i:nnnnnnnwn}
+% \begin{macro}[aux, EXP]{\@@_fixed_mul:nnnnnnnwn}
% \begin{syntax}
% \cs{@@_fixed_mul:wwn} \meta{a} |;| \meta{b} |;| \Arg{continuation}
% \end{syntax}
@@ -372,9 +372,9 @@
\int_use:N \__int_eval:w \c_@@_trailing_shift_int
+ #2*#9 + #3*#8 + #4*#7
+ ( #3*#9 + #4*#8
- + \@@_fixed_mul_i:nnnnnnnwn #5 {#6}{#7} {#1}{#2}
+ + \@@_fixed_mul:nnnnnnnwn #5 {#6}{#7} {#1}{#2}
}
-\cs_new:Npn \@@_fixed_mul_i:nnnnnnnwn #1#2 #3#4 #5#6 #7#8 ; #9
+\cs_new:Npn \@@_fixed_mul:nnnnnnnwn #1#2 #3#4 #5#6 #7#8 ; #9
{
#1*#4 + #2*#3 + #5*#8 + #6*#7 ) / \c_ten_thousand
+ #1*#3 + #5*#7 ;
@@ -443,7 +443,7 @@
\int_use:N \__int_eval:w \c_@@_big_leading_shift_int
\exp_after:wN \@@_pack_big:NNNNNNwn
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int + #3 #4
- \@@_fixed_mul_add_i:Nwnnnwnnn +
+ \@@_fixed_mul_add:Nwnnnwnnn +
+ #5 #6 ; #2 ; #1 ; #2 ; +
+ #7 #8 ; {#9} ;
}
@@ -453,7 +453,7 @@
\int_use:N \__int_eval:w \c_@@_big_leading_shift_int
\exp_after:wN \@@_pack_big:NNNNNNwn
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int + #3 #4
- \@@_fixed_mul_add_i:Nwnnnwnnn -
+ \@@_fixed_mul_add:Nwnnnwnnn -
+ #5 #6 ; #2 ; #1 ; #2 ; -
+ #7 #8 ; {#9} ;
}
@@ -463,16 +463,16 @@
\int_use:N \__int_eval:w \c_@@_big_leading_shift_int
\exp_after:wN \@@_pack_big:NNNNNNwn
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int + 1 0000 0000
- \@@_fixed_mul_add_i:Nwnnnwnnn -
+ \@@_fixed_mul_add:Nwnnnwnnn -
; #2 ; #1 ; #2 ; -
; {#3} ;
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_fixed_mul_add_i:Nwnnnwnnn}
+% \begin{macro}[aux, EXP]{\@@_fixed_mul_add:Nwnnnwnnn}
% \begin{syntax}
-% \cs{@@_fixed_mul_add_i:Nwnnnwnnn} \meta{op} |+| \meta{c_3} \meta{c_4} |;|
+% \cs{@@_fixed_mul_add:Nwnnnwnnn} \meta{op} |+| \meta{c_3} \meta{c_4} |;|
% ~~\meta{b} |;| \meta{a} |;| \meta{b} |;| \meta{op}
% ~~|+| \meta{c_5} \meta{c_6} |;|
% \end{syntax}
@@ -488,7 +488,7 @@
% we've read, but not \meta{b}, since there is another copy later in
% the input stream.
% \begin{macrocode}
-\cs_new:Npn \@@_fixed_mul_add_i:Nwnnnwnnn #1 #2; #3#4#5#6; #7#8#9
+\cs_new:Npn \@@_fixed_mul_add:Nwnnnwnnn #1 #2; #3#4#5#6; #7#8#9
{
#1 #7*#3
\exp_after:wN \@@_pack_big:NNNNNNwn
@@ -499,14 +499,14 @@
#1 #7*#5 #1 #8*#4 #1 #9*#3 #2
\exp_after:wN \@@_pack_big:NNNNNNwn
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int
- #1 \@@_fixed_mul_add_ii:nnnnwnnnn {#7}{#8}{#9}
+ #1 \@@_fixed_mul_add:nnnnwnnnn {#7}{#8}{#9}
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_fixed_mul_add_ii:nnnnwnnnn}
+% \begin{macro}[aux, EXP]{\@@_fixed_mul_add:nnnnwnnnn}
% \begin{syntax}
-% \cs{@@_fixed_mul_add_ii:nnnnwnnnn} \meta{a} |;| \meta{b} |;| \meta{op}
+% \cs{@@_fixed_mul_add:nnnnwnnnn} \meta{a} |;| \meta{b} |;| \meta{op}
% ~~|+| \meta{c_5} \meta{c_6} |;|
% \end{syntax}
% Level $10^{-20}$ is $(a_{1} \cdot b_{4} + a_{2} \cdot b_{3} + a_{3}
@@ -526,12 +526,12 @@
% To do all this, we keep $a_{1}$, $a_{5}$, $a_{6}$, and the
% corresponding pieces of \meta{b}.
% \begin{macrocode}
-\cs_new:Npn \@@_fixed_mul_add_ii:nnnnwnnnn #1#2#3#4#5; #6#7#8#9
+\cs_new:Npn \@@_fixed_mul_add:nnnnwnnnn #1#2#3#4#5; #6#7#8#9
{
( #1*#9 + #2*#8 + #3*#7 + #4*#6 )
\exp_after:wN \@@_pack_big:NNNNNNwn
\int_use:N \__int_eval:w \c_@@_big_trailing_shift_int
- \@@_fixed_mul_add_iii:nnnnwnnwN
+ \@@_fixed_mul_add:nnnnwnnwN
{ #6 + #4*#7 + #3*#8 + #2*#9 + #1 }
{ #7 + #4*#8 + #3*#9 + #2 }
{#1} #5;
@@ -540,9 +540,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_fixed_mul_add_iii:nnnnwnnwN}
+% \begin{macro}[aux, EXP]{\@@_fixed_mul_add:nnnnwnnwN}
% \begin{syntax}
-% \cs{@@_fixed_mul_add_iii:nnnnwnnwN} \Arg{partial_1} \Arg{partial_2}
+% \cs{@@_fixed_mul_add:nnnnwnnwN} \Arg{partial_1} \Arg{partial_2}
% ~~\Arg{a_1} \Arg{a_5} \Arg{a_6} |;| \Arg{b_1} \Arg{b_5} \Arg{b_6} |;|
% ~~\meta{op} |+| \meta{c_5} \meta{c_6} |;|
% \end{syntax}
@@ -556,7 +556,7 @@
% expected by the packing auxiliaries. See \pkg{l3fp-aux} for the
% definition of the shifts and packing auxiliaries.
% \begin{macrocode}
-\cs_new:Npn \@@_fixed_mul_add_iii:nnnnwnnwN #1#2 #3#4#5; #6#7#8; #9
+\cs_new:Npn \@@_fixed_mul_add:nnnnwnnwN #1#2 #3#4#5; #6#7#8; #9
{
#9 (#4* #1 *#7)
#9 (#5*#6+#4* #2 *#7+#3*#8) / \c_ten_thousand
@@ -701,18 +701,18 @@
#2 \c_two * \c_@@_max_exponent_int
\use_i_ii:nnn
\fi:
- \@@_fixed_dtf_zeros_ii:ww
+ \@@_fixed_dtf_zeros_auxi:ww
#1#3 0000 0000 0000 0000 0000 0000 ;
}
-\cs_new:Npn \@@_fixed_dtf_zeros_ii:ww
+\cs_new:Npn \@@_fixed_dtf_zeros_auxi:ww
{
\@@_pack_twice_four:wNNNNNNNN
\@@_pack_twice_four:wNNNNNNNN
\@@_pack_twice_four:wNNNNNNNN
- \@@_fixed_dtf_zeros_iii:ww
+ \@@_fixed_dtf_zeros_auxii:ww
;
}
-\cs_new:Npn \@@_fixed_dtf_zeros_iii:ww #1; #2; #3 { #3 #1; }
+\cs_new:Npn \@@_fixed_dtf_zeros_auxii:ww #1; #2; #3 { #3 #1; }
% \end{macrocode}
% \newcommand{\eTeXfrac}[2]{\left[\frac{#1}{#2}\right]}
% We get
@@ -799,19 +799,19 @@
% \begin{macrocode}
\cs_new:Npn \@@_fixed_dtf_approx:n #1
{
- \exp_after:wN \@@_fixed_dtf_approx_ii:wnn
+ \exp_after:wN \@@_fixed_dtf_approx:wnn
\int_use:N \__int_eval:w 10 0000 0000 / ( #1 + \c_one ) ;
{#1}
}
-\cs_new:Npn \@@_fixed_dtf_approx_ii:wnn #1; #2#3
+\cs_new:Npn \@@_fixed_dtf_approx:wnn #1; #2#3
{
%<assert> \assert:n { \tl_count:n {#1} = 6 }
- \exp_after:wN \@@_fixed_dtf_approx_iii:NNNNNw
+ \exp_after:wN \@@_fixed_dtf_approx:NNNNNw
\int_use:N \__int_eval:w 10 0000 0000 - 1750
+ #1000 + (10 0000 0000/#2-#1) * (1000-#3/10) ;
{#2}{#3}
}
-\cs_new:Npn \@@_fixed_dtf_approx_iii:NNNNNw 1#1#2#3#4#5#6; #7; #8;
+\cs_new:Npn \@@_fixed_dtf_approx:NNNNNw 1#1#2#3#4#5#6; #7; #8;
{
+ \c_four % because of the line below "dtf_epsilon" here.
\@@_fixed_mul:wwn {000#1}{#2#3#4#5}{#6}{0000}{0000}{0000} ; #7;
@@ -824,14 +824,14 @@
{
%<assert> \assert:n { #1 = 0000 }
%<assert> \assert:n { #2 = 9999 }
- \exp_after:wN \@@_fixed_dtf_epsilon_ii:NNNNNww
+ \exp_after:wN \@@_fixed_dtf_epsilon:NNNNNww
\int_use:N \__int_eval:w 1 9999 9998 - #3#4 +
\exp_after:wN \@@_fixed_dtf_epsilon_pack:NNNNNw
\int_use:N \__int_eval:w 2 0000 0000 - #5#6 ; {0000} ;
}
\cs_new:Npn \@@_fixed_dtf_epsilon_pack:NNNNNw #1#2#3#4#5#6;
{ #1 ; {#2#3#4#5} {#6} }
-\cs_new:Npn \@@_fixed_dtf_epsilon_ii:NNNNNww #1#2#3#4#5#6; #7;
+\cs_new:Npn \@@_fixed_dtf_epsilon:NNNNNww #1#2#3#4#5#6; #7;
{
\@@_fixed_mul:wwn %^^A todo: optimize to use \@@_mul_significand.
{0000} {#2#3#4#5} {#6} #7 ;
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
index f32746b30e1..edbe34ee82c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
@@ -87,8 +87,8 @@
% \item \cs{@@_!_o:w} \meta{floating point}
% \item \cs{@@_\string&_o:ww} \meta{floating point} \meta{floating point}
% \item \cs{@@_\string|_o:ww} \meta{floating point} \meta{floating point}
-% \item \cs{@@_ternary:NwwN}, \cs{@@_ternary_i:NwwN},
-% \cs{@@_ternary_ii:NwwN} have to be understood.
+% \item \cs{@@_ternary:NwwN}, \cs{@@_ternary_auxi:NwwN},
+% \cs{@@_ternary_auxii:NwwN} have to be understood.
% \end{itemize}
%
% \subsection{Existence test}
@@ -369,9 +369,9 @@
{
\if_meaning:w 3 #4
\if_meaning:w 3 #2
- \@@_minmax_i:ww
+ \@@_minmax_auxi:ww
\else:
- \@@_minmax_ii:ww
+ \@@_minmax_auxii:ww
\fi:
\else:
\if_int_compare:w
@@ -379,9 +379,9 @@
\s_@@ \@@_chk:w #4#5;
\s_@@ \@@_chk:w #2#3;
= #1
- \@@_minmax_ii:ww
+ \@@_minmax_auxii:ww
\else:
- \@@_minmax_i:ww
+ \@@_minmax_auxi:ww
\fi:
\fi:
\@@_minmax_loop:Nww #1
@@ -391,12 +391,12 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_minmax_i:ww, \@@_minmax_ii:ww}
+% \begin{macro}[aux, EXP]{\@@_minmax_auxi:ww, \@@_minmax_auxii:ww}
% Keep the first/second number, and remove the other.
% \begin{macrocode}
-\cs_new:Npn \@@_minmax_i:ww #1 \fi: \fi: #2 \s_@@ #3 ; \s_@@ #4;
+\cs_new:Npn \@@_minmax_auxi:ww #1 \fi: \fi: #2 \s_@@ #3 ; \s_@@ #4;
{ \fi: \fi: #2 \s_@@ #3 ; }
-\cs_new:Npn \@@_minmax_ii:ww #1 \fi: \fi: #2 \s_@@ #3 ;
+\cs_new:Npn \@@_minmax_auxii:ww #1 \fi: \fi: #2 \s_@@ #3 ;
{ \fi: \fi: #2 }
% \end{macrocode}
% \end{macro}
@@ -460,7 +460,7 @@
%
%^^A todo: understand and optimize.
% \begin{macro}[int, EXP]
-% {\@@_ternary:NwwN, \@@_ternary_i:NwwN, \@@_ternary_ii:NwwN}
+% {\@@_ternary:NwwN, \@@_ternary_auxi:NwwN, \@@_ternary_auxii:NwwN}
% \begin{macro}[aux, EXP]
% {
% \@@_ternary_loop_break:w, \@@_ternary_loop:Nw,
@@ -480,7 +480,7 @@
\@@_ternary_loop:Nw
#2
\s_@@ \@@_chk:w { \@@_ternary_loop_break:w } ;
- \@@_ternary_break_point:n { \exp_after:wN \@@_ternary_i:NwwN }
+ \@@_ternary_break_point:n { \exp_after:wN \@@_ternary_auxi:NwwN }
\exp_after:wN #1
\tex_romannumeral:D -`0
\@@_exp_after_array_f:w #3 \s_@@_stop
@@ -502,7 +502,7 @@
\cs_new:Npn \@@_ternary_loop_break:w #1 \fi: #2 \@@_ternary_break_point:n #3
{
\c_zero = \c_zero \fi:
- \exp_after:wN \@@_ternary_ii:NwwN
+ \exp_after:wN \@@_ternary_auxii:NwwN
}
\cs_new:Npn \@@_ternary_loop:Nw \s_@@ \@@_chk:w #1#2;
{
@@ -512,7 +512,7 @@
\@@_ternary_loop:Nw
}
\cs_new:Npn \@@_ternary_map_break: #1 \@@_ternary_break_point:n #2 {#2}
-\cs_new:Npn \@@_ternary_i:NwwN #1#2@#3@#4
+\cs_new:Npn \@@_ternary_auxi:NwwN #1#2@#3@#4
{
\exp_after:wN \@@_parse_until_test:NwN
\exp_after:wN #1
@@ -520,7 +520,7 @@
\@@_exp_after_array_f:w #2 \s_@@_stop
#4 #1
}
-\cs_new:Npn \@@_ternary_ii:NwwN #1#2@#3@#4
+\cs_new:Npn \@@_ternary_auxii:NwwN #1#2@#3@#4
{
\exp_after:wN \@@_parse_until_test:NwN
\exp_after:wN #1
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
index c49e3248edd..cd67aa2b2c1 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
@@ -36,7 +36,7 @@
%
%<*driver>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-parse.dtx 4187 2012-09-02 15:57:09Z bruno $
+\GetIdInfo$Id: l3fp-parse.dtx 4339 2012-11-24 19:16:43Z joseph $
{L3 Floating-point expression parsing}
\documentclass[full]{l3doc}
\begin{document}
@@ -1548,7 +1548,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_parse_exponent:N, \@@_parse_exponent_ii:N}
+% \begin{macro}[aux, rEXP]{\@@_parse_exponent:N, \@@_parse_exponent_aux:N}
% This function should be called within an \cs{__int_value:w} expansion
% (or within an integer expression. It leaves digits of the exponent
% behind it in the input stream, and terminates the expansion with a
@@ -1562,14 +1562,14 @@
\cs_new:Npn \@@_parse_exponent:N #1
{
\if:w e #1
- \exp_after:wN \@@_parse_exponent_ii:N
+ \exp_after:wN \@@_parse_exponent_aux:N
\tex_romannumeral:D
\else:
0 \@@_parse_return_semicolon:w #1
\fi:
\@@_parse_expand:w
}
-\cs_new:Npn \@@_parse_exponent_ii:N #1
+\cs_new:Npn \@@_parse_exponent_aux:N #1
{
\if_int_compare:w \if_catcode:w \tex_relax:D #1
\c_zero \else: `#1 \fi: > `9 \exp_stop_f:
@@ -1789,7 +1789,7 @@
\cs_new:Npn \@@_parse_large_round_after:wNN #1 ; #2 #3
{
\if:w . #3
- \exp_after:wN \@@_parse_large_round_after_ii:wN
+ \exp_after:wN \@@_parse_large_round_after_aux:wN
\int_use:N \__int_eval:w #1 +
\c_zero * \__int_eval:w \c_zero
\exp_after:wN \@@_cfs_round_loop:N
@@ -1802,7 +1802,7 @@
\exp_after:wN #3
\fi:
}
-\cs_new:Npn \@@_parse_large_round_after_ii:wN #1 ; #2
+\cs_new:Npn \@@_parse_large_round_after_aux:wN #1 ; #2
{
+ #2
\exp_after:wN ;
@@ -2520,7 +2520,7 @@
\__msg_kernel_expandable_error:nnnn
{ kernel } { fp-missing } { ? } { ~for~?: }
\exp_after:wN @
- \exp_after:wN \@@_ternary_ii:NwwN
+ \exp_after:wN \@@_ternary_auxii:NwwN
\tex_romannumeral:D
\@@_parse_until:Nw \c_two
\exp_after:wN \@@_parse_expand:w
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
index b485a0616c3..72a176191ad 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
@@ -318,9 +318,9 @@
% \begin{macro}[aux, EXP]
% {
% \@@_round_normal:NwNNnw ,
-% \@@_round_normal_ii:NnnwNNnn ,
+% \@@_round_normal:NnnwNNnn ,
% \@@_round_pack:Nw ,
-% \@@_round_normal_iii:NNwNnn ,
+% \@@_round_normal:NNwNnn ,
% \@@_round_normal_end:wwNnn ,
% \@@_round_special:NwwNnn ,
% \@@_round_special_aux:Nw
@@ -348,11 +348,11 @@
\cs_new:Npn \@@_round_normal:NwNNnw #1#2 \s_@@ \@@_chk:w 1#3#4#5;
{
\@@_decimate:nNnnnn { \c_sixteen - #4 - #2 }
- \@@_round_normal_ii:NnnwNNnn #5 #1 #3 {#4} {#2}
+ \@@_round_normal:NnnwNNnn #5 #1 #3 {#4} {#2}
}
-\cs_new:Npn \@@_round_normal_ii:NnnwNNnn #1#2#3#4; #5#6
+\cs_new:Npn \@@_round_normal:NnnwNNnn #1#2#3#4; #5#6
{
- \exp_after:wN \@@_round_normal_iii:NNwNnn
+ \exp_after:wN \@@_round_normal:NNwNnn
\int_use:N \__int_eval:w
\if_int_compare:w #2 > \c_zero
1 \__int_value:w #2
@@ -372,7 +372,7 @@
}
\cs_new:Npn \@@_round_pack:Nw #1
{ \if_meaning:w 2 #1 + \c_one \fi: \__int_eval_end: }
-\cs_new:Npn \@@_round_normal_iii:NNwNnn #1 #2
+\cs_new:Npn \@@_round_normal:NNwNnn #1 #2
{
\if_meaning:w 0 #2
\exp_after:wN \@@_round_special:NwwNnn
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
index 1f5874ca602..dc764e54ab1 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
@@ -36,7 +36,7 @@
%
%<*driver>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-trig.dtx 4151 2012-08-28 11:51:52Z bruno $
+\GetIdInfo$Id: l3fp-trig.dtx 4339 2012-11-24 19:16:43Z joseph $
{L3 Floating-point trigonometric functions}
\documentclass[full]{l3doc}
\begin{document}
@@ -374,15 +374,15 @@
%
% \begin{macro}[aux, rEXP]
% {
-% \@@_trig_large:ww, \@@_trig_large_i:www,
-% \@@_trig_large_ii_o:wnnnn, \@@_trig_large_break:w
+% \@@_trig_large:ww, \@@_trig_large:www,
+% \@@_trig_large_o:wnnnn, \@@_trig_large_break:w
% }
% We shift the significand by one digit at a time, subtracting a multiple
% of $2\pi$ at each step. We use a value of $2\pi$ rounded up,
% consistent with the choice of \cs{c_pi_fp}. This is not quite
% correct from an accuracy perspective, but has the nice property that
% $\sin(180\mathrm{deg}) = 0$ exactly. The arguments of
-% \cs{@@_trig_large_i:www} are a leading block of up to $5$ digits,
+% \cs{@@_trig_large:www} are a leading block of up to $5$ digits,
% three brace groups of $4$ digits each, and the exponent, decremented
% at each step. The multiple of $2\pi$ to subtract is estimated as
% $\lfloor |#1| / 6283\rfloor$ (the formula chosen always gives a
@@ -393,19 +393,19 @@
% the reduction by $\pi/2$.
% \begin{macrocode}
\cs_new:Npn \@@_trig_large:ww #1; #2#3;
- { \@@_trig_large_i:www #2; #3 ; #1; }
-\cs_new:Npn \@@_trig_large_i:www #1; #2; #3;
+ { \@@_trig_large:www #2; #3 ; #1; }
+\cs_new:Npn \@@_trig_large:www #1; #2; #3;
{
\if_meaning:w 0 #3 \@@_trig_large_break:w \fi:
- \exp_after:wN \@@_trig_large_ii_o:wnnnn
+ \exp_after:wN \@@_trig_large_o:wnnnn
\int_use:N \__int_eval:w ( #1 - 3141 ) / 6283 ;
{#1} #2
\exp_after:wN ;
\int_use:N \__int_eval:w \c_minus_one + #3;
}
-\cs_new:Npn \@@_trig_large_ii_o:wnnnn #1; #2#3#4#5
+\cs_new:Npn \@@_trig_large_o:wnnnn #1; #2#3#4#5
{
- \exp_after:wN \@@_trig_large_i:www
+ \exp_after:wN \@@_trig_large:www
\int_use:N \__int_eval:w \c_@@_leading_shift_int + #20 - #1*62831
\exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_middle_shift_int + #30 - #1*8530
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index 228c317ead3..1a405873659 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -35,7 +35,7 @@
%
%<*package>
\RequirePackage{l3bootstrap}[2012/07/15]
-\GetIdInfo$Id: l3names.dtx 4230 2012-09-24 21:44:28Z joseph $
+\GetIdInfo$Id: l3names.dtx 4346 2012-12-07 13:46:13Z joseph $
{L3 Namespace for primitives}
%</package>
%<*driver>
@@ -599,6 +599,17 @@
\__expl_primitive:NN \luatexversion \luatex_luatexversion:D
\__expl_primitive:NN \savecatcodetable \luatex_savecatcodetable:D
% \end{macrocode}
+% Slightly more awkward are the directional primitives in \LuaTeX{}. These
+% come from Omega \emph{via} Aleph, but we do not support those engines and
+% so it seems most sensible to treat them as \LuaTeX{} primitives for prefix
+% purposes.
+% \begin{macrocode}
+ \__expl_primitive:NN \bodydir \luatex_bodydir:D
+ \__expl_primitive:NN \mathdir \luatex_mathdir:D
+ \__expl_primitive:NN \pagedir \luatex_pagedir:D
+ \__expl_primitive:NN \pardir \luatex_pardir:D
+ \__expl_primitive:NN \textdir \luatex_textdir:D
+% \end{macrocode}
% The job is done: close the group (using the primitive renamed!).
% \begin{macrocode}
\tex_endgroup:D
@@ -621,6 +632,14 @@
\tex_let:D \luatex_initcatcodetable:D \luatexinitcatcodetable
\tex_let:D \luatex_latelua:D \luatexlatelua
\tex_let:D \luatex_savecatcodetable:D \luatexsavecatcodetable
+% \end{macrocode}
+% Which also covers those slightly odd ones.
+% \begin{macrocode}
+\tex_let:D \luatex_bodydir:D \luatexbodydir
+\tex_let:D \luatex_mathdir:D \luatexmathdir
+\tex_let:D \luatex_pagedir:D \luatexpagedir
+\tex_let:D \luatex_pardir:D \luatexpardir
+\tex_let:D \luatex_textdir:D \luatextextdir
%</package>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index c7fcb2a2790..54db54f0f58 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{l3bootstrap}
-\GetIdInfo$Id: l3prg.dtx 4212 2012-09-09 12:24:04Z bruno $
+\GetIdInfo$Id: l3prg.dtx 4339 2012-11-24 19:16:43Z joseph $
{L3 Control structures}
%</driver|package>
%<*driver>
@@ -1124,17 +1124,17 @@
% \begin{macro}[aux]+\@@_|_1:w+
% \begin{macro}[aux]
% {
-% \@@_eval_skip_to_end:Nw,
-% \@@_eval_skip_to_end_ii:Nw,
-% \@@_eval_skip_to_end_iii:Nw
+% \@@_eval_skip_to_end_auxi:Nw,
+% \@@_eval_skip_to_end_auxii:Nw,
+% \@@_eval_skip_to_end_auxiii:Nw
% }
% When the truth value has already been decided, we have to throw away
% the remainder of the current group as we are doing minimal
% evaluation. This is slightly tricky as there are no braces so we
% have to play match the |()| manually.
% \begin{macrocode}
-\cs_new_nopar:cpn { @@_&_0:w } & { \@@_eval_skip_to_end:Nw \c_false_bool }
-\cs_new_nopar:cpn { @@_|_1:w } | { \@@_eval_skip_to_end:Nw \c_true_bool }
+\cs_new_nopar:cpn { @@_&_0:w } & { \@@_eval_skip_to_end_auxi:Nw \c_false_bool }
+\cs_new_nopar:cpn { @@_|_1:w } | { \@@_eval_skip_to_end_auxi:Nw \c_true_bool }
% \end{macrocode}
% There is always at least one |)| waiting, namely the outer
% one. However, we are facing the problem that there may be more than
@@ -1188,9 +1188,9 @@
% finally close the group nicely.
% \begin{macrocode}
%% (
-\cs_new:Npn \@@_eval_skip_to_end:Nw #1#2 )
+\cs_new:Npn \@@_eval_skip_to_end_auxi:Nw #1#2 )
{
- \@@_eval_skip_to_end_ii:Nw #1#2 ( % )
+ \@@_eval_skip_to_end_auxii:Nw #1#2 ( % )
\q_no_value \q_stop
{#2}
}
@@ -1199,20 +1199,20 @@
% the boolean |#1|. If there is, we need to grab a |()| pair and then
% recurse
% \begin{macrocode}
-\cs_new:Npn \@@_eval_skip_to_end_ii:Nw #1#2 ( #3#4 \q_stop #5 % )
+\cs_new:Npn \@@_eval_skip_to_end_auxii:Nw #1#2 ( #3#4 \q_stop #5 % )
{
\quark_if_no_value:NTF #3
{#1}
- { \@@_eval_skip_to_end_iii:Nw #1 #5 }
+ { \@@_eval_skip_to_end_auxiii:Nw #1 #5 }
}
% \end{macrocode}
% Keep the boolean, throw away anything up to the |(| as it is
% irrelevant, remove a |()| pair but remember to reinsert |#3| as it may
% contain |(| tokens!
% \begin{macrocode}
-\cs_new:Npn \@@_eval_skip_to_end_iii:Nw #1#2 ( #3 )
+\cs_new:Npn \@@_eval_skip_to_end_auxiii:Nw #1#2 ( #3 )
{ % (
- \@@_eval_skip_to_end:Nw #1#3 )
+ \@@_eval_skip_to_end_auxi:Nw #1#3 )
}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
index 1a3d34eeaac..f9c8f06e7e3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3seq.dtx 4212 2012-09-09 12:24:04Z bruno $
+\GetIdInfo$Id: l3seq.dtx 4339 2012-11-24 19:16:43Z joseph $
{L3 Sequences and stacks}
%</driver|package>
%<*driver>
@@ -815,7 +815,7 @@
% \begin{macro}[aux]{\@@_set_split:NNnn}
% \begin{macro}[aux]
% {
-% \@@_set_split_i:w, \@@_set_split_ii:w,
+% \@@_set_split_auxi:w, \@@_set_split_auxii:w,
% \@@_set_split_end:
% }
% The goal is to split a given token list at a marker,
@@ -824,11 +824,11 @@
% spaces the item is enclosed within braces. After
% \cs{tl_replace_all:Nnn}, the token list \cs{l_@@_internal_a_tl}
% is a repetition of the pattern
-% \cs{@@_set_split_i:w} \cs{prg_do_nothing:}
+% \cs{@@_set_split_auxi:w} \cs{prg_do_nothing:}
% \meta{item with spaces} \cs{@@_set_split_end:}.
-% Then, \texttt{x}-expansion causes \cs{@@_set_split_i:w}
+% Then, \texttt{x}-expansion causes \cs{@@_set_split_auxi:w}
% to trim spaces, and leaves its result as
-% \cs{@@_set_split_ii:w} \meta{trimmed item}
+% \cs{@@_set_split_auxii:w} \meta{trimmed item}
% \cs{@@_set_split_end:}. This is then converted
% to the \pkg{l3seq} internal structure by another
% \texttt{x}-expansion. In the first step, we insert
@@ -848,26 +848,26 @@
{
\tl_set:Nn \l_@@_internal_a_tl
{
- \@@_set_split_i:w \prg_do_nothing:
+ \@@_set_split_auxi:w \prg_do_nothing:
#4
\@@_set_split_end:
}
\tl_replace_all:Nnn \l_@@_internal_a_tl { #3 }
{
\@@_set_split_end:
- \@@_set_split_i:w \prg_do_nothing:
+ \@@_set_split_auxi:w \prg_do_nothing:
}
\tl_set:Nx \l_@@_internal_a_tl { \l_@@_internal_a_tl }
#1 #2 { \l_@@_internal_a_tl }
}
}
-\cs_new:Npn \@@_set_split_i:w #1 \@@_set_split_end:
+\cs_new:Npn \@@_set_split_auxi:w #1 \@@_set_split_end:
{
- \exp_not:N \@@_set_split_ii:w
+ \exp_not:N \@@_set_split_auxii:w
\exp_args:No \tl_trim_spaces:n {#1}
\exp_not:N \@@_set_split_end:
}
-\cs_new:Npn \@@_set_split_ii:w #1 \@@_set_split_end:
+\cs_new:Npn \@@_set_split_auxii:w #1 \@@_set_split_end:
{ \@@_wrap_item:n {#1} }
\cs_generate_variant:Nn \seq_set_split:Nnn { NnV }
\cs_generate_variant:Nn \seq_gset_split:Nnn { NnV }
@@ -1015,7 +1015,7 @@
% The idea of the code here is to avoid a relatively expensive addition of
% items one at a time to an intermediate sequence.
% The approach taken is therefore similar to
-% that in \cs{@@_pop_right_aux_ii:NNN}, using a \enquote{flexible}
+% that in \cs{@@_pop_right_aux:NNN}, using a \enquote{flexible}
% \texttt{x}-type expansion to do most of the work. As \cs{tl_if_eq:nnT}
% is not expandable, a two-part strategy is needed. First, the
% \texttt{x}-type expansion uses \cs{str_if_eq:nnT} to find potential
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index b48cbcd1854..0f166541978 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3tl.dtx 4244 2012-09-28 22:46:36Z bruno $
+\GetIdInfo$Id: l3tl.dtx 4339 2012-11-24 19:16:43Z joseph $
{L3 Token lists}
%</driver|package>
%<*driver>
@@ -2011,21 +2011,21 @@
% \begin{macro}[int]{\@@_trim_spaces:nn}
% \begin{macro}[aux]
% {
-% \@@_trim_spaces_i:w, \@@_trim_spaces_ii:w
-% \@@_trim_spaces_iii:w, \@@_trim_spaces_iv:w
+% \@@_trim_spaces_auxi:w, \@@_trim_spaces_auxii:w
+% \@@_trim_spaces_auxiii:w, \@@_trim_spaces_auxiv:w
% }
% Trimming spaces from around the input is done using delimited
% arguments and quarks, and to get spaces at odd places in the
% definitions, we nest those in \cs{@@_tmp:w}, which then receives
% a single space as its argument: |#1| is \verb*+ +.
-% Removing leading spaces is done with \cs{@@_trim_spaces_i:w},
+% Removing leading spaces is done with \cs{@@_trim_spaces_auxi:w},
% which loops until \cs{q_mark}\verb*+ + matches the end of the token
% list: then |##1| is the token list and |##3| is
-% \cs{@@_trim_spaces_ii:w}. This hands the relevant tokens to the
-% loop \cs{@@_trim_spaces_iii:w}, responsible for trimming
+% \cs{@@_trim_spaces_auxii:w}. This hands the relevant tokens to the
+% loop \cs{@@_trim_spaces_auxiii:w}, responsible for trimming
% trailing spaces. The end is reached when \verb*+ + \cs{q_nil}
% matches the one present in the definition of \cs{tl_trim_spacs:n}.
-% Then \cs{@@_trim_spaces_iv:w} puts the token list into a group,
+% Then \cs{@@_trim_spaces_auxiv:w} puts the token list into a group,
% with \cs{use_none:n} placed there to gobble a lingering \cs{q_mark},
% and feeds this to the \meta{continuation}.
% \begin{macrocode}
@@ -2033,37 +2033,37 @@
{
\cs_new:Npn \@@_trim_spaces:nn ##1
{
- \@@_trim_spaces_i:w
+ \@@_trim_spaces_auxi:w
##1
\q_nil
\q_mark #1 { }
- \q_mark \@@_trim_spaces_ii:w
- \@@_trim_spaces_iii:w
+ \q_mark \@@_trim_spaces_auxii:w
+ \@@_trim_spaces_auxiii:w
#1 \q_nil
- \@@_trim_spaces_iv:w
+ \@@_trim_spaces_auxiv:w
\q_stop
}
- \cs_new:Npn \@@_trim_spaces_i:w ##1 \q_mark #1 ##2 \q_mark ##3
+ \cs_new:Npn \@@_trim_spaces_auxi:w ##1 \q_mark #1 ##2 \q_mark ##3
{
##3
- \@@_trim_spaces_i:w
+ \@@_trim_spaces_auxi:w
\q_mark
##2
\q_mark #1 {##1}
}
- \cs_new:Npn \@@_trim_spaces_ii:w
- \@@_trim_spaces_i:w \q_mark \q_mark ##1
+ \cs_new:Npn \@@_trim_spaces_auxii:w
+ \@@_trim_spaces_auxi:w \q_mark \q_mark ##1
{
- \@@_trim_spaces_iii:w
+ \@@_trim_spaces_auxiii:w
##1
}
- \cs_new:Npn \@@_trim_spaces_iii:w ##1 #1 \q_nil ##2
+ \cs_new:Npn \@@_trim_spaces_auxiii:w ##1 #1 \q_nil ##2
{
##2
##1 \q_nil
- \@@_trim_spaces_iii:w
+ \@@_trim_spaces_auxiii:w
}
- \cs_new:Npn \@@_trim_spaces_iv:w ##1 \q_nil ##2 \q_stop ##3
+ \cs_new:Npn \@@_trim_spaces_auxiv:w ##1 \q_nil ##2 \q_stop ##3
{ ##3 { \use_none:n ##1 } }
}
\@@_tmp:w { ~ }
@@ -2224,7 +2224,7 @@
% \subsection{The first token from a token list}
%
% \begin{macro}{\tl_head:N, \tl_head:n, \tl_head:V, \tl_head:v, \tl_head:f}
-% \begin{macro}[aux]{\@@_head_i:nw, \@@_head_ii:nw}
+% \begin{macro}[aux]{\@@_head_auxi:nw, \@@_head_auxii:nw}
% \begin{macro}{\tl_head:w}
% \begin{macro}{\tl_tail:N, \tl_tail:n, \tl_tail:V, \tl_tail:v, \tl_tail:f}
% Finding the head of a token list expandably will always strip braces, which
@@ -2242,11 +2242,11 @@
\cs_new:Npn \tl_head:n #1
{
\etex_unexpanded:D
- \if_false: { \fi: \@@_head_i:nw #1 { } \q_stop }
+ \if_false: { \fi: \@@_head_auxi:nw #1 { } \q_stop }
}
-\cs_new:Npn \@@_head_i:nw #1#2 \q_stop
- { \exp_after:wN \@@_head_ii:nw \exp_after:wN { \if_false: } \fi: {#1} }
-\cs_new:Npn \@@_head_ii:nw #1
+\cs_new:Npn \@@_head_auxi:nw #1#2 \q_stop
+ { \exp_after:wN \@@_head_auxii:nw \exp_after:wN { \if_false: } \fi: {#1} }
+\cs_new:Npn \@@_head_auxii:nw #1
{
\exp_after:wN \if_meaning:w \exp_after:wN \q_nil
\tl_to_str:n \exp_after:wN { \use_none:n #1 } \q_nil
@@ -2255,7 +2255,7 @@
\exp_after:wN \use_ii:nn
\fi:
{#1}
- { \if_false: { \fi: \@@_head_i:nw #1 } }
+ { \if_false: { \fi: \@@_head_auxi:nw #1 } }
}
\cs_generate_variant:Nn \tl_head:n { V , v , f }
\cs_new:Npn \tl_head:w #1#2 \q_stop {#1}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index e539f0bfcec..6e3ef14d414 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{l3bootstrap}
-\GetIdInfo$Id: l3token.dtx 4251 2012-11-01 16:30:06Z joseph $
+\GetIdInfo$Id: l3token.dtx 4384 2012-12-20 15:47:56Z bruno $
{L3 Experimental token manipulation}
%</driver|package>
%<*driver>
@@ -730,7 +730,7 @@
% as described above.
% \end{variable}
%
-% \begin{function}[updated = 2011-07-02, TF]{\peek_catcode:N}
+% \begin{function}[updated = 2012-12-20, TF]{\peek_catcode:N}
% \begin{syntax}
% \cs{peek_catcode:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -742,19 +742,20 @@
% result of the test).
% \end{function}
%
-% \begin{function}[updated = 2011-07-02, TF]{\peek_catcode_ignore_spaces:N}
+% \begin{function}[updated = 2012-12-20, TF]{\peek_catcode_ignore_spaces:N}
% \begin{syntax}
% \cs{peek_catcode_ignore_spaces:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the next \meta{token} in the input stream has the same
-% category code as the \meta{test token} (as defined by the test
-% \cs{token_if_eq_catcode:NNTF}). Spaces are ignored by the test
-% and the \meta{token} will be left in the input stream after
-% the \meta{true code} or \meta{false code} (as appropriate to the
-% result of the test).
+% Tests if the next non-space \meta{token} in the input stream has the
+% same category code as the \meta{test token} (as defined by the test
+% \cs{token_if_eq_catcode:NNTF}). Explicit and implicit space tokens
+% (with character code 32 and category code 10) are ignored and
+% removed by the test and the \meta{token} will be left in the input
+% stream after the \meta{true code} or \meta{false code} (as
+% appropriate to the result of the test).
% \end{function}
%
-% \begin{function}[updated = 2011-07-02, TF]{\peek_catcode_remove:N}
+% \begin{function}[updated = 2012-12-20, TF]{\peek_catcode_remove:N}
% \begin{syntax}
% \cs{peek_catcode_remove:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -767,21 +768,22 @@
% appropriate to the result of the test).
% \end{function}
%
-% \begin{function}[updated = 2011-07-02, TF]
+% \begin{function}[updated = 2012-12-20, TF]
% {\peek_catcode_remove_ignore_spaces:N}
% \begin{syntax}
% \cs{peek_catcode_remove_ignore_spaces:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the next \meta{token} in the input stream has the same
-% category code as the \meta{test token} (as defined by the test
-% \cs{token_if_eq_catcode:NNTF}). Spaces are ignored by the test
-% and the \meta{token} will be removed from the input stream if the
-% test is true. The function will then place either the
-% \meta{true code} or \meta{false code} in the input stream (as
-% appropriate to the result of the test).
+% Tests if the next non-space \meta{token} in the input stream has the
+% same category code as the \meta{test token} (as defined by the test
+% \cs{token_if_eq_catcode:NNTF}). Explicit and implicit space tokens
+% (with character code 32 and category code 10) are ignored and
+% removed by the test and the \meta{token} will be removed from the
+% input stream if the test is true. The function will then place
+% either the \meta{true code} or \meta{false code} in the input stream
+% (as appropriate to the result of the test).
% \end{function}
%
-% \begin{function}[updated = 2011-07-02, TF]{\peek_charcode:N}
+% \begin{function}[updated = 2012-12-20, TF]{\peek_charcode:N}
% \begin{syntax}
% \cs{peek_charcode:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -793,19 +795,20 @@
% result of the test).
% \end{function}
%
-% \begin{function}[updated = 2011-07-02, TF]{\peek_charcode_ignore_spaces:N}
+% \begin{function}[updated = 2012-12-20, TF]{\peek_charcode_ignore_spaces:N}
% \begin{syntax}
% \cs{peek_charcode_ignore_spaces:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the next \meta{token} in the input stream has the same
-% character code as the \meta{test token} (as defined by the test
-% \cs{token_if_eq_charcode:NNTF}). Spaces are ignored by the test
-% and the \meta{token} will be left in the input stream after
+% Tests if the next non-space \meta{token} in the input stream has the
+% same character code as the \meta{test token} (as defined by the test
+% \cs{token_if_eq_charcode:NNTF}). Explicit and implicit space tokens
+% (with character code 32 and category code 10) are ignored and removed by
+% the test and the \meta{token} will be left in the input stream after
% the \meta{true code} or \meta{false code} (as appropriate to the
% result of the test).
% \end{function}
%
-% \begin{function}[updated = 2011-07-02, TF]{\peek_charcode_remove:N}
+% \begin{function}[updated = 2012-12-20, TF]{\peek_charcode_remove:N}
% \begin{syntax}
% \cs{peek_charcode_remove:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -818,19 +821,20 @@
% appropriate to the result of the test).
% \end{function}
%
-% \begin{function}[updated = 2011-07-02, TF]
+% \begin{function}[updated = 2012-12-20, TF]
% {\peek_charcode_remove_ignore_spaces:N}
% \begin{syntax}
% \cs{peek_charcode_remove_ignore_spaces:NTF} \meta{test token}
% ~~\Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the next \meta{token} in the input stream has the same
-% character code as the \meta{test token} (as defined by the test
-% \cs{token_if_eq_charcode:NNTF}). Spaces are ignored by the test
-% and the \meta{token} will be removed from the input stream if the
-% test is true. The function will then place either the
-% \meta{true code} or \meta{false code} in the input stream (as
-% appropriate to the result of the test).
+% Tests if the next non-space \meta{token} in the input stream has the
+% same character code as the \meta{test token} (as defined by the test
+% \cs{token_if_eq_charcode:NNTF}). Explicit and implicit space tokens
+% (with character code 32 and category code 10) are ignored and
+% removed by the test and the \meta{token} will be removed from the
+% input stream if the test is true. The function will then place
+% either the \meta{true code} or \meta{false code} in the input stream
+% (as appropriate to the result of the test).
% \end{function}
%
% \begin{function}[updated = 2011-07-02, TF]{\peek_meaning:N}
@@ -845,16 +849,17 @@
% result of the test).
% \end{function}
%
-% \begin{function}[updated = 2011-07-02, TF]{\peek_meaning_ignore_spaces:N}
+% \begin{function}[updated = 2012-12-05, TF]{\peek_meaning_ignore_spaces:N}
% \begin{syntax}
% \cs{peek_meaning_ignore_spaces:NTF} \meta{test token} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the next \meta{token} in the input stream has the same
-% meaning as the \meta{test token} (as defined by the test
-% \cs{token_if_eq_meaning:NNTF}). Spaces are ignored by the test
-% and the \meta{token} will be left in the input stream after
-% the \meta{true code} or \meta{false code} (as appropriate to the
-% result of the test).
+% Tests if the next non-space \meta{token} in the input stream has the
+% same meaning as the \meta{test token} (as defined by the test
+% \cs{token_if_eq_meaning:NNTF}). Explicit and implicit space tokens
+% (with character code 32 and category code 10) are ignored and
+% removed by the test and the \meta{token} will be left in the input
+% stream after the \meta{true code} or \meta{false code} (as
+% appropriate to the result of the test).
% \end{function}
%
% \begin{function}[updated = 2011-07-02, TF]{\peek_meaning_remove:N}
@@ -870,19 +875,20 @@
% appropriate to the result of the test).
% \end{function}
%
-% \begin{function}[updated = 2011-07-02, TF]
+% \begin{function}[updated = 2012-12-05, TF]
% {\peek_meaning_remove_ignore_spaces:N}
% \begin{syntax}
% \cs{peek_meaning_remove_ignore_spaces:NTF} \meta{test token}
% ~~\Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the next \meta{token} in the input stream has the same
-% meaning as the \meta{test token} (as defined by the test
-% \cs{token_if_eq_meaning:NNTF}). Spaces are ignored by the test
-% and the \meta{token} will be removed from the input stream if the
-% test is true. The function will then place either the
-% \meta{true code} or \meta{false code} in the input stream (as
-% appropriate to the result of the test).
+% Tests if the next non-space \meta{token} in the input stream has the
+% same meaning as the \meta{test token} (as defined by the test
+% \cs{token_if_eq_meaning:NNTF}). Explicit and implicit space tokens
+% (with character code 32 and category code 10) are ignored and
+% removed by the test and the \meta{token} will be removed from the
+% input stream if the test is true. The function will then place
+% either the \meta{true code} or \meta{false code} in the input stream
+% (as appropriate to the result of the test).
% \end{function}
%
% \section{Decomposing a macro definition}
@@ -1852,7 +1858,7 @@
% \end{macro}
%
% \subsection{Peeking ahead at the next token}
-%
+%
% \begin{macrocode}
%<@@=peek>
% \end{macrocode}
@@ -1985,19 +1991,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}
-% {\@@_execute_branches_catcode:, \@@_execute_branches_meaning:}
-% The category code and meaning tests are straight forward.
+% \begin{macro}{\@@_execute_branches_meaning:}
+% The meaning test is straight forward.
% \begin{macrocode}
-\cs_new_nopar:Npn \@@_execute_branches_catcode:
- {
- \if_catcode:w
- \exp_not:N \l_peek_token \exp_not:N \l_@@_search_token
- \exp_after:wN \@@_true:w
- \else:
- \exp_after:wN \@@_false:w
- \fi:
- }
\cs_new_nopar:Npn \@@_execute_branches_meaning:
{
\if_meaning:w \l_peek_token \l_@@_search_token
@@ -2009,35 +2005,71 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_execute_branches_charcode:}
-% \begin{macro}[aux]{\@@_execute_branches_charcode:NN}
-% First the character code test there is a need to worry about \TeX{}
-% grabbing brace group or skipping spaces. These are all tested for
-% using a category code check before grabbing what must be a real
-% single token and doing the comparison.
+% \begin{macro}{\@@_execute_branches_catcode:, \@@_execute_branches_charcode:}
+% \begin{macro}[aux]
+% {
+% \@@_execute_branches_catcode_aux: ,
+% \@@_execute_branches_catcode_auxii:N ,
+% \@@_execute_branches_catcode_auxiii:
+% }
+% The catcode and charcode tests are very similar, and in order to use
+% the same auxiliaries we do something a little bit odd, firing
+% \cs{if_catcode:w} and \cs{if_charcode:w} before finding the operands
+% for those tests, which will only be given in in the |auxii:N| and
+% |auxiii:| auxiliaries. For our purposes, three kinds of tokens may
+% follow the peeking function:
+% \begin{itemize}
+% \item control sequences which are not equal to a non-active
+% character token (\emph{e.g.}, macro, primitive);
+% \item active characters which are not equal to a non-active
+% character token (\emph{e.g.}, macro, primitive);
+% \item explicit non-active character tokens, or control sequences
+% or active characters set equal to a non-active character token.
+% \end{itemize}
+% The first two cases are not distinguishable simply using \TeX{}'s
+% \tn{futurelet}, because we can only access the \tn{meaning} of
+% tokens in that way. In those cases, detected thanks to a
+% comparison with \cs{scan_stop:}, we grab the following token, and
+% compare it explicitly with the explicit search token stored in
+% \cs{l_@@_search_tl}. The \cs{exp_not:N} prevents outer macros
+% (coming from non-\LaTeX3 code) from blowing up. In the third case,
+% \cs{l_peek_token} is good enough for the test, and we compare it
+% again with the explicit search token. Just like the peek token, the
+% search token may be of any of the three types above, hence the need
+% to use the explicit token that was given to the peek function.
% \begin{macrocode}
+\cs_new_nopar:Npn \@@_execute_branches_catcode:
+ { \if_catcode:w \@@_execute_branches_catcode_aux: }
\cs_new_nopar:Npn \@@_execute_branches_charcode:
+ { \if_charcode:w \@@_execute_branches_catcode_aux: }
+\cs_new_nopar:Npn \@@_execute_branches_catcode_aux:
{
- \bool_if:nTF
- {
- \token_if_eq_catcode_p:NN \l_peek_token \c_group_begin_token
- || \token_if_eq_catcode_p:NN \l_peek_token \c_group_end_token
- || \token_if_eq_meaning_p:NN \l_peek_token \c_space_token
- }
- { \@@_false:w }
- {
- \exp_after:wN \@@_execute_branches_charcode_aux:NN
- \l_@@_search_tl
- }
+ \if_catcode:w \exp_not:N \l_peek_token \scan_stop:
+ \exp_after:wN \exp_after:wN
+ \exp_after:wN \@@_execute_branches_catcode_auxii:N
+ \exp_after:wN \exp_not:N
+ \else:
+ \exp_after:wN \@@_execute_branches_catcode_auxiii:
+ \fi:
}
-\cs_new:Npn \@@_execute_branches_charcode_aux:NN #1#2
+\cs_new:Npn \@@_execute_branches_catcode_auxii:N #1
{
- \if:w \exp_not:N #1 \exp_not:N #2
+ \exp_not:N #1
+ \exp_after:wN \exp_not:N \l_@@_search_tl
+ \exp_after:wN \@@_true:w
+ \else:
+ \exp_after:wN \@@_false:w
+ \fi:
+ #1
+ }
+\cs_new_nopar:Npn \@@_execute_branches_catcode_auxiii:
+ {
+ \exp_not:N \l_peek_token
+ \exp_after:wN \exp_not:N \l_@@_search_tl
\exp_after:wN \@@_true:w
\else:
\exp_after:wN \@@_false:w
\fi:
- #2
}
% \end{macrocode}
% \end{macro}
@@ -2045,17 +2077,23 @@
%
% \begin{macro}{\@@_ignore_spaces_execute_branches:}
% \begin{macro}[aux]{\@@_ignore_spaces_execute_branches_aux:}
-% This function removes one token at a time with a mechanism that can
-% be applied to things other than spaces.
+% This function removes one token at a time with the same mechanism as
+% \cs{@@_true_remove:w}. We directly use the primitive meaning test
+% rather than \cs{token_if_eq_meaning:NNTF} because \cs{l_peek_token}
+% may be an outer macro (coming from non-\LaTeX3 packages). We cannot
+% replace \cs{@@_tmp:w} by \cs{l_peek_token} here because if the
+% latter is an outer macro, it may not appear in the skipped branch of
+% a conditional.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_ignore_spaces_execute_branches:
{
- \token_if_eq_meaning:NNTF \l_peek_token \c_space_token
- {
- \tex_afterassignment:D \@@_ignore_spaces_execute_branches_aux:
- \cs_set_eq:NN \@@_tmp:w
- }
- { \@@_execute_branches: }
+ \if_meaning:w \l_peek_token \c_space_token
+ \tex_afterassignment:D \@@_ignore_spaces_execute_branches_aux:
+ \exp_after:wN \cs_set_eq:NN
+ \exp_after:wN \@@_tmp:w
+ \else:
+ \exp_after:wN \@@_execute_branches:
+ \fi:
}
\cs_new_protected_nopar:Npn \@@_ignore_spaces_execute_branches_aux:
{ \peek_after:Nw \@@_ignore_spaces_execute_branches: }