summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-01-01 22:56:28 +0000
committerKarl Berry <karl@freefriends.org>2014-01-01 22:56:28 +0000
commit999dd6fa37bd291385b20ccf85f980eccfd2e683 (patch)
tree0556279ecc60a91218fc66f799180d9b30c6bf4a /Master/texmf-dist/source/latex/l3kernel
parent612e0aeaa3a96eceef8eb6e8de16fac2d6b4d8f0 (diff)
l3 (1jan14)
git-svn-id: svn://tug.org/texlive/trunk@32537 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/expl3.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx126
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx246
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx56
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx499
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx22
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx97
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx271
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx40
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx12
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp.dtx229
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3keys.dtx22
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx856
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prop.dtx43
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3quark.dtx11
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3seq.dtx182
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx5
20 files changed, 1717 insertions, 1022 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
index 96631cf3ed0..56709098421 100644
--- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
@@ -49,8 +49,8 @@
%<*driver|package>
\def\ExplFileName{expl3}
\def\ExplFileDescription{L3 Experimental code bundle wrapper}
-\def\ExplFileDate{2013/11/19}
-\def\ExplFileVersion{4610}
+\def\ExplFileDate{2013/12/31}
+\def\ExplFileVersion{4634}
%</driver|package>
%<*driver>
\documentclass[full]{l3doc}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
index 22b8f3ccd5c..b0bb71b97f3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
@@ -119,7 +119,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-\GetIdInfo$Id: l3bootstrap.dtx 4581 2013-07-28 08:38:50Z joseph $
+\GetIdInfo$Id: l3bootstrap.dtx 4629 2013-12-29 20:59:49Z joseph $
{L3 Bootstrap code}
%</driver|package>
%<*driver>
@@ -167,11 +167,11 @@
% \cs{ExplSyntaxOn} \meta{code} \cs{ExplSyntaxOff}
% \end{syntax}
% The \cs{ExplSyntaxOn} function switches to a category code
-% r{\'e}gime in which spaces are ignored and in which the colon (|:|)
+% r\'{e}gime in which spaces are ignored and in which the colon (|:|)
% and underscore (|_|) are treated as \enquote{letters}, thus allowing
% access to the names of code functions and variables. Within this
% environment, |~| is used to input a space. The \cs{ExplSyntaxOff}
-% reverts to the document category code r{\'e}gime.
+% reverts to the document category code r\'{e}gime.
% \end{function}
%
% \begin{function}{\ProvidesExplPackage, \ProvidesExplClass, \ProvidesExplFile}
@@ -424,7 +424,7 @@
\chardef\csname\detokenize{l__kernel_expl_bool}\endcsname = 0 \relax
}
\protected\edef\ExplSyntaxOn
- {
+ {%
\catcode 9 = 9 \relax
\catcode 32 = 9 \relax
\catcode 34 = 12 \relax
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
index c31a0e478de..27baad8b08d 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 4602 2013-11-18 23:19:01Z bruno $
+\GetIdInfo$Id: l3candidates.dtx 4633 2013-12-31 17:28:46Z joseph $
{L3 Experimental additions to l3kernel}
%</driver|package>
%<*driver>
@@ -456,6 +456,76 @@
% before being assigned to the \meta{floating point variable}.
% \end{function}
%
+% \begin{function}[EXP]{\fp_function:Nw}
+% \begin{syntax}
+% \cs{fp_eval:n}
+% ~~|{|
+% ~~~~\cs{fp_function:Nw} \meta{function}
+% ~~~~~~|(| \meta{fpexpr_1} |,| \ldots{} |,| \meta{fpexpr_n} |)|
+% ~~|}|
+% \end{syntax}
+% Finds one or more arguments \meta{fpexpr_1} \ldots{} \meta{fpexpr_n}
+% following the \meta{function}, and evaluate them. Then calls the
+% \meta{function} followed by a single brace group containing
+% \Arg{result_1} \ldots{} \Arg{result_n}. For instance,
+% \begin{verbatim}
+% \cs_new_nopar:Npn \mypkg_log:w
+% { \fp_function:Nw \__mypkg_log:n }
+% \cs_new:Npn \__mypkg_log:n #1
+% {
+% \int_case:nnF { \tl_count:n {#1} }
+% {
+% { 1 } { \__mypkg_log_aux:nn #1 { 10 } }
+% { 2 } { \__mypkg_log_aux:nn #1 }
+% }
+% { \ERROR \c_nan_fp }
+% }
+% \cs_new:Npn \__mypkg_log_aux:nn #1#2 { ln(#1) / ln(#2) }
+% \fp_show:n { \mypkg_log:w (8, 2) + \mypkg_log:w (1e17) }
+% \end{verbatim}
+% shows $20 = \log_2(8) + \log(10^{17})$. The function |\mypkg_log:w|
+% behaves like other built-in functions such as |ln|, but allows $1$
+% or~$2$ arguments, and computes either the base~$10$ logarithm or the
+% logarithm of the first argument in a base given by the second
+% argument. Checking the number of arguments is acheived by
+% |\__mypkg_log:n|, which provides the default base~$10$ when there is
+% only one argument. The computation itself is done by
+% |\__mypkg_log_aux:nn|.
+% \end{function}
+%
+% \begin{function}{\fp_new_function:Npn}
+% \begin{syntax}
+% \cs{fp_new_function:Npn} \meta{function} \meta{parameters} \Arg{code}
+% \cs{fp_eval:n} |{| \meta{function} |(| \meta{fpexpr_1} |,| \ldots{} |,| \meta{fpexpr_n} |)| |}|
+% \end{syntax}
+% Defines the \meta{function} for use within floating point
+% expressions, expecting some \meta{parameters}, and evaluating the
+% \meta{code}, which must be expandable. When the \meta{function}
+% appears in a floating point expression, arguments \meta{fpexpr_1},
+% \ldots{}, \meta{fpexpr_n} are found and evaluated in the same way as
+% for built-in functions such as~|max|. If the number of arguments
+% matches the number of \meta{parameters}, the arguments replace |#1|,
+% \ldots{}, |#|$n$ in the \meta{code}, which is then evaluated to
+% produce a floating point result. Otherwise, the result is
+% \texttt{nan} after an error. The \meta{parameter text} must not
+% contain delimited arguments, that is, it must be empty or one of
+% |#1|, |#1#2|, |#1#2#3|, \ldots{} |#1#2#3#4#5#6#7#8#9|. The
+% arguments replacing parameters in the \meta{code} are internal
+% floating point numbers; operations such as |#1^2| thus correctly
+% take into account the sign of~|#1|. For instance,
+% \begin{verbatim}
+% \fp_new_function:Npn \mypkg_sqrt:w #1 { #1^.5 }
+% \fp_new_function:Npn \mypkg_veclen:w #1#2
+% { \mypkg_sqrt:w ( #1^2 + #2^2 ) }
+% \fp_show:n { \mypkg_veclen:w ( 42 / 7 , 2 * 4 - 0 ) }
+% \end{verbatim}
+% shows~$10$. In the example, |\mypkg_veclen:w| receives the
+% arguments $6=42/7$ and~$8=2\times 4-0$, thus expands to
+% |\mypkg_sqrt:w ( 6^2 + 8^2 )|, then |\mypkg_sqrt:w| receives
+% $100=6^2+8^2$ as an argument, and evaluates the square root $10 =
+% 100^{0.5}$.
+% \end{function}
+%
% \section{Additions to \pkg{l3prop}}
%
% \begin{function}[rEXP]
@@ -2160,9 +2230,8 @@
% key \cs{q_recursion_tail}, which cannot appear in normal keys since
% those are strings. The odd construction |\use:n {#1}| allows |#1|
% to contain any token without interfering with \cs{prop_map_break:}.
-% Argument |#2| of \cs{@@_map_tokens:nwwn} is empty, with two
-% exceptions: it is \cs{s_@@} the first time and \cs{s_obj_end} the
-% last.
+% Argument |#2| of \cs{@@_map_tokens:nwwn} is \cs{s_@@} the first
+% time, and is otherwise empty.
% \begin{macrocode}
\cs_new:Npn \prop_map_tokens:Nn #1#2
{
@@ -2226,8 +2295,9 @@
% then the stop code |{ ? \__prg_break: } { }| will be used by the auxiliary,
% terminating the loop and returning nothing at all.
% \begin{macrocode}
-\cs_new:Npn \seq_item:Nn #1 { \exp_after:wN \@@_item:wNn #1 #1 }
-\cs_new:Npn \@@_item:wNn \s_@@ #1 \s_obj_end #2#3
+\cs_new:Npn \seq_item:Nn #1
+ { \exp_after:wN \@@_item:wNn #1 \q_stop #1 }
+\cs_new:Npn \@@_item:wNn \s_@@ #1 \q_stop #2#3
{
\exp_args:Nf \@@_item:nnn
{
@@ -2260,31 +2330,31 @@
% \seq_mapthread_function:cNN, \seq_mapthread_function:ccN
% }
% \begin{macro}[aux]
-% {\@@_mapthread_function:wNN, \@@_mapthread_function:wNw}
-% \begin{macro}[aux]{\@@_mapthread_function:Nnnwnn}
-% The idea here is to first expand both of the sequences, adding the
+% {\@@_mapthread_function:NNw, \@@_mapthread_function:Nnnwnn}
+% The idea here is to first expand both sequences, adding the
% usual |{ ? \__prg_break: } { }| to the end of each one. This is
% most conveniently done in two steps using an auxiliary function.
% The mapping then throws away the first tokens of |#2| and |#5|,
-% which for items in the sequences will both be \cs{s_@@}
+% which for items in the sequences will both be
% \cs{@@_item:n}. The function to be mapped will then be applied to
% the two entries. When the code hits the end of one of the
-% sequences, the break material will stop the entire loop and tidy up.
-% This avoids needing to find the count of the two sequences, or
+% sequences, \cs{__prg_break:} stops the entire loop and tidy up.
+% This avoids needing to count items in the sequences, or
% worrying about which is longer.
% \begin{macrocode}
\cs_new:Npn \seq_mapthread_function:NNN #1#2#3
- { \exp_after:wN \@@_mapthread_function:wNN #2 #1 #3 }
-\cs_new:Npn \@@_mapthread_function:wNN \s_@@ #1 \s_obj_end #2#3
{
- \exp_after:wN \@@_mapthread_function:wNw #2 #3
- #1 { ? \__prg_break: } { }
+ \exp_after:wN \@@_mapthread_function:NNw
+ \exp_after:wN #3
+ \exp_after:wN #1
+ #2 { ? \__prg_break: } { }
\__prg_break_point:
}
-\cs_new:Npn \@@_mapthread_function:wNw \s_@@ #1 \s_obj_end #2
+\cs_new:Npn \@@_mapthread_function:NNw #1#2
{
- \@@_mapthread_function:Nnnwnn #2
- #1 { ? \__prg_break: } { }
+ \exp_after:wN \@@_mapthread_function:Nnnwnn
+ \exp_after:wN #1
+ #2 { ? \__prg_break: } { }
\q_stop
}
\cs_new:Npn \@@_mapthread_function:Nnnwnn #1#2#3#4 \q_stop #5#6
@@ -2299,7 +2369,6 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}
% {
@@ -2319,22 +2388,22 @@
\cs_new_protected:Npn \seq_set_from_clist:NN #1#2
{
\tl_set:Nx #1
- { \s_@@ \clist_map_function:NN #2 \@@_wrap_item:n \s_obj_end }
+ { \s_@@ \clist_map_function:NN #2 \@@_wrap_item:n }
}
\cs_new_protected:Npn \seq_set_from_clist:Nn #1#2
{
\tl_set:Nx #1
- { \s_@@ \clist_map_function:nN {#2} \@@_wrap_item:n \s_obj_end }
+ { \s_@@ \clist_map_function:nN {#2} \@@_wrap_item:n }
}
\cs_new_protected:Npn \seq_gset_from_clist:NN #1#2
{
\tl_gset:Nx #1
- { \s_@@ \clist_map_function:NN #2 \@@_wrap_item:n \s_obj_end }
+ { \s_@@ \clist_map_function:NN #2 \@@_wrap_item:n }
}
\cs_new_protected:Npn \seq_gset_from_clist:Nn #1#2
{
\tl_gset:Nx #1
- { \s_@@ \clist_map_function:nN {#2} \@@_wrap_item:n \s_obj_end }
+ { \s_@@ \clist_map_function:nN {#2} \@@_wrap_item:n }
}
\cs_generate_variant:Nn \seq_set_from_clist:NN { Nc }
\cs_generate_variant:Nn \seq_set_from_clist:NN { c , cc }
@@ -2348,9 +2417,8 @@
%
% \begin{macro}
% {\seq_reverse:N, \seq_reverse:c, \seq_greverse:N, \seq_greverse:c}
-% \begin{macro}[aux]{\@@_tmp:w}
% \begin{macro}[aux]{\@@_reverse:NN}
-% \begin{macro}[aux]{\@@_reverse_setup:w, \@@_reverse_item:nwn}
+% \begin{macro}[aux, EXP]{\@@_reverse_item:nwn}
% Previously, \cs{seq_reverse:N} was coded by collecting the items
% in reverse order after an \cs{exp_stop_f:} marker.
% \begin{verbatim}
@@ -2383,7 +2451,6 @@
% of \cs{exp_not:n}. The previous calls are cleanly removed
% from the stack, and the memory consumption becomes linear.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \@@_tmp:w { }
\cs_new_protected_nopar:Npn \seq_reverse:N
{ \@@_reverse:NN \tl_set:Nx }
\cs_new_protected_nopar:Npn \seq_greverse:N
@@ -2392,11 +2459,9 @@
{
\cs_set_eq:NN \@@_tmp:w \@@_item:n
\cs_set_eq:NN \@@_item:n \@@_reverse_item:nwn
- #1 #2 { \exp_after:wN \@@_reverse_setup:w #2 }
+ #1 #2 { #2 \exp_not:n { } }
\cs_set_eq:NN \@@_item:n \@@_tmp:w
}
-\cs_new:Npn \@@_reverse_setup:w #1 \s_obj_end
- { #1 \exp_not:n { } \s_obj_end }
\cs_new:Npn \@@_reverse_item:nwn #1 #2 \exp_not:n #3
{
#2
@@ -2408,7 +2473,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{\seq_set_filter:NNn, \seq_gset_filter:NNn}
% \begin{macro}[aux]{\@@_set_filter:NNNn}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
index e6369d38bb5..7197d72e18f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3coffins.dtx 4212 2012-09-09 12:24:04Z bruno $
+\GetIdInfo$Id: l3coffins.dtx 4624 2013-12-14 13:58:48Z bruno $
{L3 Coffin code layer}
%</driver|package>
%<*driver>
@@ -1007,7 +1007,7 @@
{
\dim_compare:nNnTF {#8} = \c_zero_dim
{
- \dim_set:Nn \l_@@_x_dim {#6}
+ \dim_set:Nn \l_@@_y_dim {#6}
\@@_calculate_intersection_aux:nnnnnN
{#6} {#2} {#1} {#4} {#3} \l_@@_x_dim
}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
index 46426e18186..5eb91ddc2cb 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3drivers.dtx 4602 2013-11-18 23:19:01Z bruno $
+\GetIdInfo$Id: l3drivers.dtx 4632 2013-12-31 17:09:37Z joseph $
{L3 Experimental drivers}
%</driver|package>
%<*driver>
@@ -103,7 +103,7 @@
%
% \section{Box rotation and scaling}
%
-% \begin{function}[added = 2011-09-01, updated = 2012-05-18]
+% \begin{function}[added = 2011-09-01, updated = 2013-12-27]
% {\__driver_box_rotate_begin:, \__driver_box_rotate_end:}
% \begin{syntax}
% \cs{__driver_box_rotate_begin:}
@@ -119,7 +119,7 @@
% required by some drivers to obtain the correct output.
% \end{function}
%
-% \begin{function}[added = 2011-09-02, updated = 2012-05-18]
+% \begin{function}[added = 2011-09-02, updated = 2013-12-27]
% {\__driver_box_scale_begin:, \__driver_box_scale_end:}
% \begin{syntax}
% \cs{__driver_box_scale_begin:}
@@ -135,7 +135,7 @@
% to scale factors.
% \end{function}
%
-% \section{Colour support}
+% \section{Color support}
%
% \begin{function}[added = 2011-09-03, updated = 2012-05-18]
% {\__driver_color_ensure_current:}
@@ -187,7 +187,7 @@
%
% If the driver loaded is \texttt{pdfmode} then direct PDF output is required.
% (This may of course alter: it might be that the driver is picked based on the
-% value of \cs{pdfmode_pdfoutput:D}.)
+% value of \cs{pdftex_pdfoutput:D}.)
% \begin{macrocode}
%<*initex>
%<*pdfmode>
@@ -215,26 +215,26 @@
% \end{macrocode}
%
% \subsection{Driver utility functions}
-%
-% \begin{macro}{\@@_graphic_state_save:, \@@_graphic_state_restore:}
+%
+% \begin{macro}{\@@_state_save:, \@@_state_restore:}
% All of the drivers have a stack for saving the graphic state. These
% have slightly different interfaces. For both \texttt{dvips} and
% \texttt{(x)dvipdfmx} this is done using an appropriate special.
% \begin{macrocode}
%<*!pdfmode>
-\cs_new_protected_nopar:Npn \@@_graphic_state_save:
+\cs_new_protected_nopar:Npn \@@_state_save:
%<*dvips>
{ \tex_special:D { ps:gsave } }
%</dvips>
%<*dvipdfmx|xdvipdfmx>
- { \tex_special:D { pdf:content~q } }
+ { \tex_special:D { pdf:bcontent } }
%</dvipdfmx|xdvipdfmx>
-\cs_new_protected_nopar:Npn \@@_graphic_state_restore:
+\cs_new_protected_nopar:Npn \@@_state_restore:
%<*dvips>
{ \tex_special:D { ps:grestore } }
%</dvips>
%<*dvipdfmx|xdvipdfmx>
- { \tex_special:D { pdf:content~Q } }
+ { \tex_special:D { pdf:econtent } }
%</dvipdfmx|xdvipdfmx>
%</!pdfmode>
% \end{macrocode}
@@ -245,56 +245,67 @@
%<*pdfmode>
\cs_if_exist:NTF \pdftex_pdfsave:D
{
- \cs_new_eq:NN \@@_graphic_state_save: \pdftex_pdfsave:D
- \cs_new_eq:NN \@@_graphic_state_restore: \pdftex_pdfrestore:D
+ \cs_new_eq:NN \@@_state_save: \pdftex_pdfsave:D
+ \cs_new_eq:NN \@@_state_restore: \pdftex_pdfrestore:D
}
{
- \cs_new_protected_nopar:Npn \@@_graphic_state_save:
+ \cs_new_protected_nopar:Npn \@@_state_save:
{ \pdftex_pdfliteral:D { q } }
- \cs_new_protected_nopar:Npn \@@_graphic_state_restore:
+ \cs_new_protected_nopar:Npn \@@_state_restore:
{ \pdftex_pdfliteral:D { Q } }
}
%</pdfmode>
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{\@@_pdf_literal:n, \@@_pdf_literal_direct:n}
-% Both direct PDF mode and \texttt{xdvipdfmx} make use of direct PDF
-% special insertion. These are slightly different in the two cases.
-% The |direct| versions do not save the current matrix.
+%
+% \begin{macro}[int]{\@@_literal:n}
+% The driver code needs to pass on a lot of \enquote{raw} information to
+% the underlying binary. The exact command is driver-dependent but the
+% concept is general enough to use a single function. However, it is
+% important to remember this is a convenient shortcut: the arguments will
+% be driver-specific.
% \begin{macrocode}
-%<*!dvips>
-\cs_new_protected:Npn \@@_pdf_literal:n #1
-%<*pdfmode>
- { \pdftex_pdfliteral:D {#1} }
-%</pdfmode>
+\cs_new_protected:Npn \@@_literal:n #1
%<*dvipdfmx|xdvipdfmx>
- { \tex_special:D { pdf:content~ #1 } }
+ { \tex_special:D { pdf:literal~ #1 } }
%</dvipdfmx|xdvipdfmx>
-\cs_new_protected:Npn \@@_pdf_literal_direct:n #1
+%<*dvips>
+ { \tex_special:D { ps: #1 } }
+%</dvips>
%<*pdfmode>
- { \pdftex_pdfliteral:D direct~{#1} }
+ { \pdftex_pdfliteral:D {#1} }
%</pdfmode>
-%<*dvipdfmx|xdvipdfmx>
- { \tex_special:D { pdf:literal~direct~ #1 } }
-%</dvipdfmx|xdvipdfmx>
-%</!dvips>
% \end{macrocode}
% \end{macro}
-%
-% \begin{macro}{\@@_ps_literal:n}
-% The same concept for PostScript: these are \enquote{direct} by default,
-% but by keeping the same name life should be a little clearer.
+%
+% \begin{macro}[int]{\@@_matrix:n}
+% Here the appropriate function is set up to insert an affine matrix
+% into the PDF. With a new enough \pdfTeX{} (version~1.40.0 or later)
+% there is a primitive for this, which only needs the rotation/scaling/skew
+% part. With an older \pdfTeX{} or with \texttt{(x)dvipdfmx} the matrix
+% also has to include a translation part: that is always zero and so is
+% built in here.
% \begin{macrocode}
-%<*dvips>
-\cs_new_protected:Npn \@@_ps_literal:n #1
- { \tex_special:D { ps: #1 } }
-%</dvips>
+%<*pdfmode>
+\cs_if_exist:NTF \pdftex_pdfsetmatrix:D
+ {
+ \cs_new_protected:Npn \@@_matrix:n #1
+ { \pdftex_pdfsetmatrix:D {#1} }
+ }
+ {
+ \cs_new_protected:Npn \@@_matrix:n #1
+ { \@@_literal:n { #1 \c_space_tl 0~0~cm } }
+ }
+%</pdfmode>
+%<*dvipdfmx|xdvipdfmx>
+\cs_new_protected:Npn \@@_matrix:n #1
+ { \@@_literal:n { direct~ #1 \c_space_tl 0~0~cm } }
+%</dvipdfmx|xdvipdfmx>
% \end{macrocode}
% \end{macro}
%
% \subsection{Box clipping}
-%
+%
% \begin{macro}{\@@_box_use_clip:N}
% The overall logic to clipping a box is the same in all cases. The general
% method is to save the current location, define a clipping path equivalent
@@ -307,27 +318,15 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_box_use_clip:N #1
{
- \@@_graphic_state_save:
-% \end{macrocode}
-% The business end of the code sets up the clip box, using the higher-level
-% rectangle operators rather than the lower level direct line drawing. This
-% makes sense for a simple rectangular clip. There are a couple of approaches
-% for \texttt{dvips}. The approach here is to save the current matrix,
-% then translate to the current \TeX{} position and switch to big point
-% measurement. The clip box can then be set up using the same conversion
-% as for direct PDF output: notice that here the $y$-axis is upside down.
-% The original matrix is then restored, so that \TeX{} inserts material
-% in the correct place (there is an offset between the PostScript and
-% \TeX{} current positions).
-% \begin{macrocode}
%<*dvips>
- \@@_ps_literal:n
+ \@@_state_save:
+ \@@_literal:n
{
/savedmatrix~matrix~currentmatrix~def~
currentpoint~translate~
Resolution~72~div~VResolution~72~div~scale
}
- \@@_ps_literal:n
+ \@@_literal:n
{
0~
\__dim_strip_bp:n { \box_dp:N #1 } ~
@@ -335,23 +334,34 @@
\__dim_strip_bp:n { - \box_ht:N #1 - \box_dp:N #1 } ~
rectclip
}
- \@@_ps_literal:n { savedmatrix~setmatrix }
+ \@@_literal:n { savedmatrix~setmatrix }
%</dvips>
% \end{macrocode}
% The PDF box is easier to define as it is automatically in big points and
% as the driver deals with the relationship between the \TeX{} and graphics
-% locations automatically.
+% locations automatically. The only slight issue is the need to handle
+% \texttt{(x)dvipdfmx}'s requirements for mixing PostScript and PDF code:
+% using the standard save/restore stack here fails.
% \begin{macrocode}
-%<*!dvips>
- \@@_pdf_literal_direct:n
+%<*dvipdfmx|xdvipdfmx>
+ \@@_literal:n { q }
+%</dvipdfmx|xdvipdfmx>
+%<*pdfmode>
+ \@@_state_save:
+%</pdfmode>
+%<*dvipdfmx|pdfmode|xdvipdfmx>
+ \@@_literal:n
{
- 0 ~
+%<*dvipdfmx|xdvipdfmx>
+ direct~
+%</dvipdfmx|xdvipdfmx>
+ 0~
\__dim_strip_bp:n { - \box_dp:N #1 } ~
\__dim_strip_bp:n { \box_wd:N #1 } ~
\__dim_strip_bp:n { \box_ht:N #1 + \box_dp:N #1 } ~
re~W~n
}
-%</!dvips>
+%</dvipdfmx|pdfmode|xdvipdfmx>
% \end{macrocode}
% For \texttt{(x)dvipdfmx} the is a bit more to do yet. Using
% \texttt{pdf:bcontent}/\texttt{pdf:econtent} for scoping seems the easiest
@@ -367,9 +377,9 @@
% then the extra scope is closed (below).
% \begin{macrocode}
%<*dvipdfmx|xdvipdfmx>
- \@@_pdf_matrix:n { -1~0~0~-1 }
- \@@_graphic_state_save:
- \@@_pdf_matrix:n { -1~0~0~-1 }
+ \@@_matrix:n { -1~0~0~-1 }
+ \@@_literal:n { q }
+ \@@_matrix:n { -1~0~0~-1 }
%</dvipdfmx|xdvipdfmx>
% \end{macrocode}
% Insert the material in a box of no width, restore the graphic state
@@ -377,9 +387,12 @@
% \begin{macrocode}
\hbox_overlap_right:n { \box_use:N #1 }
%<*dvipdfmx|xdvipdfmx>
- \@@_graphic_state_restore:
+ \@@_literal:n { Q }
+ \@@_literal:n { Q }
%</dvipdfmx|xdvipdfmx>
- \@@_graphic_state_restore:
+%<*dvips|pdfmode>
+ \@@_state_restore:
+%</dvips|pdfmode>
\skip_horizontal:n { \box_wd:N #1 }
}
% \end{macrocode}
@@ -390,7 +403,7 @@
% \begin{macro}{\@@_box_rotate_begin:, \@@_box_rotate_end:}
% The driver for \texttt{dvips} works with a simple rotation angle.
% In PDF mode, an affine matrix is used instead. The transformation for
-% \texttt{xdvipdfmx} can be done either way: to have some code sharing,
+% \texttt{(x)dvipdfmx} can be done either way: to have some code sharing,
% the choice here is to use an affine approach (at least some code is
% shared in this way). For the \texttt{dvips}, that odd-looking
% |currentpoint| at the beginning is used to put this data onto the
@@ -408,27 +421,14 @@
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_box_rotate_begin:
{
- \@@_graphic_state_save:
-%<*dvips>
- \fp_set:Nn \l__box_angle_fp { round ( \l__box_angle_fp , 5 ) }
- \@@_ps_literal:n
- {
- currentpoint~
- currentpoint~translate~
- \fp_compare:nNnTF \l__box_angle_fp = \c_zero_fp
- { 0 }
- { \fp_eval:n { - \l__box_angle_fp } }
- \c_space_tl rotate~
- neg~exch~neg~exch~translate
- }
-%</dvips>
-%<*!dvips>
+ \@@_state_save:
+%<*dvipdfmx|pdfmode|xdvipdfmx>
\box_set_wd:Nn \l__box_internal_box \c_zero_dim
\fp_set:Nn \l__box_cos_fp { round ( \l__box_cos_fp , 5 ) }
\fp_compare:nNnT \l__box_cos_fp = \c_zero_fp
{ \fp_zero:N \l__box_cos_fp }
\fp_set:Nn \l__box_sin_fp { round ( \l__box_sin_fp , 5 ) }
- \@@_pdf_matrix:n
+ \@@_matrix:n
{
\fp_use:N \l__box_cos_fp \c_space_tl
\fp_compare:nNnTF \l__box_sin_fp = \c_zero_fp
@@ -441,26 +441,40 @@
\c_space_tl
\fp_use:N \l__box_cos_fp
}
-%</!dvips>
+%</dvipdfmx|pdfmode|xdvipdfmx>
+%<*dvips>
+ \fp_set:Nn \l__box_angle_fp { round ( \l__box_angle_fp , 5 ) }
+ \@@_literal:n
+ {
+ currentpoint~
+ currentpoint~translate~
+ \fp_compare:nNnTF \l__box_angle_fp = \c_zero_fp
+ { 0 }
+ { \fp_eval:n { - \l__box_angle_fp } }
+ \c_space_tl rotate~
+ neg~exch~neg~exch~translate
+ }
+%</dvips>
}
% \end{macrocode}
+% \end{macro}
% The end of a rotation means tidying up the output grouping.
% \begin{macrocode}
-\cs_new_eq:NN \@@_box_rotate_end: \@@_graphic_state_restore:
+\cs_new_eq:NN \@@_box_rotate_end: \@@_state_restore:
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\@@_box_scale_begin:, \@@_box_scale_end:}
% Scaling is not dissimilar to rotation, but the calculations are somewhat
% less complex.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_box_scale_begin:
{
+ \@@_state_save:
\fp_set:Nn \l__box_scale_x_fp { round ( \l__box_scale_x_fp , 5 ) }
\fp_set:Nn \l__box_scale_y_fp { round ( \l__box_scale_y_fp , 5 ) }
- \@@_graphic_state_save:
%<*dvips>
- \@@_ps_literal:n
+ \@@_literal:n
{
currentpoint~
currentpoint~translate~
@@ -469,67 +483,41 @@
neg~exch~neg~exch~translate
}
%</dvips>
-%<*!dvips>
- \@@_pdf_matrix:n
+%<*dvipdfmx|pdfmode|xdvipdfmx>
+ \@@_matrix:n
{
\fp_use:N \l__box_scale_x_fp \c_space_tl
0~0~
\fp_use:N \l__box_scale_y_fp
}
-%</!dvips>
+%</dvipdfmx|pdfmode|xdvipdfmx>
}
-\cs_new_eq:NN \@@_box_scale_end: \@@_graphic_state_restore:
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_pdf_matrix:n}
-% Here the appropriate function is set up to insert an affine matrix
-% into the PDF. With a new enough \pdfTeX{} (version~1.40.0 or later)
-% there is a primitive for this, which only needs the rotation/scaling/skew
-% part. With an older \pdfTeX{} or with \texttt{xdvipdfmx} the matrix
-% also has to include a translation part: that is always zero and so is
-% built in here.
-% \begin{macrocode}
-%<*pdfmode>
-\cs_if_exist:NTF \pdftex_pdfsetmatrix:D
- {
- \cs_new_protected:Npn \@@_pdf_matrix:n #1
- { \pdftex_pdfsetmatrix:D {#1} }
- }
- {
- \cs_new_protected:Npn \@@_pdf_matrix:n #1
- { \@@_pdf_literal:n { #1 \c_space_tl 0~0~cm } }
- }
-%</pdfmode>
-%<*dvipdfmx|xdvipdfmx>
-\cs_new_protected:Npn \@@_pdf_matrix:n #1
- { \@@_pdf_literal_direct:n { #1 \c_space_tl 0~0~cm } }
-%</dvipdfmx|xdvipdfmx>
+\cs_new_eq:NN \@@_box_scale_end: \@@_state_restore:
% \end{macrocode}
% \end{macro}
%
-% \subsection{Colour support}
+% \subsection{Color support}
%
% \begin{variable}{\l_@@_current_color_tl}
% The current color is needed by all of the engines, but the way this
% is stored varies.
% \begin{macrocode}
\tl_new:N \l_@@_current_color_tl
+%<*dvipdfmx|xdvipdfmx>
+\tl_set:Nn \l_@@_current_color_tl { gray~0 }
+%</dvipdfmx|xdvipdfmx>
%<*dvips>
\tl_set:Nn \l_@@_current_color_tl { Black }
%</dvips>
%<*pdfmode>
\tl_set:Nn \l_@@_current_color_tl { 0~g~0~G }
%</pdfmode>
-%<*dvipdfmx|xdvipdfmx>
-\tl_set:Nn \l_@@_current_color_tl { gray~0 }
-%</dvipdfmx|xdvipdfmx>
-% \end{macrocode}
+%% \end{macrocode}
% \end{variable}
%
% \begin{variable}{\l_@@_color_stack_int}
% \pdfTeX{} (version~1.40.0 or later) and \LuaTeX{} have multiple stacks
-% available, and the color stack therefore needs a number.
+% available, and the color stack therefore needs a number when in PDF mode.
% \begin{macrocode}
%<*pdfmode>
\int_new:N \l_@@_color_stack_int
@@ -543,7 +531,7 @@
% available. In all cases there is a need to reset the color after
% the current group.
% \begin{macrocode}
-%<*!pdfmode>
+%<*dvipdfmx|dvips|xdvipdfmx>
\cs_new_protected_nopar:Npn \@@_color_ensure_current:
{
\tex_special:D { color~push~\l_@@_current_color_tl }
@@ -551,7 +539,7 @@
}
\cs_new_protected_nopar:Npn \@@_color_reset:
{ \tex_special:D { color~pop } }
-%</!pdfmode>
+%</dvipdfmx|dvips|xdvipdfmx>
% \end{macrocode}
% Once again there is a version switch for \pdfTeX{}, as the
% \tn{pdfcolorstack} primitive was introduced in version~1.40.0.
@@ -571,11 +559,11 @@
{
\cs_new_protected_nopar:Npn \@@_color_ensure_current:
{
- \@@_pdf_literal:n { \l_@@_current_color_tl }
+ \@@_literal:n { \l_@@_current_color_tl }
\group_insert_after:N \@@_color_reset:
}
\cs_new_protected_nopar:Npn \@@_color_reset:
- { \@@_pdf_literal:n { \l_@@_current_color_tl } }
+ { \@@_literal:n { \l_@@_current_color_tl } }
}
%</pdfmode>
% \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 ee40577fbe8..03708beff6f 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 4601 2013-11-18 23:13:28Z bruno $
+\GetIdInfo$Id: l3fp-aux.dtx 4622 2013-12-14 13:05:45Z bruno $
{L3 Floating-point support functions}
\documentclass[full]{l3doc}
\begin{document}
@@ -211,7 +211,6 @@
% (typically digits).
% \begin{macrocode}
\cs_new:Npn \@@_use_s:n #1 { #1; }
-\cs_new:Npn \@@_use_braced_s:n #1 { {#1} ; }
\cs_new:Npn \@@_use_s:nn #1#2 { #1#2; }
% \end{macrocode}
% \end{macro}
@@ -244,11 +243,12 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_use_i:ww}
+% \begin{macro}[int, EXP]{\@@_use_i:ww, \@@_use_i:www}
% Many internal functions take arguments delimited by semicolons, and
-% it is occasionally useful to remove one such argument.
+% it is occasionally useful to remove one or two such arguments.
% \begin{macrocode}
\cs_new:Npn \@@_use_i:ww #1; #2; { #1; }
+\cs_new:Npn \@@_use_i:www #1; #2; #3; { #1; }
% \end{macrocode}
% \end{macro}
%
@@ -591,7 +591,7 @@
% provide different sets of packing functions and shifts, depending on
% ranges of input.
%
-% \begin{macro}[int, EXP]{\@@_pack:NNNNNw, \@@_pack:NNNNNwn}
+% \begin{macro}[int, EXP]{\@@_pack:NNNNNw}
% \begin{variable}[int]
% {
% \c_@@_trailing_shift_int ,
@@ -600,20 +600,17 @@
% }
% This set of shifts allows for computations involving results in the
% range $[-4\cdot 10^{8}, 5\cdot 10^{8}-1]$. Shifted values all have
-% exactly $9$ digits. The \cs{@@_pack:NNNNNwn} function brings a
-% braced \meta{continuation} up through the levels of expansion.
+% exactly $9$ digits.
% \begin{macrocode}
\int_const:Nn \c_@@_leading_shift_int { - 5 0000 }
\int_const:Nn \c_@@_middle_shift_int { 5 0000 * 9999 }
\int_const:Nn \c_@@_trailing_shift_int { 5 0000 * 10000 }
\cs_new:Npn \@@_pack:NNNNNw #1 #2#3#4#5 #6; { + #1#2#3#4#5 ; {#6} }
-\cs_new:Npn \@@_pack:NNNNNwn #1 #2#3#4#5 #6; #7
- { + #1#2#3#4#5 ; {#7} {#6} }
% \end{macrocode}
% \end{variable}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_pack_big:NNNNNNw, \@@_pack_big:NNNNNNwn}
+% \begin{macro}[int, EXP]{\@@_pack_big:NNNNNNw}
% \begin{variable}[int]
% {
% \c_@@_big_trailing_shift_int ,
@@ -632,8 +629,6 @@
\int_const:Nn \c_@@_big_trailing_shift_int { 15 2374 * 10000 }
\cs_new:Npn \@@_pack_big:NNNNNNw #1#2 #3#4#5#6 #7;
{ + #1#2#3#4#5#6 ; {#7} }
-\cs_new:Npn \@@_pack_big:NNNNNNwn #1#2 #3#4#5#6 #7; #8
- { + #1#2#3#4#5#6 ; {#8} {#7} }
% \end{macrocode}
% \end{variable}
% \end{macro}
@@ -949,9 +944,9 @@
% \@@_small_int_normal:NnwTF,
% \@@_small_int_test:NnnwNTF
% }
-% This function tests if its floating point argument is an integer in
-% the range $[-99999999,99999999]$. If it is, the result of the
-% conversion is fed as a braced argument to the \meta{true code}.
+% Tests if the floating point argument is an integer or $\pm\infty$.
+% If so, it is converted to an integer in the range $[-10^{8},10^{8}]$
+% and fed as a braced argument to the \meta{true code}.
% Otherwise, the \meta{false code} is performed. First filter special
% cases: neither \texttt{nan} nor infinities are integers. Normal
% numbers with a non-positive exponent are never integers. When the
@@ -967,38 +962,45 @@
% coming from \cs{@@_small_int_normal:NnwTF}, hence will call the
% \cs{use_iii:nnn} which follows, taking the false branch.
% \begin{macrocode}
-\cs_new:Npn \@@_small_int:wTF \s_@@ \@@_chk:w #1
+\cs_new:Npn \@@_small_int:wTF \s_@@ \@@_chk:w #1#2
{
\if_case:w #1 \exp_stop_f:
\@@_case_return:nw { \@@_small_int_true:wTF 0 ; }
\or: \exp_after:wN \@@_small_int_normal:NnwTF
+ \or:
+ \@@_case_return:nw
+ {
+ \exp_after:wN \@@_small_int_true:wTF \__int_value:w
+ \if_meaning:w 2 #2 - \fi: 1 0000 0000 ;
+ }
\else: \@@_case_return:nw \use_ii:nn
\fi:
+ #2
}
\cs_new:Npn \@@_small_int_true:wTF #1; #2#3 { #2 {#1} }
\cs_new:Npn \@@_small_int_normal:NnwTF #1#2#3;
{
\if_int_compare:w #2 > \c_zero
- \if_int_compare:w #2 > \c_eight
- \exp_after:wN \exp_after:wN
- \exp_after:wN \use_iii:nnn
- \else:
- \@@_decimate:nNnnnn { \c_sixteen - #2 }
- \@@_small_int_test:NnnwNTF
- #3 #1
- \fi:
+ \@@_decimate:nNnnnn { \c_sixteen - #2 }
+ \@@_small_int_test:NnnwNnw
+ #3 #1 {#2}
\else:
\exp_after:wN \use_iii:nnn
\fi:
;
}
-\cs_new:Npn \@@_small_int_test:NnnwNTF #1#2#3#4; #5
+\cs_new:Npn \@@_small_int_test:NnnwNnw #1#2#3#4; #5#6
{
\if_meaning:w 0 #1
\exp_after:wN \@@_small_int_true:wTF
- \__int_value:w \if_meaning:w 2 #5 - \fi: #3
+ \__int_value:w \if_meaning:w 2 #5 - \fi:
+ \if_int_compare:w #6 > \c_eight
+ 1 0000 0000
+ \else:
+ #3
+ \fi:
\else:
- \exp_after:wN \use_i:nn
+ \use_i:nn
\fi:
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
index 104a118ca3b..d5ddae31ab0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
@@ -36,7 +36,7 @@
%
%<*driver>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-basics.dtx 4601 2013-11-18 23:13:28Z bruno $
+\GetIdInfo$Id: l3fp-basics.dtx 4619 2013-12-14 12:53:54Z bruno $
{L3 Floating-point arithmetic}
\documentclass[full]{l3doc}
\begin{document}
@@ -107,12 +107,7 @@
% |{0000}|.
% \begin{macrocode}
\cs_new:Npn \@@_basics_pack_low:NNNNNw #1 #2#3#4#5 #6;
- {
- \if_meaning:w 2 #1
- + \c_one
- \fi:
- ; {#2#3#4#5} {#6} ;
- }
+ { + #1 - \c_one ; {#2#3#4#5} {#6} ; }
\cs_new:Npn \@@_basics_pack_high:NNNNNw #1 #2#3#4#5 #6;
{
\if_meaning:w 2 #1
@@ -1599,7 +1594,495 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{Unary operations}
+% \subsection{Square root}
+%
+% \begin{macro}[int, EXP]{\@@_sqrt_o:w}
+% Zeros are unchanged: $\sqrt{-0} = -0$ and $\sqrt{+0} = +0$.
+% Negative numbers (other than $-0$) have no real square root.
+% Positive infinity, and \texttt{nan}, are unchanged. Finally, for
+% normal positive numbers, there is some work to do.
+% \begin{macrocode}
+\cs_new:Npn \@@_sqrt_o:w #1 \s_@@ \@@_chk:w #2#3#4; @
+ {
+ \if_meaning:w 0 #2 \@@_case_return_same_o:w \fi:
+ \if_meaning:w 2 #3
+ \@@_case_use:nw { \@@_invalid_operation_o:nw { sqrt } }
+ \fi:
+ \if_meaning:w 1 #2 \else: \@@_case_return_same_o:w \fi:
+ \@@_sqrt_npos_o:w
+ \s_@@ \@@_chk:w #2 #3 #4;
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux, EXP]{\@@_sqrt_npos_o:w}
+% \begin{macro}[aux, rEXP]
+% {\@@_sqrt_npos_auxi_o:wwnnN, \@@_sqrt_npos_auxii_o:wNNNNNNNN}
+% Prepare \cs{@@_sanitize:Nw} to receive the final sign~|0| (the
+% result is always positive) and the exponent, equal to half of the
+% exponent~|#1| of the argument. If the exponent~|#1| is even, find a
+% first approximation of the square root of the significand $10^{8}
+% a_1 + a_2 = 10^{8} |#2#3| + |#4#5|$ through Newton's method,
+% starting at $x = 57234133 \simeq 10^{7.75}$. Otherwise, first shift
+% the significand of of the argument by one digit, getting
+% $a_1'\in[10^{6}, 10^{7})$ instead of $[10^{7}, 10^{8})$, then use
+% Newton's method starting at $17782794 \simeq 10^{7.25}$.
+% \begin{macrocode}
+\cs_new:Npn \@@_sqrt_npos_o:w \s_@@ \@@_chk:w 1 0 #1#2#3#4#5;
+ {
+ \exp_after:wN \@@_sanitize:Nw
+ \exp_after:wN 0
+ \int_use:N \__int_eval:w
+ \if_int_odd:w #1 \exp_stop_f:
+ \exp_after:wN \@@_sqrt_npos_auxi_o:wwnnN
+ \fi:
+ #1 / \c_two
+ \@@_sqrt_Newton_o:wwn 56234133; 0; {#2#3} {#4#5} 0
+ }
+\cs_new:Npn \@@_sqrt_npos_auxi_o:wwnnN #1 / \c_two #2; 0; #3#4#5
+ {
+ ( #1 + \c_one ) / \c_two
+ \@@_pack_eight:wNNNNNNNN
+ \@@_sqrt_npos_auxii_o:wNNNNNNNN
+ ;
+ 0 #3 #4
+ }
+\cs_new:Npn \@@_sqrt_npos_auxii_o:wNNNNNNNN #1; #2#3#4#5#6#7#8#9
+ { \@@_sqrt_Newton_o:wwn 17782794; 0; {#1} {#2#3#4#5#6#7#8#9} }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux, rEXP]{\@@_sqrt_Newton_o:wwn}
+% Newton's method maps $x\mapsto\bigl[(x + [10^{8} a_1 / x])/2\bigr]$
+% in each iteration, where $[b/c]$ denotes \eTeX{}'s division. This
+% division rounds the real number $b/c$ to the closest integer,
+% rounding ties away from zero, hence when $c$~is even,
+% $b/c - 1/2 + 1/c \leq [b/c] \leq b/c + 1/2$
+% and when $c$~is odd,
+% $b/c - 1/2 + 1/(2c) \leq [b/c] \leq b/c + 1/2 - 1/(2c)$.
+% For all~$c$, $b/c - 1/2 + 1/(2c) \leq [b/c] \leq b/c + 1/2$.
+%
+% Let us prove that the method converges when implemented with \eTeX{}
+% integer division, for any $10^{6} \leq a_1 < 10^{8}$ and starting
+% value $10^{6} \leq x < 10^{8}$. Using the inequalities above and
+% the arithmetic--geometric inequality $(x+t)/2 \geq \sqrt{xt}$ for $t
+% = 10^{8} a_1 / x$, we find
+% \[
+% x'
+% = \left[\frac{x + [10^{8} a_1 / x]}{2}\right]
+% \geq \frac{x + 10^{8} a_1 / x - 1/2 + 1/(2x)}{2}
+% \geq \sqrt{10^{8} a_1} - \frac{1}{4} + \frac{1}{4x} \,.
+% \]
+% After any step of iteration, we thus have $\delta = x - \sqrt{10^{8}
+% a_1} \geq -0.25 + 0.25 \cdot 10^{-8}$. The new difference
+% $\delta' = x' - \sqrt{10^{8} a_1}$ after one step is bounded above
+% as
+% \[
+% x' - \sqrt{10^{8} a_1}
+% \leq \frac{x + 10^{8} a_1 / x + 1/2}{2} + \frac{1}{2}
+% - \sqrt{10^{8} a_1}
+% \leq \frac{\delta}{2} \frac{\delta}{\sqrt{10^{8} a_1} + \delta}
+% + \frac{3}{4} \,.
+% \]
+% For $\delta > 3/2$, this last expression is
+% $\leq\delta/2+3/4<\delta$, hence $\delta$~decreases at each step:
+% since all~$x$ are integers, $\delta$~must reach a value
+% $-1/4<\delta\leq 3/2$. In this range of values, we get $\delta'
+% \leq \frac{3}{4} \frac{3}{2\sqrt{10^{8} a_1}} + \frac{3}{4} \leq
+% 0.75 + 1.125 \cdot 10^{-7}$. We deduce that the difference $\delta
+% = x - \sqrt{10^{8} a_1}$ eventually reaches a value in the interval
+% $[-0.25 + 0.25\cdot 10^{-8}, 0.75 + 11.25 \cdot 10^{-8}]$, whose
+% width is $1 + 11 \cdot 10^{-8}$. The corresponding interval for~$x$
+% may contain two integers, hence $x$~might oscillate between those
+% two values.
+%
+% However, the fact that $x\mapsto x-1$ and $x-1 \mapsto x$ puts
+% stronger constraints, which are not compatible: the first implies
+% \[
+% x + [10^{8} a_1 / x] \leq 2x - 2
+% \]
+% hence $10^{8} a_1 / x \leq x - 3/2$, while the second implies
+% \[
+% x - 1 + [10^{8} a_1 / (x - 1)] \geq 2x - 1
+% \]
+% hence $10^{8} a_1 / (x - 1) \geq x - 1/2$. Combining the two
+% inequalities yields $x^2 - 3x/2 \geq 10^{8} a_1 \geq x - 3x/2 +
+% 1/2$, which cannot hold. Therefore, the iteration always converges
+% to a single integer~$x$. To stop the iteration when two consecutive
+% results are equal, the function \cs{@@_sqrt_Newton_o:wwn} receives
+% the newly computed result as~|#1|, the previous result as~|#2|, and
+% $a_1$ as~|#3|. Note that \eTeX{} combines the computation of a
+% multiplication and a following division, thus avoiding overflow in
+% |#3 * 100000000 / #1|. In any case, the result is within $[10^{7},
+% 10^{8}]$.
+% \begin{macrocode}
+\cs_new:Npn \@@_sqrt_Newton_o:wwn #1; #2; #3
+ {
+ \if_int_compare:w #1 = #2 \exp_stop_f:
+ \exp_after:wN \@@_sqrt_auxi_o:NNNNwnnN
+ \int_use:N \__int_eval:w 9999 9999 +
+ \exp_after:wN \@@_use_none_until_s:w
+ \fi:
+ \exp_after:wN \@@_sqrt_Newton_o:wwn
+ \int_use:N \__int_eval:w (#1 + #3 * 1 0000 0000 / #1) / \c_two ;
+ #1; {#3}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux, rEXP]{\@@_sqrt_auxi_o:NNNNwnnN}
+% This function is followed by $10^{8}+x-1$, which has~$9$ digits
+% starting with~$1$, then |;| \Arg{a_1} \Arg{a_2} \meta{a'}. Here, $x
+% \simeq \sqrt{10^{8} a_1}$ and we want to estimate the square root of
+% $a = 10^{-8} a_1 + 10^{-16} a_2 + 10^{-17} a'$. We set up an
+% initial underestimate
+% \[
+% y = (x - 1) 10^{-8} + 0.2499998875 \cdot 10^{-8} \lesssim \sqrt{a}\,.
+% \]
+% From the inequalities shown earlier, we know that $y \leq
+% \sqrt{10^{-8} a_1} \leq \sqrt{a}$ and that $\sqrt{10^{-8} a_1} \leq
+% y + 10^{-8} + 11\cdot 10^{-16}$ hence (using $0.1\leq y\leq
+% \sqrt{a}\leq 1$)
+% \[
+% a - y^2 \leq 10^{-8} a_1 + 10^{-8} - y^2
+% \leq (y + 10^{-8} + 11\cdot 10^{-16})^2 - y^2 + 10^{-8}
+% < 3.2 \cdot 10^{-8} \,,
+% \]
+% and $\sqrt{a} - y = (a - y^2)/(\sqrt{a} + y) \leq 16 \cdot 10^{-8}$.
+% Next, \cs{@@_sqrt_auxii_o:NnnnnnnnN} will be called several times to
+% get closer and closer underestimates of~$\sqrt{a}$. By
+% construction, the underestimates~$y$ are always increasing, $a - y^2
+% < 3.2 \cdot 10^{-8}$ for all. Also, $y<1$.
+% \begin{macrocode}
+\cs_new:Npn \@@_sqrt_auxi_o:NNNNwnnN 1 #1#2#3#4#5;
+ {
+ \@@_sqrt_auxii_o:NnnnnnnnN
+ \@@_sqrt_auxiii_o:wnnnnnnnn
+ {#1#2#3#4} {#5} {2499} {9988} {7500}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux, rEXP]{\@@_sqrt_auxii_o:NnnnnnnnN}
+% This receives a continuation function~|#1|, then five blocks of~$4$
+% digits for~$y$, then two $8$-digit blocks and a single digit
+% for~$a$. A common estimate of $\sqrt{a} - y = (a - y^2) / (\sqrt{a}
+% + y)$ is $(a - y^2)/(2y)$, which leads to alternating overestimates
+% and underestimates. We tweak this, to only work with underestimates
+% (no need then to worry about signs in the computation). Each step
+% finds the largest integer $j\leq 6$ such that $10^{4j}(a-y^2) <
+% 2\cdot 10^{8}$, then computes the integer (with \eTeX{}'s rounding
+% division)
+% \[
+% 10^{4j} z =
+% \Bigl[\bigl(\lfloor 10^{4j}(a-y^2)\rfloor - 257\bigr)
+% \cdot (0.5\cdot 10^{8})
+% \Bigm/ \lfloor 10^{8} y + 1\rfloor\Bigr] \,.
+% \]
+% The choice of~$j$ ensures that $10^{4j} z < 2\cdot 10^{8} \cdot
+% 0.5\cdot 10^{8} / 10^{7} = 10^{9}$, thus $10^{9} + 10^{4j} z$ has
+% exactly $10$~digits, does not overflow \TeX{}'s integer range, and
+% starts with~$1$. Incidentally, since all $a - y^2 \leq 3.2\cdot
+% 10^{-8}$, we know that $j\geq 3$.
+%
+% Let us show that $z$ is an underestimate of $\sqrt{a} - y$. On the
+% one hand, $\sqrt{a} - y \leq 16\cdot 10^{-8}$ because this holds for
+% the initial~$y$ and values of~$y$ can only increase. On the other
+% hand, the choice of~$j$ implies that $\sqrt{a} - y \leq
+% 5(\sqrt{a}+y)(\sqrt{a}-y) = 5(a - y^2) < 10^{9-4j}$. For $j=3$, the
+% first bound is better, while for larger~$j$, the second bound is
+% better. For all $j\in[3,6]$, we find $\sqrt{a}-y < 16\cdot
+% 10^{-2j}$. From this, we deduce that
+% \[
+% 10^{4j} (\sqrt{a}-y)
+% = \frac{10^{4j}\bigl(a-y^2-(\sqrt{a}-y)^2\bigr)}{2y}
+% \geq \frac{\bigl\lfloor 10^{4j}(a-y^2)\bigr\rfloor-257}
+% {2\cdot 10^{-8} \lfloor 10^{8}y+1\rfloor}
+% + \frac{1}{2}
+% \]
+% where we have replaced the bound $10^{4j}(16\cdot 10^{-2j}) = 256$
+% by~$257$ and extracted the corresponding term $1/\bigl(2\cdot
+% 10^{-8} \lfloor 10^{8}y+1\rfloor\bigr) \geq 1/2$. Given that
+% \eTeX{}'s integer division obeys $[b/c] \leq b/c + 1/2$, we deduce
+% that $10^{4j} z \leq 10^{4j} (\sqrt{a}-y)$, hence $y+z\leq\sqrt{a}$
+% is an underestimate of~$\sqrt{a}$, as claimed. One implementation
+% detail: because the computation involves |-#4*#4| |-| |2*#3*#5| |-|
+% |2*#2*#6| which may be as low as $-5\cdot 10^{8}$, we need to use
+% the \texttt{pack_big} functions, and the \texttt{big} shifts.
+% \begin{macrocode}
+\cs_new:Npn \@@_sqrt_auxii_o:NnnnnnnnN #1 #2#3#4#5#6 #7#8#9
+ {
+ \exp_after:wN #1
+ \int_use:N \__int_eval:w \c_@@_big_leading_shift_int
+ + #7 - #2 * #2
+ \exp_after:wN \@@_pack_big:NNNNNNw
+ \int_use:N \__int_eval:w \c_@@_big_middle_shift_int
+ - 2 * #2 * #3
+ \exp_after:wN \@@_pack_big:NNNNNNw
+ \int_use:N \__int_eval:w \c_@@_big_middle_shift_int
+ + #8 - #3 * #3 - 2 * #2 * #4
+ \exp_after:wN \@@_pack_big:NNNNNNw
+ \int_use:N \__int_eval:w \c_@@_big_middle_shift_int
+ - 2 * #3 * #4 - 2 * #2 * #5
+ \exp_after:wN \@@_pack_big:NNNNNNw
+ \int_use:N \__int_eval:w \c_@@_big_middle_shift_int
+ + #9 000 0000 - #4 * #4 - 2 * #3 * #5 - 2 * #2 * #6
+ \exp_after:wN \@@_pack_big:NNNNNNw
+ \int_use:N \__int_eval:w \c_@@_big_middle_shift_int
+ - 2 * #4 * #5 - 2 * #3 * #6
+ \exp_after:wN \@@_pack_big:NNNNNNw
+ \int_use:N \__int_eval:w \c_@@_big_middle_shift_int
+ - #5 * #5 - 2 * #4 * #6
+ \exp_after:wN \@@_pack_big:NNNNNNw
+ \int_use:N \__int_eval:w
+ \c_@@_big_middle_shift_int
+ - 2 * #5 * #6
+ \exp_after:wN \@@_pack_big:NNNNNNw
+ \int_use:N \__int_eval:w
+ \c_@@_big_trailing_shift_int
+ - #6 * #6 ;
+ % (
+ - 257 ) * 5000 0000 / (#2#3 + 1) + 10 0000 0000 ;
+ {#2}{#3}{#4}{#5}{#6} {#7}{#8}#9
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux, rEXP]
+% {
+% \@@_sqrt_auxiii_o:wnnnnnnnn,
+% \@@_sqrt_auxiv_o:NNNNNw,
+% \@@_sqrt_auxv_o:NNNNNw,
+% \@@_sqrt_auxvi_o:NNNNNw,
+% \@@_sqrt_auxvii_o:NNNNNw
+% }
+% We receive here the difference $a-y^2=d=\sum_i d_i \cdot 10^{-4i}$,
+% as \meta{d_2} |;| \Arg{d_3} \ldots{} \Arg{d_{10}}, where each block
+% has~$4$ digits, except \meta{d_2}. This function finds the largest
+% $j\leq 6$ such that $10^{4j}(a-y^2) < 2\cdot 10^{8}$, then leaves an
+% open parenthesis and the integer
+% $\bigl\lfloor 10^{4j}(a-y^2)\bigr\rfloor$ in an integer
+% expression. The closing parenthesis is provided by the caller
+% \cs{@@_sqrt_auxii_o:NnnnnnnnN}, which completes the expression
+% \[
+% 10^{4j} z =
+% \Bigl[\bigl(\lfloor 10^{4j}(a-y^2)\rfloor - 257\bigr)
+% \cdot (0.5\cdot 10^{8})
+% \Bigm/ \lfloor 10^{8} y + 1\rfloor\Bigr]
+% \]
+% for an estimate of $10^{4j} (\sqrt{a} - y)$. If $d_2\geq 2$, $j=3$
+% and the \texttt{auxiv} auxiliary receives $10^{12} z$. If $d_2\leq
+% 1$ but $10^{4} d_2 + d_3 \geq 2$, $j=4$ and the \texttt{auxv}
+% auxiliary is called, and receives $10^{16} z$, and so on. In all
+% those cases, the \texttt{auxviii} auxiliary is set up to add~$z$
+% to~$y$, then go back to the \texttt{auxii} step with continuation
+% \texttt{auxiii} (the function we are currently describing). The
+% maximum value of $j$ is~$6$, regardless of whether $10^{12} d_2 +
+% 10^{8} d_3 + 10^{4} d_4 + d_5 \geq 1$. In this last case, we detect
+% when $10^{24} z < 10^{7}$, which essentially means $\sqrt{a} - y
+% \lesssim 10^{-17}$: once this threshold is reached, there is enough
+% information to find the correctly rounded~$\sqrt{a}$ with only one
+% more call to \cs{@@_sqrt_auxii_o:NnnnnnnnN}. Note that the
+% iteration cannot be stuck before reaching $j=6$, because for $j<6$,
+% one has $2\cdot 10^{8}\leq 10^{4(j+1)}(a-y^2)$, hence
+% \[
+% 10^{4j} z
+% \geq \frac{(20000-257)(0.5\cdot 10^{8})}{\lfloor 10^{8} y + 1\rfloor}
+% \geq (20000-257)\cdot 0.5 > 0 \,.
+% \]
+% \begin{macrocode}
+\cs_new:Npn \@@_sqrt_auxiii_o:wnnnnnnnn
+ #1; #2#3#4#5#6#7#8#9
+ {
+ \if_int_compare:w #1 > \c_one
+ \exp_after:wN \@@_sqrt_auxiv_o:NNNNNw
+ \int_use:N \__int_eval:w (#1#2 %)
+ \else:
+ \if_int_compare:w #1#2 > \c_one
+ \exp_after:wN \@@_sqrt_auxv_o:NNNNNw
+ \int_use:N \__int_eval:w (#1#2#3 %)
+ \else:
+ \if_int_compare:w #1#2#3 > \c_one
+ \exp_after:wN \@@_sqrt_auxvi_o:NNNNNw
+ \int_use:N \__int_eval:w (#1#2#3#4 %)
+ \else:
+ \exp_after:wN \@@_sqrt_auxvii_o:NNNNNw
+ \int_use:N \__int_eval:w (#1#2#3#4#5 %)
+ \fi:
+ \fi:
+ \fi:
+ }
+\cs_new:Npn \@@_sqrt_auxiv_o:NNNNNw 1#1#2#3#4#5#6;
+ { \@@_sqrt_auxviii_o:nnnnnnn {#1#2#3#4#5#6} {00000000} }
+\cs_new:Npn \@@_sqrt_auxv_o:NNNNNw 1#1#2#3#4#5#6;
+ { \@@_sqrt_auxviii_o:nnnnnnn {000#1#2#3#4#5} {#60000} }
+\cs_new:Npn \@@_sqrt_auxvi_o:NNNNNw 1#1#2#3#4#5#6;
+ { \@@_sqrt_auxviii_o:nnnnnnn {0000000#1} {#2#3#4#5#6} }
+\cs_new:Npn \@@_sqrt_auxvii_o:NNNNNw 1#1#2#3#4#5#6;
+ {
+ \if_int_compare:w #1#2 = \c_zero
+ \exp_after:wN \@@_sqrt_auxx_o:Nnnnnnnn
+ \fi:
+ \@@_sqrt_auxviii_o:nnnnnnn {00000000} {000#1#2#3#4#5}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux, rEXP]
+% {\@@_sqrt_auxviii_o:nnnnnnn, \@@_sqrt_auxix_o:wnwnw}
+% Simply add the two $8$-digit blocks of~$z$, aligned to the last four
+% of the five $4$-digit blocks of~$y$, then call the \texttt{auxii}
+% auxiliary to evaluate $y'^{2} = (y+z)^{2}$.
+% \begin{macrocode}
+\cs_new:Npn \@@_sqrt_auxviii_o:nnnnnnn #1#2 #3#4#5#6#7
+ {
+ \exp_after:wN \@@_sqrt_auxix_o:wnwnw
+ \int_use:N \__int_eval:w #3
+ \exp_after:wN \@@_basics_pack_low:NNNNNw
+ \int_use:N \__int_eval:w #1 + 1#4#5
+ \exp_after:wN \@@_basics_pack_low:NNNNNw
+ \int_use:N \__int_eval:w #2 + 1#6#7 ;
+ }
+\cs_new:Npn \@@_sqrt_auxix_o:wnwnw #1; #2#3; #4#5;
+ {
+ \@@_sqrt_auxii_o:NnnnnnnnN
+ \@@_sqrt_auxiii_o:wnnnnnnnn {#1}{#2}{#3}{#4}{#5}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux, rEXP]
+% {\@@_sqrt_auxx_o:Nnnnnnnn, \@@_sqrt_auxxi_o:wwnnN}
+% At this stage, $j=6$ and $10^{24} z < 10^{7}$, hence
+% \[
+% 10^{7} + 1/2 > 10^{24} z + 1/2 \geq
+% \bigl(10^{24}(a-y^2) - 258\bigr) \cdot (0.5\cdot 10^{8})
+% \Bigm/ (10^{8} y + 1) \,,
+% \]
+% then $10^{24}(a-y^2) - 258 < 2 (10^{7} + 1/2) (y + 10^{-8})$, and
+% \[
+% 10^{24}(a-y^2)
+% < (10^{7} + 1290.5) (1 + 10^{-8}/y) (2y)
+% < (10^{7} + 1290.5) (1 + 10^{-7}) (y + \sqrt{a}) \,,
+% \]
+% which finally implies $0\leq\sqrt{a}-y < 0.2\cdot 10^{-16}$. In
+% particular, $y$~is an underestimate of~$\sqrt{a}$ and $y+0.5\cdot
+% 10^{-16}$ is a (strict) overestimate. There is at exactly one
+% multiple $m$~of $0.5\cdot 10^{-16}$ in the interval $[y, y+0.5\cdot
+% 10^{-16})$. If $m^2>a$, then the square root is inexact and is
+% obtained by rounding $m-\epsilon$ to a multiple of $10^{-16}$ (the
+% precise shift $0<\epsilon<0.5\cdot 10^{-16}$ is irrelevant for
+% rounding). If $m^2=a$ then the square root is exactly~$m$, and
+% there is no rounding. If $m^2<a$ then we round $m+\epsilon$. For
+% now, discard a few irrelevant arguments |#1|, |#2|, |#3|, and find
+% the multiple of $0.5\cdot 10^{-16}$ within $[y, y+0.5\cdot
+% 10^{-16})$; rather, only the last $4$~digits |#8| of~$y$ are
+% considered, and we do not perform any carry yet. The \texttt{auxxi}
+% auxiliary sets up \texttt{auxii} with a continuation function
+% \texttt{auxxii} instead of \texttt{auxiii} as before. To prevent
+% \texttt{auxii} from giving a negative results $a-m^2$, we compute
+% $a+10^{-16}-m^2$ instead, always positive since $m<\sqrt{a}+0.5\cdot
+% 10^{-16}$ and $a\leq 1-10^{-16}$.
+% \begin{macrocode}
+\cs_new:Npn \@@_sqrt_auxx_o:Nnnnnnnn #1#2#3 #4#5#6#7#8
+ {
+ \exp_after:wN \@@_sqrt_auxxi_o:wwnnN
+ \int_use:N \__int_eval:w
+ (#8 + 2499) / 5000 * 5000 ;
+ {#4} {#5} {#6} {#7} ;
+ }
+\cs_new:Npn \@@_sqrt_auxxi_o:wwnnN #1; #2; #3#4#5
+ {
+ \@@_sqrt_auxii_o:NnnnnnnnN
+ \@@_sqrt_auxxii_o:nnnnnnnnw
+ #2 {#1}
+ {#3} { #4 + \c_one } #5
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux, rEXP]
+% {\@@_sqrt_auxxii_o:nnnnnnnnw, \@@_sqrt_auxxiii_o:w}
+% The difference $0\leq a+10^{-16}-m^2\leq
+% 10^{-16}+(\sqrt{a}-m)(\sqrt{a}+m)\leq 2\cdot 10^{-16}$ was just
+% computed: its first $8$~digits vanish, as do the next four,~|#1|,
+% and most of the following four,~|#2|. The guess~$m$ is an
+% overestimate if $a+10^{-16}-m^2 < 10^{-16}$, that is, |#1#2|
+% vanishes. Otherwise it is an underestimate, unless
+% $a+10^{-16}-m^2=10^{-16}$ exactly. For an underestimate, call the
+% \texttt{auxxiv} function with argument~$9998$. For an exact result
+% call it with~$9999$, and for an overestimate call it with~$10000$.
+% \begin{macrocode}
+\cs_new:Npn \@@_sqrt_auxxii_o:nnnnnnnnw 0; #1#2#3#4#5#6#7#8 #9;
+ {
+ \if_int_compare:w #1#2 > \c_zero
+ \if_int_compare:w #1#2 = \c_one
+ \if_int_compare:w #3#4 = \c_zero
+ \if_int_compare:w #5#6 = \c_zero
+ \if_int_compare:w #7#8 = \c_zero
+ \@@_sqrt_auxxiii_o:w
+ \fi:
+ \fi:
+ \fi:
+ \fi:
+ \exp_after:wN \@@_sqrt_auxxiv_o:wnnnnnnnN
+ \__int_value:w 9998
+ \else:
+ \exp_after:wN \@@_sqrt_auxxiv_o:wnnnnnnnN
+ \__int_value:w 10000
+ \fi:
+ ;
+ }
+\cs_new:Npn \@@_sqrt_auxxiii_o:w \fi: \fi: \fi: \fi: #1 \fi: ;
+ {
+ \fi: \fi: \fi: \fi: \fi:
+ \@@_sqrt_auxxiv_o:wnnnnnnnN 9999 ;
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux, rEXP]{\@@_sqrt_auxxiv_o:wnnnnnnnN}
+% This receives $9998$, $9999$ or $10000$ as~|#1| when $m$~is an
+% underestimate, exact, or an overestimate, respectively. Then
+% comes~$m$ as five blocks of~$4$ digits, but where the last
+% block~|#6| may be $0$, $5000$, or~$10000$. In the latter case, we
+% need to add a carry, unless $m$~is an overestimate (|#1|~is then
+% $10000$). Then comes~$a$ as three arguments. Rounding is done by
+% \cs{@@_round:NNN}, whose first argument is the final sign~$0$
+% (square roots are positive). We fake its second argument. It
+% should be the last digit kept, but this is only used when ties are
+% \enquote{rounded to even}, and only when the result is exactly
+% half-way between two representable numbers rational square roots of
+% numbers with $16$~significant digits have: this situation never
+% arises for the square root, as any exact square root of a $16$~digit
+% number has at most $8$~significant digits. Finally, the last
+% argument is the next digit, possibly shifted by~$1$ when there are
+% further nonzero digits. This is achieved by \cs{@@_round_digit:Nw},
+% which receives (after removal of the $10000$'s digit) one of $0000$,
+% $0001$, $4999$, $5000$, $5001$, or~$9999$, which it converts to $0$,
+% $1$, $4$, $5$, $6$, and~$9$, respectively.
+% \begin{macrocode}
+\cs_new:Npn \@@_sqrt_auxxiv_o:wnnnnnnnN #1; #2#3#4#5#6 #7#8#9
+ {
+ \exp_after:wN \@@_basics_pack_high:NNNNNw
+ \int_use:N \__int_eval:w 1 0000 0000 + #2#3
+ \exp_after:wN \@@_basics_pack_low:NNNNNw
+ \int_use:N \__int_eval:w 1 0000 0000
+ + #4#5
+ \if_int_compare:w #6 > #1 \exp_stop_f: + \c_one \fi:
+ + \exp_after:wN \@@_round:NNN
+ \exp_after:wN 0
+ \exp_after:wN 0
+ \__int_value:w
+ \exp_after:wN \use_i:nn
+ \exp_after:wN \@@_round_digit:Nw
+ \int_use:N \__int_eval:w #6 + 19999 - #1 ;
+ \exp_after:wN ;
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Setting the sign}
%
% \begin{macro}[int, EXP]{\@@_set_sign_o:w}
% This function is used for the unary minus and for \texttt{abs}. It
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
index 47dfff937ad..75a68d95846 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
@@ -36,7 +36,7 @@
%
%<*driver>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-expo.dtx 4601 2013-11-18 23:13:28Z bruno $
+\GetIdInfo$Id: l3fp-expo.dtx 4617 2013-12-14 12:37:59Z bruno $
{L3 Floating-point exponential-related functions}
\documentclass[full]{l3doc}
\begin{document}
@@ -1070,34 +1070,34 @@
\cs_new:Npn \@@_pow_exponent:wnN #1; #2
{
\if_int_compare:w #2 > \c_zero
- \exp_after:wN \@@_pow_exponent:Nwnnnnnwn % n\ln(10) - (-\ln(x))
+ \exp_after:wN \@@_pow_exponent:Nwnnnnnw % n\ln(10) - (-\ln(x))
\exp_after:wN +
\else:
- \exp_after:wN \@@_pow_exponent:Nwnnnnnwn % -( |n|\ln(10) + (-\ln(x)) )
+ \exp_after:wN \@@_pow_exponent:Nwnnnnnw % -( |n|\ln(10) + (-\ln(x)) )
\exp_after:wN -
\fi:
#2; #1;
}
-\cs_new:Npn \@@_pow_exponent:Nwnnnnnwn #1#2; #3#4#5#6#7#8; #9
+\cs_new:Npn \@@_pow_exponent:Nwnnnnnw #1#2; #3#4#5#6#7#8;
{ %^^A todo: use that in ln.
- \exp_after:wN \@@_fixed_mul_after:wn
+ \exp_after:wN \@@_fixed_mul_after:wwn
\int_use:N \__int_eval:w \c_@@_leading_shift_int
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_middle_shift_int
#1#2*23025 - #1 #3
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_middle_shift_int
#1 #2*8509 - #1 #4
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_middle_shift_int
#1 #2*2994 - #1 #5
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_middle_shift_int
#1 #2*0456 - #1 #6
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_trailing_shift_int
#1 #2*8401 - #1 #7
- #1 ( #2*7991 - #8 ) / 1 0000 ; {#9} ;
+ #1 ( #2*7991 - #8 ) / 1 0000 ; ;
}
\cs_new:Npn \@@_pow_B:wwN #1#2#3#4#5#6; #7;
{
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
index 9bb7145d635..fabc72e0392 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 4601 2013-11-18 23:13:28Z bruno $
+\GetIdInfo$Id: l3fp-extended.dtx 4617 2013-12-14 12:37:59Z bruno $
{L3 Floating-points with extended precision}
\documentclass[full]{l3doc}
\begin{document}
@@ -168,28 +168,25 @@
% exactly $4$~digits. The choice of shifts allows~|#1| to be in the
% range $[0, 5\cdot 10^{8}-1]$.
% \begin{macrocode}
-\cs_new:Npn \@@_fixed_div_myriad:wn #1#2#3#4#5#6; #7
+\cs_new:Npn \@@_fixed_div_myriad:wn #1#2#3#4#5#6;
{
- \exp_after:wN \@@_fixed_mul_after:wn
+ \exp_after:wN \@@_fixed_mul_after:wwn
\int_use:N \__int_eval:w \c_@@_leading_shift_int
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_trailing_shift_int
- + #1 ; {#7} {#2}{#3}{#4}{#5};
+ + #1 ; {#2}{#3}{#4}{#5};
}
% \end{macrocode}
% \end{macro}
%
-% ^^A todo:\cs_new:Npn \@@_fixed_mul_after:wn #1; #2; #3 { #3 {#1} #2; }
-% ^^A and do not bring the continuation up while packing.
-% ^^A possibly delete use_braced_s function afterwards.
-% \begin{macro}[aux, EXP]{\@@_fixed_mul_after:wn}
+% \begin{macro}[aux, EXP]{\@@_fixed_mul_after:wwn}
% The fixed point operations which involve multiplication end by
% calling this auxiliary. It braces the last block of digits, and
% places the \meta{continuation} |#2| in front. The
% \meta{continuation} was brought up through the expansions by
% the packing functions.
% \begin{macrocode}
-\cs_new:Npn \@@_fixed_mul_after:wn #1; #2 { #2 {#1} }
+\cs_new:Npn \@@_fixed_mul_after:wwn #1; #2; #3 { #3 {#1} #2; }
% \end{macrocode}
% \end{macro}
%
@@ -213,27 +210,26 @@
% \begin{macrocode}
\cs_new:Npn \@@_fixed_mul_short:wwn #1#2#3#4#5#6; #7#8#9;
{
- \exp_after:wN \@@_fixed_mul_after:wn
+ \exp_after:wN \@@_fixed_mul_after:wwn
\int_use:N \__int_eval:w \c_@@_leading_shift_int
+ #1*#7
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_middle_shift_int
+ #1*#8 + #2*#7
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_middle_shift_int
+ #1*#9 + #2*#8 + #3*#7
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_middle_shift_int
+ #2*#9 + #3*#8 + #4*#7
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_middle_shift_int
+ #3*#9 + #4*#8 + #5*#7
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_trailing_shift_int
+ #4*#9 + #5*#8 + #6*#7
+ ( #5*#9 + #6*#8 + #6*#9 / \c_ten_thousand )
- / \c_ten_thousand
- \exp_after:wN ; \@@_use_braced_s:n
+ / \c_ten_thousand ; ;
}
% \end{macrocode}
% \end{macro}
@@ -382,7 +378,7 @@
%
% ^^A todo: may a_1 or b_1 be = 10000? Used in ediv_epsi later.
% \begin{macro}[int, EXP]{\@@_fixed_mul:wwn}
-% \begin{macro}[aux, EXP]{\@@_fixed_mul:nnnnnnnwn}
+% \begin{macro}[aux, EXP]{\@@_fixed_mul:nnnnnnnw}
% \begin{syntax}
% \cs{@@_fixed_mul:wwn} \meta{a} |;| \meta{b} |;| \Arg{continuation}
% \end{syntax}
@@ -419,38 +415,36 @@
% $a_{5}$, $a_{6}$, $b_{1}$, $b_{2}$, $a_{1}$, $a_{2}$, $b_{5}$,
% $b_{6}$ and finally the \meta{continuation} as arguments. It writes
% the end of the expression, including the right parenthesis and the
-% denominator of the fraction. The packing auxiliaries bring the
-% \meta{continuation} up through the expansion chain, as |#7|, and it
+% denominator of the fraction. The \meta{continuation}
% is finally placed in front of the $6$ brace groups by
-% \cs{@@_fixed_mul_after:wn}.
+% \cs{@@_fixed_mul_after:wwn}.
% \begin{macrocode}
\cs_new:Npn \@@_fixed_mul:wwn #1#2#3#4 #5; #6#7#8#9
{
- \exp_after:wN \@@_fixed_mul_after:wn
+ \exp_after:wN \@@_fixed_mul_after:wwn
\int_use:N \__int_eval:w \c_@@_leading_shift_int
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_middle_shift_int
+ #1*#6
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_middle_shift_int
+ #1*#7 + #2*#6
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_middle_shift_int
+ #1*#8 + #2*#7 + #3*#6
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_middle_shift_int
+ #1*#9 + #2*#8 + #3*#7 + #4*#6
- \exp_after:wN \@@_pack:NNNNNwn
+ \exp_after:wN \@@_pack:NNNNNw
\int_use:N \__int_eval:w \c_@@_trailing_shift_int
+ #2*#9 + #3*#8 + #4*#7
+ ( #3*#9 + #4*#8
- + \@@_fixed_mul:nnnnnnnwn #5 {#6}{#7} {#1}{#2}
+ + \@@_fixed_mul:nnnnnnnw #5 {#6}{#7} {#1}{#2}
}
-\cs_new:Npn \@@_fixed_mul:nnnnnnnwn #1#2 #3#4 #5#6 #7#8 ; #9
+\cs_new:Npn \@@_fixed_mul:nnnnnnnw #1#2 #3#4 #5#6 #7#8 ;
{
#1*#4 + #2*#3 + #5*#8 + #6*#7 ) / \c_ten_thousand
- + #1*#3 + #5*#7 ;
- {#9} ;
+ + #1*#3 + #5*#7 ; ;
}
% \end{macrocode}
% \end{macro}
@@ -505,39 +499,37 @@
% later, and adds a trailing ${} + c_{5}c_{6}$ |;|
% \Arg{continuation}~|;|. The ${} + c_{5}c_{6}$ piece, which is
% omitted for \cs{@@_fixed_one_minus_mul:wwn}, will be taken in the
-% integer expression for the $10^{-24}$ level. The
-% \meta{continuation} is placed correctly to be taken upstream by
-% packing auxiliaries.
+% integer expression for the $10^{-24}$ level.
% \begin{macrocode}
-\cs_new:Npn \@@_fixed_mul_add:wwwn #1; #2; #3#4#5#6#7#8; #9
+\cs_new:Npn \@@_fixed_mul_add:wwwn #1; #2; #3#4#5#6#7#8;
{
- \exp_after:wN \@@_fixed_mul_after:wn
+ \exp_after:wN \@@_fixed_mul_after:wwn
\int_use:N \__int_eval:w \c_@@_big_leading_shift_int
- \exp_after:wN \@@_pack_big:NNNNNNwn
+ \exp_after:wN \@@_pack_big:NNNNNNw
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int + #3 #4
\@@_fixed_mul_add:Nwnnnwnnn +
+ #5 #6 ; #2 ; #1 ; #2 ; +
- + #7 #8 ; {#9} ;
+ + #7 #8 ; ;
}
-\cs_new:Npn \@@_fixed_mul_sub_back:wwwn #1; #2; #3#4#5#6#7#8; #9
+\cs_new:Npn \@@_fixed_mul_sub_back:wwwn #1; #2; #3#4#5#6#7#8;
{
- \exp_after:wN \@@_fixed_mul_after:wn
+ \exp_after:wN \@@_fixed_mul_after:wwn
\int_use:N \__int_eval:w \c_@@_big_leading_shift_int
- \exp_after:wN \@@_pack_big:NNNNNNwn
+ \exp_after:wN \@@_pack_big:NNNNNNw
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int + #3 #4
\@@_fixed_mul_add:Nwnnnwnnn -
+ #5 #6 ; #2 ; #1 ; #2 ; -
- + #7 #8 ; {#9} ;
+ + #7 #8 ; ;
}
-\cs_new:Npn \@@_fixed_one_minus_mul:wwn #1; #2; #3
+\cs_new:Npn \@@_fixed_one_minus_mul:wwn #1; #2;
{
- \exp_after:wN \@@_fixed_mul_after:wn
+ \exp_after:wN \@@_fixed_mul_after:wwn
\int_use:N \__int_eval:w \c_@@_big_leading_shift_int
- \exp_after:wN \@@_pack_big:NNNNNNwn
+ \exp_after:wN \@@_pack_big:NNNNNNw
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int + 1 0000 0000
\@@_fixed_mul_add:Nwnnnwnnn -
; #2 ; #1 ; #2 ; -
- ; {#3} ;
+ ; ;
}
% \end{macrocode}
% \end{macro}
@@ -563,13 +555,13 @@
\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
+ \exp_after:wN \@@_pack_big:NNNNNNw
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int
#1 #7*#4 #1 #8*#3
- \exp_after:wN \@@_pack_big:NNNNNNwn
+ \exp_after:wN \@@_pack_big:NNNNNNw
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int
#1 #7*#5 #1 #8*#4 #1 #9*#3 #2
- \exp_after:wN \@@_pack_big:NNNNNNwn
+ \exp_after:wN \@@_pack_big:NNNNNNw
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int
#1 \@@_fixed_mul_add:nnnnwnnnn {#7}{#8}{#9}
}
@@ -601,7 +593,7 @@
\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
+ \exp_after:wN \@@_pack_big:NNNNNNw
\int_use:N \__int_eval:w \c_@@_big_trailing_shift_int
\@@_fixed_mul_add:nnnnwnnwN
{ #6 + #4*#7 + #3*#8 + #2*#9 + #1 }
@@ -676,7 +668,6 @@
% \end{macro}
%
% ^^A todo: make it work when the arg is zero.
-% ^^A todo: remove the unused(?) 'n' arg.
% \begin{macro}[aux, EXP]{\@@_ep_to_ep:wwN}
% \begin{macro}[aux, rEXP]{\@@_ep_to_ep_loop:N, \@@_ep_to_ep_end:www}
% \begin{macro}[aux, EXP]{\@@_ep_to_ep_zero:ww}
@@ -1221,7 +1212,7 @@
% before), and we assume that it is less than $10^8$.\footnote{Bruno:
% I must double check this assumption.}
%
-%^^A todo: round properly when rounding to infinity: I need to know the sign.
+%^^A todo: round properly when rounding to infinity: I need the sign.
% \begin{macrocode}
\cs_new:Npn \@@_fixed_to_float:Nw #1#2; { \@@_fixed_to_float:wN #2; #1 }
\cs_new:Npn \@@_fixed_to_float:wN #1#2#3#4#5#6; #7
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
index 3923238e387..7f8d4c4a194 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 4604 2013-11-19 03:03:47Z bruno $
+\GetIdInfo$Id: l3fp-parse.dtx 4622 2013-12-14 13:05:45Z bruno $
{L3 Floating-point expression parsing}
\documentclass[full]{l3doc}
\begin{document}
@@ -1721,7 +1721,7 @@
\exp_after:wN \@@_parse_apply_unary:NNNwN
\exp_after:wN ##1
\exp_after:wN #4
- \cs:w @@_#3_o:w \exp_after:wN \cs_end:
+ \exp_after:wN #3
\tex_romannumeral:D
\if_int_compare:w #2 < ##1
\@@_parse_operand:Nw ##1
@@ -1731,8 +1731,8 @@
\@@_parse_expand:w
}
}
-\@@_tmp:w - \c_twelve { set_sign } 2
-\@@_tmp:w ! \c_twelve { not } ?
+\@@_tmp:w - \c_twelve \@@_set_sign_o:w 2
+\@@_tmp:w ! \c_twelve \@@_not_o:w ?
% \end{macrocode}
% \end{macro}
%
@@ -1939,6 +1939,7 @@
% \@@_parse_word_abs:N ,
% \@@_parse_word_exp:N ,
% \@@_parse_word_ln:N ,
+% \@@_parse_word_sqrt:N ,
% }
% Unary functions.
% \begin{macrocode}
@@ -1948,6 +1949,8 @@
{ \@@_parse_unary_function:nNN {exp} ? }
\cs_new_nopar:Npn \@@_parse_word_ln:N
{ \@@_parse_unary_function:nNN {ln} ? }
+\cs_new_nopar:Npn \@@_parse_word_sqrt:N
+ { \@@_parse_unary_function:nNN {sqrt} ? }
% \end{macrocode}
% \end{macro}
%
@@ -1990,8 +1993,23 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_parse_word_round:N}
-% This function expects one or two arguments.
+% \begin{macro}[aux, EXP]
+% {
+% \@@_parse_word_trunc:N,
+% \@@_parse_word_floor:N,
+% \@@_parse_word_ceil:N
+% }
+% \begin{macrocode}
+\cs_new_nopar:Npn \@@_parse_word_trunc:N
+ { \@@_parse_function:NNN \@@_round_o:Nw \@@_round_to_zero:NNN }
+\cs_new_nopar:Npn \@@_parse_word_floor:N
+ { \@@_parse_function:NNN \@@_round_o:Nw \@@_round_to_ninf:NNN }
+\cs_new_nopar:Npn \@@_parse_word_ceil:N
+ { \@@_parse_function:NNN \@@_round_o:Nw \@@_round_to_pinf:NNN }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux, EXP]{\@@_parse_word_round:N, \@@_parse_round:Nw}
% \begin{macrocode}
\cs_new:Npn \@@_parse_word_round:N #1#2
{
@@ -2006,27 +2024,12 @@
\fi:
\fi:
\fi:
- \exp_after:wN \@@_parse_apply_round:NNwN
- \exp_after:wN #1
- \exp_after:wN \@@_round_to_nearest:NNN
- \tex_romannumeral:D
- \@@_parse_operand:Nw \c_sixteen \@@_parse_expand:w #2
+ \@@_parse_function:NNN
+ \@@_round_o:Nw \@@_round_to_nearest:NNN #1
+ #2
}
\cs_new:Npn \@@_parse_round:Nw
- #1 #2 \@@_round_to_nearest:NNN #3 \@@_parse_expand:w #4
- { #2 #1 #3 \@@_parse_expand:w }
-\cs_new:Npn \@@_parse_apply_round:NNwN #1#2#3@#4
- {
- \if_case:w \__int_eval:w \@@_array_count:n {#3} - \c_one \__int_eval_end:
- \@@_round:Nwn #2 #3 {0} \tex_romannumeral:D
- \or: \@@_round:Nww #2 #3 \tex_romannumeral:D
- \else:
- \__msg_kernel_expandable_error:nnnnn
- { kernel } { fp-num-args } { round() } { 1 } { 2 }
- \exp_after:wN \c_nan_fp \tex_romannumeral:D
- \fi:
- -`0 #4 #1
- }
+ #1 #2 \@@_round_to_nearest:NNN #3#4 { #2 #1 #3 }
% \end{macrocode}
% \end{macro}
%
@@ -2428,74 +2431,73 @@
% }
% \begin{macro}[aux, EXP]
% {
-% \@@_parse_infix_excl_aux:NN,
-% \@@_parse_infix_excl_error:,
-% \@@_infix_compare:N,
-% \@@_parse_compare:NNNNNNw,
-% \@@_parse_compare_expand:NNNNNw,
-% \@@_parse_compare_end:NNNN,
+% \@@_parse_excl_error:,
+% \@@_parse_compare:NNNNNNN,
+% \@@_parse_compare_auxi:NNNNNNN,
+% \@@_parse_compare_auxii:NNNNN,
+% \@@_parse_compare_end:NNNNw,
% \@@_compare:wNNNNw,
% }
% \begin{macrocode}
\cs_new:cpn { @@_parse_infix_<:N } #1
{
- \@@_infix_compare:N #1 \c_one_fp
- \c_zero_fp \c_zero_fp \c_zero_fp \c_zero_fp <
+ \@@_parse_compare:NNNNNNN #1 \c_one
+ \c_zero \c_zero \c_zero \c_zero <
}
\cs_new:cpn { @@_parse_infix_=:N } #1
{
- \@@_infix_compare:N #1 \c_one_fp
- \c_zero_fp \c_zero_fp \c_zero_fp \c_zero_fp =
+ \@@_parse_compare:NNNNNNN #1 \c_one
+ \c_zero \c_zero \c_zero \c_zero =
}
\cs_new:cpn { @@_parse_infix_>:N } #1
{
- \@@_infix_compare:N #1 \c_one_fp
- \c_zero_fp \c_zero_fp \c_zero_fp \c_zero_fp >
+ \@@_parse_compare:NNNNNNN #1 \c_one
+ \c_zero \c_zero \c_zero \c_zero >
}
\cs_new:cpn { @@_parse_infix_!:N } #1
{
- \exp_after:wN \@@_parse_infix_excl_aux:NN
- \exp_after:wN #1 \tex_romannumeral:D \@@_parse_expand:w
- }
-\cs_new:Npn \@@_parse_infix_excl_aux:NN #1#2
- {
- \@@_infix_compare:N #1 \c_zero_fp
- \c_one_fp \c_one_fp \c_one_fp \c_one_fp #2
+ \exp_after:wN \@@_parse_compare:NNNNNNN
+ \exp_after:wN #1
+ \exp_after:wN \c_zero
+ \exp_after:wN \c_one
+ \exp_after:wN \c_one
+ \exp_after:wN \c_one
+ \exp_after:wN \c_one
}
-\cs_new:Npn \@@_parse_infix_excl_error:
+\cs_new:Npn \@@_parse_excl_error:
{
\__msg_kernel_expandable_error:nnnn
{ kernel } { fp-missing } { = } { ~after~!. }
}
-\cs_new:Npn \@@_infix_compare:N #1
+\cs_new:Npn \@@_parse_compare:NNNNNNN #1
{
\if_int_compare:w #1 < \c_seven
- \exp_after:wN \@@_parse_compare:NNNNNNw
- \exp_after:wN \@@_parse_infix_excl_error:
+ \exp_after:wN \@@_parse_compare_auxi:NNNNNNN
+ \exp_after:wN \@@_parse_excl_error:
\else:
\exp_after:wN @
\exp_after:wN \use_none:n
- \exp_after:wN \@@_infix_compare:N
+ \exp_after:wN \@@_parse_compare:NNNNNNN
\fi:
}
-\cs_new:Npn \@@_parse_compare:NNNNNNw #1#2#3#4#5#6#7
+\cs_new:Npn \@@_parse_compare_auxi:NNNNNNN #1#2#3#4#5#6#7
{
\if_case:w
- \if_catcode:w \scan_stop: #7
+ \if_catcode:w \scan_stop: \exp_not:N #7
\c_minus_one
\else:
\__int_eval:w `#7 - `< \__int_eval_end:
\fi:
- \@@_parse_compare_expand:NNNNNw #2#2#4#5#6
- \or: \@@_parse_compare_expand:NNNNNw #2#3#2#5#6
- \or: \@@_parse_compare_expand:NNNNNw #2#3#4#2#6
- \or: \@@_parse_compare_expand:NNNNNw #2#3#4#5#2
- \else: #1 \@@_parse_compare_end:NNNN #3#4#5#6#7
+ \@@_parse_compare_auxii:NNNNN #2#2#4#5#6
+ \or: \@@_parse_compare_auxii:NNNNN #2#3#2#5#6
+ \or: \@@_parse_compare_auxii:NNNNN #2#3#4#2#6
+ \or: \@@_parse_compare_auxii:NNNNN #2#3#4#5#2
+ \else: #1 \@@_parse_compare_end:NNNNw #3#4#5#6#7
\fi:
}
-\cs_new:Npn \@@_parse_compare_expand:NNNNNw #1#2#3#4#5
+\cs_new:Npn \@@_parse_compare_auxii:NNNNN #1#2#3#4#5
{
- \exp_after:wN \@@_parse_compare:NNNNNNw
+ \exp_after:wN \@@_parse_compare_auxi:NNNNNNN
\exp_after:wN \prg_do_nothing:
\exp_after:wN #1
\exp_after:wN #2
@@ -2504,11 +2506,12 @@
\exp_after:wN #5
\tex_romannumeral:D \exp_after:wN \@@_parse_expand:w
}
-\cs_new:Npn \@@_parse_compare_end:NNNN #1#2#3#4#5 \fi:
+\cs_new:Npn \@@_parse_compare_end:NNNNw #1#2#3#4#5 \fi:
{
\fi:
\exp_after:wN @
- \exp_after:wN \@@_parse_apply_compare:NwNNNNwN
+ \exp_after:wN \@@_parse_apply_compare:NwNNNNNwN
+ \exp_after:wN \c_one_fp
\exp_after:wN #1
\exp_after:wN #2
\exp_after:wN #3
@@ -2516,26 +2519,146 @@
\tex_romannumeral:D
\@@_parse_operand:Nw \c_seven \@@_parse_expand:w #5
}
-\cs_new:Npn \@@_parse_apply_compare:NwNNNNwN #1 #2@ #3#4#5#6 #7@ #8
+\cs_new:Npn \@@_parse_apply_compare:NwNNNNNwN
+ #1 #2@ #3 #4#5#6#7 #8@ #9
{
- \exp_after:wN \@@_parse_continue:NwN
- \exp_after:wN #1
- \tex_romannumeral:D -`0
- \exp_after:wN \exp_after:wN
- \exp_after:wN \exp_after:wN
- \exp_after:wN \exp_after:wN
- \if_case:w \@@_compare_back:ww #7 #2 \exp_stop_f:
- #4
- \or: #5
- \or: #6
- \else: #3
- \fi:
- \tex_romannumeral:D -`0 #8 #1
+ \if_int_odd:w
+ \if_meaning:w \c_zero_fp #3
+ \c_zero
+ \else:
+ \if_case:w \@@_compare_back:ww #8 #2 \exp_stop_f:
+ #5 \or: #6 \or: #7 \else: #4
+ \fi:
+ \fi:
+ \exp_after:wN \@@_parse_apply_compare_aux:NNwN
+ \exp_after:wN \c_one_fp
+ \else:
+ \exp_after:wN \@@_parse_apply_compare_aux:NNwN
+ \exp_after:wN \c_zero_fp
+ \fi:
+ #1 #8 #9
+ }
+\cs_new:Npn \@@_parse_apply_compare_aux:NNwN #1 #2 #3; #4
+ {
+ \if_meaning:w \@@_parse_compare:NNNNNNN #4
+ \exp_after:wN \@@_parse_continue_compare:NNwNN
+ \exp_after:wN #1
+ \exp_after:wN #2
+ \tex_romannumeral:D -`0
+ \@@_exp_after_o:w #3;
+ \tex_romannumeral:D -`0
+ \else:
+ \exp_after:wN \@@_parse_continue:NwN
+ \exp_after:wN #2
+ \tex_romannumeral:D -`0
+ \exp_after:wN #1
+ \tex_romannumeral:D -`0
+ \fi:
+ #4 #2
+ }
+\cs_new:Npn \@@_parse_continue_compare:NNwNN #1#2 #3@ #4#5
+ { #4 #2 #3@ #1 }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Candidate: defining new \pkg{l3fp} functions}
+%
+% \begin{macro}[EXP]{\fp_function:Nw}
+% This relies on the definition of the null character as a prefix
+% operator with very specific semantics.
+% \begin{macrocode}
+\group_begin:
+ \char_set_catcode_other:N \^^@
+ \cs_new:Npn \fp_function:Nw #1 { ^^@ ; { \exp_after:wN #1 } }
+\group_end:
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fp_new_function:Npn}
+% \begin{macro}[aux]{\@@_function_args:Nwn}
+% This relies on the definition of the null character as a prefix
+% operator with very specific semantics.
+% \begin{macrocode}
+\group_begin:
+ \char_set_catcode_other:N \^^@
+ \cs_new_protected:Npn \fp_new_function:Npn #1#2#
+ {
+ \cs_new:Npx #1
+ {
+ ^^@ ;
+ {
+ \exp_not:N \exp_after:wN
+ \exp_not:N \@@_function_args:Nwn
+ \exp_not:N \exp_after:wN
+ \exp_not:c { @@_user_ \cs_to_str:N #1 }
+ \exp_not:N \__int_value:w
+ \int_eval:n { \tl_count:n {#2} / \c_two }
+ \exp_not:N \exp_after:wN ;
+ }
+ }
+ \cs_new:cpn { @@_user_ \cs_to_str:N #1 } #2
+ }
+\group_end:
+\cs_new:Npn \@@_function_args:Nwn #1#2; #3
+ {
+ \int_compare:nNnTF { \tl_count:n {#3} } = {#2}
+ { #1 #3 }
+ {
+ \__msg_kernel_expandable_error:nnnnn
+ { kernel } { fp-num-args } { #1() } {#2} {#2}
+ \c_nan_fp
+ }
}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
+% \begingroup\catcode`^^@=12\relax % ^^A hack
+% \begin{macro}[EXP, aux]{\@@_parse_prefix_^^@:Nw}
+% \begin{macrocode}
+\group_begin:
+ \char_set_catcode_other:N \^^@
+ \cs_new:cpn { @@_parse_prefix_ ^^@ :Nw } #1 ; #2
+ {
+ \exp_after:wN \@@_function_apply:NnwN
+ \exp_after:wN #1
+ \exp_after:wN { #2 \exp_after:wN }
+ \tex_romannumeral:D
+ \@@_parse_operand:Nw \c_sixteen \@@_parse_expand:w
+ }
+\group_end:
+% \end{macrocode}
+% \end{macro}
+% \endgroup
+%
+% \begin{macro}[aux, EXP]
+% {
+% \@@_function_apply:NnwN,
+% \@@_function_store:wwNwnn,
+% \@@_function_store_end:wnnn
+% }
+% \begin{macrocode}
+\cs_new:Npn \@@_function_apply:NnwN #1#2#3@#4
+ {
+ \exp_after:wN \@@_exp_after_array_f:w
+ \tex_romannumeral:D -`0
+ \@@_function_store:wwNwnn #3
+ \s_@@_mark \@@_function_store:wwNwnn ;
+ \s_@@_mark \@@_function_store_end:wnnn
+ \s_@@_stop { } { } {#2}
+ \s_@@_stop
+ #4 #1
+ }
+\cs_new:Npn \@@_function_store:wwNwnn
+ #1; #2 \s_@@_mark #3#4 \s_@@_stop #5#6
+ { #3 #2 \s_@@_mark #3#4 \s_@@_stop { #5 #6 } { { #1; } } }
+\cs_new:Npn \@@_function_store_end:wnnn
+ #1 \s_@@_stop #2#3#4
+ { \@@_parse:n { #4 {#2} } }
+% \end{macrocode}
+% \end{macro}
+%
% ^^A end[todo]
%
% \subsection{Messages}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
index 72a176191ad..556b1960fdd 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
@@ -314,6 +314,41 @@
%
% ^^A todo: This macro is intermingled with l3fp-parse.
% ^^A todo: Add explanations.
+% \begin{macro}[aux,EXP]{\@@_round_o:Nw}
+% This function expects one or two arguments.
+% \begin{macrocode}
+\cs_new:Npn \@@_round_o:Nw #1#2 @
+ {
+ \if_case:w
+ \__int_eval:w \@@_array_count:n {#2} - \c_one \__int_eval_end:
+ \@@_round:Nwn #1 #2 {0} \tex_romannumeral:D
+ \or: \@@_round:Nww #1 #2 \tex_romannumeral:D
+ \else:
+ \@@_error:nffn { num-args }
+ { \@@_round_name_from_cs:N #1 () } { 1 } { 2 }
+ \exp_after:wN \c_nan_fp \tex_romannumeral:D
+ \fi:
+ -`0
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux, EXP]{\@@_round_name_from_cs:N}
+% \begin{macrocode}
+\cs_new:Npn \@@_round_name_from_cs:N #1
+ {
+ \cs_if_eq:NNTF #1 \@@_round_to_zero:NNN { trunc }
+ {
+ \cs_if_eq:NNTF #1 \@@_round_to_ninf:NNN { floor }
+ {
+ \cs_if_eq:NNTF #1 \@@_round_to_pinf:NNN { ceil }
+ { round }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}[int, EXP]{\@@_round:Nww, \@@_round:Nwn}
% \begin{macro}[aux, EXP]
% {
@@ -330,8 +365,9 @@
{
\@@_small_int:wTF #3; { \@@_round:Nwn #1#2; }
{
- \@@_invalid_operation_tl_o:nf
- { round } { \@@_array_to_clist:n { #2; #3; } }
+ \@@_invalid_operation_tl_o:ff
+ { \@@_round_name_from_cs:N #1 }
+ { \@@_array_to_clist:n { #2; #3; } }
}
}
\cs_new:Npn \@@_round:Nwn #1 \s_@@ \@@_chk:w #2#3#4; #5
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
index 2a989ffcdf8..3394561ccdf 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
@@ -36,7 +36,7 @@
%
%<*driver>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-traps.dtx 4598 2013-11-02 14:26:32Z bruno $
+\GetIdInfo$Id: l3fp-traps.dtx 4622 2013-12-14 13:05:45Z bruno $
{L3 Floating-point exception trapping}
\documentclass[full]{l3doc}
\begin{document}
@@ -152,7 +152,7 @@
% \begin{itemize}
% \item \cs{@@_invalid_operation:nnw},
% \item \cs{@@_invalid_operation_o:Nww},
-% \item \cs{@@_invalid_operation_tl_o:nf},
+% \item \cs{@@_invalid_operation_tl_o:ff},
% \item \cs{@@_division_by_zero_o:Nnw},
% \item \cs{@@_division_by_zero_o:NNww},
% \item \cs{@@_overflow:w},
@@ -224,10 +224,10 @@
\exp_after:wN \c_nan_fp
}
\exp_args:Nno \use:n
- { \cs_set:Npn \@@_invalid_operation_tl_o:nf ##1##2 }
+ { \cs_set:Npn \@@_invalid_operation_tl_o:ff ##1##2 }
{
#1
- \@@_error:nnfn { invalid } {##1} {##2} { }
+ \@@_error:nffn { invalid } {##1} {##2} { }
\fp_flag_on:n { invalid_operation }
\exp_after:wN \c_nan_fp
}
@@ -345,7 +345,7 @@
% \begin{macro}[int, EXP]
% {
% \@@_invalid_operation:nnw, \@@_invalid_operation_o:Nww,
-% \@@_invalid_operation_tl_o:nf,
+% \@@_invalid_operation_tl_o:ff,
% \@@_division_by_zero_o:Nnw, \@@_division_by_zero_o:NNww,
% \@@_overflow:w , \@@_underflow:w
% }
@@ -356,7 +356,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_invalid_operation:nnw #1#2#3; { }
\cs_new:Npn \@@_invalid_operation_o:Nww #1#2; #3; { }
-\cs_new:Npn \@@_invalid_operation_tl_o:nf #1 #2 { }
+\cs_new:Npn \@@_invalid_operation_tl_o:ff #1 #2 { }
\cs_new:Npn \@@_division_by_zero_o:Nnw #1#2#3; { }
\cs_new:Npn \@@_division_by_zero_o:NNww #1#2#3; #4; { }
\cs_new:Npn \@@_overflow:w { }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
index 0fea2b00541..11a058130d1 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 4607 2013-11-19 08:35:08Z joseph $
+\GetIdInfo$Id: l3fp-trig.dtx 4617 2013-12-14 12:37:59Z bruno $
{L3 Floating-point trigonometric functions}
\documentclass[full]{l3doc}
\begin{document}
@@ -642,7 +642,7 @@
\cs_end:
}
% \end{macrocode}
-% \end{macro}
+% \end{variable}
%
% \begin{macro}[aux, rEXP]
% {
@@ -978,8 +978,6 @@
%
% \subsection{Inverse trigonometric functions}
%
-% \providecommand*{\atan}{\operatorname{atan}}
-%
% All inverse trigonometric functions (arcsine, arccosine, arctangent,
% arccotangent, arccosecant, and arcsecant) are based on a function
% often denoted \texttt{atan2}. This function is accessed directly by
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
index dc000923765..fea05abbb12 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp.dtx 4601 2013-11-18 23:13:28Z bruno $
+\GetIdInfo$Id: l3fp.dtx 4633 2013-12-31 17:28:46Z joseph $
{L3 Floating points}
%</driver|package>
%<*driver>
@@ -82,7 +82,8 @@
% precedence.
% \begin{itemize}
% \item Basic arithmetic: addition $x+y$, subtraction $x-y$,
-% multiplication $x*y$, division $x/y$, and parentheses.
+% multiplication $x*y$, division $x/y$, square root~$\sqrt{x}$,
+% and parentheses.
% \item Comparison operators: $x\mathop{\mathtt{<}}y$,
% $x\mathop{\mathtt{<=}}y$, $x\mathop{\mathtt{>?}}y$,
% $x\mathop{\mathtt{!=}}y$ \emph{etc.}
@@ -112,13 +113,14 @@
% $\operatorname{asech} x$, $\operatorname{acsch} x$.
% \item Extrema: $\max(x,y,\ldots)$, $\min(x,y,\ldots)$,
% $\operatorname{abs}(x)$.
-% \item Rounding functions: $\operatorname{round}(x,n)$ round to
-% closest, $\operatorname{round0}(x,n)$ round towards zero,
-% $\operatorname{round\pm}(x,n)$ round towards $\pm\infty$. And
+% \item Rounding functions: $\operatorname{round}(x,n)$ rounds to
+% closest, $\operatorname{trunc}(x,n)$ rounds towards zero,
+% $\operatorname{floor}(x,n)$ rounds towards~$-\infty$,
+% $\operatorname{ceil}(x,n)$ rounds towards~$+\infty$. And
% \emph{(not yet)} modulo, and \enquote{quantize}.
% \item Constants: \texttt{pi}, \texttt{deg} (one degree in radians).
% \item Dimensions, automatically expressed in points, \emph{e.g.},
-% \texttt{pc} is $12$.
+% \texttt{pc} is~$12$.
% \item Automatic conversion (no need for \cs{\meta{type}_use:N}) of
% integer, dimension, and skip variables to floating points,
% expressing dimensions in points and ignoring the stretch and
@@ -159,7 +161,7 @@
% \end{syntax}
% Creates a new \meta{fp~var} or raises an error if the name is
% already taken. The declaration is global. The \meta{fp~var} will
-% initially be $+0$.
+% initially be~$+0$.
% \end{function}
%
% \begin{function}[updated = 2012-05-08, tested = m3fp001]
@@ -187,7 +189,7 @@
% \end{syntax}
% Ensures that the \meta{fp~var} exists globally
% by applying \cs{fp_new:N} if necessary, then applies
-% \cs{fp_(g)zero:N} to leave the \meta{fp~var} set to zero.
+% \cs{fp_(g)zero:N} to leave the \meta{fp~var} set to~$+0$.
% \end{function}
%
% \section{Setting floating point variables}
@@ -239,7 +241,7 @@
% \cs{fp_eval:n} \Arg{floating point expression}
% \end{syntax}
% Evaluates the \meta{floating point expression} and expresses the
-% result as a decimal number with~$16$ significant figures and no
+% result as a decimal number with no
% exponent. Leading or trailing zeros may be inserted to compensate
% for the exponent. Non-significant trailing zeros are trimmed, and
% integers are expressed without a decimal separator. The values
@@ -255,11 +257,11 @@
% \cs{fp_to_decimal:n} \Arg{floating point expression}
% \end{syntax}
% Evaluates the \meta{floating point expression} and expresses the
-% result as a decimal number with $16$ significant figures and no
+% result as a decimal number with no
% exponent. Leading or trailing zeros may be inserted to compensate
% for the exponent. Non-significant trailing zeros are trimmed, and
% integers are expressed without a decimal separator. The values
-% $\pm\infty$ and \nan{} trigger an \enquote{invalid operation}
+% $\pm\infty$ and~\nan{} trigger an \enquote{invalid operation}
% exception.
% \end{function}
%
@@ -270,12 +272,12 @@
% \cs{fp_to_dim:n} \Arg{floating point expression}
% \end{syntax}
% Evaluates the \meta{floating point expression} and expresses the
-% result as a dimension (in \texttt{pt}) suitable for use in dimension
+% result as a dimension (in~\texttt{pt}) suitable for use in dimension
% expressions. The output is identical to \cs{fp_to_decimal:n}, with
-% an additional trailing \texttt{pt}. In particular, the result may
+% an additional trailing~\texttt{pt}. In particular, the result may
% be outside the range $[- 2^{14} + 2^{-17}, 2^{14} - 2^{-17}]$ of
% valid \TeX{} dimensions, leading to overflow errors if used as a
-% dimension. The values $\pm\infty$ and \nan{} trigger an
+% dimension. The values $\pm\infty$ and~\nan{} trigger an
% \enquote{invalid operation} exception.
% \end{function}
%
@@ -286,10 +288,11 @@
% \cs{fp_to_int:n} \Arg{floating point expression}
% \end{syntax}
% Evaluates the \meta{floating point expression}, and rounds the
-% result to the closest integer, with ties rounded to an even integer.
+% result to the closest integer, rounding exact ties to an even
+% integer.
% The result may be outside the range $[- 2^{31} + 1, 2^{31} - 1]$ of
-% valid \TeX{} integers, triggering \TeX{} errors if used in an
-% integer expression. The values $\pm\infty$ and \nan{} trigger
+% valid \TeX{}~integers, leading to overflow errors if used in an
+% integer expression. The values $\pm\infty$ and~\nan{} trigger
% an \enquote{invalid operation} exception.
% \end{function}
%
@@ -301,12 +304,12 @@
% \cs{fp_to_scientific:n} \Arg{floating point expression}
% \end{syntax}
% Evaluates the \meta{floating point expression} and expresses the
-% result in scientific notation with $16$ significant figures:
+% result in scientific notation:
% \begin{quote}
% \meta{optional \texttt{-}}\meta{digit}\texttt{.}\meta{15 digits}\texttt{e}\meta{optional sign}\meta{exponent}
% \end{quote}
% The leading \meta{digit} is non-zero except in the case of $\pm 0$.
-% The values $\pm\infty$ and \nan{} trigger an \enquote{invalid
+% The values $\pm\infty$ and~\nan{} trigger an \enquote{invalid
% operation} exception.
% \end{function}
%
@@ -319,13 +322,14 @@
% Evaluates the \meta{floating point expression} and expresses the
% result in (almost) the shortest possible form. Numbers in the
% ranges $(0,10^{-3})$ and $[10^{16},\infty)$ are expressed in
-% scientific notation with trailing zeros trimmed (see
+% scientific notation with trailing zeros trimmed and no decimal
+% separator when there is a single significant digit (see
% \cs{fp_to_scientific:n}). Numbers in the range $[10^{-3},10^{16})$
% are expressed in a decimal notation without exponent, with trailing
% zeros trimmed, and no decimal separator for integer values (see
-% \cs{fp_to_decimal:n}. Negative numbers start with |-|. The
-% special values $\pm 0$, $\pm \inf$ and \nan{} are rendered as
-% |0|, |-0|, \texttt{inf}, \texttt{-inf}, and \texttt{nan}
+% \cs{fp_to_decimal:n}. Negative numbers start with~|-|. The
+% special values $\pm 0$, $\pm\infty$ and~\nan{} are rendered as
+% |0|, |-0|, \texttt{inf}, \texttt{-inf}, and~\texttt{nan}
% respectively.
% \end{function}
%
@@ -335,11 +339,11 @@
% \cs{fp_use:N} \meta{fp~var}
% \end{syntax}
% Inserts the value of the \meta{fp~var} into the input stream as a
-% decimal number with $16$ significant figures and no exponent.
+% decimal number with no exponent.
% Leading or trailing zeros may be inserted to compensate for the
% exponent. Non-significant trailing zeros are trimmed. Integers are
-% expressed without a decimal separator. The values $\pm\infty$ and
-% \nan{} trigger an \enquote{invalid operation} exception. This
+% expressed without a decimal separator. The values $\pm\infty$
+% and~\nan{} trigger an \enquote{invalid operation} exception. This
% function is identical to \cs{fp_to_decimal:N}.
% \end{function}
%
@@ -356,30 +360,20 @@
% \end{function}
%
% \begin{function}[EXP, pTF, updated = 2012-05-08,
-% tested = m3fp-logic001]{\fp_compare:nNn, \fp_compare:n}
+% tested = m3fp-logic001]{\fp_compare:nNn}
% \begin{syntax}
% \cs{fp_compare_p:nNn} \Arg{fpexpr_1} \meta{relation} \Arg{fpexpr_2}
% \cs{fp_compare:nNnTF} \Arg{fpexpr_1} \meta{relation} \Arg{fpexpr_2} \Arg{true code} \Arg{false code}
-% \cs{fp_compare_p:n} \{ \meta{fpexpr_1} \meta{relation} \meta{fpexpr_2} \}
-% \cs{fp_compare:nTF} \{ \meta{fpexpr_1} \meta{relation} \meta{fpexpr_2} \} \Arg{true code} \Arg{false code}
% \end{syntax}
% Compares the \meta{fpexpr_1} and the \meta{fpexpr_2}, and returns
% \texttt{true} if the \meta{relation} is obeyed. Two floating point
-% numbers $x$ and $y$ may obey four mutually exclusive relations:
-% $x<y$, $x=y$, $x>y$, or $x$ and $y$ are not ordered. The latter
-% case occurs exactly when one of the operands is \nan{}, and
-% this relations is denoted by the symbol |?|. The \texttt{nNn}
-% functions support the \meta{relations} |<|, |=|, |>|, and |?|. The
-% \texttt{n} functions support as a \meta{relation} any non-empty string of
-% those four symbols, plus optional leading |!| (which negate the
-% \meta{relation}), with the restriction that the \meta{relation} may
-% not start with |?|. Common choices of \meta{relation} include |>=|
-% (greater or equal), |!=| (not equal), |!?| (comparable). Note that
-% a \nan{} is distinct from any value, even another
-% \nan{}, hence $x=x$ is not true for a \nan{}.
-% Since a \nan{} is not comparable to any floating point, to test if a
-% value is \nan{}, one can use the following, where~$0$ is an
-% arbitrary floating point.
+% numbers $x$ and~$y$ may obey four mutually exclusive relations:
+% $x<y$, $x=y$, $x>y$, or $x$ and~$y$ are not ordered. The latter
+% case occurs exactly when either operand is~\nan{}, and this relation
+% is denoted by the symbol~|?|. Note that a~\nan{} is distinct from
+% any value, even another~\nan{}, hence $x=x$ is not true for
+% a~\nan{}. To test if a value is~\nan{}, compare it to an arbitrary
+% number with the \enquote{not ordered} relation.
% \begin{verbatim}
% \fp_compare:nNnTF { <value> } ? { 0 }
% { } % <value> is nan
@@ -387,6 +381,54 @@
% \end{verbatim}
% \end{function}
%
+% \begin{function}[EXP, pTF, updated = 2012-12-14,
+% tested = m3fp-logic001]{\fp_compare:n}
+% \begin{syntax}
+% \cs{fp_compare_p:n} \\
+% ~~\{ \\
+% ~~~~\meta{fpexpr_1} \meta{relation_1} \\
+% ~~~~\ldots{} \\
+% ~~~~\meta{fpexpr_N} \meta{relation_N} \\
+% ~~~~\meta{fpexpr_{N+1}} \\
+% ~~\} \\
+% \cs{fp_compare:nTF}
+% ~~\{ \\
+% ~~~~\meta{fpexpr_1} \meta{relation_1} \\
+% ~~~~\ldots{} \\
+% ~~~~\meta{fpexpr_N} \meta{relation_N} \\
+% ~~~~\meta{fpexpr_{N+1}} \\
+% ~~\} \\
+% ~~\Arg{true code} \Arg{false code}
+% \end{syntax}
+% Evaluates the \meta{floating point expressions} as described for
+% \cs{fp_eval:n} and compares consecutive result using the
+% corresponding \meta{relation}, namely it compares \meta{intexpr_1}
+% and \meta{intexpr_2} using the \meta{relation_1}, then
+% \meta{intexpr_2} and \meta{intexpr_3} using the \meta{relation_2},
+% until finally comparing \meta{intexpr_N} and \meta{intexpr_{N+1}}
+% using the \meta{relation_N}. The test yields \texttt{true} if all
+% comparisons are \texttt{true}. Each \meta{floating point
+% expression} is evaluated only once. Contrarily to
+% \cs{int_compare:nTF}, all \meta{floating point expressions} are
+% computed, even if one comparison is \texttt{false}. Two floating
+% point numbers $x$ and~$y$ may obey four mutually exclusive
+% relations: $x<y$, $x=y$, $x>y$, or $x$ and~$y$ are not ordered. The
+% latter case occurs exactly when one of the operands is~\nan{}, and
+% this relation is denoted by the symbol~|?|. Each \meta{relation}
+% can be any (non-empty) combination of |<|, |=|, |>|, and~|?|, plus
+% an optional leading~|!| (which negates the \meta{relation}), with
+% the restriction that the \meta{relation} may not start with~|?|, as
+% this symbol has a different meaning (in combination with~|:|) within
+% floatin point expressions. The comparison $x$~\meta{relation}~$y$
+% is then \texttt{true} if the \meta{relation} does not start with~|!|
+% and the actual relation (|<|, |=|, |>|, or~|?|) between $x$ and~$y$
+% appears within the \meta{relation}, or on the contrary if the
+% \meta{relation} starts with~|!| and the relation between $x$ and~$y$
+% does not appear within the \meta{relation}. Common choices of
+% \meta{relation} include |>=|~(greater or equal), |!=|~(not equal),
+% |!?|~or~|<=>| (comparable).
+% \end{function}
+%
% \section{Floating point expression loops}
%
% \begin{function}[rEXP, added = 2012-08-16, tested = m3fp-logic003]
@@ -513,8 +555,8 @@
% \end{variable}
%
% \begin{variable}[updated = 2012-05-08, updated = 2013-11-17]{\c_pi_fp}
-% The value of $\pi$. This can be input directly in a floating point
-% expression as \texttt{pi}.
+% The value of~$\pi$. This can be input directly in a floating point
+% expression as~\texttt{pi}.
% \end{variable}
%
% \begin{variable}[added = 2012-05-08, updated = 2013-11-17]
@@ -787,20 +829,29 @@
% \begin{syntax}
% \cs{fp_eval:n} \{ \meta{operand_1} \texttt{&&} \meta{operand_2} \}
% \end{syntax}
-% If \meta{operand_1} is false (equal to $\pm 0$), use that value,
+% If \meta{operand_1} is false (equal to~$\pm 0$), use that value,
% otherwise the value of \meta{operand_2}. Both \meta{operands} are
% evaluated in all cases.
% \end{function}
% \endgroup
%
-% \begin{function}[tested = m3fp-logic001]{\<, =, >, ?}
+% \begin{function}[tested = m3fp-logic001, updated = 2013-12-14]
+% {\<, =, >, ?}
% \begin{syntax}
-% \cs{fp_eval:n} \{ \meta{operand_1} \meta{comparison} \meta{operand_2} \}
+% \cs{fp_eval:n} \\
+% ~~\{ \\
+% ~~~~\meta{operand_1} \meta{relation_1} \\
+% ~~~~\ldots{} \\
+% ~~~~\meta{operand_N} \meta{relation_N} \\
+% ~~~~\meta{operand_{N+1}} \\
+% ~~\}
% \end{syntax}
-% The \meta{comparison} consists of a non-empty string of |<|, |=|,
-% |>|, and |?|, optionally preceded by |!|. It may not start with
-% |?|. This evaluates to $+1$ if the \meta{comparison} between the
-% \meta{operand_1} and \meta{operand_2} is true, and $+0$ otherwise.
+% Each \meta{relation} consists of a non-empty string of |<|, |=|,
+% |>|, and~|?|, optionally preceded by~|!|, and may not start
+% with~|?|. This evaluates to $+1$ if all comparisons
+% \meta{operand_i} \meta{relation_j} \meta{operand_{i+1}} are true, and
+% $+0$ otherwise. All \meta{operands} are evaluated in all cases.
+% See \cs{fp_compare:nTF} for details.
% \end{function}
%
% \begin{function}[tested = m3fp-basics001]{+, -}
@@ -893,27 +944,38 @@
% \nan{}. Those operations do not raise exceptions.
% \end{function}
%
-% \begin{function}[tested = {m3fp-round001, m3fp-round002}]
-% {round, round0, round+, round-}
+% \begin{function}
+% [tested = {m3fp-round001, m3fp-round002}, added = 2013-12-14]
+% {round, trunc, ceil, floor}
% \begin{syntax}
-% \cs{fp_eval:n} \{ |round| \meta{option} |(| \meta{fpexpr} |)| \}
-% \cs{fp_eval:n} \{ |round| \meta{option} |(| \meta{fpexpr_1} , \meta{fpexpr_2} |)| \}
+% \cs{fp_eval:n} \{ |round| |(| \meta{fpexpr} |)| \}
+% \cs{fp_eval:n} \{ |round| |(| \meta{fpexpr_1} , \meta{fpexpr_2} |)| \}
% \end{syntax}
-% Rounds \meta{fpexpr_1} to \meta{fpexpr_2} places. When
-% \meta{fpexpr_2} is omitted, it is assumed to be $0$, \emph{i.e.},
-% \meta{fpexpr_1} is rounded to an integer. The \meta{option}
-% controls the rounding direction:
+% Evaluates $\meta{fpexpr_1}=x$ and $\meta{fpexpr_2}=n$, then rounds
+% $x$~to $n$~places. If $n$~is an integer, this rounds~$x$ to a
+% multiple of~$10^{-n}$; if $n=+\infty$, this always yields~$x$; if
+% $n=-\infty$, this yields one of $\pm 0$, $\pm\infty$, or~\nan{}; if
+% $n$~is neither $\pm\infty$ nor an integer, then an \enquote{invalid
+% operation} exception is raised. When \meta{fpexpr_2} is omitted,
+% $n=0$, \emph{i.e.}, \meta{fpexpr_1} is rounded to an integer. The
+% rounding direction depends on the function:
% \begin{itemize}
-% \item by default, the operation rounds to the closest allowed number
-% (rounding ties to even);
-% \item with |0|, the operation rounds towards $0$, \emph{i.e.}, truncates;
-% \item with |+|, the operation rounds towards $+\infty$;
-% \item with |-|, the operation rounds towards $-\infty$.
+% \item |round| yields the multiple of~$10^{-n}$ closest to~$x$, and
+% if $x$~is half-way between two such multiples, the even multiple
+% is chosen (\enquote{ties to even});
+% \item |floor|, or the deprecated |round-|, yields the largest
+% multiple of~$10^{-n}$ smaller or equal to~$x$ (\enquote{round
+% towards negative infinity});
+% \item |ceil|, or the deprecated |round+|, yields the smallest
+% multiple of~$10^{-n}$ greater or equal to~$x$ (\enquote{round
+% towards positive infinity});
+% \item |trunc|, or the deprecated |round0|, yields a multiple
+% of~$10^{-n}$ with the same sign as~$x$ and with the largest
+% absolute value less that that of~$x$ (\enquote{round towards
+% zero}).
% \end{itemize}
-% If \meta{fpexpr_2} does not yield an integer less than $10^{8}$ in
-% absolute value, then an \enquote{invalid operation} exception is
-% raised. \enquote{Overflow} may occur if the result is infinite
-% (this cannot happen unless $\meta{fpexpr_2}\string<-9984$).
+% \enquote{Overflow} occurs if $x$~is finite and the result is
+% infinite (this can only happen if $\meta{fpexpr_2}\string<-9984$).
% \end{function}
%
% \begin{function}[updated = 2013-11-17, tested = m3fp-trig001]
@@ -1058,6 +1120,17 @@
% exception can occur.
% \end{function}
%
+% \begin{function}[added = 2013-12-14, tested = m3fp-basics005]{sqrt}
+% \begin{syntax}
+% \cs{fp_eval:n} \{ |sqrt(| \meta{fpexpr} |)| \}
+% \end{syntax}
+% Computes the square root of the \meta{fpexpr}. The \enquote{invalid
+% operation} is raised when the \meta{fpexpr} is negative; no other
+% exception can occur. Special values yield $\sqrt{-0} = -0$,
+% $\sqrt{+0} = +0$, $\sqrt{+\infty} = +\infty$ and
+% $\sqrt{\text{\nan{}}}=\text{\nan{}}$.
+% \end{function}
+%
% \begin{variable}[tested = m3fp-parse001]{inf, nan}
% The special values $+\infty$, $-\infty$, and \nan{} are represented
% as \texttt{inf}, \texttt{-inf} and \texttt{nan} (see \cs{c_inf_fp},
@@ -1143,10 +1216,8 @@
%
% The following need to be done. I'll try to time-order the items.
% \begin{itemize}
-% \item Rename |round0| to |trunc|, |round+| to |ceil|, and |round-|
-% to |floor|.
% \item Decide what exponent range to consider.
-% \item Improve the treatment of signalling versus quiet \texttt{nan}.
+% \item Support signalling \texttt{nan}.
% \item Modulo and remainder, and rounding functions |quantize|,
% |quantize0|, |quantize+|, |quantize-|, |quantize=|, |round=|.
% Should the modulo also be provided as (catcode 12) |%|?
@@ -1178,15 +1249,13 @@
%
% Bugs. (Exclamation points mark important bugs.)
% \begin{itemize}
-% \item[!] $-3<-2<-1$ is wrongly parsed as $(-3<-2)<-1$.
% \item Check that functions are monotonic when they should.
% \item Add exceptions to |?:|, |!<=>?|, |&&|, \verb"||", and |!|.
-% \item |round| should accept any integer as its second argument.
% \item Logarithms of numbers very close to $1$ are inaccurate.
% \item When rounding towards $-\infty$, |\dim_to_fp:n {0pt}| should
% return $-0$, not $+0$.
-% \item The result of $(\pm0)+(\pm0)$ should depend on the rounding
-% mode.
+% \item The result of $(\pm0)+(\pm0)$, of $x+(-x)$, and of $(-x)+x$
+% should depend on the rounding mode.
% \item \texttt{0e9999999999} gives a \TeX{} \enquote{number too
% large} error.
% \item Subnormals are not implemented.
@@ -1226,12 +1295,6 @@
% \item Add bibliography. Some of Kahan's articles, some previous
% \TeX{} fp packages, the international standards,\ldots{}
% \item Also take into account the \enquote{inexact} exception?
-% \item (Likely not.)
-% Change the internal representation of fp, by replacing braced
-% groups of $4$ digits by delimited arguments. Also consider
-% changing the fp structure a bit to allow using
-% \cs{pdftex_strcmp:D} to compare (not in \LuaTeX{}: it is too
-% slow)?
% \item Support multi-character prefix operators (\emph{e.g.}, |@/| or
% whatever)? Perhaps for including comments inside the computation
% itself??
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
index e5c80030f7e..a825c0cad3b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3keys.dtx 4581 2013-07-28 08:38:50Z joseph $
+\GetIdInfo$Id: l3keys.dtx 4614 2013-12-08 17:07:31Z joseph $
{L3 Experimental key-value interfaces}
%</driver|package>
%<*driver>
@@ -209,7 +209,7 @@
% \begin{function}[added = 2011-08-21, updated = 2013-07-10]
% {.choices:nn, .choices:Vn, .choices:on, .choices:xn}
% \begin{syntax}
-% \meta{key} .choices:nn \meta{choices} \meta{code}
+% \meta{key} .choices:nn = \Arg{choices} \Arg{code}
% \end{syntax}
% Sets \meta{key} to act as a choice key, and defines a series \meta{choices}
% which are implemented using the \meta{code}. Inside \meta{code},
@@ -232,7 +232,7 @@
%
% \begin{function}[updated = 2013-07-10]{.code:n}
% \begin{syntax}
-% \meta{key} .code:n = \meta{code}
+% \meta{key} .code:n = \Arg{code}
% \end{syntax}
% Stores the \meta{code} for execution when \meta{key} is used. The
% The \meta{code} can include one parameter (|#1|), which will be the
@@ -244,7 +244,7 @@
% \begin{function}[updated = 2013-07-09]
% {.default:n, .default:V, .default:o, .default:x}
% \begin{syntax}
-% \meta{key} .default:n = \meta{default}
+% \meta{key} .default:n = \Arg{default}
% \end{syntax}
% Creates a \meta{default} value for \meta{key}, which is used if no
% value is given. This will be used if only the key name is given,
@@ -285,7 +285,7 @@
% \begin{function}[added = 2013-07-14]
% {.groups:n}
% \begin{syntax}
-% \meta{key} .groups:n = \meta{groups}
+% \meta{key} .groups:n = \Arg{groups}
% \end{syntax}
% Defines \meta{key} as belonging to the \meta{groups} declared. Groups
% provide a \enquote{secondary axis} for selectively setting keys, and are
@@ -295,7 +295,7 @@
% \begin{function}[updated = 2013-07-09]
% {.initial:n, .initial:V, .initial:o, .initial:x}
% \begin{syntax}
-% \meta{key} .initial:n = \meta{value}
+% \meta{key} .initial:n = \Arg{value}
% \end{syntax}
% Initialises the \meta{key} with the \meta{value}, equivalent to
% \begin{quote}
@@ -345,7 +345,7 @@
% \begin{function}[added = 2011-08-21, updated = 2013-07-10]
% {.multichoices:nn, .multichoices:Vn, .multichoices:on, .multichoices:xn}
% \begin{syntax}
-% \meta{key} .multichoices:nn \meta{choices} \meta{code}
+% \meta{key} .multichoices:nn \Arg{choices} \Arg{code}
% \end{syntax}
% Sets \meta{key} to act as a multiple choice key, and defines a series
% \meta{choices}
@@ -717,8 +717,8 @@
%
% \begin{function}[EXP,pTF]{\keys_if_exist:nn}
% \begin{syntax}
-% \cs{keys_if_exist_p:nn} \meta{module} \meta{key} \\
-% \cs{keys_if_exist:nnTF} \meta{module} \meta{key} \Arg{true code} \Arg{false code}
+% \cs{keys_if_exist_p:nn} \Arg{module} \Arg{key} \\
+% \cs{keys_if_exist:nnTF} \Arg{module} \Arg{key} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{key} exists for \meta{module}, \emph{i.e.}~if any code
% has been defined for \meta{key}.
@@ -726,8 +726,8 @@
%
% \begin{function}[added = 2011-08-21,EXP,pTF]{\keys_if_choice_exist:nnn}
% \begin{syntax}
-% \cs{keys_if_choice_exist_p:nnn} \meta{module} \meta{key} \meta{choice} \\
-% \cs{keys_if_choice_exist:nnnTF} \meta{module} \meta{key} \meta{choice} \Arg{true code} \Arg{false code}
+% \cs{keys_if_choice_exist_p:nnn} \Arg{module} \Arg{key} \Arg{choice} \\
+% \cs{keys_if_choice_exist:nnnTF} \Arg{module} \Arg{key} \Arg{choice} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{choice} is defined for the \meta{key} within the
% \meta{module}, \emph{i.e.}~if any code has been defined for
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index 1a405873659..edabde36f6a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3names.dtx Copyright (C) 1990-2012 The LaTeX3 project
+%% File: l3names.dtx Copyright (C) 1990-2013 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 @@
%
%<*package>
\RequirePackage{l3bootstrap}[2012/07/15]
-\GetIdInfo$Id: l3names.dtx 4346 2012-12-07 13:46:13Z joseph $
+\GetIdInfo$Id: l3names.dtx 4630 2013-12-29 21:04:05Z joseph $
{L3 Namespace for primitives}
%</package>
%<*driver>
@@ -128,16 +128,16 @@
% \end{macrocode}
%
% Everything is inside a (rather long) group, which keeps
-% \cs{__expl_primitive:NN} trapped.
+% \cs{__kernel_primitive:NN} trapped.
% \begin{macrocode}
\begingroup
% \end{macrocode}
%
-% \begin{macro}[aux]{\__expl_primitive:NN}
+% \begin{macro}[aux]{\__kernel_primitive:NN}
% A temporary function to actually do the renaming. This also allows the
% original names to be removed in format mode.
% \begin{macrocode}
- \long \def \__expl_primitive:NN #1#2
+ \long \def \__kernel_primitive:NN #1#2
{
\tex_global:D \tex_let:D #2 #1
%<*initex>
@@ -153,406 +153,406 @@
% These are given modified new names, so that they may be entered
% without catcode tricks.
% \begin{macrocode}
- \__expl_primitive:NN \ \tex_space:D
- \__expl_primitive:NN \/ \tex_italiccorrection:D
- \__expl_primitive:NN \- \tex_hyphen:D
+ \__kernel_primitive:NN \ \tex_space:D
+ \__kernel_primitive:NN \/ \tex_italiccorrection:D
+ \__kernel_primitive:NN \- \tex_hyphen:D
% \end{macrocode}
%
% Now all the other primitives.
% \begin{macrocode}
- \__expl_primitive:NN \let \tex_let:D
- \__expl_primitive:NN \def \tex_def:D
- \__expl_primitive:NN \edef \tex_edef:D
- \__expl_primitive:NN \gdef \tex_gdef:D
- \__expl_primitive:NN \xdef \tex_xdef:D
- \__expl_primitive:NN \chardef \tex_chardef:D
- \__expl_primitive:NN \countdef \tex_countdef:D
- \__expl_primitive:NN \dimendef \tex_dimendef:D
- \__expl_primitive:NN \skipdef \tex_skipdef:D
- \__expl_primitive:NN \muskipdef \tex_muskipdef:D
- \__expl_primitive:NN \mathchardef \tex_mathchardef:D
- \__expl_primitive:NN \toksdef \tex_toksdef:D
- \__expl_primitive:NN \futurelet \tex_futurelet:D
- \__expl_primitive:NN \advance \tex_advance:D
- \__expl_primitive:NN \divide \tex_divide:D
- \__expl_primitive:NN \multiply \tex_multiply:D
- \__expl_primitive:NN \font \tex_font:D
- \__expl_primitive:NN \fam \tex_fam:D
- \__expl_primitive:NN \global \tex_global:D
- \__expl_primitive:NN \long \tex_long:D
- \__expl_primitive:NN \outer \tex_outer:D
- \__expl_primitive:NN \setlanguage \tex_setlanguage:D
- \__expl_primitive:NN \globaldefs \tex_globaldefs:D
- \__expl_primitive:NN \afterassignment \tex_afterassignment:D
- \__expl_primitive:NN \aftergroup \tex_aftergroup:D
- \__expl_primitive:NN \expandafter \tex_expandafter:D
- \__expl_primitive:NN \noexpand \tex_noexpand:D
- \__expl_primitive:NN \begingroup \tex_begingroup:D
- \__expl_primitive:NN \endgroup \tex_endgroup:D
- \__expl_primitive:NN \halign \tex_halign:D
- \__expl_primitive:NN \valign \tex_valign:D
- \__expl_primitive:NN \cr \tex_cr:D
- \__expl_primitive:NN \crcr \tex_crcr:D
- \__expl_primitive:NN \noalign \tex_noalign:D
- \__expl_primitive:NN \omit \tex_omit:D
- \__expl_primitive:NN \span \tex_span:D
- \__expl_primitive:NN \tabskip \tex_tabskip:D
- \__expl_primitive:NN \everycr \tex_everycr:D
- \__expl_primitive:NN \if \tex_if:D
- \__expl_primitive:NN \ifcase \tex_ifcase:D
- \__expl_primitive:NN \ifcat \tex_ifcat:D
- \__expl_primitive:NN \ifnum \tex_ifnum:D
- \__expl_primitive:NN \ifodd \tex_ifodd:D
- \__expl_primitive:NN \ifdim \tex_ifdim:D
- \__expl_primitive:NN \ifeof \tex_ifeof:D
- \__expl_primitive:NN \ifhbox \tex_ifhbox:D
- \__expl_primitive:NN \ifvbox \tex_ifvbox:D
- \__expl_primitive:NN \ifvoid \tex_ifvoid:D
- \__expl_primitive:NN \ifx \tex_ifx:D
- \__expl_primitive:NN \iffalse \tex_iffalse:D
- \__expl_primitive:NN \iftrue \tex_iftrue:D
- \__expl_primitive:NN \ifhmode \tex_ifhmode:D
- \__expl_primitive:NN \ifmmode \tex_ifmmode:D
- \__expl_primitive:NN \ifvmode \tex_ifvmode:D
- \__expl_primitive:NN \ifinner \tex_ifinner:D
- \__expl_primitive:NN \else \tex_else:D
- \__expl_primitive:NN \fi \tex_fi:D
- \__expl_primitive:NN \or \tex_or:D
- \__expl_primitive:NN \immediate \tex_immediate:D
- \__expl_primitive:NN \closeout \tex_closeout:D
- \__expl_primitive:NN \openin \tex_openin:D
- \__expl_primitive:NN \openout \tex_openout:D
- \__expl_primitive:NN \read \tex_read:D
- \__expl_primitive:NN \write \tex_write:D
- \__expl_primitive:NN \closein \tex_closein:D
- \__expl_primitive:NN \newlinechar \tex_newlinechar:D
- \__expl_primitive:NN \input \tex_input:D
- \__expl_primitive:NN \endinput \tex_endinput:D
- \__expl_primitive:NN \inputlineno \tex_inputlineno:D
- \__expl_primitive:NN \errmessage \tex_errmessage:D
- \__expl_primitive:NN \message \tex_message:D
- \__expl_primitive:NN \show \tex_show:D
- \__expl_primitive:NN \showthe \tex_showthe:D
- \__expl_primitive:NN \showbox \tex_showbox:D
- \__expl_primitive:NN \showlists \tex_showlists:D
- \__expl_primitive:NN \errhelp \tex_errhelp:D
- \__expl_primitive:NN \errorcontextlines \tex_errorcontextlines:D
- \__expl_primitive:NN \tracingcommands \tex_tracingcommands:D
- \__expl_primitive:NN \tracinglostchars \tex_tracinglostchars:D
- \__expl_primitive:NN \tracingmacros \tex_tracingmacros:D
- \__expl_primitive:NN \tracingonline \tex_tracingonline:D
- \__expl_primitive:NN \tracingoutput \tex_tracingoutput:D
- \__expl_primitive:NN \tracingpages \tex_tracingpages:D
- \__expl_primitive:NN \tracingparagraphs \tex_tracingparagraphs:D
- \__expl_primitive:NN \tracingrestores \tex_tracingrestores:D
- \__expl_primitive:NN \tracingstats \tex_tracingstats:D
- \__expl_primitive:NN \pausing \tex_pausing:D
- \__expl_primitive:NN \showboxbreadth \tex_showboxbreadth:D
- \__expl_primitive:NN \showboxdepth \tex_showboxdepth:D
- \__expl_primitive:NN \batchmode \tex_batchmode:D
- \__expl_primitive:NN \errorstopmode \tex_errorstopmode:D
- \__expl_primitive:NN \nonstopmode \tex_nonstopmode:D
- \__expl_primitive:NN \scrollmode \tex_scrollmode:D
- \__expl_primitive:NN \end \tex_end:D
- \__expl_primitive:NN \csname \tex_csname:D
- \__expl_primitive:NN \endcsname \tex_endcsname:D
- \__expl_primitive:NN \ignorespaces \tex_ignorespaces:D
- \__expl_primitive:NN \relax \tex_relax:D
- \__expl_primitive:NN \the \tex_the:D
- \__expl_primitive:NN \mag \tex_mag:D
- \__expl_primitive:NN \language \tex_language:D
- \__expl_primitive:NN \mark \tex_mark:D
- \__expl_primitive:NN \topmark \tex_topmark:D
- \__expl_primitive:NN \firstmark \tex_firstmark:D
- \__expl_primitive:NN \botmark \tex_botmark:D
- \__expl_primitive:NN \splitfirstmark \tex_splitfirstmark:D
- \__expl_primitive:NN \splitbotmark \tex_splitbotmark:D
- \__expl_primitive:NN \fontname \tex_fontname:D
- \__expl_primitive:NN \escapechar \tex_escapechar:D
- \__expl_primitive:NN \endlinechar \tex_endlinechar:D
- \__expl_primitive:NN \mathchoice \tex_mathchoice:D
- \__expl_primitive:NN \delimiter \tex_delimiter:D
- \__expl_primitive:NN \mathaccent \tex_mathaccent:D
- \__expl_primitive:NN \mathchar \tex_mathchar:D
- \__expl_primitive:NN \mskip \tex_mskip:D
- \__expl_primitive:NN \radical \tex_radical:D
- \__expl_primitive:NN \vcenter \tex_vcenter:D
- \__expl_primitive:NN \mkern \tex_mkern:D
- \__expl_primitive:NN \above \tex_above:D
- \__expl_primitive:NN \abovewithdelims \tex_abovewithdelims:D
- \__expl_primitive:NN \atop \tex_atop:D
- \__expl_primitive:NN \atopwithdelims \tex_atopwithdelims:D
- \__expl_primitive:NN \over \tex_over:D
- \__expl_primitive:NN \overwithdelims \tex_overwithdelims:D
- \__expl_primitive:NN \displaystyle \tex_displaystyle:D
- \__expl_primitive:NN \textstyle \tex_textstyle:D
- \__expl_primitive:NN \scriptstyle \tex_scriptstyle:D
- \__expl_primitive:NN \scriptscriptstyle \tex_scriptscriptstyle:D
- \__expl_primitive:NN \nonscript \tex_nonscript:D
- \__expl_primitive:NN \eqno \tex_eqno:D
- \__expl_primitive:NN \leqno \tex_leqno:D
- \__expl_primitive:NN \abovedisplayshortskip \tex_abovedisplayshortskip:D
- \__expl_primitive:NN \abovedisplayskip \tex_abovedisplayskip:D
- \__expl_primitive:NN \belowdisplayshortskip \tex_belowdisplayshortskip:D
- \__expl_primitive:NN \belowdisplayskip \tex_belowdisplayskip:D
- \__expl_primitive:NN \displaywidowpenalty \tex_displaywidowpenalty:D
- \__expl_primitive:NN \displayindent \tex_displayindent:D
- \__expl_primitive:NN \displaywidth \tex_displaywidth:D
- \__expl_primitive:NN \everydisplay \tex_everydisplay:D
- \__expl_primitive:NN \predisplaysize \tex_predisplaysize:D
- \__expl_primitive:NN \predisplaypenalty \tex_predisplaypenalty:D
- \__expl_primitive:NN \postdisplaypenalty \tex_postdisplaypenalty:D
- \__expl_primitive:NN \mathbin \tex_mathbin:D
- \__expl_primitive:NN \mathclose \tex_mathclose:D
- \__expl_primitive:NN \mathinner \tex_mathinner:D
- \__expl_primitive:NN \mathop \tex_mathop:D
- \__expl_primitive:NN \displaylimits \tex_displaylimits:D
- \__expl_primitive:NN \limits \tex_limits:D
- \__expl_primitive:NN \nolimits \tex_nolimits:D
- \__expl_primitive:NN \mathopen \tex_mathopen:D
- \__expl_primitive:NN \mathord \tex_mathord:D
- \__expl_primitive:NN \mathpunct \tex_mathpunct:D
- \__expl_primitive:NN \mathrel \tex_mathrel:D
- \__expl_primitive:NN \overline \tex_overline:D
- \__expl_primitive:NN \underline \tex_underline:D
- \__expl_primitive:NN \left \tex_left:D
- \__expl_primitive:NN \right \tex_right:D
- \__expl_primitive:NN \binoppenalty \tex_binoppenalty:D
- \__expl_primitive:NN \relpenalty \tex_relpenalty:D
- \__expl_primitive:NN \delimitershortfall \tex_delimitershortfall:D
- \__expl_primitive:NN \delimiterfactor \tex_delimiterfactor:D
- \__expl_primitive:NN \nulldelimiterspace \tex_nulldelimiterspace:D
- \__expl_primitive:NN \everymath \tex_everymath:D
- \__expl_primitive:NN \mathsurround \tex_mathsurround:D
- \__expl_primitive:NN \medmuskip \tex_medmuskip:D
- \__expl_primitive:NN \thinmuskip \tex_thinmuskip:D
- \__expl_primitive:NN \thickmuskip \tex_thickmuskip:D
- \__expl_primitive:NN \scriptspace \tex_scriptspace:D
- \__expl_primitive:NN \noboundary \tex_noboundary:D
- \__expl_primitive:NN \accent \tex_accent:D
- \__expl_primitive:NN \char \tex_char:D
- \__expl_primitive:NN \discretionary \tex_discretionary:D
- \__expl_primitive:NN \hfil \tex_hfil:D
- \__expl_primitive:NN \hfilneg \tex_hfilneg:D
- \__expl_primitive:NN \hfill \tex_hfill:D
- \__expl_primitive:NN \hskip \tex_hskip:D
- \__expl_primitive:NN \hss \tex_hss:D
- \__expl_primitive:NN \vfil \tex_vfil:D
- \__expl_primitive:NN \vfilneg \tex_vfilneg:D
- \__expl_primitive:NN \vfill \tex_vfill:D
- \__expl_primitive:NN \vskip \tex_vskip:D
- \__expl_primitive:NN \vss \tex_vss:D
- \__expl_primitive:NN \unskip \tex_unskip:D
- \__expl_primitive:NN \kern \tex_kern:D
- \__expl_primitive:NN \unkern \tex_unkern:D
- \__expl_primitive:NN \hrule \tex_hrule:D
- \__expl_primitive:NN \vrule \tex_vrule:D
- \__expl_primitive:NN \leaders \tex_leaders:D
- \__expl_primitive:NN \cleaders \tex_cleaders:D
- \__expl_primitive:NN \xleaders \tex_xleaders:D
- \__expl_primitive:NN \lastkern \tex_lastkern:D
- \__expl_primitive:NN \lastskip \tex_lastskip:D
- \__expl_primitive:NN \indent \tex_indent:D
- \__expl_primitive:NN \par \tex_par:D
- \__expl_primitive:NN \noindent \tex_noindent:D
- \__expl_primitive:NN \vadjust \tex_vadjust:D
- \__expl_primitive:NN \baselineskip \tex_baselineskip:D
- \__expl_primitive:NN \lineskip \tex_lineskip:D
- \__expl_primitive:NN \lineskiplimit \tex_lineskiplimit:D
- \__expl_primitive:NN \clubpenalty \tex_clubpenalty:D
- \__expl_primitive:NN \widowpenalty \tex_widowpenalty:D
- \__expl_primitive:NN \exhyphenpenalty \tex_exhyphenpenalty:D
- \__expl_primitive:NN \hyphenpenalty \tex_hyphenpenalty:D
- \__expl_primitive:NN \linepenalty \tex_linepenalty:D
- \__expl_primitive:NN \doublehyphendemerits \tex_doublehyphendemerits:D
- \__expl_primitive:NN \finalhyphendemerits \tex_finalhyphendemerits:D
- \__expl_primitive:NN \adjdemerits \tex_adjdemerits:D
- \__expl_primitive:NN \hangafter \tex_hangafter:D
- \__expl_primitive:NN \hangindent \tex_hangindent:D
- \__expl_primitive:NN \parshape \tex_parshape:D
- \__expl_primitive:NN \hsize \tex_hsize:D
- \__expl_primitive:NN \lefthyphenmin \tex_lefthyphenmin:D
- \__expl_primitive:NN \righthyphenmin \tex_righthyphenmin:D
- \__expl_primitive:NN \leftskip \tex_leftskip:D
- \__expl_primitive:NN \rightskip \tex_rightskip:D
- \__expl_primitive:NN \looseness \tex_looseness:D
- \__expl_primitive:NN \parskip \tex_parskip:D
- \__expl_primitive:NN \parindent \tex_parindent:D
- \__expl_primitive:NN \uchyph \tex_uchyph:D
- \__expl_primitive:NN \emergencystretch \tex_emergencystretch:D
- \__expl_primitive:NN \pretolerance \tex_pretolerance:D
- \__expl_primitive:NN \tolerance \tex_tolerance:D
- \__expl_primitive:NN \spaceskip \tex_spaceskip:D
- \__expl_primitive:NN \xspaceskip \tex_xspaceskip:D
- \__expl_primitive:NN \parfillskip \tex_parfillskip:D
- \__expl_primitive:NN \everypar \tex_everypar:D
- \__expl_primitive:NN \prevgraf \tex_prevgraf:D
- \__expl_primitive:NN \spacefactor \tex_spacefactor:D
- \__expl_primitive:NN \shipout \tex_shipout:D
- \__expl_primitive:NN \vsize \tex_vsize:D
- \__expl_primitive:NN \interlinepenalty \tex_interlinepenalty:D
- \__expl_primitive:NN \brokenpenalty \tex_brokenpenalty:D
- \__expl_primitive:NN \topskip \tex_topskip:D
- \__expl_primitive:NN \maxdeadcycles \tex_maxdeadcycles:D
- \__expl_primitive:NN \maxdepth \tex_maxdepth:D
- \__expl_primitive:NN \output \tex_output:D
- \__expl_primitive:NN \deadcycles \tex_deadcycles:D
- \__expl_primitive:NN \pagedepth \tex_pagedepth:D
- \__expl_primitive:NN \pagestretch \tex_pagestretch:D
- \__expl_primitive:NN \pagefilstretch \tex_pagefilstretch:D
- \__expl_primitive:NN \pagefillstretch \tex_pagefillstretch:D
- \__expl_primitive:NN \pagefilllstretch \tex_pagefilllstretch:D
- \__expl_primitive:NN \pageshrink \tex_pageshrink:D
- \__expl_primitive:NN \pagegoal \tex_pagegoal:D
- \__expl_primitive:NN \pagetotal \tex_pagetotal:D
- \__expl_primitive:NN \outputpenalty \tex_outputpenalty:D
- \__expl_primitive:NN \hoffset \tex_hoffset:D
- \__expl_primitive:NN \voffset \tex_voffset:D
- \__expl_primitive:NN \insert \tex_insert:D
- \__expl_primitive:NN \holdinginserts \tex_holdinginserts:D
- \__expl_primitive:NN \floatingpenalty \tex_floatingpenalty:D
- \__expl_primitive:NN \insertpenalties \tex_insertpenalties:D
- \__expl_primitive:NN \lower \tex_lower:D
- \__expl_primitive:NN \moveleft \tex_moveleft:D
- \__expl_primitive:NN \moveright \tex_moveright:D
- \__expl_primitive:NN \raise \tex_raise:D
- \__expl_primitive:NN \copy \tex_copy:D
- \__expl_primitive:NN \lastbox \tex_lastbox:D
- \__expl_primitive:NN \vsplit \tex_vsplit:D
- \__expl_primitive:NN \unhbox \tex_unhbox:D
- \__expl_primitive:NN \unhcopy \tex_unhcopy:D
- \__expl_primitive:NN \unvbox \tex_unvbox:D
- \__expl_primitive:NN \unvcopy \tex_unvcopy:D
- \__expl_primitive:NN \setbox \tex_setbox:D
- \__expl_primitive:NN \hbox \tex_hbox:D
- \__expl_primitive:NN \vbox \tex_vbox:D
- \__expl_primitive:NN \vtop \tex_vtop:D
- \__expl_primitive:NN \prevdepth \tex_prevdepth:D
- \__expl_primitive:NN \badness \tex_badness:D
- \__expl_primitive:NN \hbadness \tex_hbadness:D
- \__expl_primitive:NN \vbadness \tex_vbadness:D
- \__expl_primitive:NN \hfuzz \tex_hfuzz:D
- \__expl_primitive:NN \vfuzz \tex_vfuzz:D
- \__expl_primitive:NN \overfullrule \tex_overfullrule:D
- \__expl_primitive:NN \boxmaxdepth \tex_boxmaxdepth:D
- \__expl_primitive:NN \splitmaxdepth \tex_splitmaxdepth:D
- \__expl_primitive:NN \splittopskip \tex_splittopskip:D
- \__expl_primitive:NN \everyhbox \tex_everyhbox:D
- \__expl_primitive:NN \everyvbox \tex_everyvbox:D
- \__expl_primitive:NN \nullfont \tex_nullfont:D
- \__expl_primitive:NN \textfont \tex_textfont:D
- \__expl_primitive:NN \scriptfont \tex_scriptfont:D
- \__expl_primitive:NN \scriptscriptfont \tex_scriptscriptfont:D
- \__expl_primitive:NN \fontdimen \tex_fontdimen:D
- \__expl_primitive:NN \hyphenchar \tex_hyphenchar:D
- \__expl_primitive:NN \skewchar \tex_skewchar:D
- \__expl_primitive:NN \defaulthyphenchar \tex_defaulthyphenchar:D
- \__expl_primitive:NN \defaultskewchar \tex_defaultskewchar:D
- \__expl_primitive:NN \number \tex_number:D
- \__expl_primitive:NN \romannumeral \tex_romannumeral:D
- \__expl_primitive:NN \string \tex_string:D
- \__expl_primitive:NN \lowercase \tex_lowercase:D
- \__expl_primitive:NN \uppercase \tex_uppercase:D
- \__expl_primitive:NN \meaning \tex_meaning:D
- \__expl_primitive:NN \penalty \tex_penalty:D
- \__expl_primitive:NN \unpenalty \tex_unpenalty:D
- \__expl_primitive:NN \lastpenalty \tex_lastpenalty:D
- \__expl_primitive:NN \special \tex_special:D
- \__expl_primitive:NN \dump \tex_dump:D
- \__expl_primitive:NN \patterns \tex_patterns:D
- \__expl_primitive:NN \hyphenation \tex_hyphenation:D
- \__expl_primitive:NN \time \tex_time:D
- \__expl_primitive:NN \day \tex_day:D
- \__expl_primitive:NN \month \tex_month:D
- \__expl_primitive:NN \year \tex_year:D
- \__expl_primitive:NN \jobname \tex_jobname:D
- \__expl_primitive:NN \everyjob \tex_everyjob:D
- \__expl_primitive:NN \count \tex_count:D
- \__expl_primitive:NN \dimen \tex_dimen:D
- \__expl_primitive:NN \skip \tex_skip:D
- \__expl_primitive:NN \toks \tex_toks:D
- \__expl_primitive:NN \muskip \tex_muskip:D
- \__expl_primitive:NN \box \tex_box:D
- \__expl_primitive:NN \wd \tex_wd:D
- \__expl_primitive:NN \ht \tex_ht:D
- \__expl_primitive:NN \dp \tex_dp:D
- \__expl_primitive:NN \catcode \tex_catcode:D
- \__expl_primitive:NN \delcode \tex_delcode:D
- \__expl_primitive:NN \sfcode \tex_sfcode:D
- \__expl_primitive:NN \lccode \tex_lccode:D
- \__expl_primitive:NN \uccode \tex_uccode:D
- \__expl_primitive:NN \mathcode \tex_mathcode:D
+ \__kernel_primitive:NN \let \tex_let:D
+ \__kernel_primitive:NN \def \tex_def:D
+ \__kernel_primitive:NN \edef \tex_edef:D
+ \__kernel_primitive:NN \gdef \tex_gdef:D
+ \__kernel_primitive:NN \xdef \tex_xdef:D
+ \__kernel_primitive:NN \chardef \tex_chardef:D
+ \__kernel_primitive:NN \countdef \tex_countdef:D
+ \__kernel_primitive:NN \dimendef \tex_dimendef:D
+ \__kernel_primitive:NN \skipdef \tex_skipdef:D
+ \__kernel_primitive:NN \muskipdef \tex_muskipdef:D
+ \__kernel_primitive:NN \mathchardef \tex_mathchardef:D
+ \__kernel_primitive:NN \toksdef \tex_toksdef:D
+ \__kernel_primitive:NN \futurelet \tex_futurelet:D
+ \__kernel_primitive:NN \advance \tex_advance:D
+ \__kernel_primitive:NN \divide \tex_divide:D
+ \__kernel_primitive:NN \multiply \tex_multiply:D
+ \__kernel_primitive:NN \font \tex_font:D
+ \__kernel_primitive:NN \fam \tex_fam:D
+ \__kernel_primitive:NN \global \tex_global:D
+ \__kernel_primitive:NN \long \tex_long:D
+ \__kernel_primitive:NN \outer \tex_outer:D
+ \__kernel_primitive:NN \setlanguage \tex_setlanguage:D
+ \__kernel_primitive:NN \globaldefs \tex_globaldefs:D
+ \__kernel_primitive:NN \afterassignment \tex_afterassignment:D
+ \__kernel_primitive:NN \aftergroup \tex_aftergroup:D
+ \__kernel_primitive:NN \expandafter \tex_expandafter:D
+ \__kernel_primitive:NN \noexpand \tex_noexpand:D
+ \__kernel_primitive:NN \begingroup \tex_begingroup:D
+ \__kernel_primitive:NN \endgroup \tex_endgroup:D
+ \__kernel_primitive:NN \halign \tex_halign:D
+ \__kernel_primitive:NN \valign \tex_valign:D
+ \__kernel_primitive:NN \cr \tex_cr:D
+ \__kernel_primitive:NN \crcr \tex_crcr:D
+ \__kernel_primitive:NN \noalign \tex_noalign:D
+ \__kernel_primitive:NN \omit \tex_omit:D
+ \__kernel_primitive:NN \span \tex_span:D
+ \__kernel_primitive:NN \tabskip \tex_tabskip:D
+ \__kernel_primitive:NN \everycr \tex_everycr:D
+ \__kernel_primitive:NN \if \tex_if:D
+ \__kernel_primitive:NN \ifcase \tex_ifcase:D
+ \__kernel_primitive:NN \ifcat \tex_ifcat:D
+ \__kernel_primitive:NN \ifnum \tex_ifnum:D
+ \__kernel_primitive:NN \ifodd \tex_ifodd:D
+ \__kernel_primitive:NN \ifdim \tex_ifdim:D
+ \__kernel_primitive:NN \ifeof \tex_ifeof:D
+ \__kernel_primitive:NN \ifhbox \tex_ifhbox:D
+ \__kernel_primitive:NN \ifvbox \tex_ifvbox:D
+ \__kernel_primitive:NN \ifvoid \tex_ifvoid:D
+ \__kernel_primitive:NN \ifx \tex_ifx:D
+ \__kernel_primitive:NN \iffalse \tex_iffalse:D
+ \__kernel_primitive:NN \iftrue \tex_iftrue:D
+ \__kernel_primitive:NN \ifhmode \tex_ifhmode:D
+ \__kernel_primitive:NN \ifmmode \tex_ifmmode:D
+ \__kernel_primitive:NN \ifvmode \tex_ifvmode:D
+ \__kernel_primitive:NN \ifinner \tex_ifinner:D
+ \__kernel_primitive:NN \else \tex_else:D
+ \__kernel_primitive:NN \fi \tex_fi:D
+ \__kernel_primitive:NN \or \tex_or:D
+ \__kernel_primitive:NN \immediate \tex_immediate:D
+ \__kernel_primitive:NN \closeout \tex_closeout:D
+ \__kernel_primitive:NN \openin \tex_openin:D
+ \__kernel_primitive:NN \openout \tex_openout:D
+ \__kernel_primitive:NN \read \tex_read:D
+ \__kernel_primitive:NN \write \tex_write:D
+ \__kernel_primitive:NN \closein \tex_closein:D
+ \__kernel_primitive:NN \newlinechar \tex_newlinechar:D
+ \__kernel_primitive:NN \input \tex_input:D
+ \__kernel_primitive:NN \endinput \tex_endinput:D
+ \__kernel_primitive:NN \inputlineno \tex_inputlineno:D
+ \__kernel_primitive:NN \errmessage \tex_errmessage:D
+ \__kernel_primitive:NN \message \tex_message:D
+ \__kernel_primitive:NN \show \tex_show:D
+ \__kernel_primitive:NN \showthe \tex_showthe:D
+ \__kernel_primitive:NN \showbox \tex_showbox:D
+ \__kernel_primitive:NN \showlists \tex_showlists:D
+ \__kernel_primitive:NN \errhelp \tex_errhelp:D
+ \__kernel_primitive:NN \errorcontextlines \tex_errorcontextlines:D
+ \__kernel_primitive:NN \tracingcommands \tex_tracingcommands:D
+ \__kernel_primitive:NN \tracinglostchars \tex_tracinglostchars:D
+ \__kernel_primitive:NN \tracingmacros \tex_tracingmacros:D
+ \__kernel_primitive:NN \tracingonline \tex_tracingonline:D
+ \__kernel_primitive:NN \tracingoutput \tex_tracingoutput:D
+ \__kernel_primitive:NN \tracingpages \tex_tracingpages:D
+ \__kernel_primitive:NN \tracingparagraphs \tex_tracingparagraphs:D
+ \__kernel_primitive:NN \tracingrestores \tex_tracingrestores:D
+ \__kernel_primitive:NN \tracingstats \tex_tracingstats:D
+ \__kernel_primitive:NN \pausing \tex_pausing:D
+ \__kernel_primitive:NN \showboxbreadth \tex_showboxbreadth:D
+ \__kernel_primitive:NN \showboxdepth \tex_showboxdepth:D
+ \__kernel_primitive:NN \batchmode \tex_batchmode:D
+ \__kernel_primitive:NN \errorstopmode \tex_errorstopmode:D
+ \__kernel_primitive:NN \nonstopmode \tex_nonstopmode:D
+ \__kernel_primitive:NN \scrollmode \tex_scrollmode:D
+ \__kernel_primitive:NN \end \tex_end:D
+ \__kernel_primitive:NN \csname \tex_csname:D
+ \__kernel_primitive:NN \endcsname \tex_endcsname:D
+ \__kernel_primitive:NN \ignorespaces \tex_ignorespaces:D
+ \__kernel_primitive:NN \relax \tex_relax:D
+ \__kernel_primitive:NN \the \tex_the:D
+ \__kernel_primitive:NN \mag \tex_mag:D
+ \__kernel_primitive:NN \language \tex_language:D
+ \__kernel_primitive:NN \mark \tex_mark:D
+ \__kernel_primitive:NN \topmark \tex_topmark:D
+ \__kernel_primitive:NN \firstmark \tex_firstmark:D
+ \__kernel_primitive:NN \botmark \tex_botmark:D
+ \__kernel_primitive:NN \splitfirstmark \tex_splitfirstmark:D
+ \__kernel_primitive:NN \splitbotmark \tex_splitbotmark:D
+ \__kernel_primitive:NN \fontname \tex_fontname:D
+ \__kernel_primitive:NN \escapechar \tex_escapechar:D
+ \__kernel_primitive:NN \endlinechar \tex_endlinechar:D
+ \__kernel_primitive:NN \mathchoice \tex_mathchoice:D
+ \__kernel_primitive:NN \delimiter \tex_delimiter:D
+ \__kernel_primitive:NN \mathaccent \tex_mathaccent:D
+ \__kernel_primitive:NN \mathchar \tex_mathchar:D
+ \__kernel_primitive:NN \mskip \tex_mskip:D
+ \__kernel_primitive:NN \radical \tex_radical:D
+ \__kernel_primitive:NN \vcenter \tex_vcenter:D
+ \__kernel_primitive:NN \mkern \tex_mkern:D
+ \__kernel_primitive:NN \above \tex_above:D
+ \__kernel_primitive:NN \abovewithdelims \tex_abovewithdelims:D
+ \__kernel_primitive:NN \atop \tex_atop:D
+ \__kernel_primitive:NN \atopwithdelims \tex_atopwithdelims:D
+ \__kernel_primitive:NN \over \tex_over:D
+ \__kernel_primitive:NN \overwithdelims \tex_overwithdelims:D
+ \__kernel_primitive:NN \displaystyle \tex_displaystyle:D
+ \__kernel_primitive:NN \textstyle \tex_textstyle:D
+ \__kernel_primitive:NN \scriptstyle \tex_scriptstyle:D
+ \__kernel_primitive:NN \scriptscriptstyle \tex_scriptscriptstyle:D
+ \__kernel_primitive:NN \nonscript \tex_nonscript:D
+ \__kernel_primitive:NN \eqno \tex_eqno:D
+ \__kernel_primitive:NN \leqno \tex_leqno:D
+ \__kernel_primitive:NN \abovedisplayshortskip \tex_abovedisplayshortskip:D
+ \__kernel_primitive:NN \abovedisplayskip \tex_abovedisplayskip:D
+ \__kernel_primitive:NN \belowdisplayshortskip \tex_belowdisplayshortskip:D
+ \__kernel_primitive:NN \belowdisplayskip \tex_belowdisplayskip:D
+ \__kernel_primitive:NN \displaywidowpenalty \tex_displaywidowpenalty:D
+ \__kernel_primitive:NN \displayindent \tex_displayindent:D
+ \__kernel_primitive:NN \displaywidth \tex_displaywidth:D
+ \__kernel_primitive:NN \everydisplay \tex_everydisplay:D
+ \__kernel_primitive:NN \predisplaysize \tex_predisplaysize:D
+ \__kernel_primitive:NN \predisplaypenalty \tex_predisplaypenalty:D
+ \__kernel_primitive:NN \postdisplaypenalty \tex_postdisplaypenalty:D
+ \__kernel_primitive:NN \mathbin \tex_mathbin:D
+ \__kernel_primitive:NN \mathclose \tex_mathclose:D
+ \__kernel_primitive:NN \mathinner \tex_mathinner:D
+ \__kernel_primitive:NN \mathop \tex_mathop:D
+ \__kernel_primitive:NN \displaylimits \tex_displaylimits:D
+ \__kernel_primitive:NN \limits \tex_limits:D
+ \__kernel_primitive:NN \nolimits \tex_nolimits:D
+ \__kernel_primitive:NN \mathopen \tex_mathopen:D
+ \__kernel_primitive:NN \mathord \tex_mathord:D
+ \__kernel_primitive:NN \mathpunct \tex_mathpunct:D
+ \__kernel_primitive:NN \mathrel \tex_mathrel:D
+ \__kernel_primitive:NN \overline \tex_overline:D
+ \__kernel_primitive:NN \underline \tex_underline:D
+ \__kernel_primitive:NN \left \tex_left:D
+ \__kernel_primitive:NN \right \tex_right:D
+ \__kernel_primitive:NN \binoppenalty \tex_binoppenalty:D
+ \__kernel_primitive:NN \relpenalty \tex_relpenalty:D
+ \__kernel_primitive:NN \delimitershortfall \tex_delimitershortfall:D
+ \__kernel_primitive:NN \delimiterfactor \tex_delimiterfactor:D
+ \__kernel_primitive:NN \nulldelimiterspace \tex_nulldelimiterspace:D
+ \__kernel_primitive:NN \everymath \tex_everymath:D
+ \__kernel_primitive:NN \mathsurround \tex_mathsurround:D
+ \__kernel_primitive:NN \medmuskip \tex_medmuskip:D
+ \__kernel_primitive:NN \thinmuskip \tex_thinmuskip:D
+ \__kernel_primitive:NN \thickmuskip \tex_thickmuskip:D
+ \__kernel_primitive:NN \scriptspace \tex_scriptspace:D
+ \__kernel_primitive:NN \noboundary \tex_noboundary:D
+ \__kernel_primitive:NN \accent \tex_accent:D
+ \__kernel_primitive:NN \char \tex_char:D
+ \__kernel_primitive:NN \discretionary \tex_discretionary:D
+ \__kernel_primitive:NN \hfil \tex_hfil:D
+ \__kernel_primitive:NN \hfilneg \tex_hfilneg:D
+ \__kernel_primitive:NN \hfill \tex_hfill:D
+ \__kernel_primitive:NN \hskip \tex_hskip:D
+ \__kernel_primitive:NN \hss \tex_hss:D
+ \__kernel_primitive:NN \vfil \tex_vfil:D
+ \__kernel_primitive:NN \vfilneg \tex_vfilneg:D
+ \__kernel_primitive:NN \vfill \tex_vfill:D
+ \__kernel_primitive:NN \vskip \tex_vskip:D
+ \__kernel_primitive:NN \vss \tex_vss:D
+ \__kernel_primitive:NN \unskip \tex_unskip:D
+ \__kernel_primitive:NN \kern \tex_kern:D
+ \__kernel_primitive:NN \unkern \tex_unkern:D
+ \__kernel_primitive:NN \hrule \tex_hrule:D
+ \__kernel_primitive:NN \vrule \tex_vrule:D
+ \__kernel_primitive:NN \leaders \tex_leaders:D
+ \__kernel_primitive:NN \cleaders \tex_cleaders:D
+ \__kernel_primitive:NN \xleaders \tex_xleaders:D
+ \__kernel_primitive:NN \lastkern \tex_lastkern:D
+ \__kernel_primitive:NN \lastskip \tex_lastskip:D
+ \__kernel_primitive:NN \indent \tex_indent:D
+ \__kernel_primitive:NN \par \tex_par:D
+ \__kernel_primitive:NN \noindent \tex_noindent:D
+ \__kernel_primitive:NN \vadjust \tex_vadjust:D
+ \__kernel_primitive:NN \baselineskip \tex_baselineskip:D
+ \__kernel_primitive:NN \lineskip \tex_lineskip:D
+ \__kernel_primitive:NN \lineskiplimit \tex_lineskiplimit:D
+ \__kernel_primitive:NN \clubpenalty \tex_clubpenalty:D
+ \__kernel_primitive:NN \widowpenalty \tex_widowpenalty:D
+ \__kernel_primitive:NN \exhyphenpenalty \tex_exhyphenpenalty:D
+ \__kernel_primitive:NN \hyphenpenalty \tex_hyphenpenalty:D
+ \__kernel_primitive:NN \linepenalty \tex_linepenalty:D
+ \__kernel_primitive:NN \doublehyphendemerits \tex_doublehyphendemerits:D
+ \__kernel_primitive:NN \finalhyphendemerits \tex_finalhyphendemerits:D
+ \__kernel_primitive:NN \adjdemerits \tex_adjdemerits:D
+ \__kernel_primitive:NN \hangafter \tex_hangafter:D
+ \__kernel_primitive:NN \hangindent \tex_hangindent:D
+ \__kernel_primitive:NN \parshape \tex_parshape:D
+ \__kernel_primitive:NN \hsize \tex_hsize:D
+ \__kernel_primitive:NN \lefthyphenmin \tex_lefthyphenmin:D
+ \__kernel_primitive:NN \righthyphenmin \tex_righthyphenmin:D
+ \__kernel_primitive:NN \leftskip \tex_leftskip:D
+ \__kernel_primitive:NN \rightskip \tex_rightskip:D
+ \__kernel_primitive:NN \looseness \tex_looseness:D
+ \__kernel_primitive:NN \parskip \tex_parskip:D
+ \__kernel_primitive:NN \parindent \tex_parindent:D
+ \__kernel_primitive:NN \uchyph \tex_uchyph:D
+ \__kernel_primitive:NN \emergencystretch \tex_emergencystretch:D
+ \__kernel_primitive:NN \pretolerance \tex_pretolerance:D
+ \__kernel_primitive:NN \tolerance \tex_tolerance:D
+ \__kernel_primitive:NN \spaceskip \tex_spaceskip:D
+ \__kernel_primitive:NN \xspaceskip \tex_xspaceskip:D
+ \__kernel_primitive:NN \parfillskip \tex_parfillskip:D
+ \__kernel_primitive:NN \everypar \tex_everypar:D
+ \__kernel_primitive:NN \prevgraf \tex_prevgraf:D
+ \__kernel_primitive:NN \spacefactor \tex_spacefactor:D
+ \__kernel_primitive:NN \shipout \tex_shipout:D
+ \__kernel_primitive:NN \vsize \tex_vsize:D
+ \__kernel_primitive:NN \interlinepenalty \tex_interlinepenalty:D
+ \__kernel_primitive:NN \brokenpenalty \tex_brokenpenalty:D
+ \__kernel_primitive:NN \topskip \tex_topskip:D
+ \__kernel_primitive:NN \maxdeadcycles \tex_maxdeadcycles:D
+ \__kernel_primitive:NN \maxdepth \tex_maxdepth:D
+ \__kernel_primitive:NN \output \tex_output:D
+ \__kernel_primitive:NN \deadcycles \tex_deadcycles:D
+ \__kernel_primitive:NN \pagedepth \tex_pagedepth:D
+ \__kernel_primitive:NN \pagestretch \tex_pagestretch:D
+ \__kernel_primitive:NN \pagefilstretch \tex_pagefilstretch:D
+ \__kernel_primitive:NN \pagefillstretch \tex_pagefillstretch:D
+ \__kernel_primitive:NN \pagefilllstretch \tex_pagefilllstretch:D
+ \__kernel_primitive:NN \pageshrink \tex_pageshrink:D
+ \__kernel_primitive:NN \pagegoal \tex_pagegoal:D
+ \__kernel_primitive:NN \pagetotal \tex_pagetotal:D
+ \__kernel_primitive:NN \outputpenalty \tex_outputpenalty:D
+ \__kernel_primitive:NN \hoffset \tex_hoffset:D
+ \__kernel_primitive:NN \voffset \tex_voffset:D
+ \__kernel_primitive:NN \insert \tex_insert:D
+ \__kernel_primitive:NN \holdinginserts \tex_holdinginserts:D
+ \__kernel_primitive:NN \floatingpenalty \tex_floatingpenalty:D
+ \__kernel_primitive:NN \insertpenalties \tex_insertpenalties:D
+ \__kernel_primitive:NN \lower \tex_lower:D
+ \__kernel_primitive:NN \moveleft \tex_moveleft:D
+ \__kernel_primitive:NN \moveright \tex_moveright:D
+ \__kernel_primitive:NN \raise \tex_raise:D
+ \__kernel_primitive:NN \copy \tex_copy:D
+ \__kernel_primitive:NN \lastbox \tex_lastbox:D
+ \__kernel_primitive:NN \vsplit \tex_vsplit:D
+ \__kernel_primitive:NN \unhbox \tex_unhbox:D
+ \__kernel_primitive:NN \unhcopy \tex_unhcopy:D
+ \__kernel_primitive:NN \unvbox \tex_unvbox:D
+ \__kernel_primitive:NN \unvcopy \tex_unvcopy:D
+ \__kernel_primitive:NN \setbox \tex_setbox:D
+ \__kernel_primitive:NN \hbox \tex_hbox:D
+ \__kernel_primitive:NN \vbox \tex_vbox:D
+ \__kernel_primitive:NN \vtop \tex_vtop:D
+ \__kernel_primitive:NN \prevdepth \tex_prevdepth:D
+ \__kernel_primitive:NN \badness \tex_badness:D
+ \__kernel_primitive:NN \hbadness \tex_hbadness:D
+ \__kernel_primitive:NN \vbadness \tex_vbadness:D
+ \__kernel_primitive:NN \hfuzz \tex_hfuzz:D
+ \__kernel_primitive:NN \vfuzz \tex_vfuzz:D
+ \__kernel_primitive:NN \overfullrule \tex_overfullrule:D
+ \__kernel_primitive:NN \boxmaxdepth \tex_boxmaxdepth:D
+ \__kernel_primitive:NN \splitmaxdepth \tex_splitmaxdepth:D
+ \__kernel_primitive:NN \splittopskip \tex_splittopskip:D
+ \__kernel_primitive:NN \everyhbox \tex_everyhbox:D
+ \__kernel_primitive:NN \everyvbox \tex_everyvbox:D
+ \__kernel_primitive:NN \nullfont \tex_nullfont:D
+ \__kernel_primitive:NN \textfont \tex_textfont:D
+ \__kernel_primitive:NN \scriptfont \tex_scriptfont:D
+ \__kernel_primitive:NN \scriptscriptfont \tex_scriptscriptfont:D
+ \__kernel_primitive:NN \fontdimen \tex_fontdimen:D
+ \__kernel_primitive:NN \hyphenchar \tex_hyphenchar:D
+ \__kernel_primitive:NN \skewchar \tex_skewchar:D
+ \__kernel_primitive:NN \defaulthyphenchar \tex_defaulthyphenchar:D
+ \__kernel_primitive:NN \defaultskewchar \tex_defaultskewchar:D
+ \__kernel_primitive:NN \number \tex_number:D
+ \__kernel_primitive:NN \romannumeral \tex_romannumeral:D
+ \__kernel_primitive:NN \string \tex_string:D
+ \__kernel_primitive:NN \lowercase \tex_lowercase:D
+ \__kernel_primitive:NN \uppercase \tex_uppercase:D
+ \__kernel_primitive:NN \meaning \tex_meaning:D
+ \__kernel_primitive:NN \penalty \tex_penalty:D
+ \__kernel_primitive:NN \unpenalty \tex_unpenalty:D
+ \__kernel_primitive:NN \lastpenalty \tex_lastpenalty:D
+ \__kernel_primitive:NN \special \tex_special:D
+ \__kernel_primitive:NN \dump \tex_dump:D
+ \__kernel_primitive:NN \patterns \tex_patterns:D
+ \__kernel_primitive:NN \hyphenation \tex_hyphenation:D
+ \__kernel_primitive:NN \time \tex_time:D
+ \__kernel_primitive:NN \day \tex_day:D
+ \__kernel_primitive:NN \month \tex_month:D
+ \__kernel_primitive:NN \year \tex_year:D
+ \__kernel_primitive:NN \jobname \tex_jobname:D
+ \__kernel_primitive:NN \everyjob \tex_everyjob:D
+ \__kernel_primitive:NN \count \tex_count:D
+ \__kernel_primitive:NN \dimen \tex_dimen:D
+ \__kernel_primitive:NN \skip \tex_skip:D
+ \__kernel_primitive:NN \toks \tex_toks:D
+ \__kernel_primitive:NN \muskip \tex_muskip:D
+ \__kernel_primitive:NN \box \tex_box:D
+ \__kernel_primitive:NN \wd \tex_wd:D
+ \__kernel_primitive:NN \ht \tex_ht:D
+ \__kernel_primitive:NN \dp \tex_dp:D
+ \__kernel_primitive:NN \catcode \tex_catcode:D
+ \__kernel_primitive:NN \delcode \tex_delcode:D
+ \__kernel_primitive:NN \sfcode \tex_sfcode:D
+ \__kernel_primitive:NN \lccode \tex_lccode:D
+ \__kernel_primitive:NN \uccode \tex_uccode:D
+ \__kernel_primitive:NN \mathcode \tex_mathcode:D
% \end{macrocode}
% Since \LaTeX3 requires at least the \eTeX{} extensions,
% we also rename the additional primitives. These are all
% given the prefix |\etex_|.
% \begin{macrocode}
- \__expl_primitive:NN \ifdefined \etex_ifdefined:D
- \__expl_primitive:NN \ifcsname \etex_ifcsname:D
- \__expl_primitive:NN \unless \etex_unless:D
- \__expl_primitive:NN \eTeXversion \etex_eTeXversion:D
- \__expl_primitive:NN \eTeXrevision \etex_eTeXrevision:D
- \__expl_primitive:NN \marks \etex_marks:D
- \__expl_primitive:NN \topmarks \etex_topmarks:D
- \__expl_primitive:NN \firstmarks \etex_firstmarks:D
- \__expl_primitive:NN \botmarks \etex_botmarks:D
- \__expl_primitive:NN \splitfirstmarks \etex_splitfirstmarks:D
- \__expl_primitive:NN \splitbotmarks \etex_splitbotmarks:D
- \__expl_primitive:NN \unexpanded \etex_unexpanded:D
- \__expl_primitive:NN \detokenize \etex_detokenize:D
- \__expl_primitive:NN \scantokens \etex_scantokens:D
- \__expl_primitive:NN \showtokens \etex_showtokens:D
- \__expl_primitive:NN \readline \etex_readline:D
- \__expl_primitive:NN \tracingassigns \etex_tracingassigns:D
- \__expl_primitive:NN \tracingscantokens \etex_tracingscantokens:D
- \__expl_primitive:NN \tracingnesting \etex_tracingnesting:D
- \__expl_primitive:NN \tracingifs \etex_tracingifs:D
- \__expl_primitive:NN \currentiflevel \etex_currentiflevel:D
- \__expl_primitive:NN \currentifbranch \etex_currentifbranch:D
- \__expl_primitive:NN \currentiftype \etex_currentiftype:D
- \__expl_primitive:NN \tracinggroups \etex_tracinggroups:D
- \__expl_primitive:NN \currentgrouplevel \etex_currentgrouplevel:D
- \__expl_primitive:NN \currentgrouptype \etex_currentgrouptype:D
- \__expl_primitive:NN \showgroups \etex_showgroups:D
- \__expl_primitive:NN \showifs \etex_showifs:D
- \__expl_primitive:NN \interactionmode \etex_interactionmode:D
- \__expl_primitive:NN \lastnodetype \etex_lastnodetype:D
- \__expl_primitive:NN \iffontchar \etex_iffontchar:D
- \__expl_primitive:NN \fontcharht \etex_fontcharht:D
- \__expl_primitive:NN \fontchardp \etex_fontchardp:D
- \__expl_primitive:NN \fontcharwd \etex_fontcharwd:D
- \__expl_primitive:NN \fontcharic \etex_fontcharic:D
- \__expl_primitive:NN \parshapeindent \etex_parshapeindent:D
- \__expl_primitive:NN \parshapelength \etex_parshapelength:D
- \__expl_primitive:NN \parshapedimen \etex_parshapedimen:D
- \__expl_primitive:NN \numexpr \etex_numexpr:D
- \__expl_primitive:NN \dimexpr \etex_dimexpr:D
- \__expl_primitive:NN \glueexpr \etex_glueexpr:D
- \__expl_primitive:NN \muexpr \etex_muexpr:D
- \__expl_primitive:NN \gluestretch \etex_gluestretch:D
- \__expl_primitive:NN \glueshrink \etex_glueshrink:D
- \__expl_primitive:NN \gluestretchorder \etex_gluestretchorder:D
- \__expl_primitive:NN \glueshrinkorder \etex_glueshrinkorder:D
- \__expl_primitive:NN \gluetomu \etex_gluetomu:D
- \__expl_primitive:NN \mutoglue \etex_mutoglue:D
- \__expl_primitive:NN \lastlinefit \etex_lastlinefit:D
- \__expl_primitive:NN \interlinepenalties \etex_interlinepenalties:D
- \__expl_primitive:NN \clubpenalties \etex_clubpenalties:D
- \__expl_primitive:NN \widowpenalties \etex_widowpenalties:D
- \__expl_primitive:NN \displaywidowpenalties \etex_displaywidowpenalties:D
- \__expl_primitive:NN \middle \etex_middle:D
- \__expl_primitive:NN \savinghyphcodes \etex_savinghyphcodes:D
- \__expl_primitive:NN \savingvdiscards \etex_savingvdiscards:D
- \__expl_primitive:NN \pagediscards \etex_pagediscards:D
- \__expl_primitive:NN \splitdiscards \etex_splitdiscards:D
- \__expl_primitive:NN \TeXXeTstate \etex_TeXXeTstate:D
- \__expl_primitive:NN \beginL \etex_beginL:D
- \__expl_primitive:NN \endL \etex_endL:D
- \__expl_primitive:NN \beginR \etex_beginR:D
- \__expl_primitive:NN \endR \etex_endR:D
- \__expl_primitive:NN \predisplaydirection \etex_predisplaydirection:D
- \__expl_primitive:NN \everyeof \etex_everyeof:D
- \__expl_primitive:NN \protected \etex_protected:D
+ \__kernel_primitive:NN \ifdefined \etex_ifdefined:D
+ \__kernel_primitive:NN \ifcsname \etex_ifcsname:D
+ \__kernel_primitive:NN \unless \etex_unless:D
+ \__kernel_primitive:NN \eTeXversion \etex_eTeXversion:D
+ \__kernel_primitive:NN \eTeXrevision \etex_eTeXrevision:D
+ \__kernel_primitive:NN \marks \etex_marks:D
+ \__kernel_primitive:NN \topmarks \etex_topmarks:D
+ \__kernel_primitive:NN \firstmarks \etex_firstmarks:D
+ \__kernel_primitive:NN \botmarks \etex_botmarks:D
+ \__kernel_primitive:NN \splitfirstmarks \etex_splitfirstmarks:D
+ \__kernel_primitive:NN \splitbotmarks \etex_splitbotmarks:D
+ \__kernel_primitive:NN \unexpanded \etex_unexpanded:D
+ \__kernel_primitive:NN \detokenize \etex_detokenize:D
+ \__kernel_primitive:NN \scantokens \etex_scantokens:D
+ \__kernel_primitive:NN \showtokens \etex_showtokens:D
+ \__kernel_primitive:NN \readline \etex_readline:D
+ \__kernel_primitive:NN \tracingassigns \etex_tracingassigns:D
+ \__kernel_primitive:NN \tracingscantokens \etex_tracingscantokens:D
+ \__kernel_primitive:NN \tracingnesting \etex_tracingnesting:D
+ \__kernel_primitive:NN \tracingifs \etex_tracingifs:D
+ \__kernel_primitive:NN \currentiflevel \etex_currentiflevel:D
+ \__kernel_primitive:NN \currentifbranch \etex_currentifbranch:D
+ \__kernel_primitive:NN \currentiftype \etex_currentiftype:D
+ \__kernel_primitive:NN \tracinggroups \etex_tracinggroups:D
+ \__kernel_primitive:NN \currentgrouplevel \etex_currentgrouplevel:D
+ \__kernel_primitive:NN \currentgrouptype \etex_currentgrouptype:D
+ \__kernel_primitive:NN \showgroups \etex_showgroups:D
+ \__kernel_primitive:NN \showifs \etex_showifs:D
+ \__kernel_primitive:NN \interactionmode \etex_interactionmode:D
+ \__kernel_primitive:NN \lastnodetype \etex_lastnodetype:D
+ \__kernel_primitive:NN \iffontchar \etex_iffontchar:D
+ \__kernel_primitive:NN \fontcharht \etex_fontcharht:D
+ \__kernel_primitive:NN \fontchardp \etex_fontchardp:D
+ \__kernel_primitive:NN \fontcharwd \etex_fontcharwd:D
+ \__kernel_primitive:NN \fontcharic \etex_fontcharic:D
+ \__kernel_primitive:NN \parshapeindent \etex_parshapeindent:D
+ \__kernel_primitive:NN \parshapelength \etex_parshapelength:D
+ \__kernel_primitive:NN \parshapedimen \etex_parshapedimen:D
+ \__kernel_primitive:NN \numexpr \etex_numexpr:D
+ \__kernel_primitive:NN \dimexpr \etex_dimexpr:D
+ \__kernel_primitive:NN \glueexpr \etex_glueexpr:D
+ \__kernel_primitive:NN \muexpr \etex_muexpr:D
+ \__kernel_primitive:NN \gluestretch \etex_gluestretch:D
+ \__kernel_primitive:NN \glueshrink \etex_glueshrink:D
+ \__kernel_primitive:NN \gluestretchorder \etex_gluestretchorder:D
+ \__kernel_primitive:NN \glueshrinkorder \etex_glueshrinkorder:D
+ \__kernel_primitive:NN \gluetomu \etex_gluetomu:D
+ \__kernel_primitive:NN \mutoglue \etex_mutoglue:D
+ \__kernel_primitive:NN \lastlinefit \etex_lastlinefit:D
+ \__kernel_primitive:NN \interlinepenalties \etex_interlinepenalties:D
+ \__kernel_primitive:NN \clubpenalties \etex_clubpenalties:D
+ \__kernel_primitive:NN \widowpenalties \etex_widowpenalties:D
+ \__kernel_primitive:NN \displaywidowpenalties \etex_displaywidowpenalties:D
+ \__kernel_primitive:NN \middle \etex_middle:D
+ \__kernel_primitive:NN \savinghyphcodes \etex_savinghyphcodes:D
+ \__kernel_primitive:NN \savingvdiscards \etex_savingvdiscards:D
+ \__kernel_primitive:NN \pagediscards \etex_pagediscards:D
+ \__kernel_primitive:NN \splitdiscards \etex_splitdiscards:D
+ \__kernel_primitive:NN \TeXXeTstate \etex_TeXXeTstate:D
+ \__kernel_primitive:NN \beginL \etex_beginL:D
+ \__kernel_primitive:NN \endL \etex_endL:D
+ \__kernel_primitive:NN \beginR \etex_beginR:D
+ \__kernel_primitive:NN \endR \etex_endR:D
+ \__kernel_primitive:NN \predisplaydirection \etex_predisplaydirection:D
+ \__kernel_primitive:NN \everyeof \etex_everyeof:D
+ \__kernel_primitive:NN \protected \etex_protected:D
% \end{macrocode}
% The newer primitives are more complex: there are an awful lot of them,
% and we don't use them all at the moment. So the following is selective.
@@ -561,54 +561,54 @@
% there are a lot of \pdfTeX{} primitives that start \cs{pdf\ldots} but
% are not related to PDF output. These ones related to PDF output.
% \begin{macrocode}
- \__expl_primitive:NN \pdfcreationdate \pdftex_pdfcreationdate:D
- \__expl_primitive:NN \pdfcolorstack \pdftex_pdfcolorstack:D
- \__expl_primitive:NN \pdfcompresslevel \pdftex_pdfcompresslevel:D
- \__expl_primitive:NN \pdfdecimaldigits \pdftex_pdfdecimaldigits:D
- \__expl_primitive:NN \pdfhorigin \pdftex_pdfhorigin:D
- \__expl_primitive:NN \pdfinfo \pdftex_pdfinfo:D
- \__expl_primitive:NN \pdflastxform \pdftex_pdflastxform:D
- \__expl_primitive:NN \pdfliteral \pdftex_pdfliteral:D
- \__expl_primitive:NN \pdfminorversion \pdftex_pdfminorversion:D
- \__expl_primitive:NN \pdfobjcompresslevel \pdftex_pdfobjcompresslevel:D
- \__expl_primitive:NN \pdfoutput \pdftex_pdfoutput:D
- \__expl_primitive:NN \pdfrefxform \pdftex_pdfrefxform:D
- \__expl_primitive:NN \pdfrestore \pdftex_pdfrestore:D
- \__expl_primitive:NN \pdfsave \pdftex_pdfsave:D
- \__expl_primitive:NN \pdfsetmatrix \pdftex_pdfsetmatrix:D
- \__expl_primitive:NN \pdfpkresolution \pdftex_pdfpkresolution:D
- \__expl_primitive:NN \pdftexrevision \pdftex_pdftextrevision:D
- \__expl_primitive:NN \pdfvorigin \pdftex_pdfvorigin:D
- \__expl_primitive:NN \pdfxform \pdftex_pdfxform:D
+ \__kernel_primitive:NN \pdfcreationdate \pdftex_pdfcreationdate:D
+ \__kernel_primitive:NN \pdfcolorstack \pdftex_pdfcolorstack:D
+ \__kernel_primitive:NN \pdfcompresslevel \pdftex_pdfcompresslevel:D
+ \__kernel_primitive:NN \pdfdecimaldigits \pdftex_pdfdecimaldigits:D
+ \__kernel_primitive:NN \pdfhorigin \pdftex_pdfhorigin:D
+ \__kernel_primitive:NN \pdfinfo \pdftex_pdfinfo:D
+ \__kernel_primitive:NN \pdflastxform \pdftex_pdflastxform:D
+ \__kernel_primitive:NN \pdfliteral \pdftex_pdfliteral:D
+ \__kernel_primitive:NN \pdfminorversion \pdftex_pdfminorversion:D
+ \__kernel_primitive:NN \pdfobjcompresslevel \pdftex_pdfobjcompresslevel:D
+ \__kernel_primitive:NN \pdfoutput \pdftex_pdfoutput:D
+ \__kernel_primitive:NN \pdfrefxform \pdftex_pdfrefxform:D
+ \__kernel_primitive:NN \pdfrestore \pdftex_pdfrestore:D
+ \__kernel_primitive:NN \pdfsave \pdftex_pdfsave:D
+ \__kernel_primitive:NN \pdfsetmatrix \pdftex_pdfsetmatrix:D
+ \__kernel_primitive:NN \pdfpkresolution \pdftex_pdfpkresolution:D
+ \__kernel_primitive:NN \pdftexrevision \pdftex_pdftextrevision:D
+ \__kernel_primitive:NN \pdfvorigin \pdftex_pdfvorigin:D
+ \__kernel_primitive:NN \pdfxform \pdftex_pdfxform:D
% \end{macrocode}
% While these are not.
% \begin{macrocode}
- \__expl_primitive:NN \pdfstrcmp \pdftex_strcmp:D
+ \__kernel_primitive:NN \pdfstrcmp \pdftex_strcmp:D
% \end{macrocode}
% \XeTeX{}-specific primitives. Note that \XeTeX{}'s \tn{strcmp} is
% handled earlier and is \enquote{rolled up} into \tn{pdfstrcmp}.
% \begin{macrocode}
- \__expl_primitive:NN \XeTeXversion \xetex_XeTeXversion:D
+ \__kernel_primitive:NN \XeTeXversion \xetex_XeTeXversion:D
% \end{macrocode}
% Primitives from \LuaTeX{}.
% \begin{macrocode}
- \__expl_primitive:NN \catcodetable \luatex_catcodetable:D
- \__expl_primitive:NN \directlua \luatex_directlua:D
- \__expl_primitive:NN \initcatcodetable \luatex_initcatcodetable:D
- \__expl_primitive:NN \latelua \luatex_latelua:D
- \__expl_primitive:NN \luatexversion \luatex_luatexversion:D
- \__expl_primitive:NN \savecatcodetable \luatex_savecatcodetable:D
+ \__kernel_primitive:NN \catcodetable \luatex_catcodetable:D
+ \__kernel_primitive:NN \directlua \luatex_directlua:D
+ \__kernel_primitive:NN \initcatcodetable \luatex_initcatcodetable:D
+ \__kernel_primitive:NN \latelua \luatex_latelua:D
+ \__kernel_primitive:NN \luatexversion \luatex_luatexversion:D
+ \__kernel_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
+ \__kernel_primitive:NN \bodydir \luatex_bodydir:D
+ \__kernel_primitive:NN \mathdir \luatex_mathdir:D
+ \__kernel_primitive:NN \pagedir \luatex_pagedir:D
+ \__kernel_primitive:NN \pardir \luatex_pardir:D
+ \__kernel_primitive:NN \textdir \luatex_textdir:D
% \end{macrocode}
% The job is done: close the group (using the primitive renamed!).
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
index 50472ab8754..bce67a2fb30 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3prop.dtx 4581 2013-07-28 08:38:50Z joseph $
+\GetIdInfo$Id: l3prop.dtx 4623 2013-12-14 13:53:40Z bruno $
{L3 Property lists}
%</driver|package>
%<*driver>
@@ -508,9 +508,8 @@
% \cs{@@_pair:wn} \meta{key_1} \cs{s_@@} \Arg{value_1} \\
% \ldots{} \\
% \cs{@@_pair:wn} \meta{key_n} \cs{s_@@} \Arg{value_n} \\
-% \cs{s_obj_end}
% \end{quote}
-% where the separators \cs{s_@@} and \cs{s_obj_end} are scan marks
+% where \cs{s_@@} is a scan mark
% (equal to \cs{scan_stop:}), and \cs{@@_pair:wn} can be used to map
% through the property list.
%
@@ -542,7 +541,7 @@
% \begin{variable}[tested = m3prop004]{\c_empty_prop}
% An empty prop.
% \begin{macrocode}
-\tl_const:Nn \c_empty_prop { \s_@@ \s_obj_end }
+\tl_const:Nn \c_empty_prop { \s_@@ }
% \end{macrocode}
% \end{variable}
%
@@ -620,14 +619,6 @@
%
% \subsection{Accessing data in property lists}
%
-% \begin{macro}[EXP]{\@@_strip_end:w}
-% Strip the \cs{s_obj_end} marker from an expanded property list
-% variable.
-% \begin{macrocode}
-\cs_new:Npn \@@_strip_end:w #1 \s_obj_end { \exp_not:n {#1} }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}[int]{\@@_split:NnTF}
% \begin{macro}[aux]{\@@_split_aux:NnTF}
% \begin{macro}[aux, EXP]{\@@_split_aux:w}
@@ -816,8 +807,8 @@
% storing in \cs{l_@@_internal_tl} tokens which (after
% \texttt{x}-expansion) encode the key--value pair. This variable can
% safely be used in \cs{@@_split:NnTF}. If the \meta{key} was absent,
-% append the new key--value to the list (\cs{@@_strip_end:w} moves the
-% \cs{s_obj_end} marker). Otherwise concatenate the extracts |##1|
+% append the new key--value to the list.
+% Otherwise concatenate the extracts |##1|
% and |##3| with the new key--value pair \cs{l_@@_internal_tl}. The
% updated entry is placed at the same spot as the original \meta{key}
% in the property list, preserving the order of entries.
@@ -833,13 +824,7 @@
}
\@@_split:NnTF #2 {#3}
{ #1 #2 { \exp_not:n {##1} \l_@@_internal_tl \exp_not:n {##3} } }
- {
- #1 #2
- {
- \exp_after:wN \@@_strip_end:w #2
- \l_@@_internal_tl \s_obj_end
- }
- }
+ { #1 #2 { \exp_not:o {#2} \l_@@_internal_tl } }
}
\cs_generate_variant:Nn \prop_put:Nnn
{ NnV , Nno , Nnx , NV , NVV , No , Noo }
@@ -877,13 +862,7 @@
}
\@@_split:NnTF #2 {#3}
{ }
- {
- #1 #2
- {
- \exp_after:wN \@@_strip_end:w #2
- \l_@@_internal_tl \s_obj_end
- }
- }
+ { #1 #2 { \exp_not:o {#2} \l_@@_internal_tl } }
}
\cs_generate_variant:Nn \prop_put_if_new:Nnn { c }
\cs_generate_variant:Nn \prop_gput_if_new:Nnn { c }
@@ -944,7 +923,7 @@
% mechanism choke, because the arbitrary token list material is
% enclosed in braces. The second argument of \cs{@@_if_in:nwwn} is
% most often empty. When the \meta{key} is found in the list,
-% \cs{@@_if_in:N} receives \cs{s_@@} or \cs{s_obj_end}, and if it is
+% \cs{@@_if_in:N} receives \cs{@@_pair:wn}, and if it is
% found as the extra item, the function receives
% \cs{q_recursion_tail}, easily recognizable.
%
@@ -1026,9 +1005,9 @@
% The fastest way to do a recursion here is to use an
% \cs{if_meaning:w} test: the keys are strings, and thus cannot match
% the marker \cs{q_recursion_tail}. A special case to note is when
-% the key |#3| is empty: then \cs{q_recursion_tail} is compared to
-% \cs{exp_after:wN}, also different. Note that |#2| can only consist
-% of \cs{s_@@} and/or \cs{s_obj_end}.
+% the key~|#3| is empty: then \cs{q_recursion_tail} is compared to
+% \cs{exp_after:wN}, also different. Note that |#2|~is empty, except
+% at the first iteration, where it is \cs{s_@@}.
% \begin{macrocode}
\cs_new:Npn \prop_map_function:NN #1#2
{
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
index 26d3c4d78f7..d38da212ecb 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3quark.dtx 4564 2013-07-21 02:12:33Z bruno $
+\GetIdInfo$Id: l3quark.dtx 4623 2013-12-14 13:53:40Z bruno $
{L3 Quarks}
%</driver|package>
%<*driver>
@@ -671,15 +671,6 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\s_obj_end}
-% This scan mark is used both in \pkg{l3seq} and \pkg{l3prop}. This
-% token ought to be defined in a \pkg{l3obj} module if we decide to go
-% in that direction. In the mean-time, we need it to be set.
-% \begin{macrocode}
-\__scan_new:N \s_obj_end
-% \end{macrocode}
-% \end{variable}
-%
% \subsection{Deprecated quark functions}
%
% \begin{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
index a697739d8da..ef713afaa31 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 4581 2013-07-28 08:38:50Z joseph $
+\GetIdInfo$Id: l3seq.dtx 4623 2013-12-14 13:53:40Z bruno $
{L3 Sequences and stacks}
%</driver|package>
%<*driver>
@@ -777,8 +777,8 @@
%
% A sequence is a control sequence whose top-level expansion is of the
% form \enquote{\cs{s_@@} \cs{@@_item:n} \marg{item_1} \ldots
-% \cs{@@_item:n} \marg{item_n} \cs{s_obj_end}}, with a leading scan
-% mark, $n$~items of the same form, and a trailing scan mark. An
+% \cs{@@_item:n} \marg{item_n}}, with a leading scan
+% mark followed by $n$~items of the same form. An
% earlier implementation used the structure \enquote{\cs{seq_elt:w}
% \meta{item_1} \cs{seq_elt_end:} \ldots \cs{seq_elt:w} \meta{item_n}
% \cs{seq_elt_end:}}. This allowed rapid searching using a delimited
@@ -810,10 +810,17 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{macro}[aux]{\@@_tmp:w}
+% Scratch function for internal use.
+% \begin{macrocode}
+\cs_new_eq:NN \@@_tmp:w ?
+% \end{macrocode}
+% \end{macro}
+%
% \begin{variable}{\c_empty_seq}
% A sequence with no item, following the structure mentioned above.
% \begin{macrocode}
-\tl_const:Nn \c_empty_seq { \s_@@ \s_obj_end }
+\tl_const:Nn \c_empty_seq { \s_@@ }
% \end{macrocode}
% \end{variable}
%
@@ -940,7 +947,7 @@
}
\tl_set:Nx \l_@@_internal_a_tl { \l_@@_internal_a_tl }
}
- #1 #2 { \s_@@ \l_@@_internal_a_tl \s_obj_end }
+ #1 #2 { \s_@@ \l_@@_internal_a_tl }
}
\cs_new:Npn \@@_set_split_auxi:w #1 \@@_set_split_end:
{
@@ -961,25 +968,19 @@
% \UnitTested
% \begin{macro}{\seq_gconcat:NNN, \seq_gconcat:ccc}
% \UnitTested
-% \begin{macro}[aux,EXP]{\@@_concat:NN, \@@_concat:w}
-% When concatenating sequences, one must take care of the trailing
-% \cs{s_obj_end} and leading \cs{s_@@}. The second argument of
-% \cs{@@_concat:NN} is \cs{s_@@}, and \cs{@@_concat:w} removes
-% \cs{s_obj_end} by a delimited approach. The result starts with
-% \cs{s_@@} (of the first sequence), which stops \texttt{f}-expansion.
+% When concatenating sequences, one must remove the leading \cs{s_@@}
+% of the second sequence. The result starts with \cs{s_@@} (of the
+% first sequence), which stops \texttt{f}-expansion.
% \begin{macrocode}
\cs_new_protected:Npn \seq_concat:NNN #1#2#3
- { \tl_set:Nf #1 { \exp_last_unbraced:NNo \@@_concat:NN #2 #3 } }
+ { \tl_set:Nf #1 { \exp_after:wN \use_i:nn \exp_after:wN #2 #3 } }
\cs_new_protected:Npn \seq_gconcat:NNN #1#2#3
- { \tl_gset:Nf #1 { \exp_last_unbraced:NNo \@@_concat:NN #2 #3 } }
-\cs_new:Npn \@@_concat:NN #1#2 { \exp_after:wN \@@_concat:w #1 }
-\cs_new:Npn \@@_concat:w #1 \s_obj_end {#1}
+ { \tl_gset:Nf #1 { \exp_after:wN \use_i:nn \exp_after:wN #2 #3 } }
\cs_generate_variant:Nn \seq_concat:NNN { ccc }
\cs_generate_variant:Nn \seq_gconcat:NNN { ccc }
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}[pTF]{\seq_if_exist:N, \seq_if_exist:c}
% Copies of the \texttt{cs} functions defined in \pkg{l3basics}.
@@ -1035,41 +1036,28 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{
-% \seq_put_right:Nn, \seq_put_right:NV, \seq_put_right:Nv,
-% \seq_put_right:No, \seq_put_right:Nx,
-% \seq_put_right:cn, \seq_put_right:cV, \seq_put_right:cv,
-% \seq_put_right:co, \seq_put_right:cx
-% }
+% \begin{macro}
+% {
+% \seq_put_right:Nn, \seq_put_right:NV, \seq_put_right:Nv,
+% \seq_put_right:No, \seq_put_right:Nx,
+% \seq_put_right:cn, \seq_put_right:cV, \seq_put_right:cv,
+% \seq_put_right:co, \seq_put_right:cx
+% }
% \UnitTested
-% \begin{macro}{
-% \seq_gput_right:Nn, \seq_gput_right:NV, \seq_gput_right:Nv,
-% \seq_gput_right:No, \seq_gput_right:Nx,
-% \seq_gput_right:cn, \seq_gput_right:cV,\seq_gput_right:cv,
-% \seq_gput_right:co, \seq_gput_right:cx
-% }
-% \begin{macro}[aux,EXP]{\@@_put_right_aux:w}
-% When adding to the right of a sequence, remove \cs{s_obj_end}. This
-% is done by \cs{@@_put_right_aux:w}, which takes its result through
-% \cs{exp_not:n}.
+% \begin{macro}
+% {
+% \seq_gput_right:Nn, \seq_gput_right:NV, \seq_gput_right:Nv,
+% \seq_gput_right:No, \seq_gput_right:Nx,
+% \seq_gput_right:cn, \seq_gput_right:cV, \seq_gput_right:cv,
+% \seq_gput_right:co, \seq_gput_right:cx
+% }
+% Since there is no trailing marker, adding an item to the right of a
+% sequence simply means wrapping it in \cs{@@_item:n}.
% \begin{macrocode}
\cs_new_protected:Npn \seq_put_right:Nn #1#2
- {
- \tl_set:Nx #1
- {
- \exp_after:wN \@@_put_right_aux:w #1
- \exp_not:n { \@@_item:n {#2} \s_obj_end }
- }
- }
+ { \tl_put_right:Nn #1 { \@@_item:n {#2} } }
\cs_new_protected:Npn \seq_gput_right:Nn #1#2
- {
- \tl_gset:Nx #1
- {
- \exp_after:wN \@@_put_right_aux:w #1
- \exp_not:n { \@@_item:n {#2} \s_obj_end }
- }
- }
-\cs_new:Npn \@@_put_right_aux:w #1 \s_obj_end { \exp_not:n {#1} }
+ { \tl_gput_right:Nn #1 { \@@_item:n {#2} } }
\cs_generate_variant:Nn \seq_gput_right:Nn { NV , Nv , No , Nx }
\cs_generate_variant:Nn \seq_gput_right:Nn { c , cV , cv , co , cx }
\cs_generate_variant:Nn \seq_put_right:Nn { NV , Nv , No , Nx }
@@ -1077,7 +1065,6 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \subsection{Modifying sequences}
%
@@ -1132,7 +1119,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:NNN}, using a \enquote{flexible}
+% that in \cs{@@_pop_right: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
@@ -1322,27 +1309,24 @@
%
% \begin{macro}{\seq_get_right:NN, \seq_get_right:cN}
% \UnitTested
-% \begin{macro}[aux]{\@@_get_right_setup:wN, \@@_get_right_loop:nn}
-% First prepend \cs{q_no_value}, then take two arguments at a time.
-% Apart from the right-hand end of the sequence, this be a brace group
-% followed by \cs{@@_item:n}. The \cs{use_none:nn} removes both of
-% those. At the end of the sequence, the two question marks are taken
-% by \cs{use_none:nn}, and the assignment is placed before the
-% right-most item. The \tn{afterassignment} primitive places
-% \cs{use_none:n} to get rid of a trailing \cs{@@_get_right_loop:nn}.
+% \begin{macro}[aux]{\@@_get_right_loop:nn}
+% First remove \cs{s_@@} and prepend \cs{q_no_value}, then take two
+% arguments at a time. Before the right-hand end of the sequence,
+% this is a brace group followed by \cs{@@_item:n}, both removed by
+% \cs{use_none:nn}. At the end of the sequence, the two question
+% marks are taken by \cs{use_none:nn}, and the assignment is placed
+% before the right-most item. In the next iteration,
+% \cs{@@_get_right_loop:nn} receives two empty arguments, and
+% \cs{use_none:nn} stops the loop.
% \begin{macrocode}
\cs_new_protected:Npn \seq_get_right:NN #1#2
- { \exp_after:wN \@@_get_right_setup:wN #1 #2 }
-\cs_new_protected:Npn \@@_get_right_setup:wN \s_@@ #1 \s_obj_end #2
{
- \@@_get_right_loop:nn
- \q_no_value
+ \exp_after:wN \use_i_ii:nnn
+ \exp_after:wN \@@_get_right_loop:nn
+ \exp_after:wN \q_no_value
#1
- {
- ??
- \tex_afterassignment:D \use_none:n
- \tl_set:Nn #2
- }
+ { ?? \tl_set:Nn #2 }
+ { } { }
}
\cs_new_protected:Npn \@@_get_right_loop:nn #1#2
{
@@ -1358,8 +1342,7 @@
% \UnitTested
% \begin{macro}{\seq_gpop_right:NN, \seq_gpop_right:cN}
% \UnitTested
-% \begin{macro}[aux]{\@@_pop_right_aux:NNN, \@@_pop_right_loop:nn}
-% \begin{macro}[aux, EXP]{\@@_pop_right_setup:w}
+% \begin{macro}[aux]{\@@_pop_right:NNN, \@@_pop_right_loop:nn}
% The approach to popping from the right is a bit more involved, but does
% use some of the same ideas as getting from the right. What is needed is a
% \enquote{flexible length} way to set a token list variable. This is
@@ -1368,34 +1351,33 @@
% expansion and a \enquote{non-expanding} definition for \cs{@@_item:n},
% the left-most $n - 1$ entries in a sequence of $n$ items will be stored
% back in the sequence. That needs a loop of unknown length, hence using the
-% strange \cs{if_false:} way of including brackets. When the last item
-% of the sequence is reached, the closing bracket for the assignment is
+% strange \cs{if_false:} way of including braces. When the last item
+% of the sequence is reached, the closing brace for the assignment is
% inserted, and |\tl_set:Nn #3| is inserted in front of the final
-% entry. This therefore does the pop assignment. The trailing
-% looping macro is removed by placing a \cs{use_none:n} using the
-% \tn{afterassignment} primitive.
+% entry. This therefore does the pop assignment. One more iteration
+% is performed, with an empty argument and \cs{use_none:nn}, which
+% finally stops the loop.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \seq_pop_right:NN
- { \@@_pop:NNNN \@@_pop_right_aux:NNN \tl_set:Nx }
+ { \@@_pop:NNNN \@@_pop_right:NNN \tl_set:Nx }
\cs_new_protected_nopar:Npn \seq_gpop_right:NN
- { \@@_pop:NNNN \@@_pop_right_aux:NNN \tl_gset:Nx }
-\cs_new_protected:Npn \@@_pop_right_aux:NNN #1#2#3
+ { \@@_pop:NNNN \@@_pop_right:NNN \tl_gset:Nx }
+\cs_new_protected:Npn \@@_pop_right:NNN #1#2#3
{
- \cs_set_eq:NN \seq_tmp:w \@@_item:n
+ \cs_set_eq:NN \@@_tmp:w \@@_item:n
\cs_set_eq:NN \@@_item:n \scan_stop:
#1 #2
{ \if_false: } \fi: \s_@@
- \exp_after:wN \@@_pop_right_setup:w
+ \exp_after:wN \use_i:nnn
+ \exp_after:wN \@@_pop_right_loop:nn
#2
{
- \s_obj_end \if_false: { \fi: }
- \tex_afterassignment:D \use_none:n
+ \if_false: { \fi: }
\tl_set:Nx #3
}
- \cs_set_eq:NN \@@_item:n \seq_tmp:w
+ { } \use_none:nn
+ \cs_set_eq:NN \@@_item:n \@@_tmp:w
}
-\cs_new:Npn \@@_pop_right_setup:w \s_@@ #1 \s_obj_end
- { \exp_after:wN \@@_pop_right_loop:nn \use_none:n #1 }
\cs_new:Npn \@@_pop_right_loop:nn #1#2
{
#2 { \exp_not:n {#1} }
@@ -1407,7 +1389,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}[TF]{\seq_get_left:NN, \seq_get_left:cN}
% \begin{macro}[TF]{\seq_get_right:NN, \seq_get_right:cN}
@@ -1439,9 +1420,9 @@
\prg_new_protected_conditional:Npnn \seq_gpop_left:NN #1#2 { T , F , TF }
{ \@@_pop_TF:NNNN \@@_pop_left:NNN \tl_gset:Nn #1 #2 }
\prg_new_protected_conditional:Npnn \seq_pop_right:NN #1#2 { T , F , TF }
- { \@@_pop_TF:NNNN \@@_pop_right_aux:NNN \tl_set:Nx #1 #2 }
+ { \@@_pop_TF:NNNN \@@_pop_right:NNN \tl_set:Nx #1 #2 }
\prg_new_protected_conditional:Npnn \seq_gpop_right:NN #1#2 { T , F , TF }
- { \@@_pop_TF:NNNN \@@_pop_right_aux:NNN \tl_gset:Nx #1 #2 }
+ { \@@_pop_TF:NNNN \@@_pop_right:NNN \tl_gset:Nx #1 #2 }
\cs_generate_variant:Nn \seq_pop_left:NNT { c }
\cs_generate_variant:Nn \seq_pop_left:NNF { c }
\cs_generate_variant:Nn \seq_pop_left:NNTF { c }
@@ -1480,7 +1461,7 @@
%
% \begin{macro}{\seq_map_function:NN, \seq_map_function:cN}
% \UnitTested
-% \begin{macro}[aux,rEXP]{\@@_map_function:wN,\@@_map_function:NNn}
+% \begin{macro}[aux,rEXP]{\@@_map_function:NNn}
% The idea here is to apply the code of |#2| to each item in the
% sequence without altering the definition of \cs{@@_item:n}. This
% is done as by noting that every odd token in the sequence must be
@@ -1489,10 +1470,12 @@
% loop without needing to do a (relatively-expensive) quark test.
% \begin{macrocode}
\cs_new:Npn \seq_map_function:NN #1#2
- { \exp_after:wN \@@_map_function:wN #1 #2 }
-\cs_new:Npn \@@_map_function:wN \s_@@ #1 \s_obj_end #2
{
- \@@_map_function:NNn #2 #1 { ? \seq_map_break: } { }
+ \exp_after:wN \use_i_ii:nnn
+ \exp_after:wN \@@_map_function:NNn
+ \exp_after:wN #2
+ #1
+ { ? \seq_map_break: } { }
\__prg_break_point:Nn \seq_map_break: { }
}
\cs_new:Npn \@@_map_function:NNn #1#2#3
@@ -1605,12 +1588,12 @@
%
% \begin{macro}[EXP]{\seq_use:Nnnn, \seq_use:cnnn}
% \begin{macro}[EXP, aux]
-% {\@@_use:wnwnn, \@@_use_setup:w, \@@_use:nwwwwnwn, \@@_use:nwwn}
+% {\@@_use:NNnNnn, \@@_use_setup:w, \@@_use:nwwwwnwn, \@@_use:nwwn}
% \begin{macro}[EXP]{\seq_use:Nn, \seq_use:cn}
% 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, and
-% \cs{s_@@} and \cs{s_obj_end}.
+% \cs{s_@@}.
% \begin{macrocode}
\cs_new:Npn \seq_use:Nnnn #1#2#3#4
{
@@ -1619,12 +1602,8 @@
\int_case:nnF { \seq_count:N #1 }
{
{ 0 } { }
- { 1 }
- {
- \exp_after:wN \@@_use:wnwnn #1
- \@@_item:n { } \s_obj_end { }
- }
- { 2 } { \exp_after:wN \@@_use:wnwnn #1 {#2} }
+ { 1 } { \exp_after:wN \@@_use:NNnNnn #1 ? { } { } }
+ { 2 } { \exp_after:wN \@@_use:NNnNnn #1 {#2} }
}
{
\exp_after:wN \@@_use_setup:w #1 \@@_item:n
@@ -1636,11 +1615,8 @@
{ \__msg_kernel_expandable_error:nnn { kernel } { bad-variable } {#1} }
}
\cs_generate_variant:Nn \seq_use:Nnnn { c }
-\cs_new:Npn \@@_use:wnwnn
- #1 \@@_item:n #2#3 \@@_item:n #4#5 \s_obj_end #6
- { \exp_not:n { #2 #6 #4 } }
-\cs_new:Npn \@@_use_setup:w \s_@@ #1 \s_obj_end
- { \@@_use:nwwwwnwn { } #1 }
+\cs_new:Npn \@@_use:NNnNnn #1#2#3#4#5#6 { \exp_not:n { #3 #6 #5 } }
+\cs_new:Npn \@@_use_setup:w \s_@@ { \@@_use:nwwwwnwn { } }
\cs_new:Npn \@@_use:nwwwwnwn
#1 \@@_item:n #2 \@@_item:n #3 \@@_item:n #4#5
\q_mark #6#7 \q_stop #8
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index d7bfa2428e7..f5164b6f093 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 4592 2013-09-16 21:11:41Z joseph $
+\GetIdInfo$Id: l3tl.dtx 4625 2013-12-27 15:55:36Z joseph $
{L3 Token lists}
%</driver|package>
%<*driver>
@@ -776,7 +776,8 @@
% \end{syntax}
% Removes any leading and trailing explicit space characters
% (explicit tokens with character code~$32$ and category code~$10$)
-% from the content of the \meta{tl~var}.
+% from the content of the \meta{tl~var}. Note that this therefore
+% \emph{resets} the content of the variable.
% \end{function}
%
% \section{The first token from a token list}