summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/expl3.dtx53
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3.ins26
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx69
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx86
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx51
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3box.dtx53
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx341
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3clist.dtx76
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx52
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3color.dtx52
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3doc.dtx93
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx52
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx54
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3expan.dtx53
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx89
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3final.dtx51
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3format.ins26
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx54
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx52
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx54
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx52
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx60
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx54
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx143
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx230
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx331
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx52
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx54
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx54
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp.dtx104
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3int.dtx75
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3keys.dtx287
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx51
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3msg.dtx57
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx64
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx51
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx62
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prop.dtx51
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3quark.dtx53
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3seq.dtx68
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3skip.dtx71
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3str.dtx65
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3sys.dtx86
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx72
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx73
45 files changed, 1836 insertions, 1921 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
index 0c1b6727074..5a2661885c0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: expl3.dtx Copyright (C) 1990-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver|generic|package>
\def\ExplFileName{expl3}%
\def\ExplFileDescription{L3 programming layer}%
-\def\ExplFileDate{2016/11/21}%
-\def\ExplFileVersion{6760}%
+\def\ExplFileDate{2017/01/28}%
+\def\ExplFileVersion{6834}%
%</driver|generic|package>
%<*driver>
\documentclass[full]{l3doc}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3.ins b/Master/texmf-dist/source/latex/l3kernel/l3.ins
index a60eb19398c..c86f611940c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3.ins
+++ b/Master/texmf-dist/source/latex/l3kernel/l3.ins
@@ -12,7 +12,18 @@ of this license is in the file
This file is part of the "l3kernel bundle" (The Work in LPPL)
and all files in that bundle must be distributed together.
-The released version of this bundle is available from CTAN.
+-----------------------------------------------------------------------
+
+The development version of the bundle can be found at
+
+ https://github.com/latex3/latex3
+
+for those people who are interested.
+
+-----------------------------------------------------------------------
+
+Any modification of this file should ensure that the copyright and
+license information is placed in the derived files.
\fi
@@ -22,12 +33,17 @@ The released version of this bundle is available from CTAN.
\preamble
-EXPERIMENTAL CODE
+Copyright (C) 1990-2016 The LaTeX3 Project
-Do not distribute this file without also distributing the
-source files specified above.
+It may be distributed and/or modified under the conditions of
+the LaTeX Project Public License (LPPL), either version 1.3c of
+this license or (at your option) any later version. The latest
+version of this license is in the file:
-Do not distribute a modified version of this file.
+ http://www.latex-project.org/lppl.txt
+
+This file is part of the "l3kernel bundle" (The Work in LPPL)
+and all files in that bundle must be distributed together.
\endpreamble
% stop docstrip adding \endinput
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
index 16009950b33..8d783bd018f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
@@ -1,41 +1,28 @@
% \iffalse meta-comment
%
-%% File: l3alloc.dtx Copyright (C) 1990-2012,2014,2015 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%% File: l3alloc.dtx Copyright (C) 1990-2012,2014-2016 The LaTeX3 Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3alloc.dtx 5952 2015-09-08 16:10:05Z joseph $
+\GetIdInfo$Id: l3alloc.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Register allocation}
\begin{document}
\DocInput{\jobname.dtx}
@@ -185,12 +172,12 @@
% makes sense to collect most of them together here.
% \begin{macrocode}
\cs_if_exist:NTF \luatex_luatexversion:D
- { \@@_new:nnnN { box } \c_zero \c_max_register_int \tex_chardef:D }
- { \@@_new:nnnN { box } \c_zero \c_max_register_int \tex_mathchardef:D }
-\@@_new:nnnN { dim } \c_zero \c_max_register_int \tex_dimendef:D
-\@@_new:nnnN { int } { 11 } \c_max_register_int \tex_countdef:D
-\@@_new:nnnN { muskip } \c_zero \c_max_register_int \tex_muskipdef:D
-\@@_new:nnnN { skip } \c_zero \c_max_register_int \tex_skipdef:D
+ { \@@_new:nnnN { box } { 0 } \c_max_register_int \tex_chardef:D }
+ { \@@_new:nnnN { box } { 0 } \c_max_register_int \tex_mathchardef:D }
+\@@_new:nnnN { dim } { 0 } \c_max_register_int \tex_dimendef:D
+\@@_new:nnnN { int } { 10 } \c_max_register_int \tex_countdef:D
+\@@_new:nnnN { muskip } { 0 } \c_max_register_int \tex_muskipdef:D
+\@@_new:nnnN { skip } { 0 } \c_max_register_int \tex_skipdef:D
% \end{macrocode}
% \end{macro}
%
@@ -254,14 +241,14 @@
\tl_if_exist:cTF { c__ #1 _allocation_reserve_begin_tl }
{
\int_compare:nNnTF
- { \tl_use:c { g__ #1 _allocation_tl } + \c_one }
+ { \tl_use:c { g__ #1 _allocation_tl } + 1 }
=
{ \tl_use:c { c__ #1 _allocation_reserve_begin_tl } }
{ \tl_use:c { c__ #1 _allocation_reserve_end_tl } }
{ \tl_use:c { g__ #1 _allocation_tl } }
}
{ \tl_use:c { g__ #1 _allocation_tl } }
- + \c_one
+ + 1
}
}
}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index 84e6a2c9086..6337bf9c86f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: l3basics.dtx Copyright (C) 1990-2016 The LaTeX3 project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3basics.dtx 6696 2016-09-01 16:09:52Z bruno $
+\GetIdInfo$Id: l3basics.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Basic definitions}
%</driver|package>
%<*driver>
@@ -558,7 +545,7 @@
% \cs_gset_nopar:Nx, \cs_gset_nopar:cx
% }
% \begin{syntax}
-% \cs{cs_git cogset_nopar:Nn} \meta{function} \Arg{code}
+% \cs{cs_gset_nopar:Nn} \meta{function} \Arg{code}
% \end{syntax}
% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the number of \meta{parameters} is detected
@@ -1435,26 +1422,15 @@
%
% \subsection{Defining some constants}
%
-% \begin{variable}{\c_minus_one, \c_zero, \c_sixteen}
-% We need the constants \cs{c_minus_one} and \cs{c_sixteen} now for
-% writing information to the log and the terminal and \cs{c_zero}
-% which is used by some functions in the \textsf{l3alloc} module. The
-% rest are defined in the \textsf{l3int} module -- at least for the
-% ones that can be defined with \cs{tex_chardef:D} or
-% \cs{tex_mathchardef:D}. For other constants the \textsf{l3int} module is
-% required but it can't be used until the allocation has been set
-% up properly! The actual allocation mechanism is in
-% \pkg{l3alloc}, and works such that the first available count register
-% is $10$.
+% \begin{variable}{\c_zero}
+% We need the constant \cs{c_zero}
+% which is used by some functions in the \textsf{l3alloc} module. The
+% rest are defined in the \textsf{l3int} module -- at least for the
+% ones that can be defined with \cs{tex_chardef:D} or
+% \cs{tex_mathchardef:D}. For other constants the \textsf{l3int} module is
+% required but it can't be used until the allocation has been set
+% up properly!
% \begin{macrocode}
-%<*package>
-\tex_let:D \c_minus_one \m@ne
-%</package>
-%<*initex>
-\tex_countdef:D \c_minus_one = 10 ~
-\c_minus_one = -1 ~
-%</initex>
-\tex_chardef:D \c_sixteen = 16 ~
\tex_chardef:D \c_zero = 0 ~
% \end{macrocode}
% \end{variable}
@@ -2293,9 +2269,9 @@
% These will be redefined later by \pkg{l3io}.
% \begin{macrocode}
\cs_set_protected:Npn \iow_log:x
- { \tex_immediate:D \tex_write:D \c_minus_one }
+ { \tex_immediate:D \tex_write:D -1 }
\cs_set_protected:Npn \iow_term:x
- { \tex_immediate:D \tex_write:D \c_sixteen }
+ { \tex_immediate:D \tex_write:D 16 }
% \end{macrocode}
% \end{macro}
%
@@ -2692,7 +2668,7 @@
\if_meaning:w \c_true_bool #3
\tl_count:n {#2}
\else:
- \c_minus_one
+ -1
\fi:
}
\cs_new:Npn \__cs_count_signature:c
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
index 903202b7da2..0d9512296ff 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
@@ -1,37 +1,24 @@
% \iffalse meta-comment
%
%% File: l3bootstrap.dtx Copyright (C) 2011-2016 The LaTeX3 project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver|package>
% \begin{macro}{\GetIdInfo}
@@ -145,7 +132,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
-\GetIdInfo$Id: l3bootstrap.dtx 6596 2016-06-13 21:29:58Z joseph $
+\GetIdInfo$Id: l3bootstrap.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Bootstrap code}%
%</driver|package>
%<*driver>
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
index 8bca5327b64..239228d0917 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: l3box.dtx Copyright (C) 2005-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3box.dtx 6685 2016-08-19 16:26:52Z bruno $
+\GetIdInfo$Id: l3box.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Experimental boxes}
%</driver|package>
%<*driver>
@@ -976,7 +963,7 @@
\int_set:Nn \tex_showboxbreadth:D {#3}
\int_set:Nn \tex_showboxdepth:D {#4}
\int_set_eq:NN \tex_tracingonline:D #1
- \int_set_eq:NN \tex_errorcontextlines:D \c_minus_one
+ \int_set:Nn \tex_errorcontextlines:D { - \c_one }
\box_if_exist:NTF #2
{ \tex_showbox:D \use:n {#2} }
{
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
index d3ef2708afc..62a21ee09ea 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
@@ -1,44 +1,30 @@
% \iffalse meta-comment
%
%% File: l3candidates.dtx Copyright (C) 2012-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3candidates.dtx 6688 2016-08-19 19:21:48Z bruno $
+\GetIdInfo$Id: l3candidates.dtx 6809 2017-01-01 06:33:13Z bruno $
{L3 Experimental additions to l3kernel}
%</driver|package>
%<*driver>
@@ -317,6 +303,23 @@
% \cs{clist_show:n} which displays the result in the terminal.
% \end{function}
%
+% \begin{function}[EXP, added = 2016-12-06]
+% {\clist_rand_item:N, \clist_rand_item:n, \clist_rand_item:c}
+% \begin{syntax}
+% \cs{clist_rand_item:N} \meta{clist~var}
+% \cs{clist_rand_item:n} \Arg{comma list}
+% \end{syntax}
+% Selects a pseudo-random item of the \meta{comma list}. If the
+% \meta{comma list} has no item, the result is empty. This is only
+% available in \pdfTeX{} and \LuaTeX{}.
+% \begin{texnote}
+% The result is returned within the \tn{unexpanded}
+% primitive (\cs{exp_not:n}), which means that the \meta{item}
+% will not expand further when appearing in an \texttt{x}-type
+% argument expansion.
+% \end{texnote}
+% \end{function}
+%
% \section{Additions to \pkg{l3coffins}}
%
% \begin{function}{\coffin_resize:Nnn, \coffin_resize:cnn}
@@ -495,6 +498,15 @@
% in the log file.
% \end{function}
%
+% \begin{function}[EXP, added = 2016-12-06]{\int_rand:nn}
+% \begin{syntax}
+% \cs{int_rand:nn} \Arg{intexpr_1} \Arg{intexpr_2}
+% \end{syntax}
+% Evaluates the two \meta{integer expressions} and produces a
+% pseudo-random number between the two (with bounds included). This
+% is only available in \pdfTeX{} and \LuaTeX{}.
+% \end{function}
+%
% \section{Additions to \pkg{l3keys}}
%
% \begin{function}[added = 2014-08-22]{\keys_log:nn}
@@ -673,6 +685,51 @@
% Writes the entries in the \meta{property list} in the log file.
% \end{function}
%
+% \begin{function}[EXP, added = 2016-12-06]
+% {\prop_rand_key:N, \prop_rand_key:c}
+% \begin{syntax}
+% \cs{prop_rand_key:N} \meta{prop~var}
+% \end{syntax}
+% Selects a pseudo-random key--value pair in the \meta{property list}
+% and returns the \meta{key}. If the \meta{property list} is empty
+% the result is empty. This is only available in \pdfTeX{} and
+% \LuaTeX{}.
+% \end{function}
+%
+% \begin{function}[EXP, added = 2016-12-06]
+% {\prop_rand_value:N, \prop_rand_value:c}
+% \begin{syntax}
+% \cs{prop_rand_value:N} \meta{prop~var}
+% \end{syntax}
+% Selects a pseudo-random key--value pair in the \meta{property list}
+% and returns the \meta{value}. If the \meta{property list} is empty
+% the result is empty. This is only available in \pdfTeX{} and
+% \LuaTeX{}.
+% \begin{texnote}
+% The result is returned within the \tn{unexpanded}
+% primitive (\cs{exp_not:n}), which means that the \meta{value}
+% will not expand further when appearing in an \texttt{x}-type
+% argument expansion.
+% \end{texnote}
+% \end{function}
+%
+% \begin{function}[EXP, added = 2016-12-06]
+% {\prop_rand_key_value:N, \prop_rand_key_value:c}
+% \begin{syntax}
+% \cs{prop_rand_key_value:N} \meta{prop~var}
+% \end{syntax}
+% Selects a pseudo-random key--value pair in the \meta{property list}
+% and returns \Arg{key}\Arg{value}. If the \meta{property list} is
+% empty the result is empty. This is only available in \pdfTeX{} and
+% \LuaTeX{}.
+% \begin{texnote}
+% The result is returned within the \tn{unexpanded}
+% primitive (\cs{exp_not:n}), which means that the \meta{value}
+% will not expand further when appearing in an \texttt{x}-type
+% argument expansion.
+% \end{texnote}
+% \end{function}
+%
% \section{Additions to \pkg{l3seq}}
%
% \begin{function}[rEXP]
@@ -733,6 +790,21 @@
% Writes the entries in the \meta{sequence} in the log file.
% \end{function}
%
+% \begin{function}[EXP, added = 2016-12-06]{\seq_rand_item:N, \seq_rand_item:c}
+% \begin{syntax}
+% \cs{seq_rand_item:N} \meta{seq~var}
+% \end{syntax}
+% Selects a pseudo-random item of the \meta{sequence}. If the
+% \meta{sequence} is empty the result is empty. This is only
+% available in \pdfTeX{} and \LuaTeX{}.
+% \begin{texnote}
+% The result is returned within the \tn{unexpanded}
+% primitive (\cs{exp_not:n}), which means that the \meta{item}
+% will not expand further when appearing in an \texttt{x}-type
+% argument expansion.
+% \end{texnote}
+% \end{function}
+%
% \section{Additions to \pkg{l3skip}}
%
% \begin{function}{\skip_split_finite_else_action:nnNN}
@@ -1069,12 +1141,29 @@
%
% \begin{function}[added = 2014-08-22]{\tl_log:n}
% \begin{syntax}
-% \cs{tl_log:n} \meta{token list}
+% \cs{tl_log:n} \Arg{token list}
% \end{syntax}
% Writes the \meta{token list} in the log file. See also
% \cs{tl_show:n} which displays the result in the terminal.
% \end{function}
%
+% \begin{function}[EXP, added = 2016-12-06]
+% {\tl_rand_item:N, \tl_rand_item:c, \tl_rand_item:n}
+% \begin{syntax}
+% \cs{tl_rand_item:N} \meta{tl~var}
+% \cs{tl_rand_item:n} \Arg{token list}
+% \end{syntax}
+% Selects a pseudo-random item of the \meta{token list}. If the
+% \meta{token list} is blank, the result is empty. This is only
+% available in \pdfTeX{} and \LuaTeX{}.
+% \begin{texnote}
+% The result is returned within the \tn{unexpanded}
+% primitive (\cs{exp_not:n}), which means that the \meta{item}
+% will not expand further when appearing in an \texttt{x}-type
+% argument expansion.
+% \end{texnote}
+% \end{function}
+%
% \section{Additions to \pkg{l3tokens}}
%
% \begin{function}[TF, updated = 2012-12-20]{\peek_N_type:}
@@ -1799,6 +1888,33 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\clist_rand_item:n, \clist_rand_item:N, \clist_rand_item:c}
+% \begin{macro}[aux]{\@@_rand_item:nn}
+% The |N|-type function is not implemented through the |n|-type
+% function for efficiency: for instance comma-list variables do not
+% require space-trimming of their items. Even testing for emptyness
+% of an |n|-type comma-list is slow, so we count items first and use
+% that both for the emptyness test and the pseudo-random integer.
+% Importantly, \cs{clist_item:Nn} and \cs{clist_item:nn} only evaluate
+% their argument once.
+% \begin{macrocode}
+\cs_new:Npn \clist_rand_item:n #1
+ { \exp_args:Nf \@@_rand_item:nn { \clist_count:n {#1} } {#1} }
+\cs_new:Npn \@@_rand_item:nn #1#2
+ {
+ \int_compare:nNnF {#1} = \c_zero
+ { \clist_item:nn {#2} { \int_rand:nn { 1 } {#1} } }
+ }
+\cs_new:Npn \clist_rand_item:N #1
+ {
+ \clist_if_empty:NF #1
+ { \clist_item:Nn #1 { \int_rand:nn { 1 } { \clist_count:N #1 } } }
+ }
+\cs_generate_variant:Nn \clist_rand_item:N { c }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Additions to \pkg{l3coffins}}
%
% \begin{macrocode}
@@ -2338,7 +2454,7 @@
\cs_new_protected:Npn \ior_map_inline:Nn
{ \@@_map_inline:NNn \ior_get:NN }
\cs_new_protected:Npn \ior_str_map_inline:Nn
- { \@@_map_inline:NNn \ior_get_str:NN }
+ { \@@_map_inline:NNn \ior_str_get:NN }
\cs_new_protected:Npn \@@_map_inline:NNn
{
\int_gincr:N \g__prg_map_int
@@ -2408,6 +2524,10 @@
%
% \subsection{Additions to \pkg{l3int}}
%
+% \begin{macrocode}
+%<@@=int>
+% \end{macrocode}
+%
% \begin{macro}{\int_log:N, \int_log:c}
% Redirect output of \cs{int_show:N} to the log. This is not just a
% copy of \cs{__kernel_register_log:N} because of subtleties
@@ -2428,6 +2548,89 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}[EXP]{\int_rand:nn}
+% \begin{macro}[aux, EXP]
+% {
+% \@@_rand:ww, \@@_rand_narrow:n,
+% \@@_rand_narrow:nnn, \@@_rand_narrow:nnnn
+% }
+% Evaluate the argument and filter out the case where the lower
+% bound~|#1| is more than the upper bound~|#2|. Then determine
+% whether the range is narrower than \cs{c__fp_rand_size_int}; |#2-#1|
+% may overflow for very large positive~|#2| and negative~|#1|. If the
+% range is wide, use slower code from \pkg{l3fp}. If the range is
+% narrow, call \cs{@@_rand_narrow:nn} \Arg{choices} |{#1}| where
+% \meta{choices} is the number of possible outcomes. Then
+% \cs{@@_rand_narrow:nnnn} receives a random number reduced modulo
+% \meta{choices}, the random number itself, \meta{choices} and |#1|.
+% To avoid bias, throw away the random number if it lies in the last,
+% incomplete, interval of size \meta{choices} in
+% $[0,\cs{c__fp_rand_size_int}-1]$, and try again.
+% \begin{macrocode}
+\cs_if_exist:NTF \pdftex_uniformdeviate:D
+ {
+ \cs_new:Npn \int_rand:nn #1#2
+ {
+ \exp_after:wN \@@_rand:ww
+ \__int_value:w \__int_eval:w #1 \exp_after:wN ;
+ \__int_value:w \__int_eval:w #2 ;
+ }
+ \cs_new:Npn \@@_rand:ww #1; #2;
+ {
+ \int_compare:nNnTF {#1} > {#2}
+ {
+ \__msg_kernel_expandable_error:nnnn
+ { kernel } { backward-range } {#1} {#2}
+ \@@_rand:ww #2; #1;
+ }
+ {
+ \int_compare:nNnTF {#1} > \c_zero
+ { \int_compare:nNnTF { #2 - #1 } < \c__fp_rand_size_int }
+ { \int_compare:nNnTF {#2} < { #1 + \c__fp_rand_size_int } }
+ {
+ \exp_args:Nf \@@_rand_narrow:nn
+ { \int_eval:n { #2 - #1 + \c_one } } {#1}
+ }
+ { \fp_to_int:n { randint(#1,#2) } }
+ }
+ }
+ \cs_new:Npn \@@_rand_narrow:nn
+ {
+ \exp_args:No \@@_rand_narrow:nnn
+ { \pdftex_uniformdeviate:D \c__fp_rand_size_int }
+ }
+ \cs_new:Npn \@@_rand_narrow:nnn #1#2
+ {
+ \exp_args:Nf \@@_rand_narrow:nnnn
+ { \int_mod:nn {#1} {#2} } {#1} {#2}
+ }
+ \cs_new:Npn \@@_rand_narrow:nnnn #1#2#3#4
+ {
+ \int_compare:nNnTF { #2 - #1 + #3 } > \c__fp_rand_size_int
+ { \@@_rand_narrow:nn {#3} {#4} }
+ { \int_eval:n { #4 + #1 } }
+ }
+ }
+ {
+ \cs_new:Npn \int_rand:nn #1#2
+ {
+ \__msg_kernel_expandable_error:nn { kernel } { fp-no-random }
+ \int_eval:n {#1}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The following must be added to \pkg{l3msg}.
+% \begin{macrocode}
+\cs_if_exist:NT \pdftex_uniformdeviate:D
+ {
+ \__msg_kernel_new:nnn { kernel } { backward-range }
+ { Bounds~ordered~backwards~in~\int_rand:nn {#1}~{#2}. }
+ }
+% \end{macrocode}
+%
% \subsection{Additions to \pkg{l3keys}}
%
% \begin{macrocode}
@@ -2638,6 +2841,47 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}[EXP]
+% {
+% \prop_rand_key:N, \prop_rand_key:c,
+% \prop_rand_value:N, \prop_rand_value:c,
+% \prop_rand_key_value:N, \prop_rand_key_value:c
+% }
+% \begin{macro}[aux, EXP]{\@@_rand:NN, \@@_rand_item:Nw}
+% Contrarily to |clist|, |seq| and |tl|, there is no function to get
+% an item of a |prop| given an integer between $1$ and the number of
+% items, so we write the appropriate code. There is no bounds
+% checking because \cs{int_rand:nn} is always within bounds. At the
+% end, leave either the key |#3| or the value |#4| in the input
+% stream.
+% \begin{macrocode}
+\cs_new:Npn \prop_rand_key:N { \@@_rand:NN \use_i:nnn }
+\cs_new:Npn \prop_rand_value:N { \@@_rand:NN \use_none:n }
+\cs_new:Npn \prop_rand_key_value:N { \@@_rand:NN \@@_rand:nNn }
+\cs_new:Npn \@@_rand:nNn #1#2#3 { \exp_not:n { {#1} {#3} } }
+\cs_new:Npn \@@_rand:NN #1#2
+ {
+ \prop_if_empty:NTF #2 { }
+ {
+ \exp_after:wN \@@_rand_item:Nw \exp_after:wN #1
+ \__int_value:w \int_rand:nn { 1 } { \prop_count:N #2 } #2
+ \q_stop
+ }
+ }
+\cs_new:Npn \@@_rand_item:Nw #1#2 \s_@@ \@@_pair:wn #3 \s_@@ #4
+ {
+ \int_compare:nNnF {#2} > \c_one
+ { \use_i_delimit_by_q_stop:nw { #1 {#3} \exp_not:n {#4} } }
+ \exp_after:wN \@@_rand_item:Nw \exp_after:wN #1
+ \__int_value:w \int_eval:n { #2 - \c_one } \s_@@
+ }
+\cs_generate_variant:Nn \prop_rand_key:N { c }
+\cs_generate_variant:Nn \prop_rand_value:N { c }
+\cs_generate_variant:Nn \prop_rand_key_value:N { c }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Additions to \pkg{l3seq}}
%
% \begin{macrocode}
@@ -2745,6 +2989,18 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\seq_rand_item:N, \seq_rand_item:c}
+% Importantly, \cs{seq_item:Nn} only evaluates its argument once.
+% \begin{macrocode}
+\cs_new:Npn \seq_rand_item:N #1
+ {
+ \seq_if_empty:NF #1
+ { \seq_item:Nn #1 { \int_rand:nn { 1 } { \seq_count:N #1 } } }
+ }
+\cs_generate_variant:Nn \seq_rand_item:N { c }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Additions to \pkg{l3skip}}
%
% \begin{macrocode}
@@ -2937,7 +3193,7 @@
}
}
\exp_args:Nno \use:nn
- { \cs_set_protected:Npn \@@_from_file_do:w #1 }
+ { \cs_new_protected:Npn \@@_from_file_do:w #1 }
{ \c_@@_rescan_marker_tl }
{ \tl_set:No \l_@@_internal_a_tl {#1} }
% \end{macrocode}
@@ -4442,6 +4698,19 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\tl_rand_item:n, \tl_rand_item:N, \tl_rand_item:c}
+% Importantly \cs{tl_item:nn} only evaluates its argument once.
+% \begin{macrocode}
+\cs_new:Npn \tl_rand_item:n #1
+ {
+ \tl_if_blank:nF {#1}
+ { \tl_item:nn {#1} { \int_rand:nn { 1 } { \tl_count:n {#1} } } }
+ }
+\cs_new:Npn \tl_rand_item:N { \exp_args:No \tl_rand_item:n }
+\cs_generate_variant:Nn \tl_rand_item:N { c }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Additions to \pkg{l3tokens}}
%
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
index b9987de422b..b7364894e39 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
@@ -3,43 +3,30 @@
%% File: l3clist.dtx Copyright (C) 2004-2011 Frank Mittelbach,
%% The LaTeX3 project
%% (C) 2012-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3clist.dtx 6685 2016-08-19 16:26:52Z bruno $
+\GetIdInfo$Id: l3clist.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Comma separated lists}
%</driver|package>
%<*driver>
@@ -1720,7 +1707,7 @@
% \subsection{Using a single item}
%
% \begin{macro}{\clist_item:Nn, \clist_item:cn}
-% \begin{macro}[aux]{\@@_item:nnNn}
+% \begin{macro}[aux]{\@@_item:nnnN, \@@_item:ffoN, \@@_item:ffnN}
% \begin{macro}[aux]{\@@_item_N_loop:nw}
% To avoid needing to test the end of the list at each step,
% we first compute the \meta{length} of the list. If the item number
@@ -1732,27 +1719,28 @@
% \begin{macrocode}
\cs_new:Npn \clist_item:Nn #1#2
{
- \exp_args:Nfo \@@_item:nnNn
+ \@@_item:ffoN
{ \clist_count:N #1 }
+ { \int_eval:n {#2} }
#1
\@@_item_N_loop:nw
- {#2}
}
-\cs_new:Npn \@@_item:nnNn #1#2#3#4
+\cs_new:Npn \@@_item:nnnN #1#2#3#4
{
- \int_compare:nNnTF {#4} < \c_zero
+ \int_compare:nNnTF {#2} < \c_zero
{
- \int_compare:nNnTF {#4} < { - #1 }
+ \int_compare:nNnTF {#2} < { - #1 }
{ \use_none_delimit_by_q_stop:w }
- { \exp_args:Nf #3 { \int_eval:n { #4 + \c_one + #1 } } }
+ { \exp_args:Nf #4 { \int_eval:n { #2 + \c_one + #1 } } }
}
{
- \int_compare:nNnTF {#4} > {#1}
+ \int_compare:nNnTF {#2} > {#1}
{ \use_none_delimit_by_q_stop:w }
- { #3 {#4} }
+ { #4 {#2} }
}
- { } , #2 , \q_stop
+ { } , #3 , \q_stop
}
+\cs_generate_variant:Nn \@@_item:nnnN { ffo, ff }
\cs_new:Npn \@@_item_N_loop:nw #1 #2,
{
\int_compare:nNnTF {#1} = \c_zero
@@ -1778,11 +1766,11 @@
% \begin{macrocode}
\cs_new:Npn \clist_item:nn #1#2
{
- \exp_args:Nf \@@_item:nnNn
+ \@@_item:ffnN
{ \clist_count:n {#1} }
+ { \int_eval:n {#2} }
{#1}
\@@_item_n:nw
- {#2}
}
\cs_new:Npn \@@_item_n:nw #1
{ \@@_item_n_loop:nw {#1} \prg_do_nothing: }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
index 6a19c51d7ee..848eeefaa71 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
@@ -1,44 +1,30 @@
% \iffalse meta-comment
%
%% File: l3coffins.dtx Copyright(C) 2010-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3coffins.dtx 6685 2016-08-19 16:26:52Z bruno $
+\GetIdInfo$Id: l3coffins.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Coffin code layer}
%</driver|package>
%<*driver>
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
index 731789745b2..4512d174154 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
@@ -1,44 +1,30 @@
% \iffalse meta-comment
%
%% File: l3color.dtx Copyright(C) 2011,2012,2014,2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3color.dtx 6596 2016-06-13 21:29:58Z joseph $
+\GetIdInfo$Id: l3color.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Experimental color support}
%</driver|package>
%<*driver>
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
index c4638af4fc2..fc4319207fb 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
@@ -1,37 +1,24 @@
% \iffalse meta-comment
%
%% File: l3doc.dtx Copyright (C) 1990-2016 The LaTeX3 project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\def\nameofplainTeX{plain}
@@ -75,7 +62,7 @@ Do not distribute a modified version of this file.
%
%<*driver|class>
\RequirePackage{expl3,xparse,calc}
-\GetIdInfo$Id: l3doc.dtx 6701 2016-09-08 13:56:52Z qinglee $
+\GetIdInfo$Id: l3doc.dtx 6809 2017-01-01 06:33:13Z bruno $
{L3 Experimental documentation class}
%</driver|class>
%
@@ -3715,8 +3702,8 @@ Do not distribute a modified version of this file.
\use:x
{
\@@_special_index_module:nnnnN
- { \quotechar #1 }
- { \quotechar \bslash \quotechar #1 }
+ {#1}
+ { \bslash #1 }
{ }
{ }
\c_false_bool
@@ -3758,6 +3745,7 @@ Do not distribute a modified version of this file.
% a construct such as |\meta{...}|.
% \begin{macrocode}
\tl_new:N \l_@@_index_escaped_macro_tl
+\tl_new:N \l_@@_index_escaped_key_tl
\cs_new_protected:Npn \@@_special_index_module:nnnnN #1#2#3#4#5
{
\use:x
@@ -3783,6 +3771,8 @@ Do not distribute a modified version of this file.
\cs_generate_variant:Nn \@@_special_index_module:nnnnN { ooo }
\cs_new_protected:Npn \@@_special_index_aux:nnnnnn #1#2#3#4#5#6
{
+ \tl_set:Nn \l_@@_index_escaped_key_tl {#1}
+ \@@_quote_special_char:N \l_@@_index_escaped_key_tl
\@@_special_index_set:Nn \l_@@_index_escaped_macro_tl {#2}
\str_if_eq:onTF { \@currenvir } { macrocode }
{ \codeline@wrindex }
@@ -3797,7 +3787,7 @@ Do not distribute a modified version of this file.
{
\tl_if_empty:nF { #3 #4 #5 }
{ #3 #5 \actualchar #4 #5 \levelchar }
- #1
+ \l_@@_index_escaped_key_tl
\actualchar
{
\token_to_str:N \verbatim@font \c_space_tl
@@ -3812,23 +3802,24 @@ Do not distribute a modified version of this file.
\tl_set:Nx #1 { \tl_to_str:n {#2} }
\@@_if_almost_str:nTF {#2}
{
+ \tl_replace_all:Non #1 { \tl_to_str:n { __ } }
+ {
+ \verbatimchar
+ \token_to_str:N \_ \token_to_str:N \_
+ \token_to_str:N \verb * \verbatimchar
+ }
\exp_args:Nx \tl_map_inline:nn
{ \tl_to_str:N \verbatimchar \token_to_str:N _ }
{
\tl_replace_all:Nnn #1 {##1}
{
\verbatimchar \c_@@_backslash_tl ##1
- \token_to_str:N \verb \quotechar * \verbatimchar
+ \token_to_str:N \verb * \verbatimchar
}
}
- \tl_map_inline:nn { \actualchar \encapchar \levelchar }
- {
- \tl_replace_all:Nxn #1
- { \tl_to_str:N ##1 } { \quotechar \tl_to_str:N ##1 }
- }
\tl_set:Nx #1
{
- \token_to_str:N \verb \quotechar * \verbatimchar
+ \token_to_str:N \verb * \verbatimchar
#1 \verbatimchar
}
}
@@ -3838,6 +3829,21 @@ Do not distribute a modified version of this file.
{ \c_@@_backslash_tl }
{ \token_to_str:N \bslash \c_space_tl }
}
+ \@@_quote_special_char:N #1
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux]{\@@_quote_special_char:N}
+% Quote some special characters.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_quote_special_char:N #1
+ {
+ \tl_map_inline:nn { \quotechar \actualchar \encapchar \levelchar }
+ {
+ \tl_replace_all:Nxn #1
+ { \tl_to_str:N ##1 } { \quotechar \tl_to_str:N ##1 }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -3895,7 +3901,7 @@ Do not distribute a modified version of this file.
% the first occurence of |#1|. Helper that removes any leading
% underscore from \cs{l_@@_index_key_tl}.
% \begin{macrocode}
-\cs_set:Npn \@@_key_trim_module:n #1
+\cs_new_protected:Npn \@@_key_trim_module:n #1
{
\cs_set:Npn \@@_tmpa:w ##1 #1 ##2 \q_stop
{ \exp_not:n {##1} }
@@ -4322,7 +4328,6 @@ page_precedence "rnaA"
%
% \begin{macro}
% {
-% \c_minus_one,
% \c_zero,
% \c_one,
% \c_two,
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
index fd300d5ee45..14626c67e4f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
@@ -1,38 +1,24 @@
% \iffalse
%
-%% File l3dosctrip.dtx Copyright (C) 2012 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%% File l3dosctrip.dtx Copyright (C) 2012,2016 The LaTeX3 Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver|program>
\def\ExplFileDate{2012/06/08}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
index fc30245ded9..20e53271c95 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
@@ -1,44 +1,30 @@
% \iffalse meta-comment
%
%% File: l3drivers.dtx Copyright(C) 2011-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3drivers.dtx 6644 2016-08-13 20:22:11Z bruno $
+\GetIdInfo$Id: l3drivers.dtx 6809 2017-01-01 06:33:13Z bruno $
{L3 Experimental drivers}
%</driver|package>
%<*driver>
@@ -90,7 +76,7 @@
% The code here is all very low-level, and should not in general be used
% outside of the kernel. It is also important to note that many of the
% functions here are closely tied to the immediate level \enquote{up},
-% and they must be used in the correct contexts.d
+% and they must be used in the correct contexts.
%
% \section{Box clipping}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
index ba6f3b4eb7a..2b15d471d7b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: l3expan.dtx Copyright (C) 1990-2016 The LaTeX3 project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3expan.dtx 6684 2016-08-19 15:21:49Z bruno $
+\GetIdInfo$Id: l3expan.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Argument expansion}
%</driver|package>
%<*driver>
@@ -158,7 +145,7 @@
% control sequence} is protected or if the \meta{variant} involves
% |x|~arguments, then the \meta{variant control sequence} will also be
% protected. The \meta{variant} is created globally, as is any
-% \cs{exp_args:N\meta{variant}} function needed to carry out the
+% \cs[no-index]{exp_args:N\meta{variant}} function needed to carry out the
% expansion.
% \end{function}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index aca87c16595..fee42ad5736 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: l3file.dtx Copyright (C) 1990-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3file.dtx 6685 2016-08-19 16:26:52Z bruno $
+\GetIdInfo$Id: l3file.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 File and I/O operations}
%</driver|package>
%<*driver>
@@ -278,9 +265,9 @@
% \end{texnote}
% \end{function}
%
-% \begin{function}[added = 2012-06-24, updated = 2012-07-31]{\ior_get_str:NN}
+% \begin{function}[added = 2016-12-04]{\ior_str_get:NN}
% \begin{syntax}
-% \cs{ior_get_str:NN} \meta{stream} \meta{token list variable}
+% \cs{ior_str_get:NN} \meta{stream} \meta{token list variable}
% \end{syntax}
% Function that reads one line from the input \meta{stream} and stores
% the result locally in the \meta{token list} variable. If the
@@ -302,7 +289,7 @@
% This protected macro is a wrapper around the \eTeX{} primitive
% \tn{readline}. However, the end-line character normally added by
% this primitive is not included in the result of
-% \cs{ior_get_str:NN}.
+% \cs{ior_str_get:NN}.
% \end{texnote}
% \end{function}
%
@@ -690,7 +677,10 @@
{
\group_begin:
\seq_map_inline:Nn \l_char_active_seq
- { \char_set:active:Npx ##1 { \cs_to_str:N ##1 } }
+ {
+ \tl_set:Nx \l_@@_internal_tl { \iow_char:N ##1 }
+ \char_set_active_eq:NN ##1 \l_@@_internal_tl
+ }
\tl_set:Nx \l_@@_internal_name_tl {#1}
\tl_set:Nx \l_@@_internal_name_tl
{ \tl_to_str:N \l_@@_internal_name_tl }
@@ -803,7 +793,7 @@
%
% \begin{macro}{\file_input:n}
% \begin{macro}[int]{\@@_if_exist:nT}
-% \begin{macro}[aux]{\@@_input:n \@@_input:V}
+% \begin{macro}[aux]{\@@_input:n, \@@_input:V}
% \begin{macro}[aux]{\@@_input_aux:n, \@@_input_aux:o}
% Loading a file is done in a safe way, checking first that the file
% exists and loading only if it does. Push the file name on the
@@ -1110,7 +1100,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \ior_close:N #1
{
- \int_compare:nT { \c_minus_one < #1 < \c_sixteen }
+ \int_compare:nT { - \c_one < #1 < \c_sixteen }
{
\tex_closein:D #1
\prop_gremove:NV \g_@@_streams_prop #1
@@ -1186,15 +1176,15 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\ior_get_str:NN}
+% \begin{macro}{\ior_str_get:NN}
% Reading as strings is a more complicated wrapper, as we wish to
% remove the endline character.
% \begin{macrocode}
-\cs_new_protected:Npn \ior_get_str:NN #1#2
+\cs_new_protected:Npn \ior_str_get:NN #1#2
{
\use:x
{
- \int_set_eq:NN \tex_endlinechar:D \c_minus_one
+ \int_set:Nn \tex_endlinechar:D { - \c_one }
\exp_not:n { \etex_readline:D #1 to #2 }
\int_set:Nn \tex_endlinechar:D { \int_use:N \tex_endlinechar:D }
}
@@ -1349,13 +1339,13 @@
% \begin{macrocode}
\cs_new_protected:Npn \iow_close:N #1
{
- \int_compare:nT { \c_minus_one < #1 < \c_sixteen }
+ \int_compare:nT { - \c_one < #1 < \c_sixteen }
{
\tex_immediate:D \tex_closeout:D #1
\prop_gremove:NV \g_@@_streams_prop #1
\seq_if_in:NVF \g_@@_streams_seq #1
{ \seq_gpush:NV \g_@@_streams_seq #1 }
- \cs_gset_eq:NN #1 \c_term_ior
+ \cs_gset_eq:NN #1 \c_term_iow
}
}
\cs_generate_variant:Nn \iow_close:N { c }
@@ -1572,7 +1562,7 @@
% nicer.
% \begin{macrocode}
\group_begin:
- \int_set_eq:NN \tex_escapechar:D \c_minus_one
+ \int_set:Nn \tex_escapechar:D { - \c_one }
\tl_const:Nx \c_@@_wrap_marker_tl
{ \tl_to_str:n { \^^I \^^O \^^W \^^_ \^^W \^^R \^^A \^^P } }
\group_end:
@@ -1638,7 +1628,7 @@
\cs_new_protected:Npn \iow_wrap:nnnN #1#2#3#4
{
\group_begin:
- \int_set_eq:NN \tex_escapechar:D \c_minus_one
+ \int_set:Nn \tex_escapechar:D { - \c_one }
\cs_set:Npx \{ { \token_to_str:N \{ }
\cs_set:Npx \# { \token_to_str:N \# }
\cs_set:Npx \} { \token_to_str:N \} }
@@ -1892,6 +1882,15 @@
{ Only~\iow_wrap:nnnN~(arg~1)~allows~\iow_indent:n }
% \end{macrocode}
%
+% \subsection{Deprecated functions}
+%
+% \begin{macro}[added = 2012-06-24, updated = 2012-07-31, deprecated=2017-12-31]{\ior_get_str:NN}
+% For removal after 2017-12-31.
+% \begin{macrocode}
+\cs_new_eq:NN \ior_get_str:NN \ior_str_get:NN
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
index c5217673bb7..40b9cbe27df 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
@@ -1,41 +1,28 @@
% \iffalse meta-comment
%
%% File: l3final.dtx Copyright (C) 1990-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3final.dtx 6596 2016-06-13 21:29:58Z joseph $
+\GetIdInfo$Id: l3final.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Experimental format finalisation}
\begin{document}
\DocInput{\jobname.dtx}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3format.ins b/Master/texmf-dist/source/latex/l3kernel/l3format.ins
index 1e38ca555f3..0a4822eb012 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3format.ins
+++ b/Master/texmf-dist/source/latex/l3kernel/l3format.ins
@@ -12,7 +12,18 @@ of this license is in the file
This file is part of the "l3kernel bundle" (The Work in LPPL)
and all files in that bundle must be distributed together.
-The released version of this bundle is available from CTAN.
+-----------------------------------------------------------------------
+
+The development version of the bundle can be found at
+
+ https://github.com/latex3/latex3
+
+for those people who are interested.
+
+-----------------------------------------------------------------------
+
+Any modification of this file should ensure that the copyright and
+license information is placed in the derived files.
\fi
@@ -22,12 +33,17 @@ The released version of this bundle is available from CTAN.
\preamble
-EXPERIMENTAL CODE
+Copyright (C) 1990-2016 The LaTeX3 Project
-Do not distribute this file without also distributing the
-source files specified above.
+It may be distributed and/or modified under the conditions of
+the LaTeX Project Public License (LPPL), either version 1.3c of
+this license or (at your option) any later version. The latest
+version of this license is in the file:
-Do not distribute a modified version of this file.
+ http://www.latex-project.org/lppl.txt
+
+This file is part of the "l3kernel bundle" (The Work in LPPL)
+and all files in that bundle must be distributed together.
\endpreamble
% stop docstrip adding \endinput
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
index 265613f9025..d696a2ba2e5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
@@ -1,42 +1,28 @@
% \iffalse meta-comment
-%%
+%
%% File: l3fp-assign.dtx Copyright (C) 2011-2016 The LaTeX3 project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-assign.dtx 6596 2016-06-13 21:29:58Z joseph $
+\GetIdInfo$Id: l3fp-assign.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Floating-point assignments}
\begin{document}
\DocInput{\jobname.dtx}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
index 519a63fd6d9..382bfb3ecc3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
@@ -1,42 +1,28 @@
% \iffalse meta-comment
%
%% File: l3fp-aux.dtx Copyright(C) 2011-2014,2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-aux.dtx 6750 2016-11-21 01:24:26Z bruno $
+\GetIdInfo$Id: l3fp-aux.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Floating-point support functions}
\documentclass[full]{l3doc}
\begin{document}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
index 81fa321e1b2..8bdb1f07152 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
@@ -1,42 +1,28 @@
% \iffalse meta-comment
%
%% File: l3fp-basics.dtx Copyright (C) 2011-2014,2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-basics.dtx 6596 2016-06-13 21:29:58Z joseph $
+\GetIdInfo$Id: l3fp-basics.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Floating-point arithmetic}
\begin{document}
\DocInput{\jobname.dtx}
@@ -215,7 +201,7 @@
\if_int_compare:w #2 > #4 \exp_stop_f:
\c_three
\else:
- \c_minus_one
+ \c_four
\fi:
\fi:
\exp_after:wN \@@_add_zeros_o:Nww \__int_value:w
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
index 0a300cd1341..728085952a1 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
@@ -1,42 +1,28 @@
% \iffalse meta-comment
%
%% File: l3fp-convert.dtx Copyright(C) 2011-2014,2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-convert.dtx 6596 2016-06-13 21:29:58Z joseph $
+\GetIdInfo$Id: l3fp-convert.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Floating-point conversion}
\begin{document}
\DocInput{\jobname.dtx}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
index 05da6150eb4..5f9a05d834b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
@@ -1,42 +1,28 @@
% \iffalse meta-comment
%
%% File: l3fp-expo.dtx Copyright (C) 2011-2014,2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-expo.dtx 6441 2016-03-24 10:11:59Z joseph $
+\GetIdInfo$Id: l3fp-expo.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Floating-point exponential-related functions}
\begin{document}
\DocInput{\jobname.dtx}
@@ -1208,12 +1194,12 @@
% \meta{digits} |;| which would be the digits surrounding the decimal
% period. If the \meta{digits} are non-zero, the number is not an
% integer. Otherwise, check the parity of the \meta{digit} and return
-% \cs{c_zero} or \cs{c_minus_one}.
+% \cs{c_zero} or |-|\cs{c_one}.
% \begin{macrocode}
\cs_new:Npn \@@_pow_neg_case:w \s_@@ \@@_chk:w #1#2#3;
{
\if_case:w #1 \exp_stop_f:
- \c_minus_one
+ -\c_one
\or: \@@_pow_neg_case_aux:nnnnn #3
\else: \c_one
\fi:
@@ -1222,7 +1208,7 @@
{
\if_int_compare:w #1 > \c_eight
\if_int_compare:w #1 > \c_sixteen
- \c_minus_one
+ -\c_one
\else:
\exp_after:wN \exp_after:wN
\exp_after:wN \@@_pow_neg_case_aux:NNNNNNNNw
@@ -1248,7 +1234,7 @@
\if_int_odd:w #8 \exp_stop_f:
\c_zero
\else:
- \c_minus_one
+ -\c_one
\fi:
\else:
\c_one
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
index 6900fcc0ba2..1e8fe4b7cb5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
@@ -1,42 +1,28 @@
% \iffalse meta-comment
%
%% File: l3fp-extended.dtx Copyright (C) 2011-2014,2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-extended.dtx 6684 2016-08-19 15:21:49Z bruno $
+\GetIdInfo$Id: l3fp-extended.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Floating-points with extended precision}
\begin{document}
\DocInput{\jobname.dtx}
@@ -290,7 +276,7 @@
{
\exp_after:wN \@@_fixed_div_int_after:Nw
\exp_after:wN #8
- \__int_value:w \__int_eval:w \c_minus_one
+ \__int_value:w \__int_eval:w - \c_one
\@@_fixed_div_int:wnN
#1; {#7} \@@_fixed_div_int_auxi:wnn
#2; {#7} \@@_fixed_div_int_auxi:wnn
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
index 68282396cce..fa1b7538c83 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
@@ -1,42 +1,28 @@
% \iffalse meta-comment
%
%% File: l3fp-logic.dtx Copyright (C) 2011-2014,2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-logic.dtx 6759 2016-11-21 17:04:08Z joseph $
+\GetIdInfo$Id: l3fp-logic.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Floating-point conditionals}
\begin{document}
\DocInput{\jobname.dtx}
@@ -318,56 +304,72 @@
%
% \begin{macro}[EXP]{\fp_step_function:nnnN, \fp_step_function:nnnc}
% \begin{macro}[EXP, aux]{\@@_step:wwwN}
-% \begin{macro}[EXP, aux]{\@@_step:NnnnN, \@@_step:NfnnN}
-% The approach here is much the same as \cs{int_step_function:nnnN} except we
-% do not have a convenient low-level way to evaluation each argument to give
-% a pure number. Instead, the internal parser is used to leave values in the
-% internal format (and avoid a more expensive \texttt{f}-type expansion of
-% multiple uses of \texttt{fp_eval:n}).
+% \begin{macro}[EXP, aux]{\@@_step:NnnnnN, \@@_step:NfnnnN}
+% The approach here is somewhat similar to
+% \cs{int_step_function:nnnN}. There are two subtleties: we use the
+% internal parser \cs{@@_parse:n} to avoid converting back and forth
+% from the internal representation; and (due to rounding) even a
+% non-zero step does not guarantee that the loop counter will
+% increase.
% \begin{macrocode}
\cs_new:Npn \fp_step_function:nnnN #1#2#3
{
\exp_after:wN \@@_step:wwwN
- \exp:w \exp_end_continue_f:w \@@_parse_o:n {#1} :
- \exp:w \exp_end_continue_f:w \@@_parse_o:n {#2} :
- \exp:w \exp_end_continue_f:w \@@_parse:n {#3} :
+ \exp:w \exp_end_continue_f:w \@@_parse_o:n {#1}
+ \exp:w \exp_end_continue_f:w \@@_parse_o:n {#2}
+ \exp:w \exp_end_continue_f:w \@@_parse:n {#3}
}
\cs_generate_variant:Nn \fp_step_function:nnnN { nnnc }
-% \end{macrocode}
-% Here, |#1| will be passed to the output on the first pass of the loop.
-% To avoid this being in internal form, an \texttt{f}-type expansion is used
-% here on that value only. The second and third arguments will be converted
-% during the loop itself.
+% \end{macrocode}
+% Only \enquote{normal} floating points (not $\pm 0$,
+% $\pm\texttt{inf}$, \texttt{nan}) can be used as step; if positive,
+% call \cs{@@_step:NnnnnN} with argument |>| otherwise~|<|. This
+% function has one more argument than its integer counterpart, namely
+% the previous value, to catch the case where the loop has made no
+% progress. Conversion to decimal is done just before calling the
+% user's function.
% \begin{macrocode}
-\cs_new:Npn \@@_step:wwwN #1 : #2 : #3 : #4
+\cs_new:Npn \@@_step:wwwN #1 ; \s_@@ \@@_chk:w #2#3#4 ; #5; #6
{
- \fp_compare:nNnTF {#2} > 0
- { \@@_step:NfnnN > }
+ \token_if_eq_meaning:NNTF #2 1
+ {
+ \token_if_eq_meaning:NNTF #3 0
+ { \@@_step:NnnnnN > }
+ { \@@_step:NnnnnN < }
+ }
{
- \fp_compare:nNnTF {#2} = 0
+ \token_if_eq_meaning:NNTF #2 0
+ { \__msg_kernel_expandable_error:nnn { kernel } { zero-step } {#6} }
{
- \__msg_kernel_expandable_error:nnn { kernel } { zero-step } {#4}
- \use_none:nnnn
+ \@@_error:nnfn { bad-step } { }
+ { \fp_to_tl:n { \s_@@ \@@_chk:w #2#3#4 ; } } {#6}
}
- { \@@_step:NfnnN < }
+ \use_none:nnnnn
}
- { \fp_eval:n {#1} } {#2} {#3} #4
+ { #1 ; } { \c_nan_fp } { \s_@@ \@@_chk:w #2#3#4 ; } { #5 ; } #6
}
-
-\cs_new:Npn \@@_step:NnnnN #1#2#3#4#5
+\cs_new:Npn \@@_step:NnnnnN #1#2#3#4#5#6
{
- \fp_compare:nNnF {#2} #1 {#4}
+ \fp_compare:nNnTF {#2} = {#3}
+ {
+ \@@_error:nffn { tiny-step }
+ { \fp_to_tl:n {#3} } { \fp_to_tl:n {#4} } {#6}
+ }
{
- #5 {#2}
- \@@_step:NfnnN
- #1 { \fp_eval:n { #2 + #3 } } {#3} {#4} #5
+ \fp_compare:nNnF {#2} #1 {#5}
+ {
+ \exp_args:Nf #6 { \@@_to_decimal_dispatch:w #2 }
+ \@@_step:NfnnnN
+ #1 { \@@_parse:n { #2 + #4 } } {#2} {#4} {#5} #6
+ }
}
}
-\cs_generate_variant:Nn \@@_step:NnnnN { Nf }
+\cs_generate_variant:Nn \@@_step:NnnnnN { Nf }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+%
% \begin{macro}{\fp_step_inline:nnnn}
% As for \cs{int_step_inline:nnnn}, create a global function and apply it,
% following up with a break point.
@@ -384,6 +386,13 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macrocode}
+\__msg_kernel_new:nnn { kernel } { fp-bad-step }
+ { Invalid~step~size~#2~in~step~function~#3. }
+\__msg_kernel_new:nnn { kernel } { fp-tiny-step }
+ { Tiny~step~size~(#1+#2=#1)~in~step~function~#3. }
+% \end{macrocode}
+%
% \subsection{Extrema}
%
% \begin{macro}[int, EXP]{\@@_minmax_o:Nw}
@@ -400,9 +409,9 @@
\cs_new:Npn \@@_minmax_o:Nw #1#2 @
{
\if_meaning:w 0 #1
- \exp_after:wN \@@_minmax_loop:Nww \exp_after:wN \c_one
+ \exp_after:wN \@@_minmax_loop:Nww \exp_after:wN +
\else:
- \exp_after:wN \@@_minmax_loop:Nww \exp_after:wN \c_minus_one
+ \exp_after:wN \@@_minmax_loop:Nww \exp_after:wN -
\fi:
#2
\s_@@ \@@_chk:w 2 #1 \s_@@_exact ;
@@ -412,7 +421,7 @@
% \end{macro}
%
% \begin{macro}[aux, EXP]{\@@_minmax_loop:Nww}
-% The first argument is $-1$ or $1$ to denote the case where the
+% The first argument is $-$ or $+$ to denote the case where the
% currently largest (smallest) number found (first floating point
% argument) should be replaced by the new number (second floating
% point argument). If the new number is \texttt{nan}, keep that as
@@ -436,7 +445,7 @@
\@@_compare_back:ww
\s_@@ \@@_chk:w #4#5;
\s_@@ \@@_chk:w #2#3;
- = #1
+ = #1 \c_one
\@@_minmax_auxii:ww
\else:
\@@_minmax_auxi:ww
@@ -545,7 +554,7 @@
\@@_exp_after_array_f:w #3 \s_@@_stop
\exp_after:wN @
\exp:w
- \@@_parse_operand:Nw \c_two
+ \@@_parse_operand:Nw \c_@@_prec_colon_int
\@@_parse_expand:w
\else:
\__msg_kernel_expandable_error:nnnn
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
index 339595c6d2e..1936b34f888 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
@@ -1,42 +1,28 @@
% \iffalse meta-comment
%
%% File: l3fp-parse.dtx Copyright (C) 2011-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-parse.dtx 6750 2016-11-21 01:24:26Z bruno $
+\GetIdInfo$Id: l3fp-parse.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Floating-point expression parsing}
\begin{document}
\DocInput{\jobname.dtx}
@@ -111,20 +97,57 @@
% \begin{itemize}
% \item[16] Function calls with multiple arguments.
% \item[15] Function calls expecting exactly one argument.
-% \item[14] Binary |**| and~|^| (right to left).
+% \item[13/14] Binary |**| and~|^| (right to left).
% \item[12] Unary |+|, |-|, |!| (right to left).
% \item[10] Binary |*|, |/|, and juxtaposition (implicit~|*|).
% \item[9] Binary |+| and~|-|.
% \item[7] Comparisons.
-% \item[5] Logical \texttt{and}, denoted by~|&&|.
-% \item[4] Logical \texttt{or}, denoted by~\verb*+||+.
-% \item[3] Ternary operator |?:|, piece~|?|.
-% \item[2] Ternary operator |?:|, piece~|:|.
-% \item[1] Commas, and parentheses accepting commas.
-% \item[0] Parentheses expecting exactly one argument.
-% \item[-1] Start and end of the expression.
+% \item[6] Logical \texttt{and}, denoted by~|&&|.
+% \item[5] Logical \texttt{or}, denoted by~\verb*+||+.
+% \item[4] Ternary operator |?:|, piece~|?|.
+% \item[3] Ternary operator |?:|, piece~|:|.
+% \item[2] Commas, and parentheses accepting commas.
+% \item[1] Parentheses expecting exactly one argument.
+% \item[0] Start and end of the expression.
% \end{itemize}
%
+% \begin{variable}
+% {
+% \c_@@_prec_funcii_int,
+% \c_@@_prec_func_int,
+% \c_@@_prec_hatii_int,
+% \c_@@_prec_hat_int,
+% \c_@@_prec_not_int,
+% \c_@@_prec_times_int,
+% \c_@@_prec_plus_int,
+% \c_@@_prec_comp_int,
+% \c_@@_prec_and_int,
+% \c_@@_prec_or_int,
+% \c_@@_prec_quest_int,
+% \c_@@_prec_colon_int,
+% \c_@@_prec_comma_int,
+% \c_@@_prec_paren_int,
+% \c_@@_prec_end_int,
+% }
+% \begin{macrocode}
+\int_const:Nn \c_@@_prec_funcii_int { 16 }
+\int_const:Nn \c_@@_prec_func_int { 15 }
+\int_const:Nn \c_@@_prec_hatii_int { 14 }
+\int_const:Nn \c_@@_prec_hat_int { 13 }
+\int_const:Nn \c_@@_prec_not_int { 12 }
+\int_const:Nn \c_@@_prec_times_int { 10 }
+\int_const:Nn \c_@@_prec_plus_int { 9 }
+\int_const:Nn \c_@@_prec_comp_int { 7 }
+\int_const:Nn \c_@@_prec_and_int { 6 }
+\int_const:Nn \c_@@_prec_or_int { 5 }
+\int_const:Nn \c_@@_prec_quest_int { 4 }
+\int_const:Nn \c_@@_prec_colon_int { 3 }
+\int_const:Nn \c_@@_prec_comma_int { 2 }
+\int_const:Nn \c_@@_prec_paren_int { 1 }
+\int_const:Nn \c_@@_prec_end_int { 0 }
+% \end{macrocode}
+% \end{variable}
+%
% \subsubsection{Storing results}
%
% The main question in parsing expressions expandably is to decide where
@@ -215,8 +238,8 @@
% previous binary operator is, or rather, its precedence: we thus rename
% it |\operand:Nw|. Let us describe as an example how the calculation
% |41-2^3*4+5| will be done. Here, we abuse notations: the first
-% argument of |\operand:Nw| should be an integer constant (\cs{c_three},
-% \cs{c_nine}, \ldots{}) equal to the precedence of the given operator,
+% argument of |\operand:Nw| should be an integer constant (\cs{c_@@_prec_plus_int},
+% \ldots{}) equal to the precedence of the given operator,
% not directly the operator itself.
% \begin{itemize}
% \item Clean up~|41| and find~|-|. We call |\operand:Nw|~|-| to find
@@ -1736,7 +1759,7 @@
% \begin{macro}[EXP, aux]{\@@_parse_prefix_-:Nw, \@@_parse_prefix_!:Nw}
% The unary~|-| and boolean not are harder: we parse the operand using
% a precedence equal to the maximum of the previous precedence~|##1|
-% and the precedence \cs{c_twelve} of the unary operator, then call
+% and the precedence \cs{c_@@_prec_not_int} of the unary operator, then call
% the appropriate |\__fp_|\meta{operation}|_o:w| function,
% where the \meta{operation} is |set_sign| or |not|.
% \begin{macrocode}
@@ -1757,8 +1780,8 @@
\@@_parse_expand:w
}
}
-\@@_tmp:w - \c_twelve \@@_set_sign_o:w 2
-\@@_tmp:w ! \c_twelve \@@_not_o:w ?
+\@@_tmp:w - \c_@@_prec_not_int \@@_set_sign_o:w 2
+\@@_tmp:w ! \c_@@_prec_not_int \@@_not_o:w ?
% \end{macrocode}
% \end{macro}
%
@@ -1801,10 +1824,10 @@
\exp_after:wN \@@_parse_lparen_after:NwN
\exp_after:wN #1
\exp:w
- \if_int_compare:w #1 = \c_sixteen
- \@@_parse_operand:Nw \c_one
+ \if_int_compare:w #1 = \c_@@_prec_funcii_int
+ \@@_parse_operand:Nw \c_@@_prec_comma_int
\else:
- \@@_parse_operand:Nw \c_zero
+ \@@_parse_operand:Nw \c_@@_prec_paren_int
\fi:
\@@_parse_expand:w
}
@@ -1827,31 +1850,15 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP, verb]{\@@_parse_prefix_,:Nw}
% \begin{macro}[aux, EXP]{\@@_parse_prefix_):Nw}
-% The right parenthesis and the comma can appear as unary prefixes
-% when an argument of a multi-argument function is missing (for
-% instance the first and last ones in |max(,1,2,)| or in |rand()|).
-% In single-argument functions (precedence~$0$ rather than~$1$) forbid
-% this.
+% The right parenthesis can appear as unary prefixes when arguments of
+% a multi-argument function end with a comma, or when there is no
+% argument, as in |max(1,2,)| or in |rand()|. In single-argument
+% functions (precedence~$0$ rather than~$1$) forbid this.
% \begin{macrocode}
-\cs_new:cpn { @@_parse_prefix_,:Nw } #1
- {
- \if_int_compare:w #1 = \c_one
- \exp_after:wN \@@_parse_one:Nw
- \exp_after:wN #1
- \else:
- \__msg_kernel_expandable_error:nnn
- { kernel } { fp-missing-number } { , }
- \exp_after:wN \c_nan_fp \exp:w \exp_end_continue_f:w
- \exp_after:wN \@@_parse_infix:NN
- \exp_after:wN #1
- \exp_after:wN ,
- \fi:
- }
\cs_new:cpn { @@_parse_prefix_):Nw } #1
{
- \if_int_compare:w #1 = \c_one
+ \if_int_compare:w #1 = \c_@@_prec_comma_int
\else:
\__msg_kernel_expandable_error:nnn
{ kernel } { fp-missing-number } { ) }
@@ -1861,7 +1868,6 @@
}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \subsubsection{Constants}
%
@@ -1958,7 +1964,7 @@
\exp_after:wN #2
\cs:w @@_#1_o:w \exp_after:wN \cs_end:
\exp:w
- \@@_parse_operand:Nw \c_fifteen \@@_parse_expand:w
+ \@@_parse_operand:Nw \c_@@_prec_func_int \@@_parse_expand:w
}
\cs_new:Npn \@@_parse_function:NNN #1#2#3
{
@@ -1967,7 +1973,7 @@
\exp_after:wN #2
\exp_after:wN #1
\exp:w
- \@@_parse_operand:Nw \c_sixteen \@@_parse_expand:w
+ \@@_parse_operand:Nw \c_@@_prec_funcii_int \@@_parse_expand:w
}
% \end{macrocode}
% \end{macro}
@@ -2108,7 +2114,7 @@
% Start an \cs{exp:w} expansion so that \cs{@@_parse:n} expands
% in two steps. The \cs{@@_parse_operand:Nw} function will perform
% computations until reaching an operation with precedence
-% \cs{c_minus_one} or less, namely, the end of the expression. The
+% \cs{c_@@_prec_end_int} or less, namely, the end of the expression. The
% marker \cs{s_@@_mark} indicates that the next token is an already
% parsed version of an infix operator, and \cs{@@_parse_infix_end:N}
% has infinitely negative precedence. Finally, clean up a
@@ -2120,7 +2126,7 @@
\exp:w
\exp_after:wN \@@_parse_after:ww
\exp:w
- \@@_parse_operand:Nw \c_minus_one
+ \@@_parse_operand:Nw \c_@@_prec_end_int
\@@_parse_expand:w #1
\s_@@_mark \@@_parse_infix_end:N
\s_@@_stop
@@ -2272,7 +2278,7 @@
\char_set_catcode_letter:N \)
\cs_new:Npn \@@_parse_infix_):N #1
{
- \if_int_compare:w #1 < \c_zero
+ \if_int_compare:w #1 < \c_@@_prec_paren_int
\__msg_kernel_expandable_error:nnn { kernel } { fp-extra } { ) }
\exp_after:wN \@@_parse_infix:NN
\exp_after:wN #1
@@ -2288,37 +2294,53 @@
% \end{macro}
%
% \begin{macro}[aux, verb, EXP]{\__fp_parse_infix_,:N}
+% \begin{macro}[aux, EXP]{\@@_parse_infix_comma:w, \@@_parse_infix_comma_error:w}
+% \begin{macro}[aux, verb, EXP]{\__fp_,_o:ww}
+% \cs{@@_,_o:ww} is a complicated way of replacing any number of
+% floating point arguments by \texttt{nan}.
% \begin{macrocode}
\group_begin:
\char_set_catcode_letter:N \,
\cs_new:Npn \@@_parse_infix_,:N #1
{
- \if_int_compare:w #1 > \c_one
+ \if_int_compare:w #1 > \c_@@_prec_comma_int
\exp_after:wN @
\exp_after:wN \use_none:n
\exp_after:wN \@@_parse_infix_,:N
\else:
- \if_int_compare:w #1 = \c_one
- \exp_after:wN \@@_parse_infix_comma:w
- \exp:w
- \else:
- \exp_after:wN \@@_parse_infix_comma_gobble:w
- \exp:w
+ \if_int_compare:w #1 < \c_@@_prec_comma_int
+ \@@_parse_infix_comma_error:w
\fi:
- \@@_parse_operand:Nw \c_one
+ \exp_after:wN \@@_parse_infix_comma:w
+ \exp:w \@@_parse_operand:Nw \c_@@_prec_comma_int
\exp_after:wN \@@_parse_expand:w
\fi:
}
\cs_new:Npn \@@_parse_infix_comma:w #1 @
{ #1 @ \use_none:n }
- \cs_new:Npn \@@_parse_infix_comma_gobble:w #1 @
+ \cs_new:Npn \@@_parse_infix_comma_error:w #1 \exp:w
{
+ \fi:
\__msg_kernel_expandable_error:nn { kernel } { fp-extra-comma }
- @ \use_none:n
+ \exp_after:wN @
+ \exp_after:wN \@@_parse_apply_binary:NwNwN
+ \exp_after:wN ,
+ \exp:w
+ }
+ \cs_new:Npn \@@_,_o:ww #1
+ {
+ \if_meaning:w \s_@@ #1
+ \exp_after:wN \@@_use_i_until_s:nw
+ \exp_after:wN \@@_,_o:ww
+ \fi:
+ \exp_after:wN \c_nan_fp
+ #1
}
\group_end:
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsubsection{Usual infix operators}
%
@@ -2367,13 +2389,13 @@
\fi:
}
}
- \@@_tmp:w \@@_parse_infix_^:N ^ \c_fifteen \c_fourteen
- \@@_tmp:w \@@_parse_infix_/:N / \c_ten \c_ten
- \@@_tmp:w \@@_parse_infix_mul:N * \c_ten \c_ten
- \@@_tmp:w \@@_parse_infix_-:N - \c_nine \c_nine
- \@@_tmp:w \@@_parse_infix_+:N + \c_nine \c_nine
- \@@_tmp:w \@@_parse_infix_and:N & \c_five \c_five
- \@@_tmp:w \@@_parse_infix_or:N | \c_four \c_four
+ \@@_tmp:w \@@_parse_infix_^:N ^ \c_@@_prec_hatii_int \c_@@_prec_hat_int
+ \@@_tmp:w \@@_parse_infix_/:N / \c_@@_prec_times_int \c_@@_prec_times_int
+ \@@_tmp:w \@@_parse_infix_mul:N * \c_@@_prec_times_int \c_@@_prec_times_int
+ \@@_tmp:w \@@_parse_infix_-:N - \c_@@_prec_plus_int \c_@@_prec_plus_int
+ \@@_tmp:w \@@_parse_infix_+:N + \c_@@_prec_plus_int \c_@@_prec_plus_int
+ \@@_tmp:w \@@_parse_infix_and:N & \c_@@_prec_and_int \c_@@_prec_and_int
+ \@@_tmp:w \@@_parse_infix_or:N | \c_@@_prec_or_int \c_@@_prec_or_int
\group_end:
% \end{macrocode}
% \end{macro}
@@ -2403,11 +2425,11 @@
% \begin{macrocode}
\cs_new:Npn \@@_parse_infix_juxtapose:N #1
{
- \if_int_compare:w #1 < \c_ten
+ \if_int_compare:w #1 < \c_@@_prec_times_int
\exp_after:wN @
\exp_after:wN \@@_parse_apply_juxtapose:NwwN
\exp:w
- \@@_parse_operand:Nw \c_ten
+ \@@_parse_operand:Nw \c_@@_prec_times_int
\exp_after:wN \@@_parse_expand:w
\else:
\exp_after:wN @
@@ -2493,11 +2515,11 @@
\char_set_catcode_letter:N \?
\cs_new:Npn \@@_parse_infix_?:N #1
{
- \if_int_compare:w #1 < \c_three
+ \if_int_compare:w #1 < \c_@@_prec_quest_int
\exp_after:wN @
\exp_after:wN \@@_ternary:NwwN
\exp:w
- \@@_parse_operand:Nw \c_three
+ \@@_parse_operand:Nw \c_@@_prec_quest_int
\exp_after:wN \@@_parse_expand:w
\else:
\exp_after:wN @
@@ -2507,13 +2529,13 @@
}
\cs_new:Npn \@@_parse_infix_::N #1
{
- \if_int_compare:w #1 < \c_three
+ \if_int_compare:w #1 < \c_@@_prec_quest_int
\__msg_kernel_expandable_error:nnnn
{ kernel } { fp-missing } { ? } { ~for~?: }
\exp_after:wN @
\exp_after:wN \@@_ternary_auxii:NwwN
\exp:w
- \@@_parse_operand:Nw \c_two
+ \@@_parse_operand:Nw \c_@@_prec_colon_int
\exp_after:wN \@@_parse_expand:w
\else:
\exp_after:wN @
@@ -2574,7 +2596,7 @@
}
\cs_new:Npn \@@_parse_compare:NNNNNNN #1
{
- \if_int_compare:w #1 < \c_seven
+ \if_int_compare:w #1 < \c_@@_prec_comp_int
\exp_after:wN \@@_parse_compare_auxi:NNNNNNN
\exp_after:wN \@@_parse_excl_error:
\else:
@@ -2587,7 +2609,7 @@
{
\if_case:w
\if_catcode:w \scan_stop: \exp_not:N #7
- \c_minus_one
+ \c_four
\else:
\__int_eval:w `#7 - `< \__int_eval_end:
\fi:
@@ -2620,7 +2642,7 @@
\exp_after:wN #3
\exp_after:wN #4
\exp:w
- \@@_parse_operand:Nw \c_seven \@@_parse_expand:w #5
+ \@@_parse_operand:Nw \c_@@_prec_comp_int \@@_parse_expand:w #5
}
\cs_new:Npn \@@_parse_apply_compare:NwNNNNNwN
#1 #2@ #3 #4#5#6#7 #8@ #9
@@ -2677,7 +2699,7 @@
\exp_after:wN \@@_function_apply:nw
\exp_after:wN #1
\exp:w
- \@@_parse_operand:Nw \c_sixteen \@@_parse_expand:w
+ \@@_parse_operand:Nw \c_@@_prec_funcii_int \@@_parse_expand:w
}
% \end{macrocode}
% \end{macro}
@@ -2713,7 +2735,7 @@
\__int_value:w #3 \exp_after:wN ; \exp_after:wN
}
\exp:w
- \@@_parse_operand:Nw \c_sixteen \@@_parse_expand:w
+ \@@_parse_operand:Nw \c_@@_prec_funcii_int \@@_parse_expand:w
}
\cs_new:Npn #2 #4 {#5}
}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
index e2708e193fc..a8e3f199dba 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
@@ -1,42 +1,28 @@
% \iffalse meta-comment
%
%% File: l3fp-random.dtx Copyright (C) 2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-random.dtx 6750 2016-11-21 01:24:26Z bruno $
+\GetIdInfo$Id: l3fp-random.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Floating-point random numbers}
\begin{document}
\DocInput{\jobname.dtx}
@@ -76,49 +62,141 @@
%<@@=fp>
% \end{macrocode}
%
-% \subsection{Random floating point}
+% \subsection{Engine support}
%
-% \begin{macro}[EXP, int]{\@@_rand_o:Nw}
-% \begin{macro}[EXP, aux]{\@@_rand_o:}
-% Check that |random| was called without argument. Random numbers are
-% only available if the engine defines a primitive equivalent to
-% \pdfTeX{}'s \tn{pdfuniformdeviate}. A random floating point number
-% in $[0,1)$, uniformly distributed with equal-spaced steps of
-% $10^{-16}$ is obtained by combining two integers in $[0,10^8-1]$.
+% At present, \XeTeX{}, \pTeX{} and \upTeX{} do not provide random
+% numbers, while \LuaTeX{} and \pdfTeX{} provide the primitive
+% \cs{pdftex_uniformdeviate:D} (\tn{pdfuniformdeviate} in \pdfTeX{} and
+% \tn{uniformdeviate} in \LuaTeX{}). We write the test twice simply in
+% order to write the \texttt{false} branch first.
% \begin{macrocode}
-\cs_new:Npn \@@_rand_o:Nw ? #1 @
+\cs_if_exist:NF \pdftex_uniformdeviate:D
{
- \tl_if_empty:nTF {#1}
- { \@@_rand_o: }
+ \__msg_kernel_new:nnn { kernel } { fp-no-random }
+ { Random~numbers~unavailable }
+ \cs_new:Npn \@@_rand_o:Nw ? #1 @
{
- \__msg_kernel_expandable_error:nnnnn
- { kernel } { fp-num-args } { rand() } { 0 } { 0 }
+ \__msg_kernel_expandable_error:nn { kernel } { fp-no-random }
\exp_after:wN \c_nan_fp
}
+ \cs_new_eq:NN \@@_randint_o:Nw \@@_rand_o:Nw
}
-\cs_if_exist:NTF \pdftex_uniformdeviate:D
+\cs_if_exist:NT \pdftex_uniformdeviate:D
{
- \cs_new:Npn \@@_rand_o:
- {
- \@@_parse_o:n
- {
- .
- \exp_after:wN \use_none:n
- \__int_value:w \__int_eval:w 1 0000 0000 +
- \pdftex_uniformdeviate:D 1 0000 0000 \__int_eval_end:
- \exp_after:wN \use_none:n
- \__int_value:w \__int_eval:w 1 0000 0000 +
- \pdftex_uniformdeviate:D 1 0000 0000 \__int_eval_end:
- }
- }
+% \end{macrocode}
+%
+% \begin{macro}[EXP, int]{\@@_rand_uniform:}
+% \begin{variable}
+% {
+% \c_@@_rand_size_int,
+% \c_@@_rand_four_int,
+% \c_@@_rand_eight_int,
+% }
+% The \cs{pdftex_uniformdeviate:D} primitive gives a pseudo-random
+% integer in a range $[0,n-1]$ of the user's choice. This number is
+% meant to be uniformly distributed, but is produced by rescaling a
+% uniform pseudo-random integer in $[0,2^{28}-1]$. For instance,
+% setting~$n$ to (any multiple of) $2^{29}$ gives only even values.
+% Thus it is only safe to call \cs{pdftex_uniformdeviate:D} with
+% argument $2^{28}$. This integer is also used in the implementation
+% of \cs{int_rand:nn}. We will also use variants of this number
+% rounded down to multiples of $10^4$ and $10^8$.
+% \begin{macrocode}
+\cs_new:Npn \@@_rand_uniform:
+ { \pdftex_uniformdeviate:D \c_@@_rand_size_int }
+\int_const:Nn \c_@@_rand_size_int { 268 435 456 }
+\int_const:Nn \c_@@_rand_four_int { 268 430 000 }
+\int_const:Nn \c_@@_rand_eight_int { 200 000 000 }
+% \end{macrocode}
+% \end{variable}
+% \end{macro}
+%
+% \begin{macro}[EXP, int]{\@@_rand_myriads:n}
+% \begin{macro}[EXP, aux]
+% {
+% \@@_rand_myriads_loop:nn,
+% \@@_rand_myriads_get:w,
+% \@@_rand_myriads_last:,
+% \@@_rand_myriads_last:w,
+% }
+% Used as \cs{@@_rand_myriads:n} |{XXX}| with one input character per
+% block of four digit we want. Given a pseudo-random integer from the
+% primitive, we extract $2$ blocks of digits if possible, namely if
+% the integer is less than $2\times 10^8$. If that's not possible,
+% we try to extract $1$~block, which succeeds in the range $[2\times
+% 10^8, 26843\times 10^4)$. For the $5456$ remaining possible values
+% we just throw away the random integer and get a new one. Depending
+% on whether we got $2$, $1$, or~$0$ blocks, remove the same number of
+% characters from the input stream with \cs{use_i:nnn}, \cs{use_i:nn}
+% or nothing.
+% \begin{macrocode}
+\cs_new:Npn \@@_rand_myriads:n #1
+ {
+ \@@_rand_myriads_loop:nn #1
+ { ? \use_i_delimit_by_q_stop:nw \@@_rand_myriads_last: }
+ { ? \use_none_delimit_by_q_stop:w } \q_stop
+ }
+\cs_new:Npn \@@_rand_myriads_loop:nn #1#2
+ {
+ \use_none:n #2
+ \exp_after:wN \@@_rand_myriads_get:w
+ \__int_value:w \@@_rand_uniform: ; {#1}{#2}
+ }
+\cs_new:Npn \@@_rand_myriads_get:w #1 ;
+ {
+ \if_int_compare:w #1 < \c_@@_rand_eight_int
+ \exp_after:wN \use_none:n
+ \__int_value:w \__int_eval:w
+ \c_@@_rand_eight_int + #1 \__int_eval_end:
+ \exp_after:wN \use_i:nnn
+ \else:
+ \if_int_compare:w #1 < \c_@@_rand_four_int
+ \exp_after:wN \use_none:nnnnn
+ \__int_value:w \__int_eval:w
+ \c_@@_rand_four_int + #1 \__int_eval_end:
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_i:nn
+ \fi:
+ \fi:
+ \@@_rand_myriads_loop:nn
+ }
+\cs_new:Npn \@@_rand_myriads_last:
+ {
+ \exp_after:wN \@@_rand_myriads_last:w
+ \__int_value:w \@@_rand_uniform: ;
}
+\cs_new:Npn \@@_rand_myriads_last:w #1 ;
{
- \cs_new:Npn \@@_rand_o:
+ \if_int_compare:w #1 < \c_@@_rand_four_int
+ \exp_after:wN \use_none:nnnnn
+ \__int_value:w \__int_eval:w
+ \c_@@_rand_four_int + #1 \__int_eval_end:
+ \else:
+ \exp_after:wN \@@_rand_myriads_last:
+ \fi:
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Random floating point}
+%
+% \begin{macro}[EXP, int]{\@@_rand_o:Nw}
+% \begin{macro}[EXP, aux]{\@@_rand_o:, \@@_rand_o:w}
+% First we check that |random| was called without argument. Then get
+% four blocks of four digits.
+% \begin{macrocode}
+\cs_new:Npn \@@_rand_o:Nw ? #1 @
+ {
+ \tl_if_empty:nTF {#1}
+ { \@@_rand_o: }
{
- \__msg_kernel_expandable_error:nn { kernel } { fp-no-random }
+ \__msg_kernel_expandable_error:nnnnn
+ { kernel } { fp-num-args } { rand() } { 0 } { 0 }
\exp_after:wN \c_nan_fp
}
}
+\cs_new:Npn \@@_rand_o:
+ { \@@_parse_o:n { . \@@_rand_myriads:n { xxxx } } }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -130,29 +208,33 @@
% {
% \@@_randint_badarg:w,
% \@@_randint_e:w,
-% \@@_randint_narrow_e:nn,
-% \@@_randint_wide_e:nn,
-% \@@_randint_wide_e:nnn,
+% \@@_randint_e:wnn,
+% \@@_randint_e:wwNnn,
+% \@@_randint_e:wwwNnn,
+% \@@_randint_narrow_e:nnnn,
% \@@_randint_wide_e:nnnn,
+% \@@_randint_wide_e:wnnn,
% }
% Enforce that there is one argument (then add first argument~$1$)
% or two arguments. Enforce that they are integers in
-% $(-10^{16},10^{16})$ and ordered.
-%
-% When the range is narrow (less than $2\times 10^9$) we can
-% directly use the primitive. Otherwise we use the primitive twice.
-% To ensure a uniform distribution we combine two uniformly
-% distributed integers into a total range greater or equal to our
-% target range and try again if the random number ended up being too
-% big.
-%
-% The strange |+\c_six| ensures that the first argument of
-% \cs{@@_randint_wide_e:nnn} is larger than $10^{-8}$ times the
-% difference between the end-points even if these are near
-% $-10^{16}$ and $+10^{16}$ (their difference is rounded to sixteen
-% digits). Note that we cannot just concatenate the two random
-% numbers provided by the engine as that may give an integer up to
-% (almost) $2\times 10^{16}$ which incurs rounding.
+% $(-10^{16},10^{16})$ and ordered. We distinguish narrow ranges
+% (less than $2^{28}$) from wider ones.
+%
+% For narrow ranges, compute the number~$n$ of possible outputs as
+% an integer using \cs{fp_to_int:n}, and reduce a pseudo-random
+% $28$-bit integer~$r$ modulo~$n$. On its own, this is not uniform
+% when $[0,2^{28}-1]$ does not divide evenly into intervals of
+% size~$n$. The auxiliary \cs{@@_randint_e:wwwNnn} discards the
+% pseudo-random integer if it lies in an incomplete interval, and
+% repeats.
+%
+% For wide ranges we use the same code except for the last eight
+% digits which use \cs{@@_rand_myriads:n}. It is not safe to
+% combine the first digits with the last eight as a single string of
+% digits, as this may exceed $16$~digits and be rounded. Instead,
+% we first add the first few digits (times $10^8$) to the lower
+% bound. The result is compared to the upper bound and the process
+% repeats if needed.
% \begin{macrocode}
\cs_new:Npn \@@_randint_o:Nw ? #1 @
{
@@ -186,73 +268,64 @@
\@@_randint_badarg:w #1;
\@@_randint_badarg:w #2;
\fp_compare:nNnTF { #1; } > { #2; } { \c_one } { \c_zero }
- \fp_compare:nNnTF { #1; + 2e9 } < { #2; }
- { \@@_randint_wide_e:nn }
- { \@@_randint_narrow_e:nn }
- { #1; } { #2; }
+ \exp_after:wN \exp_after:wN \exp_after:wN \@@_randint_e:wnn
+ \@@_parse:n { #2; - #1; } { #1; } { #2; }
\or:
\@@_invalid_operation_tl_o:ff
{ randint } { \@@_array_to_clist:n { #1; #2; } }
\exp:w
\fi:
}
-\cs_if_exist:NTF \pdftex_uniformdeviate:D
+\cs_new:Npn \@@_randint_e:wnn #1;
{
- \cs_new:Npn \@@_randint_narrow_e:nn #1#2
- {
- \@@_parse_o:n
- {
- #1 +
- \pdftex_uniformdeviate:D
- \int_eval:n { \fp_to_int:n { #2 - #1 } + \c_one }
- }
- \exp:w
- }
- \cs_new:Npn \@@_randint_wide_e:nn #1 #2
- {
- \exp_args:Nf \@@_randint_wide_e:nnn
- { \fp_to_int:n { ceil ( ( #2 - #1 + \c_six ) * 1e-8 ) } }
- {#1} {#2}
- }
- \cs_new:Npn \@@_randint_wide_e:nnn #1#2#3
- {
- \exp_args:Nf \@@_randint_wide_e:nnnn
- {
- \@@_parse:n
- {
- #2 +
- \pdftex_uniformdeviate:D #1 e 8 +
- \pdftex_uniformdeviate:D 1 0000 0000
- }
- }
- {#1} {#2} {#3}
- }
- \cs_new:Npn \@@_randint_wide_e:nnnn #1#2#3#4
- {
- \fp_compare:nNnTF {#1} > {#4}
- { \@@_randint_wide_e:nnn {#2} {#3} {#4} }
- { \@@_exp_after_o:w #1 \exp:w }
- }
+ \exp_after:wN \@@_randint_e:wwNnn
+ \__int_value:w \@@_rand_uniform: \exp_after:wN ;
+ \exp:w \exp_end_continue_f:w
+ \fp_compare:nNnTF { #1 ; } < \c_@@_rand_size_int
+ { \fp_to_int:n { #1 ; + 1 } ; \@@_randint_narrow_e:nnnn }
+ { \fp_to_int:n { floor(#1 ; * 1e-8 + 1) } ; \@@_randint_wide_e:nnnn }
}
+\cs_new:Npn \@@_randint_e:wwNnn #1 ; #2 ;
{
- \cs_new:Npn \@@_randint_narrow_e:nn #1#2
+ \exp_after:wN \@@_randint_e:wwwNnn
+ \__int_value:w \int_mod:nn {#1} {#2} ; #1 ; #2 ;
+ }
+\cs_new:Npn \@@_randint_e:wwwNnn #1 ; #2 ; #3 ; #4
+ {
+ \int_compare:nNnTF { #2 - #1 + #3 } > \c_@@_rand_size_int
{
- \__msg_kernel_expandable_error:nn { kernel } { fp-no-random }
- \exp_after:wN \c_nan_fp \exp:w
+ \exp_after:wN \@@_randint_e:wwNnn
+ \__int_value:w \@@_rand_uniform: ; #3 ; #4
}
- \cs_new:Npn \@@_randint_wide_e:nn #1#2
+ { #4 {#1} {#3} }
+ }
+\cs_new:Npn \@@_randint_narrow_e:nnnn #1#2#3#4
+ { \@@_parse_o:n { #3 + #1 } \exp:w }
+\cs_new:Npn \@@_randint_wide_e:nnnn #1#2#3#4
+ {
+ \exp_after:wN \exp_after:wN
+ \exp_after:wN \@@_randint_wide_e:wnnn
+ \@@_parse:n { #3 + #1e8 + \@@_rand_myriads:n { xx } }
+ {#2} {#3} {#4}
+ }
+\cs_new:Npn \@@_randint_wide_e:wnnn #1 ; #2#3#4
+ {
+ \fp_compare:nNnTF { #1 ; } > {#4}
{
- \__msg_kernel_expandable_error:nn { kernel } { fp-no-random }
- \exp_after:wN \c_nan_fp \exp:w
+ \exp_after:wN \@@_randint_e:wwNnn
+ \__int_value:w \@@_rand_uniform: ; #2 ;
+ \@@_randint_wide_e:nnnn {#3} {#4}
}
+ { \@@_exp_after_o:w #1 ; \exp:w }
}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
+% End the initial conditional that ensures these commands are only
+% defined in \pdfTeX{} and \LuaTeX{}.
% \begin{macrocode}
-\__msg_kernel_new:nnn { kernel } { fp-no-random }
- { Random~numbers~unavailable }
+ }
% \end{macrocode}
%
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
index 899c1a3bd6b..9f9e0d0f352 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
@@ -1,42 +1,28 @@
% \iffalse meta-comment
%
%% File: l3fp-round.dtx Copyright(C) 2011-2012,2014-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-round.dtx 6750 2016-11-21 01:24:26Z bruno $
+\GetIdInfo$Id: l3fp-round.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Floating-point rounding}
\begin{document}
\DocInput{\jobname.dtx}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
index d273a3e7cba..e6ce10175fa 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
@@ -1,42 +1,28 @@
% \iffalse meta-comment
-%%
+%
%% File: l3fp-traps.dtx Copyright (C) 2011-2014,2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-traps.dtx 6596 2016-06-13 21:29:58Z joseph $
+\GetIdInfo$Id: l3fp-traps.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Floating-point exception trapping}
\begin{document}
\DocInput{\jobname.dtx}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
index 85d8ce0c05f..e1ab93969d5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
@@ -1,42 +1,28 @@
% \iffalse meta-comment
%
%% File: l3fp-trig.dtx Copyright (C) 2011-2014,2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-trig.dtx 6723 2016-10-17 16:42:15Z bruno $
+\GetIdInfo$Id: l3fp-trig.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Floating-point trigonometric functions}
\begin{document}
\DocInput{\jobname.dtx}
@@ -1272,7 +1258,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_atan_Taylor_loop:www #1; #2; #3;
{
- \if_int_compare:w #1 = \c_minus_one
+ \if_int_compare:w #1 = - \c_one
\@@_atan_Taylor_break:w
\fi:
\exp_after:wN \@@_fixed_div_int:wwN \c_@@_one_fixed_tl ; #1;
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
index 2cbbe3e2cb6..ea20f8d1bc8 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
@@ -1,44 +1,30 @@
% \iffalse meta-comment
%
%% File: l3fp.dtx Copyright (C) 2011-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3fp.dtx 6761 2016-11-21 21:48:43Z joseph $
+\GetIdInfo$Id: l3fp.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Floating points}
%</driver|package>
%<*driver>
@@ -91,7 +77,6 @@
% \item Boolean logic: negation $\mathop{!}x$, conjunction
% $x\mathop{\&\&}y$, disjunction $x\mathop{\vert\vert}y$, ternary
% operator $x\mathop{?}y\mathop{:}z$.
-% \item Random numbers: $\mathop{rand}()$, $\mathop{randint}(m,n)$.
% \item Exponentials: $\exp x$, $\ln x$, $x^y$.
% \item Trigonometry: $\sin x$, $\cos x$, $\tan x$, $\cot x$, $\sec
% x$, $\csc x$ expecting their arguments in radians, and
@@ -123,6 +108,8 @@
% ties rounded to an even value by default, towards zero if $t=0$,
% towards $+\infty$ if $t>0$ and towards $-\infty$ if $t<0$. And
% \emph{(not yet)} modulo, and \enquote{quantize}.
+% \item Random numbers: $\mathop{rand}()$, $\mathop{randint}(m,n)$ in
+% \pdfTeX{} and \LuaTeX{} engines.
% \item Constants: \texttt{pi}, \texttt{deg} (one degree in radians).
% \item Dimensions, automatically expressed in points, \emph{e.g.},
% \texttt{pc} is~$12$.
@@ -541,8 +528,8 @@
% \texttt{false}.
% \end{function}
%
-% \begin{function}[added = 2016-11-21, rEXP]
-% {\fp_step_function:nnnN}
+% \begin{function}[added = 2016-11-21, updated = 2016-12-06, rEXP]
+% {\fp_step_function:nnnN, \fp_step_function:nnnc}
% \begin{syntax}
% \cs{fp_step_function:nnnN} \Arg{initial value} \Arg{step} \Arg{final value} \meta{function}
% \end{syntax}
@@ -569,9 +556,14 @@
% [I saw 1.4] \quad
% [I saw 1.5] \quad
% \end{quote}
+% \begin{texnote}
+% Due to rounding, it may happen that adding the \meta{step} to the
+% \meta{value} does not change the \meta{value}; such cases give an
+% error, as they would otherwise lead to an infinite loop.
+% \end{texnote}
% \end{function}
%
-% \begin{function}[added = 2016-11-21]
+% \begin{function}[added = 2016-11-21, updated = 2016-12-06]
% {\fp_step_inline:nnnn}
% \begin{syntax}
% \cs{fp_step_inline:nnnn} \Arg{initial value} \Arg{step} \Arg{final value} \Arg{code}
@@ -1180,20 +1172,36 @@
% $\sqrt{\text{\nan{}}}=\text{\nan{}}$.
% \end{function}
%
-% \begin{function}[added = 2016-11-20]{rand}
+% \begin{function}[added = 2016-12-05]{rand}
% \begin{syntax}
% \cs{fp_eval:n} \{ |rand()| \}
% \end{syntax}
% Produces a pseudo-random floating-point number (multiple of
-% $10^{-16}$) between $0$~included and $1$~excluded.
+% $10^{-16}$) between $0$~included and $1$~excluded. Available in
+% \pdfTeX{} and \LuaTeX{} engines only.
% \begin{texnote}
-% This is a wrapper around \tn{pdfuniformdeviate}. The random seed
-% can be queried using \tn{pdfrandomseed} and set using
-% \tn{pdfsetrandomseed}.
+% This is based on pseudo-random numbers provided by the engine's
+% primitive \tn{pdfuniformdeviate} in \pdfTeX{} and
+% \tn{uniformdeviate} in \LuaTeX{}. The underlying code in
+% \pdfTeX{} and \LuaTeX{} is based on Metapost, which follows an
+% additive scheme recommended in Section 3.6 of \enquote{The Art of
+% Computer Programming, Volume~2}.
+%
+% While we are more careful than \tn{uniformdeviate} to preserve
+% uniformity of the underlying stream of $28$-bit pseudo-random
+% integers, these pseudo-random numbers should of course not be
+% relied upon for serious numerical computations nor cryptography.
+%
+% The random seed can be queried using \tn{pdfrandomseed} and set
+% using \tn{pdfsetrandomseed} (in \LuaTeX{} \tn{randomseed} and
+% \tn{setrandomseed}). While a $32$-bit (signed) integer can be
+% given as a seed, only the absolute value is used and any number
+% beyond $2^{28}$ is divided by an appropriate power of~$2$. We
+% recommend using an integer in $[0,2^{28}-1]$.
% \end{texnote}
% \end{function}
%
-% \begin{function}[added = 2016-11-20]{randint}
+% \begin{function}[added = 2016-12-05]{randint}
% \begin{syntax}
% \cs{fp_eval:n} \{ |randint(| \meta{fpexpr} |)| \}
% \cs{fp_eval:n} \{ |randint(| \meta{fpexpr_1} , \meta{fpexpr_2} |)| \}
@@ -1201,12 +1209,8 @@
% Produces a pseudo-random integer between $1$~and \meta{fpexpr} or
% between \meta{fpexpr_1} and \meta{fpexpr_2} inclusive. The bounds
% must be integers in the range $(-10^{16},10^{16})$ and the first
-% must be smaller or equal to the second.
-% \begin{texnote}
-% This is a wrapper around \tn{pdfuniformdeviate}. The random seed
-% can be queried using \tn{pdfrandomseed} and set using
-% \tn{pdfsetrandomseed}.
-% \end{texnote}
+% must be smaller or equal to the second. See \texttt{rand} for
+% important comments on how these pseudo-random numbers are generated.
% \end{function}
%
% \begin{variable}[tested = m3fp-parse001]{inf, nan}
@@ -1297,8 +1301,6 @@
% \item Hyperbolic functions \texttt{cosh}, \texttt{sinh}, \texttt{tanh}.
% \item Inverse hyperbolics.
% \item Base conversion, input such as \texttt{0xAB.CDEF}.
-% \item Random numbers (pgfmath provides |rnd|, |rand|, |random|), with
-% seed reset at every \cs{fp_set:Nn}.
% \item Factorial (not with |!|), gamma function.
% \item Improve coefficients of the \texttt{sin} and \texttt{tan}
% series.
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
index c2e913ef444..cef7ea6897b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: l3int.dtx Copyright (C) 1990-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3int.dtx 6700 2016-09-07 22:16:49Z bruno $
+\GetIdInfo$Id: l3int.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Integers}
%</driver|package>
%<*driver>
@@ -1313,7 +1300,7 @@
\cs_new_protected:Npn \int_incr:N #1
{ \tex_advance:D #1 \c_one }
\cs_new_protected:Npn \int_decr:N #1
- { \tex_advance:D #1 \c_minus_one }
+ { \tex_advance:D #1 - \c_one }
\cs_new_protected:Npn \int_gincr:N
{ \tex_global:D \int_incr:N }
\cs_new_protected:Npn \int_gdecr:N
@@ -2372,11 +2359,7 @@
%
% \subsection{Constant integers}
%
-% \begin{variable}{\c_minus_one}
-% This is needed early, and so is in \pkg{l3basics}
-% \end{variable}
-%
-% \begin{variable}{\c_zero, \c_sixteen}
+% \begin{variable}{\c_zero}
% Again, in \pkg{l3basics}
% \end{variable}
%
@@ -2384,7 +2367,7 @@
% {
% \c_one, \c_two, \c_three, \c_four, \c_five, \c_six, \c_seven, \c_eight,
% \c_nine, \c_ten, \c_eleven, \c_twelve, \c_thirteen, \c_fourteen,
-% \c_fifteen
+% \c_fifteen, \c_sixteen
% }
% Low-number values not previously defined.
% \begin{macrocode}
@@ -2403,6 +2386,20 @@
\int_const:Nn \c_thirteen { 13 }
\int_const:Nn \c_fourteen { 14 }
\int_const:Nn \c_fifteen { 15 }
+\int_const:Nn \c_sixteen { 16 }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\c_minus_one}
+% The actual allocation mechanism is in \pkg{l3alloc}; it requires
+% \cs{c_one} to be defined. In package mode, reuse \tn{m@ne}.
+% \begin{macrocode}
+%<*package>
+\cs_new_eq:NN \c_minus_one \m@ne
+%</package>
+%<*initex>
+\int_const:Nn \c_minus_one { -1 }
+%</initex>
% \end{macrocode}
% \end{variable}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
index 0f109a3d695..202cc321018 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
-%% File: l3keys.dtx Copyright (C) 2006-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%% File: l3keys.dtx Copyright (C) 2006-2017 The LaTeX3 Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3keys.dtx 6711 2016-09-21 07:04:35Z joseph $
+\GetIdInfo$Id: l3keys.dtx 6811 2017-01-01 08:50:54Z joseph $
{L3 Key-value interfaces}
%</driver|package>
%<*driver>
@@ -320,6 +307,26 @@
% described in Section~\ref{sec:l3keys:selective}.
% \end{function}
%
+% \begin{function}[added = 2016-11-22]{.inherit:n}
+% \begin{syntax}
+% \meta{key} .inherit:n = \Arg{parents}
+% \end{syntax}
+% Specifies that the \meta{key} path should inherit the keys listed
+% as \meta{parents}. For example, with setting
+% \begin{verbatim}
+% \keys_define:n { foo } { test .code:n = \tl_show:n {#1} }
+% \keys_define:n { } { bar .inherit:n = foo }
+% \end{verbatim}
+% setting
+% \begin{verbatim}
+% \keys_set:n { bar } { test = a }
+% \end{verbatim}
+% will be equivalent to
+% \begin{verbatim}
+% \keys_set:n { foo } { test = a }
+% \end{verbatim}
+% \end{function}
+%
% \begin{function}[updated = 2013-07-09]
% {.initial:n, .initial:V, .initial:o, .initial:x}
% \begin{syntax}
@@ -1115,8 +1122,9 @@
% {
% \c_@@_code_root_tl ,
% \c_@@_default_root_tl ,
-% \c_@@_groups_root_tl,
-% \c_@@_info_root_tl ,
+% \c_@@_groups_root_tl ,
+% \c_@@_inherit_root_tl ,
+% \c_@@_type_root_tl ,
% \c_@@_validate_root_tl
% }
% Various storage areas for the different data which make up keys.
@@ -1124,7 +1132,8 @@
\tl_const:Nn \c_@@_code_root_tl { key~code~>~ }
\tl_const:Nn \c_@@_default_root_tl { key~default~>~ }
\tl_const:Nn \c_@@_groups_root_tl { key~groups~>~ }
-\tl_const:Nn \c_@@_info_root_tl { key~info~>~ }
+\tl_const:Nn \c_@@_inherit_root_tl { key~inherit~>~ }
+\tl_const:Nn \c_@@_type_root_tl { key~type~>~ }
\tl_const:Nn \c_@@_validate_root_tl { key~validate~>~ }
% \end{macrocode}
% \end{variable}
@@ -1316,7 +1325,12 @@
{
\str_if_eq:nnTF {#3} { . }
{
- \tl_set:Nx \l_keys_path_tl { \l_@@_module_tl / #1 }
+ \tl_set:Nx \l_keys_path_tl
+ {
+ \tl_if_empty:NF \l_@@_module_tl
+ { \l_@@_module_tl / }
+ #1
+ }
\tl_set:Nn \l_@@_property_tl { . #2 }
}
{
@@ -1376,35 +1390,6 @@
%
% \subsection{Turning properties into actions}
%
-% \begin{macro}[int]{\@@_ensure_exist:n, \@@_ensure_exist:V}
-% Used to make sure that a key implementation and the related property
-% list will exist whenever this is required. We cannot use for example
-% \cs{prop_clear_new:c} here as that would affect the order in which key
-% properties must be set. As key definitions are never global we use
-% |\cs_set_protected:cpn| not |\cs_new_protected:cpn| here. For the
-% same reason, to avoid issues if the key has been undefined in the
-% current scope but exists at a higher level, we do not use \cs{prop_new:c}
-% but rather \cs{prop_set_eq:cN}. The function \cs{__chk_log:x} only
-% writes to the log file if logging all new functions is active: without
-% it keys would not show up (as we are not using \cs[no-index]{..._new}).
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_ensure_exist:n #1
- {
- \prop_if_exist:cF { \c_@@_info_root_tl #1 }
- {
- \prop_set_eq:cN { \c_@@_info_root_tl #1 } \c_empty_prop
- }
-
- \cs_if_exist:cF { \c_@@_code_root_tl #1 }
- {
- \__chk_log:x { Defining~key~#1~ \msg_line_context: }
- \cs_set_protected:cpn { \c_@@_code_root_tl #1 } ##1 { }
- }
- }
-\cs_generate_variant:Nn \@@_ensure_exist:n { V }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}[int]{\@@_bool_set:Nn, \@@_bool_set:cn}
% Boolean keys are really just choices, but all done by hand. The
% second argument here is the scope: either empty or \texttt{ g } for
@@ -1452,13 +1437,10 @@
% \end{macro}
%
% \begin{macro}[int]{\@@_choice_make:, \@@_multichoice_make:}
-% \begin{macro}[int]{\@@_choice_make:N}
+% \begin{macro}[aux]{\@@_choice_make:N}
% \begin{macro}[aux]{\@@_choice_make_aux:N}
-% \begin{macro}[aux]{\@@_parent:n, \@@_parent:o}
-% \begin{macro}[aux]{\@@_parent:wn}
% To make a choice from a key, two steps: set the code, and set the
-% unknown key. There is one point to watch here: choice keys cannot be
-% nested! As multichoices and choices are essentially the same bar one
+% unknown key. As multichoices and choices are essentially the same bar one
% function, the code is given together.
% \begin{macrocode}
\cs_new_protected:Npn \@@_choice_make:
@@ -1467,12 +1449,12 @@
{ \@@_choice_make:N \@@_multichoice_find:n }
\cs_new_protected:Npn \@@_choice_make:N #1
{
- \prop_if_exist:cTF
- { \c_@@_info_root_tl \@@_parent:o \l_keys_path_tl }
+ \cs_if_exist:cTF
+ { \c_@@_type_root_tl \@@_parent:o \l_keys_path_tl }
{
- \prop_get:cnNTF
- { \c_@@_info_root_tl \@@_parent:o \l_keys_path_tl }
- { choice } \l_keys_value_tl
+ \str_if_eq_x:nnTF
+ { \exp_not:v { \c_@@_type_root_tl \@@_parent:o \l_keys_path_tl } }
+ { choice }
{
\__msg_kernel_error:nnxx { kernel } { nested-choice-key }
{ \l_keys_path_tl } { \@@_parent:o \l_keys_path_tl }
@@ -1483,32 +1465,18 @@
}
\cs_new_protected:Npn \@@_choice_make_aux:N #1
{
+ \cs_set_nopar:cpn { \c_@@_type_root_tl \l_keys_path_tl } { choice }
\@@_cmd_set:nn { \l_keys_path_tl } { #1 {##1} }
- \prop_put:cnn { \c_@@_info_root_tl \l_keys_path_tl } { choice }
- { true }
\@@_cmd_set:nn { \l_keys_path_tl / unknown }
{
\__msg_kernel_error:nnxx { kernel } { key-choice-unknown }
{ \l_keys_path_tl } {##1}
}
}
-\cs_new:Npn \@@_parent:n #1
- { \@@_parent:wn #1 / / \q_stop { } }
-\cs_generate_variant:Nn \@@_parent:n { o }
-\cs_new:Npn \@@_parent:wn #1 / #2 / #3 \q_stop #4
- {
- \tl_if_blank:nTF {#2}
- { \use_none:n #4 }
- {
- \@@_parent:wn #2 / #3 \q_stop { #4 / #1 }
- }
- }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \begin{macro}[int]{\@@_choices_make:nn, \@@_multichoices_make:nn}
% \begin{macro}[aux]{\@@_choices_make:Nnn}
@@ -1546,7 +1514,8 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_cmd_set:nn #1#2
{
- \@@_ensure_exist:V \l_keys_path_tl
+ \cs_if_exist:cF { \c_@@_code_root_tl #1 }
+ { \__chk_log:x { Defining~key~#1~\msg_line_context: } }
\cs_set_protected:cpn { \c_@@_code_root_tl #1 } ##1 {#2}
}
\cs_generate_variant:Nn \@@_cmd_set:nn { nx , Vn , Vo }
@@ -1575,27 +1544,39 @@
% \end{macro}
%
% \begin{macro}[int]{\@@_groups_set:n}
-% Assigning a key to one or more groups uses comma lists. So that the comma
-% list is \enquote{well-behaved} later, the storage is done via a stored
-% list here, which does the normalisation.
+% Assigning a key to one or more groups uses comma lists. As the list of
+% groups only exists if there is anything to do, the setting is done using
+% a scratch list. For the usual grouping reasons we use the low-level
+% approach to undefining a list.
% \begin{macrocode}
\cs_new_protected:Npn \@@_groups_set:n #1
{
- \@@_ensure_exist:V \l_keys_path_tl
\clist_set:Nn \l_@@_groups_clist {#1}
\clist_if_empty:NTF \l_@@_groups_clist
{
- \prop_remove:cn { \c_@@_info_root_tl \l_keys_path_tl }
- { groups }
+ \cs_set_eq:cN { \c_@@_groups_root_tl \l_keys_path_tl }
+ \tex_undefined:D
}
{
- \prop_put:cnV { \c_@@_info_root_tl \l_keys_path_tl }
- { groups } \l_@@_groups_clist
+ \clist_set_eq:cN { \c_@@_groups_root_tl \l_keys_path_tl }
+ \l_@@_groups_clist
}
}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}[int]{\@@_inherit:n}
+% Inheritance means ignoring anything already said about the key:
+% zap the lot and set up.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_inherit:n #1
+ {
+ \@@_undefine:
+ \cs_set_nopar:cpn { \c_@@_inherit_root_tl \l_keys_path_tl } {#1}
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}[int]{\@@_initialise:n}
% A set up for initialisation: just run the code if it exists.
% \begin{macrocode}
@@ -1631,7 +1612,7 @@
\cs_new_protected:Npn \@@_undefine:
{
\clist_map_inline:nn
- { code , default , groups , info , validate }
+ { code , default , groups , inherit , type , validate }
{
\cs_set_eq:cN
{ \tl_use:c { c_@@_ ##1 _root_tl } \l_keys_path_tl }
@@ -1866,6 +1847,14 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{.inherit:n}
+% Nothing complex: only one variant at the moment!
+% \begin{macrocode}
+\cs_new_protected:cpn { \c_@@_props_root_tl .inherit:n } #1
+ { \@@_inherit:n {#1} }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{.initial:n, .initial:V, .initial:o, .initial:x}
% The standard hand-off approach.
% \begin{macrocode}
@@ -2143,7 +2132,12 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_set_aux:nnn #1#2#3
{
- \tl_set:Nx \l_keys_path_tl { #1 / \@@_remove_spaces:n {#2} }
+ \tl_set:Nx \l_keys_path_tl
+ {
+ \tl_if_blank:nF {#1}
+ { #1 / }
+ \@@_remove_spaces:n {#2}
+ }
\tl_clear:N \l_@@_module_tl
\exp_after:wN \@@_find_key_module:w \l_keys_path_tl / \q_stop
\@@_value_or_default:n {#3}
@@ -2174,16 +2168,11 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_set_selective:
{
- \prop_if_exist:cTF { \c_@@_info_root_tl \l_keys_path_tl }
+ \cs_if_exist:cTF { \c_@@_groups_root_tl \l_keys_path_tl }
{
- \prop_get:cnNTF { \c_@@_info_root_tl \l_keys_path_tl }
- { groups } \l_@@_groups_clist
- { \@@_check_groups: }
- {
- \bool_if:NTF \l_@@_filtered_bool
- { \@@_execute: }
- { \@@_store_unused: }
- }
+ \clist_set_eq:Nc \l_@@_groups_clist
+ { \c_@@_groups_root_tl \l_keys_path_tl }
+ \@@_check_groups:
}
{
\bool_if:NTF \l_@@_filtered_bool
@@ -2274,23 +2263,41 @@
\bool_if:NTF \l_@@_only_known_bool
{ \@@_store_unused: }
{
- \cs_if_exist:cTF { \c_@@_code_root_tl \l_@@_module_tl / unknown }
+ \cs_if_exist:cTF
+ { \c_@@_inherit_root_tl \@@_parent:o \l_keys_path_tl }
{
- \cs:w \c_@@_code_root_tl \l_@@_module_tl / unknown \exp_after:wN
- \cs_end: \exp_after:wN { \l_keys_value_tl }
+ \clist_map_inline:cn
+ { \c_@@_inherit_root_tl \@@_parent:o \l_keys_path_tl }
+ {
+ \cs_if_exist:cT
+ { \c_@@_code_root_tl ##1 / \l_keys_key_tl }
+ {
+ \cs:w \c_@@_code_root_tl ##1 / \l_keys_key_tl
+ \exp_after:wN \cs_end: \exp_after:wN
+ { \l_keys_value_tl }
+ \clist_map_break:
+ }
+ }
}
{
- \__msg_kernel_error:nnxx { kernel } { key-unknown }
- { \l_keys_path_tl } { \l_@@_module_tl }
+ \cs_if_exist:cTF { \c_@@_code_root_tl \l_@@_module_tl / unknown }
+ {
+ \cs:w \c_@@_code_root_tl \l_@@_module_tl / unknown
+ \exp_after:wN \cs_end: \exp_after:wN { \l_keys_value_tl }
+ }
+ {
+ \__msg_kernel_error:nnxx { kernel } { key-unknown }
+ { \l_keys_path_tl } { \l_@@_module_tl }
+ }
}
- }
+ }
}
\cs_new:Npn \@@_execute:nn #1#2
{
\cs_if_exist:cTF { \c_@@_code_root_tl #1 }
{
- \exp_args:Nc \exp_args:No { \c_@@_code_root_tl #1 }
- \l_keys_value_tl
+ \cs:w \c_@@_code_root_tl #1 \exp_after:wN \cs_end:
+ \exp_after:wN { \l_keys_value_tl }
}
{#2}
}
@@ -2328,6 +2335,25 @@
%
% \subsection{Utilities}
%
+% \begin{macro}[EXP, int]{\@@_parent:n, \@@_parent:o}
+% \begin{macro}[EXP, aux]{\@@_parent:w}
+% Used to strip off the ending part of the key path after the last~|/|.
+% \begin{macrocode}
+\cs_new:Npn \@@_parent:n #1
+ { \@@_parent:w #1 / / \q_stop { } }
+\cs_generate_variant:Nn \@@_parent:n { o }
+\cs_new:Npn \@@_parent:w #1 / #2 / #3 \q_stop #4
+ {
+ \tl_if_blank:nTF {#2}
+ { \use_none:n #4 }
+ {
+ \@@_parent:w #2 / #3 \q_stop { #4 / #1 }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}[EXP, int]{\@@_remove_spaces:n}
% \begin{macro}[EXP, aux]{\@@_remove_spaces:w}
% Removes all spaces from the input which is detokenized as a result.
@@ -2375,7 +2401,7 @@
% \end{macro}
%
% \begin{macro}{\keys_show:nn}
-% \begin{macro}[aux]{\@@_show:NN}
+% \begin{macro}[aux]{\@@_show:N}
% To show a key, test for its existence to issue the correct message
% (same message, but with a |t| or |f| argument, then build the
% control sequences which contain the code and other information
@@ -2389,9 +2415,8 @@
{
\__msg_show_pre:nnxxxx { LaTeX / kernel } { show-key }
{ \@@_remove_spaces:n { #1 / #2 } } { t } { } { }
- \exp_args:Ncc \@@_show:NN
+ \exp_args:Nc \@@_show:N
{ \c_@@_code_root_tl \@@_remove_spaces:n { #1 / #2 } }
- { \c_@@_info_root_tl \@@_remove_spaces:n { #1 / #2 } }
}
{
\__msg_show_pre:nnxxxx { LaTeX / kernel } { show-key }
@@ -2399,7 +2424,7 @@
\__msg_show_wrap:n { }
}
}
-\cs_new_protected:Npn \@@_show:NN #1#2
+\cs_new_protected:Npn \@@_show:N #1
{
\use:x
{
@@ -2407,8 +2432,6 @@
{
\exp_not:N \__msg_show_item_unbraced:nn { code }
{ \token_get_replacement_spec:N #1 }
- \exp_not:n
- { \prop_map_function:NN #2 \__msg_show_item_unbraced:nn }
}
}
}
@@ -2491,20 +2514,6 @@
}
% \end{macrocode}
%
-% \subsection{Deprecated functions}
-%
-% \begin{macro}[deprecated = 2017]{.value_forbidden:}
-% \begin{macro}{.value_required:}
-% Deprecated 2015-07-14.
-% \begin{macrocode}
-\cs_new_protected:cpn { \c_@@_props_root_tl .value_forbidden: }
- { \@@_value_requirement:nn { forbidden } { true } }
-\cs_new_protected:cpn { \c_@@_props_root_tl .value_required: }
- { \@@_value_requirement:nn { required } { true } }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
index 4b751fca13a..c37e446ac83 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: l3luatex.dtx Copyright (C) 2010-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package&tex>
-\GetIdInfo$Id: l3luatex.dtx 6679 2016-08-18 20:54:06Z bruno $
+\GetIdInfo$Id: l3luatex.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Experimental LuaTeX-specific functions}
%</driver|package&tex>
%<*driver>
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index 0900a2a71b0..f44a405ac15 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: l3msg.dtx Copyright (C) 2009-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3msg.dtx 6691 2016-08-19 22:14:26Z bruno $
+\GetIdInfo$Id: l3msg.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Messages}
%</driver|package>
%<*driver>
@@ -1074,7 +1061,7 @@
}
\__iow_with:Nnn \tex_newlinechar:D { `\^^J }
{
- \__iow_with:Nnn \tex_errorcontextlines:D \c_minus_one
+ \__iow_with:Nnn \tex_errorcontextlines:D { - \c_one }
{
\group_begin:
\cs_set_protected:Npn &
@@ -1124,7 +1111,7 @@
% deliberate change by a user this is only set in format mode.
% \begin{macrocode}
%<*initex>
-\int_gset_eq:NN \tex_errorcontextlines:D \c_minus_one
+\int_gset:Nn \tex_errorcontextlines:D { - \c_one }
%</initex>
% \end{macrocode}
%
@@ -2256,7 +2243,7 @@
{
\__iow_with:Nnn \tex_newlinechar:D { 10 }
{
- \__iow_with:Nnn \tex_errorcontextlines:D \c_minus_one
+ \__iow_with:Nnn \tex_errorcontextlines:D { - \c_one }
{
\etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN
{ \exp_after:wN \l_@@_internal_tl }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index 8cb7f99d6c3..3865cbf8ad5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: l3names.dtx Copyright (C) 1990-2016 The LaTeX3 project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3names.dtx 6722 2016-10-13 10:22:35Z joseph $
+\GetIdInfo$Id: l3names.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Namespace for primitives}
%</driver|package>
%<*driver>
@@ -86,11 +73,14 @@
% the primitives. These are named based on the engine which first introduced
% them:
% \begin{itemize}
-% \item[\cs{tex_\ldots}] Introduced by \TeX{} itself;
-% \item[\cs{etex_\ldots}] Introduced by the \eTeX{} extensions;
-% \item[\cs{pdftex_\ldots}] Introduced by \pdfTeX{};
-% \item[\cs{xetex_\ldots}] Introduced by \XeTeX{};
-% \item[\cs{luatex_\ldots}] Introduced by \LuaTeX{}.
+% \item[{\cs[no-index]{tex_\ldots}}] Introduced by \TeX{} itself;
+% \item[{\cs[no-index]{etex_\ldots}}] Introduced by the \eTeX{} extensions;
+% \item[{\cs[no-index]{pdftex_\ldots}}] Introduced by \pdfTeX{};
+% \item[{\cs[no-index]{xetex_\ldots}}] Introduced by \XeTeX{};
+% \item[{\cs[no-index]{luatex_\ldots}}] Introduced by \LuaTeX{};
+% \item[{\cs[no-index]{utex_\ldots}}] Introduced by \XeTeX{} and \LuaTeX{};
+% \item[{\cs[no-index]{ptex_\ldots}}] Introduced by p\TeX{};
+% \item[{\cs[no-index]{uptex_\ldots}}] Introduced by up\TeX{}.
% \end{itemize}
%
% \end{documentation}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx b/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx
index 1dd7223c214..5fa4071258b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx
@@ -1,37 +1,24 @@
% \iffalse meta-comment
%
-%% File: l3oldmodules.dtx Copyright (C) 2014 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%% File: l3oldmodules.dtx Copyright (C) 2014,2016 The LaTeX3 Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver|oldmodules>
\def\ExplFileDate{2014/09/06}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index abe03c06261..320c9d230e7 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
-%% File: l3prg.dtx Copyright (C) 2005-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%% File: l3prg.dtx Copyright (C) 2005-2017 The LaTeX3 Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3prg.dtx 6679 2016-08-18 20:54:06Z bruno $
+\GetIdInfo$Id: l3prg.dtx 6811 2017-01-01 08:50:54Z joseph $
{L3 Control structures}
%</driver|package>
%<*driver>
@@ -1553,15 +1540,6 @@
% \end{macro}
% \end{macro}
%
-% \subsection{Deprecated functions}
-%
-% \begin{macro}[int]{\scan_align_safe_stop:}
-% Deprecated 2015-08-01 for removal after 2016-12-31.
-% \begin{macrocode}
-\cs_new_protected:Npn \scan_align_safe_stop: { }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
index 5513946feef..cb4deb613d7 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: l3prop.dtx Copyright (C) 1990-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3prop.dtx 6685 2016-08-19 16:26:52Z bruno $
+\GetIdInfo$Id: l3prop.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Property lists}
%</driver|package>
%<*driver>
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
index 7fb44625dd3..2516c123615 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
-%% File: l3quark.dtx Copyright (C) 1990-2015 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%% File: l3quark.dtx Copyright (C) 1990-2016 The LaTeX3 Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3quark.dtx 6685 2016-08-19 16:26:52Z bruno $
+\GetIdInfo$Id: l3quark.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Quarks}
%</driver|package>
%<*driver>
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
index 942b6fcdb35..e9079d80701 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: l3seq.dtx Copyright (C) 1990-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3seq.dtx 6685 2016-08-19 16:26:52Z bruno $
+\GetIdInfo$Id: l3seq.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Sequences and stacks}
%</driver|package>
%<*driver>
@@ -1684,7 +1671,7 @@
% \end{macro}
%
% \begin{macro}{\seq_item:Nn, \seq_item:cn}
-% \begin{macro}[aux]{\@@_item:wNn, \@@_item:nnn}
+% \begin{macro}[aux]{\@@_item:wNn, \@@_item:nN, \@@_item:nnn}
% The idea here is to find the offset of the item from the left, then use
% a loop to grab the correct item. If the resulting offset is too large,
% then the stop code |{ ? \__prg_break: } { }| will be used by the auxiliary,
@@ -1695,18 +1682,17 @@
\cs_new:Npn \@@_item:wNn \s_@@ #1 \q_stop #2#3
{
\exp_args:Nf \@@_item:nnn
- {
- \int_eval:n
- {
- \int_compare:nNnT {#3} < \c_zero
- { \seq_count:N #2 + \c_one + }
- #3
- }
- }
+ { \exp_args:Nf \@@_item:nN { \int_eval:n {#3} } #2 }
#1
{ ? \__prg_break: } { }
\__prg_break_point:
}
+\cs_new:Npn \@@_item:nN #1#2
+ {
+ \int_compare:nNnTF {#1} < \c_zero
+ { \int_eval:n { \seq_count:N #2 + \c_one + #1 } }
+ {#1}
+ }
\cs_new:Npn \@@_item:nnn #1#2#3
{
\use_none:n #2
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
index e22e024ef16..838657d7950 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
@@ -2,43 +2,30 @@
%
%% File: l3skip.dtx Copyright (C) 2004-2011 Frank Mittelbach, The LaTeX3 Project
%% (C) 2012-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3skip.dtx 6692 2016-08-19 22:29:47Z bruno $
+\GetIdInfo$Id: l3skip.dtx 6809 2017-01-01 06:33:13Z bruno $
{L3 Dimensions and skips}
%</driver|package>
%<*driver>
@@ -1151,7 +1138,7 @@
}
\cs_new:Npn \@@_abs:N #1
{ \if_meaning:w - #1 \else: \exp_after:wN #1 \fi: }
-\cs_set:Npn \dim_max:nn #1#2
+\cs_new:Npn \dim_max:nn #1#2
{
\dim_use:N \@@_eval:w \exp_after:wN \@@_maxmin:wwN
\dim_use:N \@@_eval:w #1 \exp_after:wN ;
@@ -1159,7 +1146,7 @@
>
\@@_eval_end:
}
-\cs_set:Npn \dim_min:nn #1#2
+\cs_new:Npn \dim_min:nn #1#2
{
\dim_use:N \@@_eval:w \exp_after:wN \@@_maxmin:wwN
\dim_use:N \@@_eval:w #1 \exp_after:wN ;
@@ -1321,7 +1308,7 @@
% |while_do| and |do_while| functions for dimensions. Same as for the
% |int| type only the names have changed.
% \begin{macrocode}
-\cs_set:Npn \dim_while_do:nn #1#2
+\cs_new:Npn \dim_while_do:nn #1#2
{
\dim_compare:nT {#1}
{
@@ -1329,7 +1316,7 @@
\dim_while_do:nn {#1} {#2}
}
}
-\cs_set:Npn \dim_until_do:nn #1#2
+\cs_new:Npn \dim_until_do:nn #1#2
{
\dim_compare:nF {#1}
{
@@ -1337,13 +1324,13 @@
\dim_until_do:nn {#1} {#2}
}
}
-\cs_set:Npn \dim_do_while:nn #1#2
+\cs_new:Npn \dim_do_while:nn #1#2
{
#2
\dim_compare:nT {#1}
{ \dim_do_while:nn {#1} {#2} }
}
-\cs_set:Npn \dim_do_until:nn #1#2
+\cs_new:Npn \dim_do_until:nn #1#2
{
#2
\dim_compare:nF {#1}
@@ -1362,7 +1349,7 @@
% |while_do| and |do_while| functions for dimensions. Same as for the
% |int| type only the names have changed.
% \begin{macrocode}
-\cs_set:Npn \dim_while_do:nNnn #1#2#3#4
+\cs_new:Npn \dim_while_do:nNnn #1#2#3#4
{
\dim_compare:nNnT {#1} #2 {#3}
{
@@ -1370,7 +1357,7 @@
\dim_while_do:nNnn {#1} #2 {#3} {#4}
}
}
-\cs_set:Npn \dim_until_do:nNnn #1#2#3#4
+\cs_new:Npn \dim_until_do:nNnn #1#2#3#4
{
\dim_compare:nNnF {#1} #2 {#3}
{
@@ -1378,13 +1365,13 @@
\dim_until_do:nNnn {#1} #2 {#3} {#4}
}
}
-\cs_set:Npn \dim_do_while:nNnn #1#2#3#4
+\cs_new:Npn \dim_do_while:nNnn #1#2#3#4
{
#4
\dim_compare:nNnT {#1} #2 {#3}
{ \dim_do_while:nNnn {#1} #2 {#3} {#4} }
}
-\cs_set:Npn \dim_do_until:nNnn #1#2#3#4
+\cs_new:Npn \dim_do_until:nNnn #1#2#3#4
{
#4
\dim_compare:nNnF {#1} #2 {#3}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
index 376bcb729fe..ea75d3e69d1 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: l3str.dtx Copyright (C) 2011-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3str.dtx 6692 2016-08-19 22:29:47Z bruno $
+\GetIdInfo$Id: l3str.dtx 6809 2017-01-01 06:33:13Z bruno $
{L3 Strings}
%</driver|package>
%<*driver>
@@ -1333,13 +1320,13 @@
% \begin{macrocode}
\cs_new:Npn \str_head:N { \exp_args:No \str_head:n }
\cs_generate_variant:Nn \str_head:N { c }
-\cs_set:Npn \str_head:n #1
+\cs_new:Npn \str_head:n #1
{
\exp_after:wN \@@_head:w
\tl_to_str:n {#1}
{ { } } ~ \q_stop
}
-\cs_set:Npn \@@_head:w #1 ~ %
+\cs_new:Npn \@@_head:w #1 ~ %
{ \use_i_delimit_by_q_stop:nw #1 { ~ } }
\cs_new:Npn \str_head_ignore_spaces:n #1
{
@@ -1370,13 +1357,13 @@
% \begin{macrocode}
\cs_new:Npn \str_tail:N { \exp_args:No \str_tail:n }
\cs_generate_variant:Nn \str_tail:N { c }
-\cs_set:Npn \str_tail:n #1
+\cs_new:Npn \str_tail:n #1
{
\exp_after:wN \@@_tail_auxi:w
\reverse_if:N \if_charcode:w
\scan_stop: \tl_to_str:n {#1} X X \q_stop
}
-\cs_set:Npn \@@_tail_auxi:w #1 X #2 \q_stop { \fi: #1 }
+\cs_new:Npn \@@_tail_auxi:w #1 X #2 \q_stop { \fi: #1 }
\cs_new:Npn \str_tail_ignore_spaces:n #1
{
\exp_after:wN \@@_tail_auxii:w
@@ -1472,9 +1459,9 @@
{ \utex_char:D \use:c { __str_lookup_ #1 :N } #2 ~ }
}
}
- \cs_set_protected:Npn \@@_lookup_lower:N #1 { \tex_lccode:D `#1 }
- \cs_set_protected:Npn \@@_lookup_upper:N #1 { \tex_uccode:D `#1 }
- \cs_set_eq:NN \@@_lookup_fold:N \@@_lookup_lower:N
+ \cs_new_protected:Npn \@@_lookup_lower:N #1 { \tex_lccode:D `#1 }
+ \cs_new_protected:Npn \@@_lookup_upper:N #1 { \tex_uccode:D `#1 }
+ \cs_new_eq:NN \@@_lookup_fold:N \@@_lookup_lower:N
}
{
\cs_new:Npn \@@_change_case_char_aux:nN #1#2
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
index 6d2e81b4b03..faca036fc44 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
-%% File: l3sys.dtx Copyright (C) 2015 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%% File: l3sys.dtx Copyright (C) 2015-2017 The LaTeX3 Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3sys.dtx 6087 2015-09-25 10:29:53Z joseph $
+\GetIdInfo$Id: l3sys.dtx 6811 2017-01-01 08:50:54Z joseph $
{L3 Experimental system/runtime functions}
%</driver|package>
%<*driver>
@@ -312,39 +299,6 @@
% \end{variable}
% \end{macro}
%
-% \subsection{Deprecated functions}
-%
-% Deprecated 2015-09-07 for removal after 2016-12-31. The older logic supported
-% only three engines so that has to be allowed for.
-% \begin{macrocode}
-\prg_new_eq_conditional:NNn \luatex_if_engine: \sys_if_engine_luatex:
- { T , F , TF , p }
-\prg_new_eq_conditional:NNn \xetex_if_engine: \sys_if_engine_xetex:
- { T , F , TF , p }
-\bool_if:nTF
- {
- \sys_if_engine_luatex_p: ||
- \sys_if_engine_xetex_p:
- }
- {
- \cs_new_eq:NN \pdftex_if_engine:T \use_none:n
- \cs_new_eq:NN \pdftex_if_engine:F \use:n
- \cs_new_eq:NN \pdftex_if_engine:TF \use_ii:nn
- \cs_new_eq:NN \pdftex_if_engine_p: \c_false_bool
- }
- {
- \cs_new_eq:NN \pdftex_if_engine:T \use:n
- \cs_new_eq:NN \pdftex_if_engine:F \use_none:n
- \cs_new_eq:NN \pdftex_if_engine:TF \use_i:nn
- \cs_new_eq:NN \pdftex_if_engine_p: \c_true_bool
- }
-% \end{macrocode}
-%
-% Deprecated 2015-09-19 for removal after 2016-12-31.
-% \begin{macrocode}
-\cs_set_eq:NN \c_job_name_tl \c_sys_jobname_str
-% \end{macrocode}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index d22763484f9..8f1fac513ed 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: l3tl.dtx Copyright (C) 1990-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3tl.dtx 6692 2016-08-19 22:29:47Z bruno $
+\GetIdInfo$Id: l3tl.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Token lists}
%</driver|package>
%<*driver>
@@ -1457,7 +1444,7 @@
\group_begin:
\exp_args:No \etex_everyeof:D { \c_@@_rescan_marker_tl \exp_not:N }
\int_compare:nNnT \tex_endlinechar:D = { 32 }
- { \tex_endlinechar:D \c_minus_one }
+ { \tex_endlinechar:D - \c_one }
\tex_newlinechar:D \tex_endlinechar:D
#3 \scan_stop:
\exp_args:No \@@_set_rescan:n { \tl_to_str:n {#4} }
@@ -1582,7 +1569,7 @@
}
\cs_new_protected:Npn \@@_set_rescan_single_aux:nn #1#2
{
- \tex_endlinechar:D \c_minus_one
+ \tex_endlinechar:D - \c_one
\use:x
{
\exp_not:N \use:n
@@ -2860,7 +2847,7 @@
% \subsection{Using a single item}
%
% \begin{macro}{\tl_item:nn, \tl_item:Nn, \tl_item:cn}
-% \begin{macro}[aux]{\@@_item:nn}
+% \begin{macro}[aux]{\@@_item_aux:nn, \@@_item:nn}
% The idea here is to find the offset of the item from the left, then use
% a loop to grab the correct item. If the resulting offset is too large,
% then \cs{quark_if_recursion_tail_stop:n} terminates the loop, and returns
@@ -2869,18 +2856,17 @@
\cs_new:Npn \tl_item:nn #1#2
{
\exp_args:Nf \@@_item:nn
- {
- \int_eval:n
- {
- \int_compare:nNnT {#2} < \c_zero
- { \tl_count:n {#1} + \c_one + }
- #2
- }
- }
+ { \exp_args:Nf \@@_item_aux:nn { \int_eval:n {#2} } {#1} }
#1
\q_recursion_tail
\__prg_break_point:
}
+\cs_new:Npn \@@_item_aux:nn #1#2
+ {
+ \int_compare:nNnTF {#1} < \c_zero
+ { \int_eval:n { \tl_count:n {#2} + \c_one + #1 } }
+ {#1}
+ }
\cs_new:Npn \@@_item:nn #1#2
{
\__quark_if_recursion_tail_break:nN {#2} \__prg_break:
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index 98aedaa038e..34bdf48ad68 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
@@ -1,43 +1,30 @@
% \iffalse meta-comment
%
%% File: l3token.dtx Copyright (C) 2005-2016 The LaTeX3 Project
-%%
-%% It may be distributed and/or modified under the conditions of the
-%% LaTeX Project Public License (LPPL), either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in the file
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the "l3kernel bundle" (The Work in LPPL)
-%% and all files in that bundle must be distributed together.
-%%
-%% The released version of this bundle is available from CTAN.
-%%
-%% -----------------------------------------------------------------------
-%%
-%% The development version of the bundle can be found at
-%%
-%% http://www.latex-project.org/svnroot/experimental/trunk/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX3 Project.
-%%
-%% -----------------------------------------------------------------------
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This file is part of the "l3kernel bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex3
+%
+% for those people who are interested.
%
%<*driver>
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3token.dtx 6695 2016-09-01 15:38:50Z bruno $
+\GetIdInfo$Id: l3token.dtx 6805 2016-12-28 22:15:52Z joseph $
{L3 Experimental token manipulation}
%</driver|package>
%<*driver>
@@ -128,7 +115,7 @@
%
% \begin{function}[added = 2015-11-12]
% {
-% \char_set_active_eq:nN, \char_set_active_eq:nc
+% \char_set_active_eq:nN, \char_set_active_eq:nc,
% \char_gset_active_eq:nN, \char_gset_active_eq:nc
% }
% \begin{syntax}
@@ -197,7 +184,7 @@
% \begin{verbatim}
% \char_set_catcode_other:N \%
% \end{verbatim}
-% The assignment is local.
+% The assignment is local.
% \end{function}
%
% \begin{function}[updated = 2015-11-11]
@@ -237,7 +224,7 @@
% The first \meta{integer expression}
% is the character code and the second is the category code to apply.
% The setting applies within the current \TeX{} group. In general, the
-% symbolic functions \cs{char_set_catcode_\meta{type}} should be preferred,
+% symbolic functions \cs[no-index]{char_set_catcode_\meta{type}} should be preferred,
% but there are cases where these lower-level functions may be useful.
% \end{function}
%
@@ -1036,10 +1023,15 @@
% identical to the command that was used to select the current font
% (such as \tn{tenrm}) but it differs from it in shape.
% \item A \enquote{frozen} |\relax|, which differs from the primitive in
-% both shape and meaning, is inserted when the closing \tn{fi} of a
+% shape (but has the same meaning), is inserted when the closing \tn{fi} of a
% conditional is encountered before the conditional is evaluated.
-% \item An |\endtemplate| (which expands to |\outer endtemplate:|)
-% can be enountered when peeking ahead at the next token.
+% \item Expanding \tn{noexpand} \meta{token} (when the \meta{token} is
+% expandable) results in an internal token, displayed (temporarily)
+% as \cs{notexpanded: \meta{token}}, whose shape coincides with the
+% \meta{token} and whose meaning differs from \tn{relax}.
+% \item An |\outer endtemplate:| (expanding to another internal token,
+% |end of alignment template|) can be encountered when peeking ahead
+% at the next token.
% \item Tricky programming might access a frozen |\endwrite|.
% \item Some frozen tokens can only be accessed in interactive
% sessions: |\cr|, |\right|, |\endgroup|, |\fi|, |\inaccessible|.
@@ -1347,7 +1339,7 @@
\seq_set_split:Nnn \l_char_special_seq { }
{ \ \" \# \$ \% \& \\ \^ \_ \{ \} \~ }
\seq_new:N \l_char_active_seq
-\seq_set_split:Nnn \l_char_special_seq { }
+\seq_set_split:Nnn \l_char_active_seq { }
{ \" \$ \& \^ \_ \~ }
% \end{macrocode}
% \end{variable}
@@ -1372,7 +1364,6 @@
\cs_new_protected:cpn { #1 :nN } ##1
{
\group_begin:
- \char_set_catcode_active:n { ##1 }
\char_set_lccode:nn { `\^^@ } { ##1 }
\tex_lowercase:D { \group_end: #2 ^^@ }
}
@@ -2110,7 +2101,7 @@
% and \tn{hyphen}, whose meaning is at most two characters.
% This leaves a string terminated by some |:|, and \cs{q_stop}.
%
-% The meaning of each one of the five \tn{...mark} primitives
+% The meaning of each one of the five \tn[no-index]{...mark} primitives
% has the form \meta{letters}|:|\meta{user material}. In other words,
% the first non-letter is a colon. We remove everything after the first
% colon.