summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-12-06 23:56:06 +0000
committerKarl Berry <karl@freefriends.org>2017-12-06 23:56:06 +0000
commitcc862e582aa0dd7c0dee16bb5475394338a07641 (patch)
treeb03dbc5b6657d47f5c61b8fcc26f04a564ad6afd /Master/texmf-dist/source/latex/l3kernel
parent7ffad570b11726b0ca150867d23878fc1a949865 (diff)
l3 (7dec17)
git-svn-id: svn://tug.org/texlive/trunk@46003 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/expl3.dtx31
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3.ins6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx10
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx449
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3box.dtx169
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx428
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3clist.dtx153
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx162
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3color.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx27
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3doc.dtx403
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx246
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3expan.dtx804
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx195
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3final.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3flag.dtx29
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3format.ins6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx38
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx104
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx128
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx26
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx44
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx78
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx46
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx173
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx22
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx38
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx22
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx84
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3int.dtx208
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx16
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3keys.dtx179
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx20
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3msg.dtx413
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx10
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx102
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prop.dtx159
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3quark.dtx21
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3regex.dtx435
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3seq.dtx151
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3skip.dtx277
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3sort.dtx48
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3str.dtx214
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3sys.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx112
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx12
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx238
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx114
52 files changed, 3664 insertions, 3034 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
index 886bb3c1d65..14e40ea9520 100644
--- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver|generic|package>
-\def\ExplFileDate{2017/11/14}%
+\def\ExplFileDate{2017/12/05}%
%</driver|generic|package>
%<*driver>
\documentclass[full]{l3doc}
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -1182,7 +1182,7 @@
]%
% \end{macrocode}
%
-% \begin{macro}[aux]{\expl@create@bool@option}
+% \begin{macro}[int]{\expl@create@bool@option}
% \begin{variable}[int]
% {
% \l@expl@check@declarations@bool ,
@@ -1289,8 +1289,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}[int]{\l__expl_driver_tl}
-% \begin{variable}[int]{\l__expl_native_drivers_bool}
+% \begin{variable}{\l__expl_driver_tl}
+% \begin{variable}{\l__expl_native_drivers_bool}
% With the code now loaded, options can be handled using a real key--value
% interpreter. The \enquote{faked} options are also included so that any
% erroneous input is mopped up (\emph{e.g.}~\texttt{log-function =
@@ -1467,32 +1467,29 @@
}
\cs_set_protected:Npn \box_rotate:Nn #1#2
{ \hbox_set:Nn #1 { \rotatebox {#2} { \box_use:N #1 } } }
- \__debug_patch_args:nNNpn { {#1} { (#2) } { (#3) } }
\cs_set_protected:Npn \box_resize_to_wd_and_ht_plus_dp:Nnn #1#2#3
{
\hbox_set:Nn #1
{
\resizebox *
- { \__dim_eval:w #2 \__dim_eval_end: }
- { \__dim_eval:w #3 \__dim_eval_end: }
+ { \__dim_eval:n {#2} }
+ { \__dim_eval:n {#3} }
{ \box_use:N #1 }
}
}
- \__debug_patch_args:nNNpn { {#1} { (#2) } }
\cs_set_protected:Npn \box_resize_to_ht_plus_dp:Nn #1#2
{
\hbox_set:Nn #1
{
- \resizebox * { ! } { \__dim_eval:w #2 \__dim_eval_end: }
+ \resizebox * { ! } { \__dim_eval:n {#2} }
{ \box_use:N #1 }
}
}
- \__debug_patch_args:nNNpn { {#1} { (#2) } }
\cs_set_protected:Npn \box_resize_to_wd:Nn #1#2
{
\hbox_set:Nn #1
{
- \resizebox * { \__dim_eval:w #2 \__dim_eval_end: } { ! }
+ \resizebox * { \__dim_eval:n {#2} } { ! }
{ \box_use:N #1 }
}
}
@@ -1528,7 +1525,7 @@
% \end{macrocode}
%
% \begin{macro}{\@pushfilename, \@popfilename}
-% \begin{macro}[aux]{\__expl_status_pop:w}
+% \begin{macro}{\__expl_status_pop:w}
% The idea here is to use \LaTeXe{}'s \tn{@pushfilename} and
% \tn{@popfilename} to track the current syntax status. This can be
% achieved by saving the current status flag at each push to a stack,
@@ -1650,7 +1647,7 @@
{\ExplFileDate\space L3 programming layer}%
% \end{macrocode}
%
-% \begin{variable}[aux]{\l@expl@tidy@tl}
+% \begin{variable}[int]{\l@expl@tidy@tl}
% Save the category code of |@| and then set it to \enquote{letter}.
% \begin{macrocode}
\expandafter\edef\csname l@expl@tidy@tl\endcsname
@@ -1679,8 +1676,8 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[aux]{\AtBeginDocument}
-% \begin{macro}[aux]{\expl@AtBeginDocument}
+% \begin{macro}{\AtBeginDocument}
+% \begin{macro}[int]{\expl@AtBeginDocument}
% There are a few uses of \cs{AtBeginDocument} in the package code: the
% easiest way around that is to simply do nothing for these. As
% bundles such as \pkg{miniltx} may have defined \cs{AtBeginDocument}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3.ins b/Master/texmf-dist/source/latex/l3kernel/l3.ins
index 24cf7c8ed85..29f65550cee 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3.ins
+++ b/Master/texmf-dist/source/latex/l3kernel/l3.ins
@@ -7,7 +7,7 @@ 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
+ https://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.
@@ -40,7 +40,7 @@ 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
+ https://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.
@@ -164,7 +164,7 @@ 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
+ https://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.
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
index 26ab6128f1e..1c408f8decc 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -81,7 +81,7 @@
%<@@=alloc>
% \end{macrocode}
%
-% \begin{variable}[int]
+% \begin{variable}
% {
% \g_@@_int_int ,
% \g_@@_dim_int ,
@@ -158,7 +158,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_reg:nNNN}
+% \begin{macro}{\@@_reg:nNNN}
% The allocator itself is modelled somewhat on \LaTeXe{}'s \tn{e@alloc},
% though there is no need to set \tn{allocationnumber}.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index 078db9864a7..120abdb963c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -1259,6 +1259,33 @@
% \cs{cs_if_exist_p:N}, and if not raises a kernel-level error.
% \end{function}
%
+% \begin{function}{\__debug_chk_var_scope:NN}
+% \begin{syntax}
+% \cs{__debug_chk_var_scope:NN} \meta{scope} \meta{var}
+% \end{syntax}
+% Checks the \meta{var} has the correct \meta{scope}, and if not
+% raises a kernel-level error. This function is only created if
+% debugging is enabled. The \meta{scope} is a single letter |l|, |g|,
+% |c| denoting local variables, global variables, or constants. More
+% precisely, if the variable name starts with a letter and an
+% underscore (normal \pkg{expl3} convention) the function checks that
+% this single letter matches the \meta{scope}. Otherwise the function
+% cannot know the scope \meta{var} the first time: instead, it defines
+% |\__debug_chk_/|\meta{var name} to store that information for the
+% next call. Thus, if a given \meta{var} is subject to assignments of
+% different scopes a kernel error will result.
+% \end{function}
+%
+% \begin{function}{\__debug_chk_var_local:N, \__debug_chk_var_global:N}
+% \begin{syntax}
+% \cs{__debug_chk_var_local:N} \meta{var}
+% \cs{__debug_chk_var_global:N} \meta{var}
+% \end{syntax}
+% Applies \cs{__debug_chk_var_exist:N} \meta{var}, then
+% \cs{__debug_chk_var_scope:NN} \meta{scope} \meta{var}, where
+% \meta{scope} is |l| or~|g|.
+% \end{function}
+%
% \begin{function}{\__debug_log:x}
% \begin{syntax}
% \cs{__debug_log:x} \Arg{message text}
@@ -1269,15 +1296,6 @@
% This function is only created if debugging is enabled.
% \end{function}
%
-% \begin{function}{\__debug_suspend_log:, \__debug_resume_log:}
-% \begin{syntax}
-% \cs{__debug_suspend_log:} \ldots{} \cs{__debug_log:x} \ldots{} \cs{__debug_resume_log:}
-% \end{syntax}
-% Any \cs{__debug_log:x} command between \cs{__debug_suspend_log:} and
-% \cs{__debug_resume_log:} is suppressed. These two commands can be
-% nested. These functions are only created if debugging is enabled.
-% \end{function}
-%
% \begin{function}{\__debug_patch:nnNNpn}
% \begin{syntax}
% \cs{__debug_patch:nnNNpn} \Arg{before} \Arg{after}
@@ -1331,6 +1349,25 @@
% counterpart.
% \end{function}
%
+% \begin{function}
+% {\__debug_patch_args:nnnNNpn, \__debug_patch_conditional_args:nnnNNpnn}
+% \begin{syntax}
+% \cs{__debug_patch_args:nnnNNpn} \Arg{before} \Arg{after} \Arg{arguments}
+% \meta{definition} \meta{function} \meta{parameters} \Arg{code}
+% \end{syntax}
+% A combination of \cs{__debug_patch:nnNNpn} and
+% \cs{__debug_patch_args:nNNpn}.
+% \end{function}
+%
+% \begin{function}{\__kernel_check_defined:NT}
+% \begin{syntax}
+% \cs{__kernel_check_defined:NT} \meta{variable} \Arg{true code}
+% \end{syntax}
+% If \meta{variable} is not defined (according to
+% \cs{cs_if_exist:NTF}), this triggers an error, otherwise the
+% \meta{true code} is run.
+% \end{function}
+%
% \begin{function}{\__kernel_register_show:N, \__kernel_register_show:c}
% \begin{syntax}
% \cs{__kernel_register_show:N} \meta{register}
@@ -1744,7 +1781,7 @@
%<@@=debug>
% \end{macrocode}
%
-% \begin{macro}[int]{\@@:TF}
+% \begin{macro}{\@@:TF}
% A more meaningful test of whether debugging is enabled than messing
% up with guards. We can also more easily change the logic in one
% place then. At present, debugging is disabled in the format and in
@@ -1798,15 +1835,59 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}{\debug_suspend:, \debug_resume:}
+% \begin{macro}{\@@_suspended:T}
+% \begin{macro}{\l_@@_suspended_tl}
+% Suspend and resume locally all debug-related errors and logging
+% except deprecation errors. The \cs{debug_suspend:} and \cs{debug_resume:}
+% pairs can be nested. We keep track of nesting in a token list
+% containing a number of periods. At first begin with the
+% \enquote{non-suspended} version of \cs{@@_suspended:T}.
+% \begin{macrocode}
+\@@:TF
+ {
+ \cs_set_nopar:Npn \l_@@_suspended_tl { }
+ \cs_set_protected:Npn \debug_suspend:
+ {
+ \tl_put_right:Nn \l_@@_suspended_tl { . }
+ \cs_set_eq:NN \@@_suspended:T \use:n
+ }
+ \cs_set_protected:Npn \debug_resume:
+ {
+ \tl_set:Nx \l_@@_suspended_tl
+ { \tl_tail:N \l_@@_suspended_tl }
+ \tl_if_empty:NT \l_@@_suspended_tl
+ {
+ \cs_set_eq:NN \@@_suspended:T \use_none:n
+ }
+ }
+ \cs_set:Npn \@@_suspended:T #1 { }
+ }
+ {
+ \cs_set_protected:Npn \debug_suspend: { }
+ \cs_set_protected:Npn \debug_resume: { }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}
% {\@@_check-declarations_on:, \@@_check-declarations_off:}
-% \begin{macro}[int]{\@@_chk_var_exist:N}
-% \begin{macro}[int]{\@@_chk_cs_exist:N, \@@_chk_cs_exist:c}
-% When debugging is enabled these two functions
-% set up \cs{@@_chk_var_exist:N} and
-% \cs{@@_chk_cs_exist:N}, two functions that test (when
-% \texttt{check-declarations} is active) that their argument is
-% defined.
+% \begin{macro}{\@@_chk_var_exist:N}
+% \begin{macro}{\@@_chk_cs_exist:N, \@@_chk_cs_exist:c}
+% \begin{macro}{\@@_chk_var_local:N, \@@_chk_var_global:N}
+% \begin{macro}{\@@_chk_var_scope:NN}
+% When debugging is enabled these two functions set up functions that
+% test their argument (when \texttt{check-declarations} is active)
+% \begin{itemize}
+% \item \cs{@@_chk_var_exist:N} and \cs{@@_chk_cs_exist:N}, two
+% functions that test that their argument is defined;
+% \item \cs{@@_chk_var_scope:NN} that checks that its argument |#2|
+% has scope |#1|.
+% \item \cs{@@_chk_var_local:N} and \cs{@@_chk_var_global:N} that
+% perform both checks.
+% \end{itemize}
% \begin{macrocode}
\@@:TF
{
@@ -1814,6 +1895,7 @@
{
\cs_set_protected:Npn \@@_chk_var_exist:N ##1
{
+ \@@_suspended:T \use_none:nnn
\cs_if_exist:NF ##1
{
\__msg_kernel_error:nnx { kernel } { non-declared-variable }
@@ -1822,17 +1904,38 @@
}
\cs_set_protected:Npn \@@_chk_cs_exist:N ##1
{
+ \@@_suspended:T \use_none:nnn
\cs_if_exist:NF ##1
{
\__msg_kernel_error:nnx { kernel } { command-not-defined }
{ \token_to_str:N ##1 }
}
}
+ \cs_set_protected:Npn \@@_chk_var_scope:NN
+ {
+ \@@_suspended:T \use_none:nnn
+ \@@_chk_var_scope_aux:NN
+ }
+ \cs_set_protected:Npn \@@_chk_var_local:N ##1
+ {
+ \@@_suspended:T \use_none:nnnnn
+ \@@_chk_var_exist:N ##1
+ \@@_chk_var_scope_aux:NN l ##1
+ }
+ \cs_set_protected:Npn \@@_chk_var_global:N ##1
+ {
+ \@@_suspended:T \use_none:nnnnn
+ \@@_chk_var_exist:N ##1
+ \@@_chk_var_scope_aux:NN g ##1
+ }
}
\exp_args:Nc \cs_set_protected:Npn { @@_check-declarations_off: }
{
\cs_set_protected:Npn \@@_chk_var_exist:N ##1 { }
\cs_set_protected:Npn \@@_chk_cs_exist:N ##1 { }
+ \cs_set_protected:Npn \@@_chk_var_local:N ##1 { }
+ \cs_set_protected:Npn \@@_chk_var_global:N ##1 { }
+ \cs_set_protected:Npn \@@_chk_var_scope:NN ##1##2 { }
}
\cs_set_protected:Npn \@@_chk_cs_exist:c
{ \exp_args:Nc \@@_chk_cs_exist:N }
@@ -1847,11 +1950,64 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}{\@@_chk_var_scope_aux:NN}
+% \begin{macro}{\@@_chk_var_scope_aux:Nn}
+% \begin{macro}{\@@_chk_var_scope_aux:NNn}
+% First check whether the name of the variable |#2| starts with
+% \meta{letter}|_|. If it does then pass that letter, the
+% \meta{scope}, and the variable name to
+% \cs{@@_chk_var_scope_aux:NNn}. That function compares the two
+% letters and triggers an error if they differ (the \cs{scan_stop:}
+% case is not reachable here). If the second character was not |_|
+% then pass the same data to the same auxiliary, except for its first
+% argument which is now a control sequence. That control sequence is
+% actually a token list (but to avoid triggering the checking code we
+% manipulate it using \cs{cs_set_nopar:Npn}) containing a single
+% letter \meta{scope} according to what the first assignment to the
+% given variable was.
+% \begin{macrocode}
+\@@:TF
+ {
+ \cs_set_protected:Npn \@@_chk_var_scope_aux:NN #1#2
+ { \exp_args:NNf \@@_chk_var_scope_aux:Nn #1 { \cs_to_str:N #2 } }
+ \cs_set_protected:Npn \@@_chk_var_scope_aux:Nn #1#2
+ {
+ \if:w _ \use_i:nn \use_i_delimit_by_q_stop:nw #2 ? ? \q_stop
+ \exp_after:wN \@@_chk_var_scope_aux:NNn
+ \use_i_delimit_by_q_stop:nw #2 ? \q_stop
+ #1 {#2}
+ \else:
+ \exp_args:Nc \@@_chk_var_scope_aux:NNn
+ { @@_chk_/ #2 }
+ #1 {#2}
+ \fi:
+ }
+ \cs_set_protected:Npn \@@_chk_var_scope_aux:NNn #1#2#3
+ {
+ \if:w #1 #2
+ \else:
+ \if:w #1 \scan_stop:
+ \cs_gset_nopar:Npn #1 {#2}
+ \else:
+ \__msg_kernel_error:nnxxx { kernel } { local-global }
+ {#1} {#2} { \iow_char:N \\ #3 }
+ \fi:
+ \fi:
+ }
+ }
+ { }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}
% {\@@_check-expressions_on:, \@@_check-expressions_off:}
-% \begin{macro}[int]{\@@_chk_expr:nNnN}
-% \begin{macro}[aux]{\@@_chk_expr_aux:nNnN}
+% \begin{macro}{\@@_chk_expr:nNnN}
+% \begin{macro}{\@@_chk_expr_aux:nNnN}
% When debugging is enabled these two functions set
% \cs{@@_chk_expr:nNnN} to test or not whether the given
% expression is valid. The idea is to evaluate the expression within
@@ -1877,6 +2033,7 @@
{
\cs_set:Npn \@@_chk_expr:nNnN ##1##2
{
+ \@@_suspended:T { ##1 \use_none:nnnnnnn }
\exp_after:wN \@@_chk_expr_aux:nNnN
\exp_after:wN { \tex_the:D ##2 ##1 \tex_relax:D }
##2
@@ -1906,48 +2063,25 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_log-functions_on:, \@@_log-functions_off:}
-% \begin{macro}[int]{\@@_log:x, \@@_suspend_log:, \@@_resume_log:}
-% These two functions
-% (corresponding to the \pkg{expl3} option \texttt{log-functions})
-% control whether \cs{@@_log:x} writes to the log file or not.
-% Since \cs{iow_log:x} does not yet have its final definition we do
-% not use \cs{cs_set_eq:NN} (not defined yet anyway). The
-% \cs{@@_suspend_log:} function disables \cs{@@_log:x} until
-% the matching \cs{@@_resume_log:}. These two commands are used
-% to improve the logging for datatypes with multiple parts, currently
-% only coffins. They should come in pairs, which can be nested (this
-% complicates the code here and is currently unused). The function
-% \cs{exp_not:o} is defined in \pkg{l3expan} later on but
-% \cs{@@_suspend_log:} and \cs{@@_resume_log:} are not used
-% before that point. Once everything is defined, turn logging on or
-% off depending on what option was given.
-% When debugging is not enabled, simply produce an error.
+% \begin{macro}{\@@_log-functions_on:, \@@_log-functions_off:}
+% \begin{macro}{\@@_log:x}
+% These two functions (corresponding to the \pkg{expl3} option
+% \texttt{log-functions}) control whether \cs{@@_log:x} writes to the
+% log file or not. Since \cs{iow_log:x} does not yet have its final
+% definition we do not use \cs{cs_set_eq:NN} (not defined yet anyway).
+% Once everything is defined, turn logging on or off depending on what
+% option was given. When debugging is not enabled, simply produce an
+% error.
% \begin{macrocode}
\@@:TF
{
\exp_args:Nc \cs_set_protected:Npn { @@_log-functions_on: }
{
- \cs_set_protected:Npn \@@_log:x { \iow_log:x }
- \cs_set_protected:Npn \@@_suspend_log:
- {
- \cs_set_protected:Npx \@@_resume_log:
- {
- \cs_set_protected:Npn \@@_resume_log:
- { \exp_not:o { \@@_resume_log: } }
- \cs_set_protected:Npn \@@_log:x
- { \exp_not:o { \@@_log:x } }
- }
- \cs_set_protected:Npn \@@_log:x { \use_none:n }
- }
- \cs_set_protected:Npn \@@_resume_log: { }
+ \cs_set_protected:Npn \@@_log:x
+ { \@@_suspended:T \use_none:nn \iow_log:x }
}
\exp_args:Nc \cs_set_protected:Npn { @@_log-functions_off: }
- {
- \cs_set_protected:Npn \@@_log:x { \use_none:n }
- \cs_set_protected:Npn \@@_suspend_log: { }
- \cs_set_protected:Npn \@@_resume_log: { }
- }
+ { \cs_set_protected:Npn \@@_log:x { \use_none:n } }
\tex_ifodd:D \l@expl@log@functions@bool
\use:c { @@_log-functions_on: }
\else:
@@ -1963,7 +2097,7 @@
% \begin{variable}{\g_@@_deprecation_on_tl, \g_@@_deprecation_off_tl}
% Some commands were more recently deprecated and not yet removed;
% only make these into errors if the user requests it. This relies on
-% two token lists, filled up by calls to
+% two token lists, mostly filled up by calls to
% \cs{@@_deprecation:nnNNpn} in each module.
% \begin{macrocode}
\@@:TF
@@ -1980,8 +2114,8 @@
% \end{variable}
% \end{macro}
%
-% \begin{macro}[int]{\@@_deprecation:nnNNpn}
-% \begin{macro}[aux]{\@@_deprecation_aux:nnNnn}
+% \begin{macro}{\@@_deprecation:nnNNpn}
+% \begin{macro}{\@@_deprecation_aux:nnNnn}
% Grab a definition (at present, must be \cs{cs_new_protected:Npn}).
% Add to \cs{g_@@_deprecation_on_tl} some code that makes the
% defined macro |#3| outer (and defines it as an error). Add to
@@ -2034,10 +2168,10 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {\@@_patch:nnNNpn, \@@_patch_conditional:nNNpnn}
-% \begin{macro}[aux]
-% {\@@_patch_aux:nnNNnn, \@@_patch_aux:nNNnnn}
+% \begin{macro}
+% {\@@_patch_aux:nnnn, \@@_patch_auxii:nnnn}
% When debugging is not enabled, \cs{@@_patch:nnNNpn} and
% \cs{@@_patch_conditional:nNNpnn} throw the patch away.
% Otherwise they can be followed by \cs{cs_new:Npn} (or similar), and
@@ -2048,13 +2182,13 @@
\@@:TF
{
\cs_set_protected:Npn \@@_patch:nnNNpn #1#2#3#4#5#
- { \@@_patch_aux:nnNNnn {#1} {#2} #3 #4 {#5} }
+ { \@@_patch_aux:nnnn {#1} {#2} { #3 #4 #5 } }
\cs_set_protected:Npn \@@_patch_conditional:nNNpnn #1#2#3#4#
- { \@@_patch_aux:nNNnnn {#1} #2 #3 {#4} }
- \cs_set_protected:Npn \@@_patch_aux:nnNNnn #1#2#3#4#5#6
- { #3 #4 #5 { #1 #6 #2 } }
- \cs_set_protected:Npn \@@_patch_aux:nNNnnn #1#2#3#4#5#6
- { #2 #3 #4 {#5} { #1 #6 } }
+ { \@@_patch_auxii:nnnn {#1} { #2 #3 #4 } }
+ \cs_set_protected:Npn \@@_patch_aux:nnnn #1#2#3#4
+ { #3 { #1 #4 #2 } }
+ \cs_set_protected:Npn \@@_patch_auxii:nnnn #1#2#3#4
+ { #2 {#3} { #1 #4 } }
}
{
\cs_set_protected:Npn \@@_patch:nnNNpn #1#2 { }
@@ -2064,48 +2198,57 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {\@@_patch_args:nNNpn, \@@_patch_conditional_args:nNNpnn}
-% \begin{macro}[aux]
+% \begin{macro}
+% {\@@_patch_args:nnnNNpn, \@@_patch_conditional_args:nnnNNpnn}
+% \begin{macro}
% {
% \@@_tmp:w,
-% \@@_patch_args_aux:nNNnn,
-% \@@_patch_args_aux:nNNnnn
+% \@@_patch_args_aux:nnnNNnn,
+% \@@_patch_args_aux:nnnNNnnn,
+% \@@_patch_args_aux:nnnn
% }
% See \cs{@@_patch:nnNNpn}. The first argument is something like
% |{#1}{(#2)}|. Define a temporary macro using the \meta{parameters}
% and \meta{code} of the definition that follows, then expand that
% temporary macro in front of the first argument to obtain new
% \meta{code}. Then perform the definition as if that new \meta{code}
-% was directly typed in the file. To make it easy to expand in the
-% definition, treat it as a \enquote{pre}-code to an empty definition.
+% was directly typed in the file.
% \begin{macrocode}
+\cs_set_protected:Npn \@@_patch_args:nNNpn
+ { \@@_patch_args:nnnNNpn { } { } }
+\cs_set_protected:Npn \@@_patch_conditional_args:nNNpnn
+ { \@@_patch_conditional_args:nnnNNpnn { } { } }
\@@:TF
{
- \cs_set_protected:Npn \@@_patch_args:nNNpn #1#2#3#4#
- { \@@_patch_args_aux:nNNnn {#1} #2 #3 {#4} }
- \cs_set_protected:Npn \@@_patch_conditional_args:nNNpnn #1#2#3#4#
- { \@@_patch_args_aux:nNNnnn {#1} #2 #3 {#4} }
- \cs_set_protected:Npn \@@_patch_args_aux:nNNnn #1#2#3#4#5
+ \cs_set_protected:Npn \@@_patch_args:nnnNNpn #1#2#3#4#5#6#
+ { \@@_patch_args_aux:nnnNNnn {#1} {#2} {#3} #4 #5 {#6} }
+ \cs_set_protected:Npn \@@_patch_conditional_args:nnnNNpnn #1#2#3#4#5#6#
+ { \@@_patch_args_aux:nnnNNnnn {#1} {#2} {#3} #4 #5 {#6} }
+ \cs_set_protected:Npn \@@_patch_args_aux:nnnNNnn #1#2#3#4#5#6#7
{
- \cs_set:Npn \@@_tmp:w #4 {#5}
- \exp_after:wN \@@_patch_aux:nnNNnn \exp_after:wN
- { \@@_tmp:w #1 } { } #2 #3 {#4} { }
+ \cs_set:Npn \@@_tmp:w #6 {#7}
+ \exp_after:wN \@@_patch_args_aux:nnnn \exp_after:wN
+ { \@@_tmp:w #3 } { #4 #5 #6 } {#1} {#2}
}
- \cs_set_protected:Npn \@@_patch_args_aux:nNNnnn #1#2#3#4#5#6
+ \cs_set_protected:Npn \@@_patch_args_aux:nnnNNnnn #1#2#3#4#5#6#7#8
{
- \cs_set:Npn \@@_tmp:w #4 {#6}
- \exp_after:wN \@@_patch_aux:nNNnnn \exp_after:wN
- { \@@_tmp:w #1 } #2 #3 {#4} {#5} { }
+ \cs_set:Npn \@@_tmp:w #6 {#8}
+ \exp_after:wN \@@_patch_args_aux:nnnn \exp_after:wN
+ { \@@_tmp:w #3 } { #4 #5 #6 {#7} } {#1} {#2}
}
+ \cs_set_protected:Npn \@@_patch_args_aux:nnnn #1#2#3#4
+ { #2 { #3 #1 #4 } }
}
{
- \cs_set_protected:Npn \@@_patch_args:nNNpn #1 { }
- \cs_set_protected:Npn \@@_patch_conditional_args:nNNpnn #1 { }
+ \cs_set_protected:Npn \@@_patch_args:nnnNNpn #1#2#3 { }
+ \cs_set_protected:Npn \@@_patch_conditional_args:nnnNNpnn #1#2#3 { }
}
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{Conditional processing and definitions}
%
@@ -2161,7 +2304,7 @@
% \prg_set_protected_conditional:Npnn ,
% \prg_new_protected_conditional:Npnn ,
% }
-% \begin{macro}[aux]{\@@_generate_conditional_parm:nnNpnn}
+% \begin{macro}{\@@_generate_conditional_parm:nnNpnn}
% The user functions for the types using parameter text from the
% programmer. The various functions only differ by which function is
% used for the assignment. For those |Npnn| type functions, we must
@@ -2196,7 +2339,7 @@
% \prg_set_protected_conditional:Nnn ,
% \prg_new_protected_conditional:Nnn ,
% }
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_generate_conditional_count:nnNnn ,
% \@@_generate_conditional_count:nnNnnnn
@@ -2243,7 +2386,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_generate_conditional:nnNnnnnn,
% \@@_generate_conditional:nnnnnnw
@@ -2303,7 +2446,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_generate_p_form:wnnnnnn,
% \@@_generate_TF_form:wnnnnnn,
@@ -2359,7 +2502,7 @@
% \end{macro}
%
% \begin{macro}{\prg_set_eq_conditional:NNn, \prg_new_eq_conditional:NNn}
-% \begin{macro}[aux]{\@@_set_eq_conditional:NNNn}
+% \begin{macro}{\@@_set_eq_conditional:NNNn}
% The setting-equal functions. Split both functions and feed
% \Arg{name_1} \Arg{signature_1} \meta{boolean_1}
% \Arg{name_2} \Arg{signature_2} \meta{boolean_2}
@@ -2387,12 +2530,12 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_set_eq_conditional:nnNnnNNw ,
% \@@_set_eq_conditional_loop:nnnnNw
% }
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_set_eq_conditional_p_form:nnn ,
% \@@_set_eq_conditional_TF_form:nnn ,
@@ -2485,7 +2628,7 @@
% \end{macrocode}
%
% \begin{macro}[EXP]{\cs_to_str:N}
-% \begin{macro}[aux, EXP]{\@@_to_str:N, \@@_to_str:w}
+% \begin{macro}[EXP]{\@@_to_str:N, \@@_to_str:w}
% This converts a control sequence into the character string of its
% name, removing the leading escape character. This turns out to be
% a non-trivial matter as there a different cases:
@@ -2549,8 +2692,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP, int]{\@@_split_function:NN}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_split_function:NN}
+% \begin{macro}[EXP]
% {\@@_split_function_auxi:w, \@@_split_function_auxii:w}
% This function takes a function name and splits it into name with
% the escape char removed and argument specification. In addition to
@@ -2597,7 +2740,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP, int]
+% \begin{macro}[EXP]
% {\@@_get_function_name:N, \@@_get_function_signature:N}
% Simple wrappers.
% \begin{macrocode}
@@ -2736,7 +2879,7 @@
% us to generate error messages. The next few definitions here are
% only temporary, they will be redefined later on.
%
-% \begin{macro}[int]
+% \begin{macro}
% {\__msg_kernel_error:nnxx, \__msg_kernel_error:nnx, \__msg_kernel_error:nn}
% If an internal error occurs before \LaTeX3 has loaded \pkg{l3msg} then
% the code should issue a usable if terse error message and halt. This
@@ -2784,7 +2927,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\__chk_if_free_cs:N, \__chk_if_free_cs:c}
+% \begin{macro}{\__chk_if_free_cs:N, \__chk_if_free_cs:c}
% This command is called by \cs{cs_new_nopar:Npn} and \cs{cs_new_eq:NN}
% \emph{etc.}\
% to make sure that the argument sequence is not already in use. If
@@ -2821,7 +2964,7 @@
% \cs_new_protected_nopar:Npn , \cs_new_protected_nopar:Npx ,
% \cs_new_protected:Npn , \cs_new_protected:Npx
% }
-% \begin{macro}[int]{\@@_tmp:w}
+% \begin{macro}{\@@_tmp:w}
% Function which check that the control sequence is free before
% defining it.
% \begin{macrocode}
@@ -2996,8 +3139,8 @@
%<@@=cs>
% \end{macrocode}
%
-% \begin{macro}[int]{\@@_parm_from_arg_count:nnF}
-% \begin{macro}[aux]{\@@_parm_from_arg_count_test:nnF}
+% \begin{macro}{\@@_parm_from_arg_count:nnF}
+% \begin{macro}{\@@_parm_from_arg_count_test:nnF}
% \LaTeX3 provides shorthands to define control sequences and
% conditionals with a simple parameter text, derived directly from the
% signature, or more generally from knowing the number of arguments,
@@ -3015,7 +3158,7 @@
\exp_args:Nx \@@_parm_from_arg_count_test:nnF
{
\exp_after:wN \exp_not:n
- \if_case:w \__int_eval:w (#2) \__int_eval_end:
+ \if_case:w \__int_eval:n {#2}
{ }
\or: { ##1 }
\or: { ##1##2 }
@@ -3050,8 +3193,8 @@
%<@@=cs>
% \end{macrocode}
%
-% \begin{macro}[EXP, int]{\@@_count_signature:N, \@@_count_signature:c}
-% \begin{macro}[aux, EXP]{\@@_count_signature:nnN}
+% \begin{macro}[EXP]{\@@_count_signature:N, \@@_count_signature:c}
+% \begin{macro}[EXP]{\@@_count_signature:nnN}
% Counting the number of tokens in the signature, \emph{i.e.}, the
% number of arguments the function should take. Since this is not
% used in any time-critical function, we simply use \cs{tl_count:n} if
@@ -3301,75 +3444,81 @@
%<@@=kernel>
% \end{macrocode}
%
-% \begin{macro}[int]{\@@_register_show:N, \@@_register_show:c}
-% \begin{macro}[aux]{\@@_register_show_aux:n}
+% \begin{macro}{\@@_check_defined:NT}
+% Error if the variable |#1| is not defined.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_check_defined:NT #1#2
+ {
+ \cs_if_exist:NTF #1
+ {#2}
+ {
+ \__msg_kernel_error:nnx { kernel } { variable-not-defined }
+ { \token_to_str:N #1 }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}
+% {\@@_register_show:N, \@@_register_show:c, \@@_register_log:N, \@@_register_log:c}
+% \begin{macro}{\@@_register_show_aux:NN, \@@_register_show_aux:nNN}
% Simply using the \tn{showthe} primitive does not allow for
-% line-wrapping, so instead use \cs{__msg_show_variable:NNNnn} (defined
-% in \pkg{l3msg}). This checks that the variable exists (using
-% \cs{cs_if_exist:NTF}), then displays the third argument, namely
+% line-wrapping, so instead use \cs{tl_show:n} and \cs{tl_log:n} (defined
+% in \pkg{l3tl} and that performs line-wrapping). This displays
% |>~|\meta{variable}|=|\meta{value}. We expand the value before-hand
% as otherwise some integers (such as \tn{currentgrouplevel} or
% \tn{currentgrouptype}) altered by the line-wrapping code would show
% wrong values.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_register_show:N #1
- { \exp_args:No \@@_register_show_aux:nN { \tex_the:D #1 } #1 }
-\cs_new_protected:Npn \@@_register_show_aux:nN #1#2
- {
- \__msg_show_variable:NNNnn #2 \cs_if_exist:NTF ? { }
- { > ~ \token_to_str:N #2 = #1 }
- }
+\cs_new_protected:Npn \@@_register_show:N
+ { \@@_register_show_aux:NN \tl_show:n }
\cs_new_protected:Npn \@@_register_show:c
{ \exp_args:Nc \@@_register_show:N }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[int]{\@@_register_log:N, \@@_register_log:c}
-% Redirect the output of \cs{@@_register_show:N} to the log.
-% \begin{macrocode}
\cs_new_protected:Npn \@@_register_log:N
- { \__msg_log_next: \@@_register_show:N }
+ { \@@_register_show_aux:NN \tl_log:n }
\cs_new_protected:Npn \@@_register_log:c
{ \exp_args:Nc \@@_register_log:N }
+\cs_new_protected:Npn \@@_register_show_aux:NN #1#2
+ {
+ \@@_check_defined:NT #2
+ {
+ \exp_args:No \@@_register_show_aux:nNN
+ { \tex_the:D #2 } #2 #1
+ }
+ }
+\cs_new_protected:Npn \@@_register_show_aux:nNN #1#2#3
+ { \exp_args:No #3 { \token_to_str:N #2 = #1 } }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\cs_show:N, \cs_show:c}
+% \begin{macro}{\cs_show:N, \cs_show:c, \cs_log:N, \cs_log:c, \@@_show:NN}
% Some control sequences have a very long name or meaning. Thus,
% simply using \TeX{}'s primitive \tn{show} could lead to overlong
% lines. The output of this primitive is mimicked to some extent,
-% then the re-built string is given to \cs{iow_wrap:nnnN} for
+% then the re-built string is given to \cs{tl_show:n} or \cs{tl_log:n} for
% line-wrapping. We must expand the meaning before passing it to the
% wrapping code as otherwise we would wrongly see the definitions that
% are in place there. To get correct escape characters, set the
% \tn{escapechar} in a group; this also localizes the assignment
-% performed by \texttt{x}-expansion. The \cs{cs_show:c} command also
-% converts its argument to a control sequence within a group to avoid
+% performed by \texttt{x}-expansion. The \cs{cs_show:c} and \cs{cs_log:c} commands
+% convert their argument to a control sequence within a group to avoid
% showing \tn{relax} for undefined control sequences.
% \begin{macrocode}
-\cs_new_protected:Npn \cs_show:N #1
+\cs_new_protected:Npn \cs_show:N { \@@_show:NN \tl_show:n }
+\cs_new_protected:Npn \cs_show:c
+ { \group_begin: \exp_args:NNc \group_end: \cs_show:N }
+\cs_new_protected:Npn \cs_log:N { \@@_show:NN \tl_log:n }
+\cs_new_protected:Npn \cs_log:c
+ { \group_begin: \exp_args:NNc \group_end: \cs_log:N }
+\cs_new_protected:Npn \@@_show:NN #1#2
{
\group_begin:
\int_set:Nn \tex_escapechar:D { `\\ }
\exp_args:NNx
\group_end:
- \__msg_show_wrap:n { > ~ \token_to_str:N #1 = \cs_meaning:N #1 }
+ #1 { \token_to_str:N #2 = \cs_meaning:N #2 }
}
-\cs_new_protected:Npn \cs_show:c
- { \group_begin: \exp_args:NNc \group_end: \cs_show:N }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\cs_log:N, \cs_log:c}
-% Use \cs{cs_show:N} or \cs{cs_show:c} after calling
-% \cs{__msg_log_next:} to redirect their output to the log file only.
-% Note that \cs{cs_log:c} is not just a variant of \cs{cs_log:N} as
-% the csname should be turned to a control sequence within a group
-% (see \cs{cs_show:c}).
-% \begin{macrocode}
-\cs_new_protected:Npn \cs_log:N { \__msg_log_next: \cs_show:N }
-\cs_new_protected:Npn \cs_log:c { \__msg_log_next: \cs_show:c }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
index cbe2fa0b9bf..6e43a24ef40 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -22,7 +22,7 @@
%
%<*driver|package>
% \begin{macro}{\GetIdInfo}
-% \begin{macro}[aux]{\GetIdInfoAuxI, \GetIdInfoAuxII, \GetIdInfoAuxIII}
+% \begin{macro}{\GetIdInfoAuxI, \GetIdInfoAuxII, \GetIdInfoAuxIII}
% The idea here is to extract out the information needed from a standard
% \textsc{svn} \texttt{Id} line, but to avoid a line that would get
% changed when the file is checked in. Hence the fact that none of the
@@ -118,7 +118,7 @@
% \end{macro}
%</driver|package>
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -138,7 +138,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
index 74ed05fa0d5..4120bdc39b0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -901,10 +901,12 @@
% \testfile*
% Assigning the contents of a box to be another box.
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \box_set_eq:NN #1#2
{ \tex_setbox:D #1 \tex_copy:D #2 }
-\cs_new_protected:Npn \box_gset_eq:NN
- { \tex_global:D \box_set_eq:NN }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \box_gset_eq:NN #1#2
+ { \tex_global:D \tex_setbox:D #1 \tex_copy:D #2 }
\cs_generate_variant:Nn \box_set_eq:NN { c , Nc , cc }
\cs_generate_variant:Nn \box_gset_eq:NN { c , Nc , cc }
% \end{macrocode}
@@ -926,10 +928,12 @@
% Assigning the contents of a box to be another box.
% This clears the second box globally (that's how \TeX{} does it).
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \box_set_eq_clear:NN #1#2
{ \tex_setbox:D #1 \tex_box:D #2 }
-\cs_new_protected:Npn \box_gset_eq_clear:NN
- { \tex_global:D \box_set_eq_clear:NN }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \box_gset_eq_clear:NN #1#2
+ { \tex_global:D \tex_setbox:D #1 \tex_box:D #2 }
\cs_generate_variant:Nn \box_set_eq_clear:NN { c , Nc , cc }
\cs_generate_variant:Nn \box_gset_eq_clear:NN { c , Nc , cc }
% \end{macrocode}
@@ -973,15 +977,12 @@
% When debugging, the dimension expression |#2| is surrounded by
% parentheses to catch early termination.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { {#1} { (#2) } }
\cs_new_protected:Npn \box_set_dp:Nn #1#2
- { \box_dp:N #1 \__dim_eval:w #2 \__dim_eval_end: }
-\__debug_patch_args:nNNpn { {#1} { (#2) } }
+ { \box_dp:N #1 \__dim_eval:n {#2} }
\cs_new_protected:Npn \box_set_ht:Nn #1#2
- { \box_ht:N #1 \__dim_eval:w #2 \__dim_eval_end: }
-\__debug_patch_args:nNNpn { {#1} { (#2) } }
+ { \box_ht:N #1 \__dim_eval:n {#2} }
\cs_new_protected:Npn \box_set_wd:Nn #1#2
- { \box_wd:N #1 \__dim_eval:w #2 \__dim_eval_end: }
+ { \box_wd:N #1 \__dim_eval:n {#2} }
\cs_generate_variant:Nn \box_set_ht:Nn { c }
\cs_generate_variant:Nn \box_set_dp:Nn { c }
\cs_generate_variant:Nn \box_set_wd:Nn { c }
@@ -1012,18 +1013,14 @@
% When debugging, the dimension expression |#1| is surrounded by
% parentheses to catch early termination.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { { (#1) } {#2} }
\cs_new_protected:Npn \box_move_left:nn #1#2
- { \tex_moveleft:D \__dim_eval:w #1 \__dim_eval_end: #2 }
-\__debug_patch_args:nNNpn { { (#1) } {#2} }
+ { \tex_moveleft:D \__dim_eval:n {#1} #2 }
\cs_new_protected:Npn \box_move_right:nn #1#2
- { \tex_moveright:D \__dim_eval:w #1 \__dim_eval_end: #2 }
-\__debug_patch_args:nNNpn { { (#1) } {#2} }
+ { \tex_moveright:D \__dim_eval:n {#1} #2 }
\cs_new_protected:Npn \box_move_up:nn #1#2
- { \tex_raise:D \__dim_eval:w #1 \__dim_eval_end: #2 }
-\__debug_patch_args:nNNpn { { (#1) } {#2} }
+ { \tex_raise:D \__dim_eval:n {#1} #2 }
\cs_new_protected:Npn \box_move_down:nn #1#2
- { \tex_lower:D \__dim_eval:w #1 \__dim_eval_end: #2 }
+ { \tex_lower:D \__dim_eval:n {#1} #2 }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1087,10 +1084,12 @@
% \testfile*
% Set a box to the previous box.
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \box_set_to_last:N #1
{ \tex_setbox:D #1 \tex_lastbox:D }
-\cs_new_protected:Npn \box_gset_to_last:N
- { \tex_global:D \box_set_to_last:N }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \box_gset_to_last:N #1
+ { \tex_global:D \tex_setbox:D #1 \tex_lastbox:D }
\cs_generate_variant:Nn \box_set_to_last:N { c }
\cs_generate_variant:Nn \box_gset_to_last:N { c }
% \end{macrocode}
@@ -1142,7 +1141,7 @@
%
% \begin{macro}{\box_log:N, \box_log:c}
% \begin{macro}{\box_log:Nnn, \box_log:cnn}
-% \begin{macro}[aux]{\@@_log:nNnn}
+% \begin{macro}{\@@_log:nNnn}
% Getting \TeX{} to write to the log without interruption the run is done by
% altering the interaction mode. For that, the \eTeX{} extensions are needed.
% \begin{macrocode}
@@ -1163,7 +1162,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_show:NNnn, \@@_show:NNff}
+% \begin{macro}{\@@_show:NNnn, \@@_show:NNff}
% The internal auxiliary to actually do the output uses a group to deal
% with breadth and depth values. The \cs{use:n} here gives better output
% appearance. Setting \tn{tracingonline} and \tn{errorcontextlines} is
@@ -1205,9 +1204,12 @@
% \begin{macro}{\hbox_gset:Nn, \hbox_gset:cn}
% \testfile*
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \hbox_set:Nn #1#2
{ \tex_setbox:D #1 \tex_hbox:D { \group_begin: #2 \group_end: } }
-\cs_new_protected:Npn \hbox_gset:Nn { \tex_global:D \hbox_set:Nn }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \hbox_gset:Nn #1#2
+ { \tex_global:D \tex_setbox:D #1 \tex_hbox:D { \group_begin: #2 \group_end: } }
\cs_generate_variant:Nn \hbox_set:Nn { c }
\cs_generate_variant:Nn \hbox_gset:Nn { c }
% \end{macrocode}
@@ -1220,14 +1222,18 @@
% Storing material in a horizontal box with a specified width.
% Again, put the dimension expression in parentheses when debugging.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { {#1} { (#2) } {#3} }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \hbox_set_to_wd:Nnn #1#2#3
{
- \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:w #2 \__dim_eval_end:
+ \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:n {#2}
+ { \group_begin: #3 \group_end: }
+ }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \hbox_gset_to_wd:Nnn #1#2#3
+ {
+ \tex_global:D \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:n {#2}
{ \group_begin: #3 \group_end: }
}
-\cs_new_protected:Npn \hbox_gset_to_wd:Nnn
- { \tex_global:D \hbox_set_to_wd:Nnn }
\cs_generate_variant:Nn \hbox_set_to_wd:Nnn { c }
\cs_generate_variant:Nn \hbox_gset_to_wd:Nnn { c }
% \end{macrocode}
@@ -1241,14 +1247,20 @@
% Storing material in a horizontal box. This type is useful in
% environment definitions.
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \hbox_set:Nw #1
{
\tex_setbox:D #1 \tex_hbox:D
\c_group_begin_token
\group_begin:
}
-\cs_new_protected:Npn \hbox_gset:Nw
- { \tex_global:D \hbox_set:Nw }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \hbox_gset:Nw #1
+ {
+ \tex_global:D \tex_setbox:D #1 \tex_hbox:D
+ \c_group_begin_token
+ \group_begin:
+ }
\cs_generate_variant:Nn \hbox_set:Nw { c }
\cs_generate_variant:Nn \hbox_gset:Nw { c }
\cs_new_protected:Npn \hbox_set_end:
@@ -1266,15 +1278,20 @@
% \begin{macro}{\hbox_gset_to_wd:Nnw, \hbox_gset_to_wd:cnw}
% Combining the above ideas.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { {#1} { (#2) } }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \hbox_set_to_wd:Nnw #1#2
{
- \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:w #2 \__dim_eval_end:
+ \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:n {#2}
+ \c_group_begin_token
+ \group_begin:
+ }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \hbox_gset_to_wd:Nnw #1#2
+ {
+ \tex_global:D \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:n {#2}
\c_group_begin_token
\group_begin:
}
-\cs_new_protected:Npn \hbox_gset_to_wd:Nnw
- { \tex_global:D \hbox_set_to_wd:Nnw }
\cs_generate_variant:Nn \hbox_set_to_wd:Nnw { c }
\cs_generate_variant:Nn \hbox_gset_to_wd:Nnw { c }
% \end{macrocode}
@@ -1286,10 +1303,9 @@
% \testfile*
% Put a horizontal box directly into the input stream.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { { (#1) } {#2} }
\cs_new_protected:Npn \hbox_to_wd:nn #1#2
{
- \tex_hbox:D to \__dim_eval:w #1 \__dim_eval_end:
+ \tex_hbox:D to \__dim_eval:n {#1}
{ \group_begin: #2 \group_end: }
}
\cs_new_protected:Npn \hbox_to_zero:n #1
@@ -1347,10 +1363,9 @@
% \testfile*
% Put a vertical box directly into the input stream.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { { (#1) } {#2} }
\cs_new_protected:Npn \vbox_to_ht:nn #1#2
{
- \tex_vbox:D to \__dim_eval:w #1 \__dim_eval_end:
+ \tex_vbox:D to \__dim_eval:n {#1}
{ \group_begin: #2 \par \group_end: }
}
\cs_new_protected:Npn \vbox_to_zero:n #1
@@ -1367,12 +1382,18 @@
% \testfile*
% Storing material in a vertical box with a natural height.
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \vbox_set:Nn #1#2
{
\tex_setbox:D #1 \tex_vbox:D
{ \group_begin: #2 \par \group_end: }
}
-\cs_new_protected:Npn \vbox_gset:Nn { \tex_global:D \vbox_set:Nn }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \vbox_gset:Nn #1#2
+ {
+ \tex_global:D \tex_setbox:D #1 \tex_vbox:D
+ { \group_begin: #2 \par \group_end: }
+ }
\cs_generate_variant:Nn \vbox_set:Nn { c }
\cs_generate_variant:Nn \vbox_gset:Nn { c }
% \end{macrocode}
@@ -1385,13 +1406,18 @@
% Storing material in a vertical box with a natural height and reference
% point at the baseline of the first object in the box.
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \vbox_set_top:Nn #1#2
{
\tex_setbox:D #1 \tex_vtop:D
{ \group_begin: #2 \par \group_end: }
}
-\cs_new_protected:Npn \vbox_gset_top:Nn
- { \tex_global:D \vbox_set_top:Nn }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \vbox_gset_top:Nn #1#2
+ {
+ \tex_global:D \tex_setbox:D #1 \tex_vtop:D
+ { \group_begin: #2 \par \group_end: }
+ }
\cs_generate_variant:Nn \vbox_set_top:Nn { c }
\cs_generate_variant:Nn \vbox_gset_top:Nn { c }
% \end{macrocode}
@@ -1403,14 +1429,18 @@
% \testfile*
% Storing material in a vertical box with a specified height.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { {#1} { (#2) } {#3} }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \vbox_set_to_ht:Nnn #1#2#3
{
- \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:w #2 \__dim_eval_end:
+ \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:n {#2}
+ { \group_begin: #3 \par \group_end: }
+ }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \vbox_gset_to_ht:Nnn #1#2#3
+ {
+ \tex_global:D \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:n {#2}
{ \group_begin: #3 \par \group_end: }
}
-\cs_new_protected:Npn \vbox_gset_to_ht:Nnn
- { \tex_global:D \vbox_set_to_ht:Nnn }
\cs_generate_variant:Nn \vbox_set_to_ht:Nnn { c }
\cs_generate_variant:Nn \vbox_gset_to_ht:Nnn { c }
% \end{macrocode}
@@ -1424,14 +1454,20 @@
% Storing material in a vertical box. This type is useful in
% environment definitions.
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \vbox_set:Nw #1
{
\tex_setbox:D #1 \tex_vbox:D
\c_group_begin_token
\group_begin:
}
-\cs_new_protected:Npn \vbox_gset:Nw
- { \tex_global:D \vbox_set:Nw }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \vbox_gset:Nw #1
+ {
+ \tex_global:D \tex_setbox:D #1 \tex_vbox:D
+ \c_group_begin_token
+ \group_begin:
+ }
\cs_generate_variant:Nn \vbox_set:Nw { c }
\cs_generate_variant:Nn \vbox_gset:Nw { c }
\cs_new_protected:Npn \vbox_set_end:
@@ -1450,15 +1486,20 @@
% \begin{macro}{\vbox_gset_to_ht:Nnw, \vbox_gset_to_ht:cnw}
% A combination of the above ideas.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { {#1} { (#2) } }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \vbox_set_to_ht:Nnw #1#2
{
- \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:w #2 \__dim_eval_end:
+ \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:n {#2}
+ \c_group_begin_token
+ \group_begin:
+ }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \vbox_gset_to_ht:Nnw #1#2
+ {
+ \tex_global:D \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:n {#2}
\c_group_begin_token
\group_begin:
}
-\cs_new_protected:Npn \vbox_gset_to_ht:Nnw
- { \tex_global:D \vbox_set_to_ht:Nnw }
\cs_generate_variant:Nn \vbox_set_to_ht:Nnw { c }
\cs_generate_variant:Nn \vbox_gset_to_ht:Nnw { c }
% \end{macrocode}
@@ -1482,9 +1523,9 @@
% \testfile*
% Splitting a vertical box in two.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { {#1} {#2} { (#3) } }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \vbox_set_split_to_ht:NNn #1#2#3
- { \tex_setbox:D #1 \tex_vsplit:D #2 to \__dim_eval:w #3 \__dim_eval_end: }
+ { \tex_setbox:D #1 \tex_vsplit:D #2 to \__dim_eval:n {#3} }
% \end{macrocode}
% \end{macro}
%
@@ -1543,9 +1584,9 @@
% \end{variable}
%
% \begin{macro}{\box_rotate:Nn}
-% \begin{macro}[aux]{\@@_rotate:N}
-% \begin{macro}[aux]{\@@_rotate_x:nnN, \@@_rotate_y:nnN}
-% \begin{macro}[aux]
+% \begin{macro}{\@@_rotate:N}
+% \begin{macro}{\@@_rotate_x:nnN, \@@_rotate_y:nnN}
+% \begin{macro}
% {
% \@@_rotate_quadrant_one:, \@@_rotate_quadrant_two:,
% \@@_rotate_quadrant_three:, \@@_rotate_quadrant_four:
@@ -1756,9 +1797,9 @@
%
% \begin{macro}
% {\box_resize_to_wd_and_ht_plus_dp:Nnn, \box_resize_to_wd_and_ht_plus_dp:cnn}
-% \begin{macro}[aux]{\@@_resize_set_corners:N}
-% \begin{macro}[aux]{\@@_resize:N}
-% \begin{macro}[aux]{\@@_resize:NNN}
+% \begin{macro}{\@@_resize_set_corners:N}
+% \begin{macro}{\@@_resize:N}
+% \begin{macro}{\@@_resize:NNN}
% Resizing a box starts by working out the various dimensions of the
% existing box.
% \begin{macrocode}
@@ -1899,7 +1940,7 @@
% \end{macro}
%
% \begin{macro}{\box_scale:Nnn, \box_scale:cnn}
-% \begin{macro}[aux]{\@@_scale_aux:N}
+% \begin{macro}{\@@_scale_aux:N}
% When scaling a box, setting the scaling itself is easy enough. The
% new dimensions are also relatively easy to find, allowing only for
% the need to keep them positive in all cases. Once that is done then
@@ -1942,7 +1983,7 @@
% \box_autosize_to_wd_and_ht_plus_dp:cnn ,
% \box_autosize_to_wd_and_ht_plus_dp:Nnn
% }
-% \begin{macro}[aux]{\@@_autosize:Nnnn}
+% \begin{macro}{\@@_autosize:Nnnn}
% Although autosizing a box uses dimensions, it has more in common in
% implementation with scaling. As such, most of the real work here is
% done elsewhere.
@@ -1969,7 +2010,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_resize_common:N}
+% \begin{macro}{\@@_resize_common:N}
% The main resize function places its input into a box which start
% off with zero width, and includes the handles for engine rescaling.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
index 2ddf658d7a5..00137d96bed 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -94,7 +94,9 @@
% can be used in the \meta{list} are
% \begin{itemize}
% \item \texttt{check-declarations} that checks all \pkg{expl3}
-% variables used were previously declared;
+% variables used were previously declared and that local/global
+% variables (based on their name or on their first assignment) are
+% only locally/globally assigned;
% \item \texttt{check-expressions} that checks integer, dimension,
% skip, and muskip expressions are not terminated prematurely;
% \item \texttt{deprecation} that makes soon-to-be-deprecated commands produce errors;
@@ -107,6 +109,17 @@
% loaded with \texttt{enable-debug} or another option implying it.
% \end{function}
%
+% \begin{function}[added = 2017-11-28]{\debug_suspend:, \debug_resume:}
+% \begin{syntax}
+% \cs{debug_suspend:} \ldots{} \cs{debug_resume:}
+% \end{syntax}
+% Suppress (locally) errors and logging from \texttt{debug} commands,
+% except for the \texttt{deprecation} errors or warnings. These pairs
+% of commands can be nested. This can be used around pieces of code
+% that are known to fail checks, if such failures should be ignored.
+% See for instance \pkg{l3coffins}.
+% \end{function}
+%
% \begin{function}[added = 2017-07-04]{\mode_leave_vertical:}
% \begin{syntax}
% \cs{mode_leave_vertical:}
@@ -357,6 +370,66 @@
% space might be removed as well.
% \end{function}
%
+% \begin{function}[added = 2017-12-04]{\msg_show_eval:Nn, \msg_log_eval:Nn}
+% \begin{syntax}
+% \cs{msg_show_eval:Nn} \meta{function} \Arg{expression}
+% \end{syntax}
+% Shows or logs the \meta{expression} (turned into a string), an equal
+% sign, and the result of applying the \meta{function} to the
+% \Arg{expression} (with \texttt{f}-expansion). For instance, if the
+% \meta{function} is \cs{int_eval:n} and the \meta{expression} is
+% |1+2| then this logs |> 1+2=3.|
+% \end{function}
+%
+% \begin{function}[added = 2017-12-04]
+% {
+% \msg_show:nnnnnn ,
+% \msg_show:nnnnn ,
+% \msg_show:nnnn ,
+% \msg_show:nnn ,
+% \msg_show:nn ,
+% \msg_show:nnxxxx ,
+% \msg_show:nnxxx ,
+% \msg_show:nnxx ,
+% \msg_show:nnx
+% }
+% \begin{syntax}
+% \cs{msg_show:nnnnnn} \Arg{module} \Arg{message} \Arg{arg one} \Arg{arg two} \Arg{arg three} \Arg{arg four}
+% \end{syntax}
+% Issues \meta{module} information \meta{message}, passing \meta{arg
+% one} to \meta{arg four} to the text-creating functions. The
+% information text is shown on the terminal and the \TeX{} run is
+% interrupted in a manner similar to \cs{tl_show:n}. This is used in
+% conjunction with \cs{msg_show_item:n} and similar functions to print
+% complex variable contents completely. If the formatted text does
+% not contain |>~| at the start of a line, an additional line |>~.|
+% will be put at the end. In addition, a final period is added if not
+% present.
+% \end{function}
+%
+% \begin{function}[EXP, added = 2017-12-04]
+% {\msg_show_item:n, \msg_show_item_unbraced:n, \msg_show_item:nn, \msg_show_item_unbraced:nn}
+% \begin{syntax}
+% \cs{seq_map_function:NN} \meta{seq} \cs{msg_show_item:n}
+% \cs{prop_map_function:NN} \meta{prop} \cs{msg_show_item:nn}
+% \end{syntax}
+% Used in the text of messages for \cs{msg_show:nnxxxx} to show or log
+% a list of items or key--value pairs. The one-argument functions are
+% used for sequences, clist or token lists and the others for property
+% lists. These functions turn their arguments to strings.
+% \end{function}
+%
+% \section{Additions to \pkg{l3prg}}
+%
+% \begin{function}[added = 2017-11-28]{\bool_const:Nn, \bool_const:cn}
+% \begin{syntax}
+% \cs{bool_const:Nn} \meta{boolean} \Arg{boolexpr}
+% \end{syntax}
+% Creates a new constant \meta{boolean} or raises an error if the name
+% is already taken. The value of the \meta{boolean} is set globally to
+% the result of evaluating the \meta{boolexpr}.
+% \end{function}
+%
% \section{Additions to \pkg{l3prop}}
%
% \begin{function}[EXP]{\prop_count:N, \prop_count:c}
@@ -402,6 +475,36 @@
% \end{texnote}
% \end{function}
%
+% \begin{function}[added = 2017-11-28]
+% {
+% \prop_set_from_keyval:Nn, \prop_set_from_keyval:cn,
+% \prop_gset_from_keyval:Nn, \prop_gset_from_keyval:cn,
+% }
+% \begin{syntax}
+% \cs{prop_set_from_keyval:Nn} \meta{prop~var}
+% \{
+% \meta{key1} |=| \meta{value1} |,|
+% \meta{key2} |=| \meta{value2} |,| \ldots{}
+% \}
+% \end{syntax}
+% Sets \meta{prop~var} to contain key--value pairs given in the second
+% argument.
+% \end{function}
+%
+% \begin{function}[added = 2017-11-28]
+% {\prop_const_from_keyval:Nn, \prop_const_from_keyval:cn}
+% \begin{syntax}
+% \cs{prop_const_from_keyval:Nn} \meta{prop~var}
+% \{
+% \meta{key1} |=| \meta{value1} |,|
+% \meta{key2} |=| \meta{value2} |,| \ldots{}
+% \}
+% \end{syntax}
+% Creates a new constant \meta{prop~var} or raises an error if the
+% name is already taken. The \meta{prop~var} is set globally to
+% contain key--value pairs given in the second argument.
+% \end{function}
+%
% \section{Additions to \pkg{l3seq}}
%
% \begin{function}[rEXP]
@@ -470,6 +573,16 @@
% \end{texnote}
% \end{function}
%
+% \begin{function}[added = 2017-11-28]
+% {\seq_const_from_clist:Nn, \seq_const_from_clist:cn}
+% \begin{syntax}
+% \cs{seq_const_from_clist:Nn} \meta{seq~var} \Arg{comma-list}
+% \end{syntax}
+% Creates a new constant \meta{seq~var} or raises an error if the name
+% is already taken. The \meta{seq~var} is set globally to contain the
+% items in the \meta{comma list}.
+% \end{function}
+%
% \section{Additions to \pkg{l3skip}}
%
% \begin{function}{\skip_split_finite_else_action:nnNN}
@@ -1027,14 +1140,13 @@
% Trimming from the left- and right-hand edges of the box is easy: kern the
% appropriate parts off each side.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { {#1} { (#2) } {#3} { (#4) } {#5} }
\cs_new_protected:Npn \box_trim:Nnnnn #1#2#3#4#5
{
\hbox_set:Nn \l_@@_internal_box
{
- \tex_kern:D -\__dim_eval:w #2 \__dim_eval_end:
+ \tex_kern:D - \__dim_eval:n {#2}
\box_use:N #1
- \tex_kern:D -\__dim_eval:w #4 \__dim_eval_end:
+ \tex_kern:D - \__dim_eval:n {#4}
}
% \end{macrocode}
% For the height and depth, there is a need to watch the baseline is
@@ -1094,14 +1206,13 @@
% dimensions. As a result, there are some things to watch out for in the
% vertical direction.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { {#1} { (#2) } {#3} { (#4) } {#5} }
\cs_new_protected:Npn \box_viewport:Nnnnn #1#2#3#4#5
{
\hbox_set:Nn \l_@@_internal_box
{
- \tex_kern:D -\__dim_eval:w #2 \__dim_eval_end:
+ \tex_kern:D - \__dim_eval:n {#2}
\box_use:N #1
- \tex_kern:D \__dim_eval:w #4 - \box_wd:N #1 \__dim_eval_end:
+ \tex_kern:D \__dim_eval:n { #4 - \box_wd:N #1 }
}
\dim_compare:nNnTF {#3} < \c_zero_dim
{
@@ -1110,7 +1221,7 @@
\box_move_down:nn \c_zero_dim
{ \box_use:N \l_@@_internal_box }
}
- \box_set_dp:Nn \l_@@_internal_box { -\dim_eval:n {#3} }
+ \box_set_dp:Nn \l_@@_internal_box { - \__dim_eval:n {#3} }
}
{
\hbox_set:Nn \l_@@_internal_box
@@ -1134,7 +1245,7 @@
{
\hbox_set:Nn \l_@@_internal_box
{
- \box_move_up:nn { -\dim_eval:n {#5} }
+ \box_move_up:nn { - \__dim_eval:n {#5} }
{ \box_use:N \l_@@_internal_box }
}
\box_set_ht:Nn \l_@@_internal_box \c_zero_dim
@@ -1152,7 +1263,7 @@
% \end{macrocode}
%
% \begin{macro}{\clist_rand_item:n, \clist_rand_item:N, \clist_rand_item:c}
-% \begin{macro}[aux]{\@@_rand_item:nn}
+% \begin{macro}{\@@_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
@@ -1274,9 +1385,8 @@
\hbox_set:Nn \l_@@_internal_box
{
\tex_kern:D
- \__dim_eval:w
- \l_@@_bounding_shift_dim - \l_@@_left_corner_dim
- \__dim_eval_end:
+ \__dim_eval:n
+ { \l_@@_bounding_shift_dim - \l_@@_left_corner_dim }
\box_move_down:nn { \l_@@_bottom_corner_dim }
{ \box_use:N #1 }
}
@@ -1401,7 +1511,7 @@
% \end{macro}
%
% \begin{macro}{\@@_find_corner_maxima:N}
-% \begin{macro}[aux]{\@@_find_corner_maxima_aux:nn}
+% \begin{macro}{\@@_find_corner_maxima_aux:nn}
% The idea here is to find the extremities of the content of the
% coffin. This is done by looking for the smallest values for the bottom
% and left corners, and the largest values for the top and right
@@ -1433,7 +1543,7 @@
% \end{macro}
%
% \begin{macro}{\@@_find_bounding_shift:}
-% \begin{macro}[aux]{\@@_find_bounding_shift_aux:nn}
+% \begin{macro}{\@@_find_bounding_shift_aux:nn}
% The approach to finding the shift for the bounding box is similar to
% that for the corners. However, there is only one value needed here and
% a fixed input property list, so things are a bit clearer.
@@ -1646,7 +1756,7 @@
%
% \begin{macro}
% {\file_get_mdfive_hash:nN, \file_get_size:nN, \file_get_timestamp:nN}
-% \begin{macro}[aux]{\@@_get_details:nnN}
+% \begin{macro}{\@@_get_details:nnN}
% These are all wrappers around the \pdfTeX{} primitives doing the same
% jobs: as we want consistent file paths to be found, they are all set up
% using \cs{file_get_full_name:nN} and so are non-expandable \texttt{get}
@@ -1723,16 +1833,16 @@
% \begin{macrocode}
\cs_new_protected:Npn \file_if_exist_input:n #1
{
- \file_get_full_name:nN {#1} \l__file_full_name_str
- \str_if_empty:NF \l__file_full_name_str
- { \@@_input:V \l__file_full_name_str }
+ \file_get_full_name:nN {#1} \l_@@_full_name_str
+ \str_if_empty:NF \l_@@_full_name_str
+ { \@@_input:V \l_@@_full_name_str }
}
\cs_new_protected:Npn \file_if_exist_input:nF #1#2
{
- \file_get_full_name:nN {#1} \l__file_full_name_str
- \str_if_empty:NTF \l__file_full_name_str
+ \file_get_full_name:nN {#1} \l_@@_full_name_str
+ \str_if_empty:NTF \l_@@_full_name_str
{#2}
- { \@@_input:V \l__file_full_name_str }
+ { \@@_input:V \l_@@_full_name_str }
}
% \end{macrocode}
% \end{macro}
@@ -1744,17 +1854,17 @@
{ \file_if_exist:nTF and~ \file_input:n }
\cs_new_protected:Npn \file_if_exist_input:nTF #1#2#3
{
- \file_get_full_name:nN {#1} \l__file_full_name_str
- \str_if_empty:NTF \l__file_full_name_str
- {#3} { #2 \@@_input:V \l__file_full_name_str }
+ \file_get_full_name:nN {#1} \l_@@_full_name_str
+ \str_if_empty:NTF \l_@@_full_name_str
+ {#3} { #2 \@@_input:V \l_@@_full_name_str }
}
\__debug_deprecation:nnNNpn { 2017-12-31 }
{ \file_if_exist:nT and~ \file_input:n }
\cs_new_protected:Npn \file_if_exist_input:nT #1#2
{
- \file_get_full_name:nN {#1} \l__file_full_name_str
- \str_if_empty:NF \l__file_full_name_str
- { #2 \@@_input:V \l__file_full_name_str }
+ \file_get_full_name:nN {#1} \l_@@_full_name_str
+ \str_if_empty:NF \l_@@_full_name_str
+ { #2 \@@_input:V \l_@@_full_name_str }
}
% \end{macrocode}
% \end{macro}
@@ -1773,7 +1883,7 @@
% \end{macrocode}
%
% \begin{macro}[EXP]{\int_rand:nn}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_rand:ww, \@@_rand_narrow:n,
% \@@_rand_narrow:nnn, \@@_rand_narrow:nnnn
@@ -1793,12 +1903,16 @@
% \begin{macrocode}
\cs_if_exist:NTF \pdftex_uniformdeviate:D
{
- \__debug_patch_args:nNNpn { { (#1) } { (#2) } }
+ \__debug_patch_args:nNNpn
+ {
+ { \__debug_chk_expr:nNnN {#1} \@@_eval:w { } \int_rand:nn }
+ { \__debug_chk_expr:nNnN {#2} \@@_eval:w { } \int_rand:nn }
+ }
\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 ;
+ \@@_value:w \@@_eval:w #1 \exp_after:wN ;
+ \@@_value:w \@@_eval:w #2 ;
}
\cs_new:Npn \@@_rand:ww #1; #2;
{
@@ -1874,7 +1988,7 @@
% \msg_expandable_error:nnff ,
% \msg_expandable_error:nnf
% }
-% \begin{macro}[aux]{\__msg_expandable_error_module:nn}
+% \begin{macro}{\@@_expandable_error_module:nn}
% Pass to an auxiliary the message to display and the module name
% \begin{macrocode}
\cs_new:Npn \msg_expandable_error:nnnnnn #1#2#3#4#5#6
@@ -1908,6 +2022,73 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\msg_show_eval:Nn, \msg_log_eval:Nn, \@@_show_eval:nnN}
+% A short-hand used for \cs{int_show:n} and similar functions that
+% passes to \cs{tl_show:n} the result of applying |#1| (a
+% function such as \cs{int_eval:n}) to the expression |#2|. The use of
+% \texttt{f}-expansion ensures that |#1| is expanded in the scope in which the
+% show command is called, rather than in the group created by
+% \cs{iow_wrap:nnnN}. This is only important for expressions
+% involving the \tn{currentgrouplevel} or \tn{currentgrouptype}.
+% On the other hand we want the expression to be converted to a string
+% with the usual escape character, hence within the wrapping code.
+% \begin{macrocode}
+\cs_new_protected:Npn \msg_show_eval:Nn #1#2
+ { \exp_args:Nf \@@_show_eval:nnN { #1 {#2} } {#2} \tl_show:n }
+\cs_new_protected:Npn \msg_log_eval:Nn #1#2
+ { \exp_args:Nf \@@_show_eval:nnN { #1 {#2} } {#2} \tl_log:n }
+\cs_new_protected:Npn \@@_show_eval:nnN #1#2#3 { #3 { #2 = #1 } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[EXP]{\msg_show_item:n}
+% \begin{macro}[EXP]{\msg_show_item_unbraced:n}
+% \begin{macro}[EXP]{\msg_show_item:nn}
+% \begin{macro}[EXP]{\msg_show_item_unbraced:nn}
+% Each item in the variable is formatted using one of the following
+% functions. We cannot use |\\| and so on because these short-hands
+% cannot be used inside the arguments of messages, only when defining
+% the messages.
+% \begin{macrocode}
+\cs_new:Npx \msg_show_item:n #1
+ { \iow_newline: > ~ \c_space_tl \exp_not:N \tl_to_str:n { {#1} } }
+\cs_new:Npx \msg_show_item_unbraced:n #1
+ { \iow_newline: > ~ \c_space_tl \exp_not:N \tl_to_str:n {#1} }
+\cs_new:Npx \msg_show_item:nn #1#2
+ {
+ \iow_newline: > \use:nn { ~ } { ~ }
+ \exp_not:N \tl_to_str:n { {#1} }
+ \use:nn { ~ } { ~ } => \use:nn { ~ } { ~ }
+ \exp_not:N \tl_to_str:n { {#2} }
+ }
+\cs_new:Npx \msg_show_item_unbraced:nn #1#2
+ {
+ \iow_newline: > \use:nn { ~ } { ~ }
+ \exp_not:N \tl_to_str:n {#1}
+ \use:nn { ~ } { ~ } => \use:nn { ~ } { ~ }
+ \exp_not:N \tl_to_str:n {#2}
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Additions to \pkg{l3prg}}
+%
+% \begin{macro}[added = 2017-11-28]{\bool_const:Nn, \bool_const:cn}
+% A merger between \cs{tl_const:Nn} and \cs{bool_set:Nn}.
+% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN c #1 } { }
+\cs_new_protected:Npn \bool_const:Nn #1#2
+ {
+ \__chk_if_free_cs:N #1
+ \tex_global:D \tex_chardef:D #1 = \bool_if_p:n {#2}
+ }
+\cs_generate_variant:Nn \bool_const:Nn { c }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Additions to \pkg{l3prop}}
%
% \begin{macrocode}
@@ -1915,7 +2096,7 @@
% \end{macrocode}
%
% \begin{macro}[EXP]{\prop_count:N, \prop_count:c}
-% \begin{macro}[aux,EXP]{\@@_count:nn}
+% \begin{macro}[EXP]{\@@_count:nn}
% Counting the key--value pairs in a property list is done using the
% same approach as for other count functions: turn each entry into a
% \texttt{+1} then use integer evaluation to actually do the
@@ -1936,7 +2117,7 @@
% \end{macro}
%
% \begin{macro}[rEXP]{\prop_map_tokens:Nn, \prop_map_tokens:cn}
-% \begin{macro}[aux]{\@@_map_tokens:nwwn}
+% \begin{macro}{\@@_map_tokens:nwwn}
% The mapping is very similar to \cs{prop_map_function:NN}. It grabs
% one key--value pair at a time, and stops when reaching the marker
% key \cs{q_recursion_tail}, which cannot appear in normal keys since
@@ -1966,7 +2147,7 @@
%
% \begin{macro}[EXP]
% {\prop_rand_key_value:N, \prop_rand_key_value:c}
-% \begin{macro}[aux, EXP]{\@@_rand:NN, \@@_rand_item:Nw}
+% \begin{macro}[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
@@ -2008,7 +2189,7 @@
% \seq_mapthread_function:NNN, \seq_mapthread_function:NcN,
% \seq_mapthread_function:cNN, \seq_mapthread_function:ccN
% }
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_mapthread_function:wNN, \@@_mapthread_function:wNw,
% \@@_mapthread_function:Nnnwnn
@@ -2052,7 +2233,7 @@
% \end{macro}
%
% \begin{macro}{\seq_set_filter:NNn, \seq_gset_filter:NNn}
-% \begin{macro}[aux]{\@@_set_filter:NNNn}
+% \begin{macro}{\@@_set_filter:NNNn}
% Similar to \cs{seq_map_inline:Nn}, without a
% \cs{__prg_break_point:} because the user's code
% is performed within the evaluation of a boolean expression,
@@ -2076,7 +2257,7 @@
% \end{macro}
%
% \begin{macro}{\seq_set_map:NNn, \seq_gset_map:NNn}
-% \begin{macro}[aux]{\@@_set_map:NNNn}
+% \begin{macro}{\@@_set_map:NNNn}
% Very similar to \cs{seq_set_filter:NNn}. We could actually
% merge the two within a single function, but it would have weird
% semantics.
@@ -2107,6 +2288,18 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\seq_const_from_clist:Nn, \seq_const_from_clist:cn}
+% Almost identical to \cs{seq_set_from_clist:Nn}.
+% \begin{macrocode}
+\cs_new_protected:Npn \seq_const_from_clist:Nn #1#2
+ {
+ \tl_const:Nx #1
+ { \s_@@ \clist_map_function:nN {#2} \@@_wrap_item:n }
+ }
+\cs_generate_variant:Nn \seq_const_from_clist:Nn { c }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Additions to \pkg{l3skip}}
%
% \begin{macrocode}
@@ -2170,9 +2363,8 @@
% \begin{macro}{\sys_gset_rand_seed:n}
% The primitive always assigns the seed globally.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { { (#1) } }
\cs_new_protected:Npn \sys_gset_rand_seed:n #1
- { \pdftex_setrandomseed:D \__int_eval:w #1 \__int_eval_end: }
+ { \pdftex_setrandomseed:D \__int_eval:n {#1} }
% \end{macrocode}
% \end{macro}
%
@@ -2332,7 +2524,7 @@
% \end{macro}
%
% \begin{macro}[EXP]{\tl_reverse_tokens:n}
-% \begin{macro}[EXP,aux]{\@@_reverse_group:nn}
+% \begin{macro}[EXP]{\@@_reverse_group:nn}
% The same as \cs{tl_reverse:n} but with recursion within brace groups.
% \begin{macrocode}
\cs_new:Npn \tl_reverse_tokens:n #1
@@ -2356,7 +2548,7 @@
}
% \end{macrocode}
% \end{macro}
-% \begin{macro}[EXP,aux]{\@@_act_group_recurse:Nnn}
+% \begin{macro}[EXP]{\@@_act_group_recurse:Nnn}
% In many applications of \cs{@@_act:NNNnn}, we need to recursively
% apply some transformation within brace groups, then output. In this
% code, |#1| is the output function, |#2| is the transformation,
@@ -2372,7 +2564,7 @@
% \end{macro}
%
% \begin{macro}[EXP]{\tl_count_tokens:n}
-% \begin{macro}[EXP,aux]{\@@_act_count_normal:nN,
+% \begin{macro}[EXP]{\@@_act_count_normal:nN,
% \@@_act_count_group:nn, \@@_act_count_space:n}
% The token count is computed through an \cs{int_eval:n} construction.
% Each \texttt{1+} is output to the \emph{left}, into the integer
@@ -2405,8 +2597,8 @@
% \tl_set_from_file:Nnn, \tl_set_from_file:cnn,
% \tl_gset_from_file:Nnn, \tl_gset_from_file:cnn
% }
-% \begin{macro}[aux]{\@@_set_from_file:NNnn}
-% \begin{macro}[aux]{\@@_from_file_do:w}
+% \begin{macro}{\@@_set_from_file:NNnn}
+% \begin{macro}{\@@_from_file_do:w}
% The approach here is similar to that for doing a rescan, and so the same
% internals can be reused. Thus the plan is to insert a pair of tokens of
% the same charcode but different catcodes after the file has been read.
@@ -2450,7 +2642,7 @@
% \tl_set_from_file_x:Nnn, \tl_set_from_file_x:cnn,
% \tl_gset_from_file_x:Nnn, \tl_gset_from_file_x:cnn
% }
-% \begin{macro}[aux]{\@@_set_from_file_x:NNnn}
+% \begin{macro}{\@@_set_from_file_x:NNnn}
% When reading a file and allowing expansion of the content, the set up
% only needs to prevent \TeX{} complaining about the end of the file. That
% is done simply, with a group then used to trap the definition needed.
@@ -2512,10 +2704,10 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_change_case:nnn}
-% \begin{macro}[aux, EXP]{\@@_change_case_aux:nnn}
-% \begin{macro}[aux, EXP]{\@@_change_case_loop:wnn}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_change_case:nnn}
+% \begin{macro}[EXP]{\@@_change_case_aux:nnn}
+% \begin{macro}[EXP]{\@@_change_case_loop:wnn}
+% \begin{macro}[EXP]
% {
% \@@_change_case_output:nwn ,
% \@@_change_case_output:Vwn ,
@@ -2523,58 +2715,58 @@
% \@@_change_case_output:vwn ,
% \@@_change_case_output:fwn ,
% }
-% \begin{macro}[aux, EXP]{\@@_change_case_end:wn}
-% \begin{macro}[aux, EXP]{\@@_change_case_group:nwnn}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_change_case_end:wn}
+% \begin{macro}[EXP]{\@@_change_case_group:nwnn}
+% \begin{macro}[EXP]
% {
% \@@_change_case_group_lower:nnnn ,
% \@@_change_case_group_upper:nnnn ,
% \@@_change_case_group_mixed:nnnn
% }
-% \begin{macro}[aux, EXP]{\@@_change_case_space:wnn}
-% \begin{macro}[aux, EXP]{\@@_change_case_N_type:Nwnn}
-% \begin{macro}[aux, EXP]{\@@_change_case_N_type:NNNnnn}
-% \begin{macro}[aux, EXP]{\@@_change_case_math:NNNnnn}
-% \begin{macro}[aux, EXP]{\@@_change_case_math_loop:wNNnn}
-% \begin{macro}[aux, EXP]{\@@_change_case_math:NwNNnn}
-% \begin{macro}[aux, EXP]{\@@_change_case_math_group:nwNNnn}
-% \begin{macro}[aux, EXP]{\@@_change_case_math_space:wNNnn}
-% \begin{macro}[aux, EXP]{\@@_change_case_N_type:Nnnn}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_change_case_space:wnn}
+% \begin{macro}[EXP]{\@@_change_case_N_type:Nwnn}
+% \begin{macro}[EXP]{\@@_change_case_N_type:NNNnnn}
+% \begin{macro}[EXP]{\@@_change_case_math:NNNnnn}
+% \begin{macro}[EXP]{\@@_change_case_math_loop:wNNnn}
+% \begin{macro}[EXP]{\@@_change_case_math:NwNNnn}
+% \begin{macro}[EXP]{\@@_change_case_math_group:nwNNnn}
+% \begin{macro}[EXP]{\@@_change_case_math_space:wNNnn}
+% \begin{macro}[EXP]{\@@_change_case_N_type:Nnnn}
+% \begin{macro}[EXP]
% {
% \@@_change_case_char_lower:Nnn ,
% \@@_change_case_char_upper:Nnn ,
% \@@_change_case_char_mixed:Nnn
% }
-% \begin{macro}[aux, EXP]{\@@_change_case_char:nN}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_change_case_char:nN}
+% \begin{macro}[EXP]
% {\@@_change_case_char_auxi:nN, \@@_change_case_char_auxii:nN}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_change_case_char_mixed:N,
% \@@_change_case_char_lower:N,
% \@@_change_case_char_upper:N
% }
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_lookup_mixed:N, \@@_lookup_lower:N, \@@_lookup_upper:N}
-% \begin{macro}[aux, EXP]{\@@_change_case_char_UTFviii:nNN}
-% \begin{macro}[aux, EXP]{\@@_change_case_char_UTFviii:nNNN}
-% \begin{macro}[aux, EXP]{\@@_change_case_char_UTFviii:nNNNN}
-% \begin{macro}[aux, EXP]{\@@_change_case_char_UTFviii:nn}
-% \begin{macro}[aux, EXP]{\@@_change_case_cs_letterlike:Nn}
-% \begin{macro}[aux, EXP]{\@@_change_case_cs_letterlike:NnN}
-% \begin{macro}[aux, EXP]{\@@_change_case_cs_accents:NN}
-% \begin{macro}[aux, EXP]{\@@_change_case_cs:N}
-% \begin{macro}[aux, EXP]{\@@_change_case_cs:NN}
-% \begin{macro}[aux, EXP]{\@@_change_case_cs:NNn}
-% \begin{macro}[aux, EXP]{\@@_change_case_protect:wNN}
-% \begin{macro}[aux, EXP]{\@@_change_case_if_expandable:NTF}
-% \begin{macro}[aux, EXP]{\@@_change_case_cs_expand:Nnw}
-% \begin{macro}[aux, EXP]{\@@_change_case_cs_expand:NN}
-% \begin{macro}[aux, EXP]{\@@_change_case_mixed_skip:N}
-% \begin{macro}[aux, EXP]{\@@_change_case_mixed_skip:NN}
-% \begin{macro}[aux, EXP]{\@@_change_case_mixed_skip_tidy:Nwn}
-% \begin{macro}[aux, EXP]{\@@_change_case_mixed_switch:w}
+% \begin{macro}[EXP]{\@@_change_case_char_UTFviii:nNN}
+% \begin{macro}[EXP]{\@@_change_case_char_UTFviii:nNNN}
+% \begin{macro}[EXP]{\@@_change_case_char_UTFviii:nNNNN}
+% \begin{macro}[EXP]{\@@_change_case_char_UTFviii:nn}
+% \begin{macro}[EXP]{\@@_change_case_cs_letterlike:Nn}
+% \begin{macro}[EXP]{\@@_change_case_cs_letterlike:NnN}
+% \begin{macro}[EXP]{\@@_change_case_cs_accents:NN}
+% \begin{macro}[EXP]{\@@_change_case_cs:N}
+% \begin{macro}[EXP]{\@@_change_case_cs:NN}
+% \begin{macro}[EXP]{\@@_change_case_cs:NNn}
+% \begin{macro}[EXP]{\@@_change_case_protect:wNN}
+% \begin{macro}[EXP]{\@@_change_case_if_expandable:NTF}
+% \begin{macro}[EXP]{\@@_change_case_cs_expand:Nnw}
+% \begin{macro}[EXP]{\@@_change_case_cs_expand:NN}
+% \begin{macro}[EXP]{\@@_change_case_mixed_skip:N}
+% \begin{macro}[EXP]{\@@_change_case_mixed_skip:NN}
+% \begin{macro}[EXP]{\@@_change_case_mixed_skip_tidy:Nwn}
+% \begin{macro}[EXP]{\@@_change_case_mixed_switch:w}
% The mechanism for the core conversion of case is based on the idea that
% we can use a loop to grab the entire token list plus a quark: the latter is
% used as an end marker and to avoid any brace stripping. Depending on the
@@ -3114,10 +3306,10 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_change_case_lower_sigma:Nnw}
-% \begin{macro}[aux, EXP]{\@@_change_case_lower_sigma:w}
-% \begin{macro}[aux, EXP]{\@@_change_case_lower_sigma:Nw}
-% \begin{macro}[aux, EXP]{\@@_change_case_upper_sigma:Nnw}
+% \begin{macro}[EXP]{\@@_change_case_lower_sigma:Nnw}
+% \begin{macro}[EXP]{\@@_change_case_lower_sigma:w}
+% \begin{macro}[EXP]{\@@_change_case_lower_sigma:Nw}
+% \begin{macro}[EXP]{\@@_change_case_upper_sigma:Nnw}
% If the current char is an upper case sigma, the a check is made on the next
% item in the input. If it is \texttt{N}-type and not a control sequence
% then there is a look-ahead phase.
@@ -3161,12 +3353,12 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_change_case_lower_tr:Nnw}
-% \begin{macro}[aux, EXP]{\@@_change_case_lower_tr_auxi:Nw}
-% \begin{macro}[aux, EXP]{\@@_change_case_lower_tr_auxii:Nw}
-% \begin{macro}[aux, EXP]{\@@_change_case_upper_tr:Nnw}
-% \begin{macro}[aux, EXP]{\@@_change_case_lower_az:Nnw}
-% \begin{macro}[aux, EXP]{\@@_change_case_upper_az:Nnw}
+% \begin{macro}[EXP]{\@@_change_case_lower_tr:Nnw}
+% \begin{macro}[EXP]{\@@_change_case_lower_tr_auxi:Nw}
+% \begin{macro}[EXP]{\@@_change_case_lower_tr_auxii:Nw}
+% \begin{macro}[EXP]{\@@_change_case_upper_tr:Nnw}
+% \begin{macro}[EXP]{\@@_change_case_lower_az:Nnw}
+% \begin{macro}[EXP]{\@@_change_case_upper_az:Nnw}
% The Turkic languages need special treatment for dotted-i and dotless-i.
% The lower casing rule can be expressed in terms of searching first for
% either a dotless-I or a dotted-I. In the latter case the mapping is
@@ -3270,15 +3462,15 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_change_case_lower_lt:Nnw}
-% \begin{macro}[aux, EXP]{\@@_change_case_lower_lt:nNnw}
-% \begin{macro}[aux, EXP]{\@@_change_case_lower_lt:nnw}
-% \begin{macro}[aux, EXP]{\@@_change_case_lower_lt:Nw}
-% \begin{macro}[aux, EXP]{\@@_change_case_lower_lt:NNw}
-% \begin{macro}[aux, EXP]{\@@_change_case_upper_lt:Nnw}
-% \begin{macro}[aux, EXP]{\@@_change_case_upper_lt:nnw}
-% \begin{macro}[aux, EXP]{\@@_change_case_upper_lt:Nw}
-% \begin{macro}[aux, EXP]{\@@_change_case_upper_lt:NNw}
+% \begin{macro}[EXP]{\@@_change_case_lower_lt:Nnw}
+% \begin{macro}[EXP]{\@@_change_case_lower_lt:nNnw}
+% \begin{macro}[EXP]{\@@_change_case_lower_lt:nnw}
+% \begin{macro}[EXP]{\@@_change_case_lower_lt:Nw}
+% \begin{macro}[EXP]{\@@_change_case_lower_lt:NNw}
+% \begin{macro}[EXP]{\@@_change_case_upper_lt:Nnw}
+% \begin{macro}[EXP]{\@@_change_case_upper_lt:nnw}
+% \begin{macro}[EXP]{\@@_change_case_upper_lt:Nw}
+% \begin{macro}[EXP]{\@@_change_case_upper_lt:NNw}
% For Lithuanian, the issue to be dealt with is dots over lower case
% letters: these should be present if there is another accent. That means
% that there is some work to do when lower casing I and J. The first step
@@ -3428,10 +3620,10 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP, int]{\__unicode_codepoint_to_UTFviii:n}
-% \begin{macro}[EXP, aux]{\__unicode_codepoint_to_UTFviii_auxi:n}
-% \begin{macro}[EXP, aux]{\__unicode_codepoint_to_UTFviii_auxii:Nnn}
-% \begin{macro}[EXP, aux]{\__unicode_codepoint_to_UTFviii_auxiii:n}
+% \begin{macro}[EXP]{\__unicode_codepoint_to_UTFviii:n}
+% \begin{macro}[EXP]{\__unicode_codepoint_to_UTFviii_auxi:n}
+% \begin{macro}[EXP]{\__unicode_codepoint_to_UTFviii_auxii:Nnn}
+% \begin{macro}[EXP]{\__unicode_codepoint_to_UTFviii_auxiii:n}
% This code converts a codepoint into the correct UTF-8 representation.
% As there are a variable number of octets, the result starts with the
% numeral |1|--|4| to indicate the nature of the returned value. Note that
@@ -3784,9 +3976,9 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[aux, EXP]{\@@_change_case_mixed_nl:Nnw}
-% \begin{macro}[aux, EXP]{\@@_change_case_mixed_nl:Nw}
-% \begin{macro}[aux, EXP]{\@@_change_case_mixed_nl:NNw}
+% \begin{macro}[EXP]{\@@_change_case_mixed_nl:Nnw}
+% \begin{macro}[EXP]{\@@_change_case_mixed_nl:Nw}
+% \begin{macro}[EXP]{\@@_change_case_mixed_nl:NNw}
% For Dutch, there is a single look-ahead test for \texttt{ij} when
% title casing. If the appropriate letters are found, produce \texttt{IJ}
% and gobble the \texttt{j}/\texttt{J}.
@@ -3895,7 +4087,7 @@
% \begin{macro}{\tl_range_braced:Nnn, \tl_range_braced:cnn, \tl_range_braced:nnn}
% \begin{macro}
% {\tl_range_unbraced:Nnn, \tl_range_unbraced:cnn, \tl_range_unbraced:nnn}
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_range:Nnnn, \@@_range:nnnNn, \@@_range:nnNn, \@@_range_skip:w,
% \@@_range_braced:w, \@@_range_collect_braced:w,
@@ -4042,7 +4234,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP, aux]{\@@_range_normalize:nn}
+% \begin{macro}[EXP]{\@@_range_normalize:nn}
% This function converts an \meta{index} argument into an explicit
% position in the token list (a result of $0$ denoting \enquote{out of
% bounds}). Expects two explicit integer arguments: the \meta{index}
@@ -4093,7 +4285,7 @@
% \end{macrocode}
%
% \begin{macro}[TF]{\peek_N_type:}
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_execute_branches_N_type:, \@@_N_type:w, \@@_N_type_aux:nnw}
% All tokens are \texttt{N}-type tokens, except in four cases:
% begin-group tokens, end-group tokens, space tokens with character
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
index ed70ce187a6..d7a063b7aae 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
@@ -9,7 +9,7 @@
% 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
+% https://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.
@@ -23,7 +23,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -384,7 +384,6 @@
% each iteration. The \meta{items} are returned from left to right.
% The function \cs{clist_map_inline:Nn} is in general more efficient
% than \cs{clist_map_function:NN}.
-% One mapping may be nested inside another.
% \end{function}
%
% \begin{function}[updated = 2012-06-29]
@@ -395,21 +394,19 @@
% Applies \meta{inline function} to every \meta{item} stored
% within the \meta{comma list}. The \meta{inline function} should
% consist of code which receives the \meta{item} as |#1|.
-% One in line mapping can be nested inside another. The \meta{items}
-% are returned from left to right.
+% The \meta{items} are returned from left to right.
% \end{function}
%
% \begin{function}[updated = 2012-06-29]
% {\clist_map_variable:NNn, \clist_map_variable:cNn, \clist_map_variable:nNn}
% \begin{syntax}
-% \cs{clist_map_variable:NNn} \meta{comma list} \meta{tl~var.} \Arg{function using tl~var.}
+% \cs{clist_map_variable:NNn} \meta{comma list} \meta{variable} \Arg{code}
% \end{syntax}
-% Stores each entry in the \meta{comma list} in turn in the
-% \meta{tl~var.}\ and applies the \meta{function using tl~var.}
-% The \meta{function} usually consists of code making use of
-% the \meta{tl~var.}, but this is not enforced. One variable
-% mapping can be nested inside another. The \meta{items}
-% are returned from left to right.
+% Stores each \meta{item} of the \meta{comma list} in turn in the
+% (token list) \meta{variable} and applies the \meta{code}. The
+% \meta{code} will usually make use of the \meta{variable}, but this
+% is not enforced. The assignments to the \meta{variable} are local.
+% The \meta{items} are returned from left to right.
% \end{function}
%
% \begin{function}[rEXP, updated = 2012-06-29]{\clist_map_break:}
@@ -432,8 +429,8 @@
% Use outside of a |\clist_map_...| scenario leads to low
% level \TeX{} errors.
% \begin{texnote}
-% When the mapping is broken, additional tokens may be inserted by the
-% internal macro \cs{__prg_break_point:Nn} before further items are taken
+% When the mapping is broken, additional tokens may be inserted
+% before further items are taken
% from the input stream. This depends on the design of the mapping
% function.
% \end{texnote}
@@ -441,17 +438,17 @@
%
% \begin{function}[updated = 2012-06-29, rEXP]{\clist_map_break:n}
% \begin{syntax}
-% \cs{clist_map_break:n} \Arg{tokens}
+% \cs{clist_map_break:n} \Arg{code}
% \end{syntax}
% Used to terminate a |\clist_map_...| function before all
% entries in the \meta{comma list} have been processed, inserting
-% the \meta{tokens} after the mapping has ended. This
+% the \meta{code} after the mapping has ended. This
% normally takes place within a conditional statement, for example
% \begin{verbatim}
% \clist_map_inline:Nn \l_my_clist
% {
% \str_if_eq:nnTF { #1 } { bingo }
-% { \clist_map_break:n { <tokens> } }
+% { \clist_map_break:n { <code> } }
% {
% % Do something useful
% }
@@ -460,8 +457,8 @@
% Use outside of a |\clist_map_...| scenario leads to low
% level \TeX{} errors.
% \begin{texnote}
-% When the mapping is broken, additional tokens may be inserted by the
-% internal macro \cs{__prg_break_point:Nn} before the \meta{tokens} are
+% When the mapping is broken, additional tokens may be inserted
+% before the \meta{code} is
% inserted into the input stream.
% This depends on the design of the mapping function.
% \end{texnote}
@@ -736,7 +733,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[aux]{\@@_tmp:w}
+% \begin{macro}{\@@_tmp:w}
% A temporary function for various purposes.
% \begin{macrocode}
\cs_new_protected:Npn \@@_tmp:w { }
@@ -832,9 +829,9 @@
% \clist_gset_from_seq:Nc, \clist_gset_from_seq:cc
% }
% \UnitTested
-% \begin{macro}[aux]{\@@_set_from_seq:NNNN}
-% \begin{macro}[aux]{\@@_wrap_item:n}
-% \begin{macro}[aux]{\@@_set_from_seq:w}
+% \begin{macro}{\@@_set_from_seq:NNNN}
+% \begin{macro}{\@@_wrap_item:n}
+% \begin{macro}{\@@_set_from_seq:w}
% Setting a comma list from a comma-separated list is done using a simple
% mapping. We wrap most items with \cs{exp_not:n}, and a comma. Items which
% contain a comma or a space are surrounded by an extra set of braces. The
@@ -879,7 +876,7 @@
% \UnitTested
% \begin{macro}{\clist_gconcat:NNN, \clist_gconcat:ccc}
% \UnitTested
-% \begin{macro}[aux]{\@@_concat:NNNN}
+% \begin{macro}{\@@_concat:NNNN}
% Concatenating comma lists is not quite as easy as it seems, as
% there needs to be the correct addition of a comma to the output. So
% a little work to do.
@@ -916,8 +913,8 @@
%
% \subsection{Removing spaces around items}
%
-% \begin{macro}[int,EXP]{\@@_trim_spaces_generic:nw}
-% \begin{macro}[aux]{\@@_trim_spaces_generic:nn}
+% \begin{macro}[EXP]{\@@_trim_spaces_generic:nw}
+% \begin{macro}{\@@_trim_spaces_generic:nn}
% \begin{syntax}
% \cs{@@_trim_spaces_generic:nw} \Arg{code} \cs{q_mark} \meta{item} |,|
% \end{syntax}
@@ -941,8 +938,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int,rEXP]{\@@_trim_spaces:n}
-% \begin{macro}[aux]{\@@_trim_spaces:nn}
+% \begin{macro}[rEXP]{\@@_trim_spaces:n}
+% \begin{macro}{\@@_trim_spaces:nn}
% The first argument of \cs{@@_trim_spaces:nn} is initially empty,
% and later a comma, namely, as soon as we have added an item to the
% resulting list. The auxiliary tests for the end of the list,
@@ -1017,7 +1014,7 @@
% \clist_gput_left:co, \clist_gput_left:cx
% }
% \UnitTested
-% \begin{macro}[aux]{\@@_put_left:NNNn}
+% \begin{macro}{\@@_put_left:NNNn}
% Comma lists cannot hold empty values: there are therefore a couple
% of sanity checks to avoid accumulating commas.
% \begin{macrocode}
@@ -1055,7 +1052,7 @@
% \clist_gput_right:co, \clist_gput_right:cx
% }
% \UnitTested
-% \begin{macro}[aux]{\@@_put_right:NNNn}
+% \begin{macro}{\@@_put_right:NNNn}
% \begin{macrocode}
\cs_new_protected:Npn \clist_put_right:Nn
{ \@@_put_right:NNNn \clist_concat:NNN \clist_set:Nn }
@@ -1079,7 +1076,7 @@
%
% \begin{macro}{\clist_get:NN, \clist_get:cN}
% \UnitTested
-% \begin{macro}[aux]{\@@_get:wN}
+% \begin{macro}{\@@_get:wN}
% Getting an item from the left of a comma list is pretty easy: just
% trim off the first item using the comma.
% \begin{macrocode}
@@ -1102,7 +1099,7 @@
% \UnitTested
% \begin{macro}{\clist_gpop:NN, \clist_gpop:cN}
% \UnitTested
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_pop:NNN, \@@_pop:wwNNN, \@@_pop:wN}
% An empty clist leads to \cs{q_no_value}, otherwise grab until the
% first comma and assign to the variable. The second argument of
@@ -1146,7 +1143,7 @@
% \begin{macro}[TF]{\clist_get:NN, \clist_get:cN}
% \begin{macro}[TF]{\clist_pop:NN, \clist_pop:cN}
% \begin{macro}[TF]{\clist_gpop:NN, \clist_gpop:cN}
-% \begin{macro}[aux]{\@@_pop_TF:NNN}
+% \begin{macro}{\@@_pop_TF:NNN}
% The same, as branching code: very similar to the above.
% \begin{macrocode}
\prg_new_protected_conditional:Npnn \clist_get:NN #1#2 { T , F , TF }
@@ -1231,7 +1228,7 @@
% \UnitTested
% \begin{macro}{\clist_gremove_duplicates:N, \clist_gremove_duplicates:c}
% \UnitTested
-% \begin{macro}[aux]{\@@_remove_duplicates:NN}
+% \begin{macro}{\@@_remove_duplicates:NN}
% Removing duplicates means making a new list then copying it.
% \begin{macrocode}
\cs_new_protected:Npn \clist_remove_duplicates:N
@@ -1259,9 +1256,9 @@
% \UnitTested
% \begin{macro}{\clist_gremove_all:Nn, \clist_gremove_all:cn}
% \UnitTested
-% \begin{macro}[aux]{\@@_remove_all:NNn}
-% \begin{macro}[aux]{\@@_remove_all:w}
-% \begin{macro}[aux]{\@@_remove_all:}
+% \begin{macro}{\@@_remove_all:NNn}
+% \begin{macro}{\@@_remove_all:w}
+% \begin{macro}{\@@_remove_all:}
% The method used here is very similar to \cs{tl_replace_all:Nnn}.
% Build a function delimited by the \meta{item} that should be removed,
% surrounded with commas, and call that function followed by
@@ -1342,7 +1339,7 @@
% \end{macro}
%
% \begin{macro}[EXP]{\clist_reverse:n}
-% \begin{macro}[aux, EXP]{\@@_reverse:wwNww, \@@_reverse_end:ww}
+% \begin{macro}[EXP]{\@@_reverse:wwNww, \@@_reverse_end:ww}
% The reversed token list is built one item at a time, and stored
% between \cs{q_stop} and \cs{q_mark}, in the form of |?| followed by
% zero or more instances of \enquote{\meta{item}\texttt{,}}. We start from a comma
@@ -1396,8 +1393,8 @@
% \end{macro}
%
% \begin{macro}[EXP, pTF]{\clist_if_empty:n}
-% \begin{macro}[aux, EXP]{\@@_if_empty_n:w}
-% \begin{macro}[aux, EXP]{\@@_if_empty_n:wNw}
+% \begin{macro}[EXP]{\@@_if_empty_n:w}
+% \begin{macro}[EXP]{\@@_if_empty_n:wNw}
% As usual, we insert a token (here |?|) before grabbing
% any argument: this avoids losing braces. The argument
% of \cs{tl_if_empty:oTF} is empty if |#1| is |?| followed
@@ -1434,7 +1431,7 @@
% \clist_if_in:cn, \clist_if_in:cV, \clist_if_in:co,
% \clist_if_in:nn, \clist_if_in:nV, \clist_if_in:no
% }
-% \begin{macro}[aux]{\@@_if_in_return:nn}
+% \begin{macro}{\@@_if_in_return:nn}
% \UnitTested
% See description of the \cs{tl_if_in:Nn} function for details.
% We simply surround the comma list, and the item, with commas.
@@ -1472,7 +1469,7 @@
%
% \begin{macro}{\clist_map_function:NN, \clist_map_function:cN}
% \UnitTested
-% \begin{macro}[aux]{\@@_map_function:Nw}
+% \begin{macro}{\@@_map_function:Nw}
% If the variable is empty, the mapping is skipped (otherwise,
% that comma-list would be seen as consisting of one empty item).
% Then loop over the comma-list, grabbing one comma-delimited
@@ -1502,8 +1499,8 @@
%
% \begin{macro}{\clist_map_function:nN}
% \UnitTested
-% \begin{macro}[aux]{\@@_map_function_n:Nn}
-% \begin{macro}[aux]{\@@_map_unbrace:Nw}
+% \begin{macro}{\@@_map_function_n:Nn}
+% \begin{macro}{\@@_map_unbrace:Nw}
% The \texttt{n}-type mapping function is a bit more awkward,
% since spaces must be trimmed from each item.
% Space trimming is again based on \cs{@@_trim_spaces_generic:nw}.
@@ -1575,7 +1572,7 @@
% \begin{macro}{\clist_map_variable:NNn, \clist_map_variable:cNn}
% \UnitTested
% \begin{macro}{\clist_map_variable:nNn}
-% \begin{macro}[aux]{\@@_map_variable:Nnw}
+% \begin{macro}{\@@_map_variable:Nnw}
% As for other comma-list mappings, filter out the case of
% an empty list. Same approach as \cs{clist_map_function:Nn},
% additionally we store each item in the given variable.
@@ -1622,8 +1619,8 @@
% \end{macro}
%
% \begin{macro}{\clist_count:N, \clist_count:c, \clist_count:n}
-% \begin{macro}[aux]{\@@_count:n}
-% \begin{macro}[aux]{\@@_count:w}
+% \begin{macro}{\@@_count:n}
+% \begin{macro}{\@@_count:w}
% Counting the items in a comma list is done using the same approach as for
% other token count functions: turn each entry into a \texttt{+1} then use
% integer evaluation to actually do the mathematics.
@@ -1665,7 +1662,7 @@
% \subsection{Using comma lists}
%
% \begin{macro}[EXP]{\clist_use:Nnnn, \clist_use:cnnn}
-% \begin{macro}[EXP, aux]
+% \begin{macro}[EXP]
% {\@@_use:wwn, \@@_use:nwwwwnwn, \@@_use:nwwn}
% \begin{macro}[EXP]{\clist_use:Nn, \clist_use:cn}
% First check that the variable exists. Then count the items in the
@@ -1732,8 +1729,8 @@
% \subsection{Using a single item}
%
% \begin{macro}{\clist_item:Nn, \clist_item:cn}
-% \begin{macro}[aux]{\@@_item:nnnN, \@@_item:ffoN, \@@_item:ffnN}
-% \begin{macro}[aux]{\@@_item_N_loop:nw}
+% \begin{macro}{\@@_item:nnnN, \@@_item:ffoN, \@@_item:ffnN}
+% \begin{macro}{\@@_item_N_loop:nw}
% To avoid needing to test the end of the list at each step,
% we first compute the \meta{length} of the list. If the item number
% is~$0$, less than $-\meta{length}$, or more than $\meta{length}$,
@@ -1779,7 +1776,7 @@
% \end{macro}
%
% \begin{macro}{\clist_item:nn}
-% \begin{macro}[aux]{
+% \begin{macro}{
% \@@_item_n:nw,
% \@@_item_n_loop:nw,
% \@@_item_n_end:n,
@@ -1825,40 +1822,38 @@
%
% \subsection{Viewing comma lists}
%
-% \begin{macro}{\clist_show:N, \clist_show:c}
-% \begin{macro}{\clist_show:n}
-% Apply the general \cs{__msg_show_variable:NNNnn}. In the case
-% of an \texttt{n}-type comma-list, we must do things by hand,
-% using the same message \texttt{show-clist} as for an
-% \texttt{N}-type comma-list but with an empty name (first
-% argument).
+% \begin{macro}{\clist_show:N, \clist_show:c, \clist_log:N, \clist_log:c, \@@_show:NN}
+% Apply the general \cs{__kernel_check_defined:NT} and
+% \cs{msg_show:nnnnnn}.
% \begin{macrocode}
-\cs_new_protected:Npn \clist_show:N #1
- {
- \__msg_show_variable:NNNnn #1
- \clist_if_exist:NTF \clist_if_empty:NTF { clist }
- { \clist_map_function:NN #1 \__msg_show_item:n }
- }
-\cs_new_protected:Npn \clist_show:n #1
+\cs_new_protected:Npn \clist_show:N { \@@_show:NN \msg_show:nnxxxx }
+\cs_generate_variant:Nn \clist_show:N { c }
+\cs_new_protected:Npn \clist_log:N { \@@_show:NN \msg_log:nnxxxx }
+\cs_generate_variant:Nn \clist_log:N { c }
+\cs_new_protected:Npn \@@_show:NN #1#2
{
- \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-clist }
- { } { \clist_if_empty:nF {#1} { ? } } { } { }
- \__msg_show_wrap:n
- { \clist_map_function:nN {#1} \__msg_show_item:n }
+ \__kernel_check_defined:NT #2
+ {
+ #1 { LaTeX/kernel } { show-clist }
+ { \token_to_str:N #2 }
+ { \clist_map_function:NN #2 \msg_show_item:n }
+ { } { }
+ }
}
-\cs_generate_variant:Nn \clist_show:N { c }
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
-% \begin{macro}{\clist_log:N, \clist_log:c, \clist_log:n}
-% Redirect output of \cs{clist_show:N} and \cs{clist_show:n} to the log.
+% \begin{macro}{\clist_show:n, \clist_log:n, \@@_show:Nn}
+% A variant of the above: no existence check, empty first argument for
+% the message.
% \begin{macrocode}
-\cs_new_protected:Npn \clist_log:N
- { \__msg_log_next: \clist_show:N }
-\cs_new_protected:Npn \clist_log:n
- { \__msg_log_next: \clist_show:n }
-\cs_generate_variant:Nn \clist_log:N { c }
+\cs_new_protected:Npn \clist_show:n { \@@_show:Nn \msg_show:nnxxxx }
+\cs_new_protected:Npn \clist_log:n { \@@_show:Nn \msg_log:nnxxxx }
+\cs_new_protected:Npn \@@_show:Nn #1#2
+ {
+ #1 { LaTeX/kernel } { show-clist }
+ { } { \clist_map_function:nN {#2} \msg_show_item:n } { } { }
+ }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
index e312125842a..824d6d13d88 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -358,11 +358,13 @@
% opposed to the \TeX{} bounding box. They all start off in the same
% place, of course.
% \begin{macrocode}
-\prop_new:N \c_@@_corners_prop
-\prop_put:Nnn \c_@@_corners_prop { tl } { { 0pt } { 0pt } }
-\prop_put:Nnn \c_@@_corners_prop { tr } { { 0pt } { 0pt } }
-\prop_put:Nnn \c_@@_corners_prop { bl } { { 0pt } { 0pt } }
-\prop_put:Nnn \c_@@_corners_prop { br } { { 0pt } { 0pt } }
+\prop_const_from_keyval:Nn \c_@@_corners_prop
+ {
+ tl = { 0pt } { 0pt } ,
+ tr = { 0pt } { 0pt } ,
+ bl = { 0pt } { 0pt } ,
+ br = { 0pt } { 0pt } ,
+ }
% \end{macrocode}
% \end{variable}
%
@@ -370,18 +372,18 @@
% Pole positions are given for horizontal, vertical and reference-point
% based values.
% \begin{macrocode}
-\prop_new:N \c_@@_poles_prop
-\tl_set:Nn \l_@@_internal_tl { { 0pt } { 0pt } { 0pt } { 1000pt } }
-\prop_put:Nno \c_@@_poles_prop { l } { \l_@@_internal_tl }
-\prop_put:Nno \c_@@_poles_prop { hc } { \l_@@_internal_tl }
-\prop_put:Nno \c_@@_poles_prop { r } { \l_@@_internal_tl }
-\tl_set:Nn \l_@@_internal_tl { { 0pt } { 0pt } { 1000pt } { 0pt } }
-\prop_put:Nno \c_@@_poles_prop { b } { \l_@@_internal_tl }
-\prop_put:Nno \c_@@_poles_prop { vc } { \l_@@_internal_tl }
-\prop_put:Nno \c_@@_poles_prop { t } { \l_@@_internal_tl }
-\prop_put:Nno \c_@@_poles_prop { B } { \l_@@_internal_tl }
-\prop_put:Nno \c_@@_poles_prop { H } { \l_@@_internal_tl }
-\prop_put:Nno \c_@@_poles_prop { T } { \l_@@_internal_tl }
+\prop_const_from_keyval:Nn \c_@@_poles_prop
+ {
+ l = { 0pt } { 0pt } { 0pt } { 1000pt } ,
+ hc = { 0pt } { 0pt } { 0pt } { 1000pt } ,
+ r = { 0pt } { 0pt } { 0pt } { 1000pt } ,
+ b = { 0pt } { 0pt } { 1000pt } { 0pt } ,
+ vc = { 0pt } { 0pt } { 1000pt } { 0pt } ,
+ t = { 0pt } { 0pt } { 1000pt } { 0pt } ,
+ B = { 0pt } { 0pt } { 1000pt } { 0pt } ,
+ H = { 0pt } { 0pt } { 1000pt } { 0pt } ,
+ T = { 0pt } { 0pt } { 1000pt } { 0pt } ,
+ }
% \end{macrocode}
% \end{variable}
%
@@ -506,38 +508,23 @@
% Creating a new coffin means making the underlying box and adding the
% data structures. These are created globally, as there is a need to
% avoid any strange effects if the coffin is created inside a group.
-% This means that the usual rule about \cs[no-index]{l_\ldots} variables has
-% to be broken. The \cs{__debug_suspend_log:} and
-% \cs{__debug_resume_log:} functions prevent \cs{prop_clear_new:c}
-% from writing useless information to the log file; however they only
-% exist if debugging is enabled.
+% This means that the usual rule about \cs[no-index]{l_\ldots}
+% variables has to be broken. The \cs{debug_suspend:} and
+% \cs{debug_resume:} functions prevent these checks. They also
+% prevent \cs{prop_clear_new:c} from writing useless information to
+% the log file.
% \begin{macrocode}
-\__debug:TF
- {
- \cs_new_protected:Npn \coffin_new:N #1
- {
- \box_new:N #1
- \__debug_suspend_log:
- \prop_clear_new:c { l_@@_corners_ \__int_value:w #1 _prop }
- \prop_clear_new:c { l_@@_poles_ \__int_value:w #1 _prop }
- \prop_gset_eq:cN { l_@@_corners_ \__int_value:w #1 _prop }
- \c_@@_corners_prop
- \prop_gset_eq:cN { l_@@_poles_ \__int_value:w #1 _prop }
- \c_@@_poles_prop
- \__debug_resume_log:
- }
- }
+\cs_new_protected:Npn \coffin_new:N #1
{
- \cs_new_protected:Npn \coffin_new:N #1
- {
- \box_new:N #1
- \prop_clear_new:c { l_@@_corners_ \__int_value:w #1 _prop }
- \prop_clear_new:c { l_@@_poles_ \__int_value:w #1 _prop }
- \prop_gset_eq:cN { l_@@_corners_ \__int_value:w #1 _prop }
- \c_@@_corners_prop
- \prop_gset_eq:cN { l_@@_poles_ \__int_value:w #1 _prop }
- \c_@@_poles_prop
- }
+ \box_new:N #1
+ \debug_suspend:
+ \prop_clear_new:c { l_@@_corners_ \__int_value:w #1 _prop }
+ \prop_clear_new:c { l_@@_poles_ \__int_value:w #1 _prop }
+ \prop_gset_eq:cN { l_@@_corners_ \__int_value:w #1 _prop }
+ \c_@@_corners_prop
+ \prop_gset_eq:cN { l_@@_poles_ \__int_value:w #1 _prop }
+ \c_@@_poles_prop
+ \debug_resume:
}
\cs_generate_variant:Nn \coffin_new:N { c }
% \end{macrocode}
@@ -699,9 +686,12 @@
% Special coffins: these cannot be set up earlier as they need
% \cs{coffin_new:N}. The empty coffin is set as a box as the full
% coffin-setting system needs some material which is not yet available.
+% Debugging must be suspended as we are assigning to a constant coffin.
% \begin{macrocode}
\coffin_new:N \c_empty_coffin
+\debug_suspend:
\hbox_set:Nn \c_empty_coffin { }
+\debug_resume:
\coffin_new:N \l_@@_aligned_coffin
\coffin_new:N \l_@@_aligned_internal_coffin
% \end{macrocode}
@@ -896,8 +886,8 @@
% \subsection{Coffins: calculation of pole intersections}
%
% \begin{macro}{\@@_calculate_intersection:Nnn}
-% \begin{macro}[aux]{\@@_calculate_intersection:nnnnnnnn}
-% \begin{macro}[aux]{\@@_calculate_intersection_aux:nnnnnN}
+% \begin{macro}{\@@_calculate_intersection:nnnnnnnn}
+% \begin{macro}{\@@_calculate_intersection_aux:nnnnnN}
% The lead off in finding intersections is to recover the two poles
% and then hand off to the auxiliary for the actual calculation. There
% may of course not be an intersection, for which an error trap is
@@ -1235,7 +1225,7 @@
% \end{macro}
%
% \begin{macro}{\@@_offset_poles:Nnn}
-% \begin{macro}[aux]{\@@_offset_pole:Nnnnnnn}
+% \begin{macro}{\@@_offset_pole:Nnnnnnn}
% Transferring structures from one coffin to another requires that the
% positions are updated by the offset between the two coffins. This is
% done by mapping to the property list of the source coffins, moving
@@ -1270,7 +1260,7 @@
% \end{macro}
%
% \begin{macro}{\@@_offset_corners:Nnn}
-% \begin{macro}[aux]{\@@_offset_corner:Nnnnn}
+% \begin{macro}{\@@_offset_corner:Nnnnn}
% Saving the offset corners of a coffin is very similar, except that
% there is no need to worry about naming: every corner can be saved
% here as order is unimportant.
@@ -1295,8 +1285,8 @@
% \end{macro}
%
% \begin{macro}{\@@_update_vertical_poles:NNN}
-% \begin{macro}[aux]{\@@_update_T:nnnnnnnnN}
-% \begin{macro}[aux]{\@@_update_B:nnnnnnnnN}
+% \begin{macro}{\@@_update_T:nnnnnnnnN}
+% \begin{macro}{\@@_update_B:nnnnnnnnN}
% The \texttt{T} and \texttt{B} poles need to be recalculated
% after alignment. These functions find the larger absolute value for
% the poles, but this is of course only logical when the poles are
@@ -1462,7 +1452,7 @@
% \end{variable}
%
% \begin{macro}{\coffin_mark_handle:Nnnn, \coffin_mark_handle:cnnn}
-% \begin{macro}[aux]{\@@_mark_handle_aux:nnnnNnn}
+% \begin{macro}{\@@_mark_handle_aux:nnnnNnn}
% Marking a single handle is relatively easy. The standard attachment
% function is used, meaning that there are two calculations for the
% location. However, this is likely to be okay given the load expected.
@@ -1529,9 +1519,9 @@
% \end{macro}
%
% \begin{macro}{\coffin_display_handles:Nn, \coffin_display_handles:cn}
-% \begin{macro}[aux]{\@@_display_handles_aux:nnnnnn}
-% \begin{macro}[aux]{\@@_display_handles_aux:nnnn}
-% \begin{macro}[aux]{\@@_display_attach:Nnnnn}
+% \begin{macro}{\@@_display_handles_aux:nnnnnn}
+% \begin{macro}{\@@_display_handles_aux:nnnn}
+% \begin{macro}{\@@_display_attach:Nnnnn}
% Printing the poles starts by removing any duplicates, for which the
% \texttt{H} poles is used as the definitive version for the baseline
% and bottom. Two loops are then used to find the combinations of
@@ -1666,38 +1656,41 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\coffin_show_structure:N, \coffin_show_structure:c}
+% \begin{macro}
+% {
+% \coffin_show_structure:N, \coffin_show_structure:c,
+% \coffin_log_structure:N, \coffin_log_structure:c,
+% \@@_show_structure:NN
+% }
% For showing the various internal structures attached to a coffin in
% a way that keeps things relatively readable. If there is no apparent
% structure then the code complains.
% \begin{macrocode}
-\cs_new_protected:Npn \coffin_show_structure:N #1
+\cs_new_protected:Npn \coffin_show_structure:N
+ { \@@_show_structure:NN \msg_show:nnxxxx }
+\cs_generate_variant:Nn \coffin_show_structure:N { c }
+\cs_new_protected:Npn \coffin_log_structure:N
+ { \@@_show_structure:NN \msg_log:nnxxxx }
+\cs_generate_variant:Nn \coffin_log_structure:N { c }
+\cs_new_protected:Npn \@@_show_structure:NN #1#2
{
- \@@_if_exist:NT #1
+ \@@_if_exist:NT #2
{
- \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-coffin }
- { \token_to_str:N #1 }
- { \dim_eval:n { \coffin_ht:N #1 } }
- { \dim_eval:n { \coffin_dp:N #1 } }
- { \dim_eval:n { \coffin_wd:N #1 } }
- \__msg_show_wrap:n
+ #1 { LaTeX / kernel } { show-coffin }
+ { \token_to_str:N #2 }
+ {
+ \iow_newline: >~ ht ~=~ \dim_eval:n { \coffin_ht:N #2 }
+ \iow_newline: >~ dp ~=~ \dim_eval:n { \coffin_dp:N #2 }
+ \iow_newline: >~ wd ~=~ \dim_eval:n { \coffin_wd:N #2 }
+ }
{
\prop_map_function:cN
- { l_@@_poles_ \__int_value:w #1 _prop }
- \__msg_show_item_unbraced:nn
+ { l_@@_poles_ \int_eval:n {#2} _prop }
+ \msg_show_item_unbraced:nn
}
+ { }
}
}
-\cs_generate_variant:Nn \coffin_show_structure:N { c }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\coffin_log_structure:N, \coffin_log_structure:c}
-% Redirect output of \cs{coffin_show_structure:N} to the log.
-% \begin{macrocode}
-\cs_new_protected:Npn \coffin_log_structure:N
- { \__msg_log_next: \coffin_show_structure:N }
-\cs_generate_variant:Nn \coffin_log_structure:N { c }
% \end{macrocode}
% \end{macro}
%
@@ -1724,11 +1717,8 @@
}
\__msg_kernel_new:nnn { kernel } { show-coffin }
{
- Size~of~coffin~#1 : \\
- > ~ ht~=~#2 \\
- > ~ dp~=~#3 \\
- > ~ wd~=~#4 \\
- Poles~of~coffin~#1 :
+ Size~of~coffin~#1 : #2 \\
+ Poles~of~coffin~#1 : #3 .
}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
index b384337ea8f..675558805c3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
index e93078b3a8a..410aa76dc98 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -66,7 +66,7 @@
%<@@=deprecation>
% \end{macrocode}
%
-% \begin{macro}[aux]{\@@_error:Nnn}
+% \begin{macro}{\@@_error:Nnn}
% The \tn{outer} definition here ensures the command cannot appear
% in an argument. Use this auxiliary on all commands that have been
% removed since 2015.
@@ -117,6 +117,25 @@
% \end{macrocode}
% \end{macro}
%
+% This is left-over from \pkg{l3expan}. It cannot be done there because
+% \pkg{l3tl} is not loaded at that time.
+% \begin{macrocode}
+\__debug:TF
+ {
+ \tl_gput_right:Nn \g__debug_deprecation_on_tl
+ {
+ \cs_set_protected:Npn \__cs_generate_variant_loop_warning:nnxxxx
+ { \__msg_kernel_error:nnxxxx }
+ }
+ \tl_gput_right:Nn \g__debug_deprecation_off_tl
+ {
+ \cs_set_protected:Npn \__cs_generate_variant_loop_warning:nnxxxx
+ { \__msg_kernel_warning:nnxxxx }
+ }
+ }
+ { }
+% \end{macrocode}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
index 2f02cd2c37a..280cb751886 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -36,7 +36,7 @@ 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
+ https://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.
@@ -70,14 +70,14 @@ and all files in that bundle must be distributed together.
% This isn't included in the typeset documentation because it's a bit
% ugly:
%<*class>
-\ProvidesExplClass{l3doc}{2017/11/14}{}
+\ProvidesExplClass{l3doc}{2017/12/05}{}
{L3 Experimental documentation class}
%</class>
% \fi
%
% \title{The \cls{l3doc} class}
% \author{\Team}
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
% \maketitle
% \tableofcontents
%
@@ -414,13 +414,10 @@ and all files in that bundle must be distributed together.
% If you are documenting an auxiliary macro, it's generally not
% necessary to highlight it as much and you also don't need to check it
% for, say, having a test function and having a documentation chunk
-% earlier in a \env{function} environment. In this case, write
-% |\begin{macro}[aux]| to mark it as such; its margin
-% call-out is then printed in grey.
-%
-% Similarly, an internal package function still requires documentation
-% but usually is not documented for users to see; these can be
-% marked as such with |\begin{macro}[int]|.
+% earlier in a \env{function} environment. \pkg{l3doc} will pick up these
+% cases form the presence of |__| in the name, or you may force marking
+% as internal by using |\begin{macro}[int]| to mark it as such. The margin
+% call-out is then printed in grey for such cases.
%
% For documenting \pkg{expl3}-type conditionals, you may also pass this
% environment a |TF| option (and omit it from the function name) to
@@ -564,7 +561,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\l_@@_detect_internals_bool, \l_@@_detect_internals_tl}
+% \begin{variable}{\l_@@_detect_internals_bool, \l_@@_detect_internals_tl}
% If \texttt{true}, \pkg{l3doc} will check for use of internal
% commands \cs[no-index]{__\meta{pkg}_\ldots{}} from other packages in
% \texttt{macrocode} environments and in~\cs{cs}. Also a token list
@@ -577,7 +574,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\l_@@_output_coffin}
+% \begin{variable}{\l_@@_output_coffin}
% The \env{function} environment is typeset by combining coffins
% containing various pieces (function names, description, \emph{etc.})
% into this coffin.
@@ -586,7 +583,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]
+% \begin{variable}
% {\l_@@_functions_coffin, \l_@@_descr_coffin, \l_@@_syntax_coffin}
% These coffins contain respectively the list of function names
% (argument of the \env{function} environment), the text between
@@ -599,7 +596,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\g_@@_syntax_box}
+% \begin{variable}{\g_@@_syntax_box}
% The contents of the \env{syntax} environment are typeset in this box
% before being transferred to \cs{l_@@_syntax_coffin}.
% \begin{macrocode}
@@ -607,7 +604,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\l_@@_in_function_bool}
+% \begin{variable}{\l_@@_in_function_bool}
% True when inside a \texttt{function} or \texttt{variable}
% environment. Used by the \texttt{syntax} environment to determine
% its behaviour.
@@ -616,7 +613,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\l_@@_long_name_bool, \l_@@_trial_width_dim}
+% \begin{variable}{\l_@@_long_name_bool, \l_@@_trial_width_dim}
% The boolean \cs{l_@@_long_name_bool} is \texttt{true} if the width
% \cs{l_@@_trial_width_dim} of the coffin \cs{l_@@_functions_coffin}
% (containing the current function names) is bigger than the space
@@ -627,7 +624,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\l_@@_nested_macro_int}
+% \begin{variable}{\l_@@_nested_macro_int}
% The nesting of \env{macro} environments (this is now~$0$ outside a
% \env{macro} environment).
% \begin{macrocode}
@@ -635,7 +632,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]
+% \begin{variable}
% {
% \l_@@_macro_tested_bool,
% \g_@@_missing_tests_prop,
@@ -653,10 +650,10 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[aux]
+% \begin{variable}
% {
+% \l_@@_macro_internal_set_bool,
% \l_@@_macro_internal_bool,
-% \l_@@_macro_aux_bool,
% \l_@@_macro_TF_bool,
% \l_@@_macro_pTF_bool,
% \l_@@_macro_noTF_bool,
@@ -670,8 +667,8 @@ and all files in that bundle must be distributed together.
% environments. We initialize \cs{l_@@_override_module_tl} to avoid
% overriding module names by an empty name (meaning no module).
% \begin{macrocode}
+\bool_new:N \l_@@_macro_internal_set_bool
\bool_new:N \l_@@_macro_internal_bool
-\bool_new:N \l_@@_macro_aux_bool
\bool_new:N \l_@@_macro_TF_bool
\bool_new:N \l_@@_macro_pTF_bool
\bool_new:N \l_@@_macro_noTF_bool
@@ -684,21 +681,23 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[aux]
+% \begin{variable}
% {
% \g_@@_lmodern_bool,
% \g_@@_checkfunc_bool,
% \g_@@_checktest_bool,
+% \g_@@_kernel_bool
% }
% Information about package options.
% \begin{macrocode}
\bool_new:N \g_@@_lmodern_bool
\bool_new:N \g_@@_checkfunc_bool
\bool_new:N \g_@@_checktest_bool
+\bool_new:N \g_@@_kernel_bool
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\l_@@_tmpa_tl, \l_@@_tmpb_tl, \l_@@_tmpa_int, \l_@@_tmpa_seq}
+% \begin{variable}{\l_@@_tmpa_tl, \l_@@_tmpb_tl, \l_@@_tmpa_int, \l_@@_tmpa_seq}
% Some temporary variables.
% \begin{macrocode}
\tl_new:N \l_@@_tmpa_tl
@@ -708,7 +707,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\l_@@_names_block_tl}
+% \begin{variable}{\l_@@_names_block_tl}
% List of local sequence variables (produced through
% \cs{@@_lseq_name:n}), one for each set of variants in a
% \env{function} or \env{macro} environment. More precisely these
@@ -722,7 +721,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\g_@@_variants_seq}
+% \begin{variable}{\g_@@_variants_seq}
% Stores rather temporarily the list of variants (signatures only) of
% a function/macro that is being documented. It is global because we
% need it to keep its value throughout cells of an alignment.
@@ -731,7 +730,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\l_@@_names_verb_bool}
+% \begin{variable}{\l_@@_names_verb_bool}
% Set to |true| if the main argument of a macro/function environment
% should be used as is, without removing any comma or space.
% \begin{macrocode}
@@ -739,7 +738,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\l_@@_names_seq}
+% \begin{variable}{\l_@@_names_seq}
% List of functions/environments/\ldots{} appearing as arguments of a
% given \env{function} or \env{macro} environment. These are the
% names after conversion of |_@@| and |@@| to |__|\meta{module name}
@@ -749,7 +748,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\g_@@_nested_names_seq}
+% \begin{variable}{\g_@@_nested_names_seq}
% Collects all macros in nested \env{macro} environments, to use them
% in the \enquote{End definition} text.
% \begin{macrocode}
@@ -757,7 +756,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\c_@@_backslash_tl, \c_@@_backslash_token}
+% \begin{variable}{\c_@@_backslash_tl, \c_@@_backslash_token}
% A single backslash, as a token list, or as an implicit character
% token.
% \begin{macrocode}
@@ -817,7 +816,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]
+% \begin{variable}
% {
% \l_@@_cmd_tl,
% \l_@@_cmd_index_tl,
@@ -869,7 +868,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\l_@@_function_label_clist, \l_@@_no_label_bool}
+% \begin{variable}{\l_@@_function_label_clist, \l_@@_no_label_bool}
% Option of a \env{function} environment which replaces the label that
% would normally be inserted by labels for the given list of control
% sequences. This is only useful to avoid duplicate labels when a
@@ -880,7 +879,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\l_@@_date_added_tl, \l_@@_date_updated_tl}
+% \begin{variable}{\l_@@_date_added_tl, \l_@@_date_updated_tl}
% Values of some options of the \env{function} environment.
% \begin{macrocode}
\tl_new:N \l_@@_date_added_tl
@@ -888,7 +887,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\l_@@_macro_argument_tl}
+% \begin{variable}{\l_@@_macro_argument_tl}
% Save the argument of a \env{macro} or \env{function} environment for
% use in error messages.
% \begin{macrocode}
@@ -903,7 +902,7 @@ and all files in that bundle must be distributed together.
%
% \subsection{Variants and helpers}
%
-% \begin{macro}[aux]{\@@_tmpa:w, \@@_tmpb:w}
+% \begin{macro}{\@@_tmpa:w, \@@_tmpb:w}
% Auxiliary macros for temporary use.
% \begin{macrocode}
\cs_new_eq:NN \@@_tmpa:w ?
@@ -941,9 +940,11 @@ and all files in that bundle must be distributed together.
% A few missing variants.
% \begin{macrocode}
\cs_generate_variant:Nn \seq_set_split:Nnn { NoV }
+\cs_generate_variant:Nn \seq_gput_right:Nn { Nf }
\cs_generate_variant:Nn \str_case:nn { fn }
\cs_generate_variant:Nn \tl_count:n { f }
\cs_generate_variant:Nn \tl_greplace_all:Nnn { Nx , Nno }
+\cs_generate_variant:Nn \tl_if_empty:nTF { f }
\cs_generate_variant:Nn \tl_if_head_eq_charcode:nNTF { o }
\cs_generate_variant:Nn \tl_if_head_eq_charcode:nNT { o }
\cs_generate_variant:Nn \tl_if_head_eq_charcode:nNF { o }
@@ -962,7 +963,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int,TF]{\@@_if_almost_str:n}
+% \begin{macro}[TF]{\@@_if_almost_str:n}
% Used to test if the argument of |\cmd| or other macros to be indexed
% is almost a string or not: for instance this is \texttt{false} if |#1|
% contains |\meta{...}|. The surprising |f|-expansion are there to
@@ -981,7 +982,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_trim_right:Nn, \@@_trim_right:No}
+% \begin{macro}{\@@_trim_right:Nn, \@@_trim_right:No}
% Removes all material after |#2| in the token list variable~|#1|.
% Perhaps combine with \cs{@@_key_trim_module:n}?
% \begin{macrocode}
@@ -994,8 +995,8 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_replace_at_at:N}
-% \begin{macro}[aux]{\@@_replace_at_at_aux:Nn}
+% \begin{macro}{\@@_replace_at_at:N}
+% \begin{macro}{\@@_replace_at_at_aux:Nn}
% The goal is to replace |@@| by the current module name. We take
% advantage of this function to also detect internal macros. If there is
% no \meta{module~name}, do nothing. Otherwise, sanitize the catcodes
@@ -1034,7 +1035,7 @@ and all files in that bundle must be distributed together.
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_detect_internals:N}
+% \begin{macro}{\@@_detect_internals:N}
% After splitting at each |__| and removing the leading item from the
% sequence (since it does not follow |__|), remove everything after
% any space or end-of-line to get a good approximation of the control
@@ -1064,10 +1065,19 @@ and all files in that bundle must be distributed together.
{
\str_if_eq:NNF \l_@@_detect_internals_tl \g_@@_module_name_tl
{
- \msg_warning:nnxxx { l3doc } { foreign-internal }
- { \tl_to_str:N \l_@@_detect_internals_cs_tl }
- { \tl_to_str:N \l_@@_detect_internals_tl }
- { \tl_to_str:N \g_@@_module_name_tl }
+ \bool_lazy_and:nnF
+ { \g_@@_kernel_bool }
+ {
+ \str_if_eq_x_p:nn
+ { \tl_to_str:N \l_@@_detect_internals_tl }
+ { kernel }
+ }
+ {
+ \msg_warning:nnxxx { l3doc } { foreign-internal }
+ { \tl_to_str:N \l_@@_detect_internals_cs_tl }
+ { \tl_to_str:N \l_@@_detect_internals_tl }
+ { \tl_to_str:N \g_@@_module_name_tl }
+ }
}
}
}
@@ -1076,8 +1086,8 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux,rEXP]{\@@_signature_base_form:n}
-% \begin{macro}[aux]
+% \begin{macro}[rEXP]{\@@_signature_base_form:n}
+% \begin{macro}
% {\@@_signature_base_form_aux:n, \@@_signature_base_form_aux:w}
% Expands to the \enquote{base form} of the signature. For instance,
% given |noxcfvV| it would obtain |nnnNnnn|, or given |ow| it would
@@ -1108,7 +1118,7 @@ and all files in that bundle must be distributed together.
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_predicate_from_base:n}
+% \begin{macro}{\@@_predicate_from_base:n}
% Get predicate from a function's base name. The code is not broken
% by functions with no signature. The |n|-type version can be used
% for keys and other non-control sequences. The output after
@@ -1123,9 +1133,9 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_split_function_do:nn, \@@_split_function_do:on}
-% \begin{macro}[aux]{\@@_get_function_name:n, \@@_get_function_signature:n}
-% \begin{macro}[aux]{\@@_split_function_auxi:w, \@@_split_function_auxii:w}
+% \begin{macro}{\@@_split_function_do:nn, \@@_split_function_do:on}
+% \begin{macro}{\@@_get_function_name:n, \@@_get_function_signature:n}
+% \begin{macro}{\@@_split_function_auxi:w, \@@_split_function_auxii:w}
% Similar to internal functions defined in \pkg{l3basics}, but here we
% operate on strings directly rather than control sequences.
% \begin{macrocode}
@@ -1156,7 +1166,7 @@ and all files in that bundle must be distributed together.
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_key_get_base:nN}
+% \begin{macro}[rEXP]{\@@_key_get_base:nN}
% Get the base form of a function and store it. As part of getting
% the base form, change trailing |T| or |F| to |TF|.
% \begin{macrocode}
@@ -1203,7 +1213,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_base_form_signature_do:nnn}
+% \begin{macro}{\@@_base_form_signature_do:nnn}
% Do |#2{#1}| if there is no signature, or if |#1| contains two colons
% in a row (this covers the weird function |\::N| and so on).
% Otherwise apply |#3| with the following two arguments: the base form
@@ -1234,8 +1244,8 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, pTF]{\@@_date_compare:nNn}
-% \begin{macro}[aux]{\@@_date_compare_aux:nnnNnnn, \@@_date_compare_aux:w}
+% \begin{macro}[pTF]{\@@_date_compare:nNn}
+% \begin{macro}{\@@_date_compare_aux:nnnNnnn, \@@_date_compare_aux:w}
% Expects |#1| and |#3| to be dates in the format YYYY-MM-DD (but
% accepts YYYY or YYYY-MM too). Compares them using |#2| (one of |<|,
% |=|, |>|), filling in zeros for missing data.
@@ -1279,7 +1289,7 @@ and all files in that bundle must be distributed together.
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_gprop_name:n, \@@_lseq_name:n}
+% \begin{macro}{\@@_gprop_name:n, \@@_lseq_name:n}
% We need to keep track of some information about control sequences
% (and other strings) that are being (or have been) documented. Some
% is stored into global props and some into local seqs, whose name
@@ -1318,6 +1328,8 @@ and all files in that bundle must be distributed together.
The~'syntax'~environment~should~only~be~used~once~in~
a~'function'~environment.
}
+\msg_new:nnn { l3doc } { deprecated-option }
+ { The~option~'#1'~has~been~deprecated~for~'#2'. }
\msg_new:nnn { l3doc } { foreign-internal }
{
A~control~sequence~of~the~form~'...__#1'~was~used.~
@@ -1360,6 +1372,13 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
%
% \begin{macrocode}
+\DeclareOption { kernel }
+ { \bool_gset_true:N \g_@@_kernel_bool }
+\DeclareOption { stdmodule }
+ { \bool_gset_false:N \g_@@_kernel_bool }
+% \end{macrocode}
+%
+% \begin{macrocode}
\DeclareOption { cm-default }
{ \bool_gset_false:N \g_@@_lmodern_bool }
\DeclareOption { lm-default }
@@ -1368,7 +1387,7 @@ and all files in that bundle must be distributed together.
%
% \begin{macrocode}
\DeclareOption* { \PassOptionsToClass { \CurrentOption } { article } }
-\ExecuteOptions { full, nocheck, nochecktest, lm-default }
+\ExecuteOptions { full, kernel, nocheck, nochecktest, lm-default }
\PassOptionsToClass { a4paper } { article }
% \end{macrocode}
%
@@ -1480,7 +1499,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\ifnot@excluded}
+% \begin{macro}{\ifnot@excluded}
% This function tests whether a macro name stored in
% \tn{macro@namepart} was excluded from indexing by \tn{DoNotIndex}.
% Rather than trying to fix catcodes that come into here, turn
@@ -1498,7 +1517,7 @@ and all files in that bundle must be distributed together.
% \end{macro}
%
% \begin{macro}{\pdfstringnewline}
-% \begin{macro}[aux]{\@@_pdfstring_newline:w}
+% \begin{macro}{\@@_pdfstring_newline:w}
% We avoid some hyperref warnings by making |\\| (almost) trivial in
% bookmarks: more precisely it might be used with a star and an
% optional argument, which we thus remove using an \pkg{xparse}
@@ -1531,7 +1550,7 @@ and all files in that bundle must be distributed together.
% later.)
%
% \begin{macro}{\list}
-% \begin{macro}[aux]{\@@_oldlist:nn}
+% \begin{macro}{\@@_oldlist:nn}
% Customise lists.
% \begin{macrocode}
\cs_new_eq:NN \@@_oldlist:nn \list
@@ -1641,7 +1660,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_pdfstring_cmd:w,
% \@@_pdfstring_cs:w,
@@ -1858,7 +1877,7 @@ and all files in that bundle must be distributed together.
}
% \end{macrocode}
%
-% \begin{macro}[int]{\@@_cmd:nn, \@@_cmd:no}
+% \begin{macro}{\@@_cmd:nn, \@@_cmd:no}
% Apply the key--value \meta{options}~|#1| after setting some
% default values. Then (unless |replace=false|) replace |@@| in~|#2|,
% which is a bit tricky: the |_| must be given the catcode expected by
@@ -1867,7 +1886,9 @@ and all files in that bundle must be distributed together.
% rescanning the whole argument. Then typeset the command in
% \tn{verbatim@font}, after turning it to harmless characters if
% needed (and keeping the underscore breakable); in any case, spaces
-% must be turned into \tn{@xobeysp}. Finally, produce an index entry.
+% must be turned into \tn{@xobeysp} and we must use \tn{@} to avoid
+% longer spaces after a control sequence that ends for instance with a
+% colon (empty signature). Finally, produce an index entry.
% Indexing is suppressed when \cs{l_@@_cmd_noindex_bool} is true.
% \begin{macrocode}
\cs_new_protected:Npn \@@_cmd:nn #1#2
@@ -1896,11 +1917,16 @@ and all files in that bundle must be distributed together.
}
\tl_replace_all:Nnn \l_@@_cmd_tl { ~ } { \@xobeysp }
\l_@@_cmd_tl
+ \@
}
\bool_if:NF \l_@@_cmd_noindex_bool
{
\quark_if_no_value:NF \l_@@_cmd_index_tl
- { \tl_set_eq:NN \l_@@_cmd_tl \l_@@_cmd_index_tl }
+ {
+ \tl_set:Nx \l_@@_cmd_tl
+ { \c_backslash_str \exp_not:o { \l_@@_cmd_index_tl } }
+ }
+
\exp_args:No \@@_key_get:n { \l_@@_cmd_tl }
\quark_if_no_value:NF \l_@@_cmd_module_tl
{
@@ -1994,12 +2020,12 @@ and all files in that bundle must be distributed together.
}
\cs_new_protected:Npn \@@_typeset_aux:n #1
{
- { \color[gray]{0.7} #1 }
+ { \color[gray]{0.5} #1 }
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {\@@_get_hyper_target:nN, \@@_get_hyper_target:oN, \@@_get_hyper_target:xN}
% Create a \pkg{hyperref} anchor from a macro name~|#1| and stores it
% in the token list variable~|#2|. For instance, |\prg_replicate:nn|
@@ -2016,7 +2042,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_names_get_seq:nN}
+% \begin{macro}{\@@_names_get_seq:nN}
% The argument~|#1| (argument of a |function| or |macro| environment)
% has catcodes $10$ (space), $12$ (other) and $13$ (active). Sanitize
% catcodes. If the |verb| option was used, output a one-item
@@ -2050,7 +2076,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_names_parse:, \@@_names_parse_one:n}
+% \begin{macro}{\@@_names_parse:, \@@_names_parse_one:n}
% The goal is to group variants together. We populate
% \cs{l_@@_names_block_tl} with local sequence variable named with
% \cs{@@_lseq_name:n} after the base forms. When encountering a new
@@ -2110,8 +2136,8 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_names_typeset:}
-% \begin{macro}[aux]{\@@_names_typeset_auxi:n}
+% \begin{macro}{\@@_names_typeset:}
+% \begin{macro}{\@@_names_typeset_auxi:n}
% This code is in particular used when typesetting function names in a
% \env{function} environment. The mapping to \cs{l_@@_names_block_tl}
% cannot use \cs{tl_map_inline:Nn} because the code following |\\|
@@ -2153,7 +2179,7 @@ and all files in that bundle must be distributed together.
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_names_typeset_auxii:n, \@@_names_typeset_auxii:x}
% In case the option |pTF| was given, typeset predicates before the
% |TF| functions. In case the option |noTF| was given, typeset the
@@ -2176,7 +2202,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_names_typeset_block:nN, \@@_names_typeset_block:xN}
+% \begin{macro}{\@@_names_typeset_block:nN, \@@_names_typeset_block:xN}
% Names in \env{function} and \env{macro} environments are typeset
% differently. To distinguish the two note that
% \cs{l_@@_nested_macro_int} is at least one when in an \env{macro}
@@ -2193,6 +2219,64 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}[pTF]{\@@_if_macro_internal:n}
+% \begin{macro}[EXP]{\@@_if_macro_internal_aux:w}
+% Determines whether the given macro should be considered internal or
+% public. If an option such as |int| was given then the answer is
+% \cs{l_@@_macro_internal_bool}, otherwise check for whether the macro
+% name contains~|__|.
+% \begin{macrocode}
+\prg_new_conditional:Npnn \@@_if_macro_internal:n #1 { p , T , F , TF }
+ {
+ \bool_if:NTF \l_@@_macro_internal_set_bool
+ {
+ \bool_if:NTF \l_@@_macro_internal_bool
+ { \prg_return_true: } { \prg_return_false: }
+ }
+ {
+ \tl_if_empty:fTF
+ {
+ \exp_after:wN \@@_if_macro_internal_aux:w
+ \tl_to_str:n { #1 ~ __ }
+ }
+ { \prg_return_false: } { \prg_return_true: }
+ }
+ }
+\exp_last_unbraced:NNNNo
+ \cs_new:Npn \@@_if_macro_internal_aux:w #1 { \tl_to_str:n { __ } } { }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_names_block_base_map:N}
+% The \cs{l_@@_names_block_tl} contains sequence variables
+% corresponding to different base functions and their variants. For
+% each such sequence, put the first and second items in
+% \cs{l_@@_tmpa_tl} and \cs{l_@@_tmpb_tl} and build the base
+% function's name.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_names_block_base_map:N #1
+ {
+ \tl_map_inline:Nn \l_@@_names_block_tl
+ {
+ \group_begin:
+ \seq_set_eq:NN \l_@@_tmpa_seq ##1
+ \seq_pop:NN \l_@@_tmpa_seq \l_@@_tmpa_tl
+ \seq_get:NN \l_@@_tmpa_seq \l_@@_tmpb_tl
+ \exp_args:NNx
+ \group_end:
+ #1
+ {
+ \l_@@_tmpa_tl
+ \str_if_eq_x:nnF { \l_@@_tmpb_tl } { \scan_stop: }
+ { : \l_@@_tmpb_tl }
+ \bool_if:NT \l_@@_macro_TF_bool { TF }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{The \env{function} environment}
%
% \begin{macrocode}
@@ -2244,7 +2328,7 @@ and all files in that bundle must be distributed together.
}
% \end{macrocode}
%
-% \begin{macro}[aux]{\@@_date_set:Nn}
+% \begin{macro}{\@@_date_set:Nn}
% Normalize the date into the format \texttt{YYYY-MM-DD}; more
% precisely month and day are allowed to be single digits.
% \begin{macrocode}
@@ -2261,7 +2345,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_deprecated_on:n}
+% \begin{macro}{\@@_deprecated_on:n}
% The date comparison function expects two dates in the YYYY-MM-DD
% format (|-|~is not subtraction here).
% Complain if a deprecated function should have been removed earlier.
@@ -2279,17 +2363,18 @@ and all files in that bundle must be distributed together.
{ \l_@@_tmpa_tl }
}
\bool_set_true:N \l_@@_macro_internal_bool
+ \bool_set_true:N \l_@@_macro_internal_set_bool
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_function:nnw}
+% \begin{macro}{\@@_function:nnw}
% \begin{arguments}
% \item Key--value list.
% \item Comma-separated list of functions; input has already been
% sanitised by catcode changes before reading the argument.
% \end{arguments}
-% \begin{macro}[int]{\@@_function_end:}
+% \begin{macro}{\@@_function_end:}
% Make sure any paragraph is finished, and similar safe practices at
% the beginning of an environment which will typeset material.
% Initialize some variables. Parse the key--value list. Clean up the
@@ -2322,7 +2407,7 @@ and all files in that bundle must be distributed together.
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_function_typeset_start:, \@@_function_typeset_stop:}
% At the start of the \env{function} environment, before performing
% any assignment, close the last paragraph, and set up the typesetting
@@ -2341,7 +2426,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_function_init:}
+% \begin{macro}{\@@_function_init:}
% Complain if \texttt{function} environments are nested. Clear
% various variables.
% \begin{macrocode}
@@ -2369,7 +2454,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_shorthand_meta:, \@@_shorthand_meta:w}
+% \begin{macro}{\@@_shorthand_meta:, \@@_shorthand_meta:w}
% Allow |<...>| to be used as markup for |\meta{...}|.
% \begin{macrocode}
\cs_new_protected:Npn \@@_shorthand_meta:
@@ -2378,7 +2463,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_function_reset:}
+% \begin{macro}{\@@_function_reset:}
% Clear some variables.
% \begin{macrocode}
\cs_new_protected:Npn \@@_function_reset:
@@ -2388,7 +2473,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_function_typeset:}
+% \begin{macro}{\@@_function_typeset:}
% Typeset in the coffin \cs{l_@@_functions_coffin} the functions listed in
% \cs{l_@@_names_block_tl} and the relevant dates, then set
% \cs{l_@@_long_name_bool} to be \texttt{true} if this coffin is
@@ -2407,7 +2492,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_function_descr_start:w, \@@_function_descr_stop:}
% The last step in \cs{@@_function:nnw} (the beginning of a
% \env{function} environment) is to open a coffin which will capture
@@ -2425,7 +2510,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_function_assemble:}
+% \begin{macro}{\@@_function_assemble:}
% The box \cs{g_@@_syntax_box} contains the contents of the syntax
% environment if it was used. Now that we have all the pieces, join
% together the syntax coffin, the names coffin, and the description
@@ -2475,7 +2560,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_typeset_functions:}
+% \begin{macro}{\@@_typeset_functions:}
% This function builds the \cs{l_@@_functions_coffin} by typesetting the
% function names (with variants) and the relevant dates in a
% \env{tabular} environment. The use of rules \tn{toprule},
@@ -2502,9 +2587,9 @@ and all files in that bundle must be distributed together.
% \end{macro}
%
% ^^A TODO: collect all index targets from a given function environment in a box and stick it at the top.
-% \begin{macro}[int]
+% \begin{macro}
% {\@@_typeset_function_block:nN, \@@_typeset_function_block:xN}
-% \begin{macro}[aux]{\@@_function_index:n, \@@_function_index:x}
+% \begin{macro}{\@@_function_index:n, \@@_function_index:x}
% |#1| is a csname, |#2| a boolean indicating whether to add |TF| or not.
% \begin{macrocode}
\cs_new_protected:Npn \@@_typeset_function_block:nN #1#2
@@ -2588,7 +2673,7 @@ and all files in that bundle must be distributed together.
% \end{macro}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_typeset_dates:}
+% \begin{macro}{\@@_typeset_dates:}
% To display metadata for when functions are added/modified.
% This function must be expandable since it produces rules for use in
% alignments.
@@ -2614,7 +2699,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_syntax:w, \@@_syntax_end:}
+% \begin{macro}{\@@_syntax:w, \@@_syntax_end:}
% Implement the \env{syntax} environment.
% \begin{macrocode}
\dim_new:N \l_@@_syntax_dim
@@ -2664,13 +2749,22 @@ and all files in that bundle must be distributed together.
{
aux .value_forbidden:n = true ,
aux .code:n =
- { \bool_set_true:N \l_@@_macro_aux_bool } ,
+ {
+ \msg_warning:nnnn { l3doc } { deprecated-option }
+ { aux } { function/macro }
+ } ,
internal .value_forbidden:n = true ,
internal .code:n =
- { \bool_set_true:N \l_@@_macro_internal_bool } ,
+ {
+ \bool_set_true:N \l_@@_macro_internal_bool
+ \bool_set_true:N \l_@@_macro_internal_set_bool
+ } ,
int .value_forbidden:n = true ,
int .code:n =
- { \bool_set_true:N \l_@@_macro_internal_bool } ,
+ {
+ \bool_set_true:N \l_@@_macro_internal_bool
+ \bool_set_true:N \l_@@_macro_internal_set_bool
+ } ,
var .value_forbidden:n = true ,
var .code:n =
{ \bool_set_true:N \l_@@_macro_var_bool } ,
@@ -2716,7 +2810,7 @@ and all files in that bundle must be distributed together.
}
% \end{macrocode}
%
-% \begin{macro}[int]{\@@_macro:nnw}
+% \begin{macro}{\@@_macro:nnw}
% The arguments are a key--value list of \meta{options} and a
% comma-list of \meta{names}, read verbatim by \pkg{xparse}. First
% initialize some variables before applying the \meta{options}, then
@@ -2732,7 +2826,6 @@ and all files in that bundle must be distributed together.
\keys_set:nn { l3doc/macro } {#1}
\@@_names_get_seq:nN {#2} \l_@@_names_seq
\@@_names_parse:
- \@@_macro_adjust_internal:
\@@_macro_save_names:
\@@_names_typeset:
\@@_macro_dump:
@@ -2741,7 +2834,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_macro_init:}
+% \begin{macro}{\@@_macro_init:}
% The booleans hold various key--value options,
% \cs{l_@@_nested_macro_int} counts the number of \env{macro}
% environments around the current point (is $0$ outside).
@@ -2749,8 +2842,8 @@ and all files in that bundle must be distributed together.
\cs_new_protected:Npn \@@_macro_init:
{
\int_incr:N \l_@@_nested_macro_int
- \bool_set_false:N \l_@@_macro_aux_bool
\bool_set_false:N \l_@@_macro_internal_bool
+ \bool_set_false:N \l_@@_macro_internal_set_bool
\bool_set_false:N \l_@@_macro_TF_bool
\bool_set_false:N \l_@@_macro_pTF_bool
\bool_set_false:N \l_@@_macro_noTF_bool
@@ -2777,7 +2870,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_macro_reset:}
+% \begin{macro}{\@@_macro_reset:}
% We ensure that \cs{cs} commands nested inside a macro whose module
% is imposed are not affected.
% \begin{macrocode}
@@ -2788,53 +2881,27 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_macro_adjust_internal:}
-% If the macros are neither marked as internal nor auxiliary, and all
-% macros in \cs{l_@@_names_seq} contain |__| then mark them as being
-% internal.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_macro_adjust_internal:
- {
- \bool_if:NF \l_@@_macro_internal_bool
- {
- \bool_if:NF \l_@@_macro_aux_bool
- {
- \bool_set_true:N \l_@@_macro_internal_bool
- \seq_map_inline:Nn \l_@@_names_seq
- {
- \tl_if_in:noF {##1} { \tl_to_str:n { __ } }
- { \bool_set_false:N \l_@@_macro_internal_bool }
- }
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[aux]{\@@_macro_save_names:}
+% \begin{macro}{\@@_macro_save_names:}
% The list of names defined in a set of \env{macro} environments is
-% eventually used to display on which page they are documented.
+% eventually used to display on which page they are documented. If
+% the |documented-as| key is given, use that, otherwise find names in
+% \cs{l_@@_names_block_tl}.
% \begin{macrocode}
\cs_new_protected:Npn \@@_macro_save_names:
{
- \tl_map_inline:Nn \l_@@_names_block_tl
+ \tl_if_empty:NTF \l_@@_macro_documented_tl
+ { \@@_names_block_base_map:N \@@_macro_save_names_aux:n }
{
- \seq_set_eq:NN \l_@@_tmpa_seq ##1
- \seq_pop:NN \l_@@_tmpa_seq \l_@@_tmpa_tl
- \seq_get:NN \l_@@_tmpa_seq \l_@@_tmpb_tl
- \seq_gput_right:Nx \g_@@_nested_names_seq
- {
- \l_@@_tmpa_tl
- \str_if_eq_x:nnF { \l_@@_tmpb_tl } { \scan_stop: }
- { : \l_@@_tmpb_tl }
- \bool_if:NT \l_@@_macro_TF_bool { TF }
- }
+ \seq_gput_right:Nf \g_@@_nested_names_seq
+ { \exp_after:wN \token_to_str:N \l_@@_macro_documented_tl }
}
}
+\cs_new_protected:Npn \@@_macro_save_names_aux:n #1
+ { \seq_gput_right:Nn \g_@@_nested_names_seq {#1} }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_macro_dump:}
+% \begin{macro}{\@@_macro_dump:}
% This calls |\makelabel{}|
% \begin{macrocode}
\cs_new_protected:Npn \@@_macro_dump:
@@ -2858,7 +2925,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_macro_typeset_block:nN}
+% \begin{macro}{\@@_macro_typeset_block:nN}
% Used to typeset a macro and its variants. |#1| is the macro name,
% |#2| is a boolean controlling whether to add |TF|.
% \begin{macrocode}
@@ -2908,7 +2975,7 @@ and all files in that bundle must be distributed together.
\DoNotIndex {#1}
\bool_if:NT #2
{
- \bool_if:NF \l_@@_macro_aux_bool
+ \@@_if_macro_internal:nF {#1}
{ \seq_gput_right:Nn \g_doc_macros_seq {#1} }
\hbox_set:Nw \l_@@_macro_index_box
\hbox_unpack_clear:N \l_@@_macro_index_box
@@ -2922,7 +2989,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_macro_typeset_one:nN}
+% \begin{macro}{\@@_macro_typeset_one:nN}
% For a long time, \cls{l3doc} collected the macro names as labels in
% the first items of nested \tn{trivlist}, but these were not closed
% properly with \tn{endtrivlist}. Also, it interacted in surprising
@@ -2970,7 +3037,7 @@ and all files in that bundle must be distributed together.
}
\cs_new_protected:Npn \@@_macroname_prefix:n #1
{
- \bool_if:NTF \l_@@_macro_aux_bool
+ \@@_if_macro_internal:nTF {#1}
{ \@@_typeset_aux:n {#1} } {#1}
}
\cs_generate_variant:Nn \@@_macroname_prefix:n { o }
@@ -3046,7 +3113,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_test_missing:n}
+% \begin{macro}{\@@_test_missing:n}
% Keys in \cs{g_@@_missing_tests_prop} are lists of macros given as
% arguments of one \env{macro} environment. Values are pairs of a
% file name and a comment about the missing tests.
@@ -3069,7 +3136,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_macro_end:}
+% \begin{macro}{\@@_macro_end:}
% It is too late for anyone to declare a test file for this macro, so
% we can check now whether the macro is tested. If the \env{macro}
% environment which is being ended is the outermost one, then wrap
@@ -3082,15 +3149,12 @@ and all files in that bundle must be distributed together.
\endtrivlist
\@@_macro_end_check_tested:
\int_compare:nNnT \l_@@_nested_macro_int = 1
- {
- \@@_macro_end_style:n { \@@_print_end_definition: }
- \seq_gclear:N \g_@@_nested_names_seq
- }
+ { \@@_macro_end_style:n { \@@_print_end_definition: } }
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_macro_end_check_tested:}
+% \begin{macro}{\@@_macro_end_check_tested:}
% If the |checktest| option was issued and the macro is not an
% auxiliary nor a variable (and it does not have a test), then add it
% to the sequence of non-tested macros.
@@ -3100,14 +3164,15 @@ and all files in that bundle must be distributed together.
\bool_lazy_all:nT
{
{ \g_@@_checktest_bool }
- { ! \l_@@_macro_aux_bool }
{ ! \l_@@_macro_var_bool }
{ ! \l_@@_macro_tested_bool }
}
{
+ \seq_set_filter:NNn \l_@@_tmpa_seq \l_@@_names_seq
+ { ! \@@_if_macro_internal_p:n {##1} }
\seq_gput_right:Nx \g_@@_not_tested_seq
{
- \seq_use:Nn \l_@@_names_seq { , }
+ \seq_use:Nn \l_@@_tmpa_seq { , }
\bool_if:NTF \l_@@_macro_pTF_bool {~(pTF)}
{ \bool_if:NT \l_@@_macro_TF_bool {~(TF)} }
}
@@ -3116,7 +3181,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_macro_end_style:n}
+% \begin{macro}{\@@_macro_end_style:n}
% Style for the extra information at the end of a top-level
% \env{macro} environment.
% \begin{macrocode}
@@ -3128,7 +3193,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_print_end_definition:,
% \@@_macro_end_wrap_item:n,
@@ -3164,33 +3229,23 @@ and all files in that bundle must be distributed together.
}
\cs_new_protected:Npn \@@_print_documented:
{
- \bool_lazy_or:nnF
- { \l_@@_macro_aux_bool }
- { \l_@@_macro_internal_bool }
+ \seq_gset_filter:NNn \g_@@_nested_names_seq
+ \g_@@_nested_names_seq
+ { ! \@@_if_macro_internal_p:n {##1} }
+ \seq_if_empty:NF \g_@@_nested_names_seq
{
\int_set:Nn \l_@@_tmpa_int
{ \seq_count:N \g_@@_nested_names_seq }
- \tl_if_empty:NTF \l_@@_macro_documented_tl
- {
- \tl_set:Nx \l_@@_macro_documented_tl
- { \seq_item:Nn \g_@@_nested_names_seq { 1 } }
- }
- {
- \tl_set:Nf \l_@@_macro_documented_tl
- {
- \exp_after:wN \token_to_str:N
- \l_@@_macro_documented_tl
- }
- }
\int_compare:nNnTF \l_@@_tmpa_int = 1 {~This~} {~These~}
\bool_if:NTF \l_@@_macro_var_bool {variable} {function}
\int_compare:nNnTF \l_@@_tmpa_int = 1 {~is~} {s~are~}
documented~on~page~
- \@@_get_hyper_target:oN
- \l_@@_macro_documented_tl
+ \@@_get_hyper_target:xN
+ { \seq_item:Nn \g_@@_nested_names_seq { 1 } }
\l_@@_tmpa_tl
\exp_args:Nx \pageref { \l_@@_tmpa_tl } .
}
+ \seq_gclear:N \g_@@_nested_names_seq
}
% \end{macrocode}
% \end{macro}
@@ -3378,7 +3433,7 @@ and all files in that bundle must be distributed together.
%
% \begin{macro}
% {\StopEventually, \Finale, \AlsoImplementation, \OnlyDescription}
-% \begin{variable}[aux]{\g_@@_finale_tl}
+% \begin{variable}{\g_@@_finale_tl}
% TODO: remove these four commands altogether, document that it is
% better to use the \env{documentation} and \env{implementation}
% environments.
@@ -3405,7 +3460,7 @@ and all files in that bundle must be distributed together.
% \end{variable}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_input:n}
+% \begin{macro}{\@@_input:n}
% Inputting a file, with some setup: the module name should be empty
% before the first |<@@=|\meta{module}|>| line in the file.
% \begin{macrocode}
@@ -3559,7 +3614,7 @@ and all files in that bundle must be distributed together.
%
% \subsubsection{The \env{macrocode} environment}
%
-% \begin{macro}[aux]{\xmacro@code, \@@_xmacro_code:n, \@@_xmacro_code:w}
+% \begin{macro}{\xmacro@code, \@@_xmacro_code:n, \@@_xmacro_code:w}
% Hook into the \texttt{macrocode} environment in a dirty way:
% \tn{xmacro@code} is responsible for grabbing (and tokenizing) the
% body of the environment. Redefine it to pass what it grabs to
@@ -3823,7 +3878,7 @@ and all files in that bundle must be distributed together.
%
% \subsubsection{Internal index commands}
%
-% \begin{macro}[int]{\it@is@a}
+% \begin{macro}{\it@is@a}
% The index of one-character commands within the \env{macrocode}
% environment is produced using \tn{it@is@a} \meta{char}. Alter that
% command.
@@ -3843,7 +3898,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_special_index:nn}
+% \begin{macro}{\@@_special_index:nn}
% ^^A TODO this override is somewhat a hack
% \begin{macrocode}
\cs_new_protected:Npn \@@_special_index:nn #1#2
@@ -3996,7 +4051,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_quote_special_char:N}
+% \begin{macro}{\@@_quote_special_char:N}
% Quote some special characters.
% \begin{macrocode}
\cs_new_protected:Npn \@@_quote_special_char:N #1
@@ -4012,7 +4067,7 @@ and all files in that bundle must be distributed together.
%
% \subsubsection{Finding sort-key and module}
%
-% \begin{macro}[aux]{\@@_key_get:n}
+% \begin{macro}{\@@_key_get:n}
% Sets \cs{l_@@_index_macro_tl}, \cs{l_@@_index_key_tl}, and
% \cs{l_@@_index_module_tl} from |#1|. The base function is stored by
% \cs{@@_key_get_base:nN} in \cs{l_@@_index_macro_tl}, falling back to
@@ -4058,7 +4113,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_key_trim_module:n, \@@_key_drop_underscores:}
+% \begin{macro}{\@@_key_trim_module:n, \@@_key_drop_underscores:}
% Helper that removes from \cs{l_@@_index_module_tl} everything after
% the first occurence of |#1|. Helper that removes any leading
% underscore from \cs{l_@@_index_key_tl}.
@@ -4078,7 +4133,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_key_func:}
+% \begin{macro}{\@@_key_func:}
% The function \cs{@@_key_func:} is used if there is a colon, so
% either for usual \pkg{expl3} functions or for keys from
% \pkg{l3keys}. After removing from the key a leading dot (for the
@@ -4097,7 +4152,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_key_var:, \@@_key_get_module:}
+% \begin{macro}{\@@_key_var:, \@@_key_get_module:}
% The function \cs{@@_key_var:} covers cases with no~|:| but with~|_|,
% typically variables but occasionally non-\pkg{expl3} functions such
% as \Lua{} function with underscores. First test the second
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
index 9cdfc7bb0bc..b29d4acf100 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
@@ -1,13 +1,13 @@
% \iffalse
%
-%% File l3dosctrip.dtx Copyright (C) 2012,2016,2017 The LaTeX3 Project
+%% File l3dosctrip.dtx Copyright (C) 2012,2014-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
+% https://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.
@@ -35,7 +35,7 @@
\else \csname fi\endcsname
%</gobble>
\def\filename{docstrip.dtx}
- \documentclass[full]{l3doc}
+ \documentclass[full,kernel]{l3doc}
\ExplSyntaxOn
\cs_set_eq:NN \__codedoc_replace_at_at:N \use_none:n
\ExplSyntaxOff
@@ -61,7 +61,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
index 7c8e43143c5..9d442e2fe77 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
%</driver>
%<*driver|package>
%</driver|package>
@@ -45,7 +45,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -518,7 +518,7 @@
%<*dvisvgm|dvipdfmx|dvips|xdvipdfmx>
% \end{macrocode}
%
-% \begin{macro}[int]{\@@_color_pickup:N}
+% \begin{macro}{\@@_color_pickup:N}
% Allow for \LaTeXe{} color. Here, the possible input values are limited:
% \texttt{dvips}-style colors can mainly be taken as-is with the exception
% spot ones (here we need a model and a tint).
@@ -550,11 +550,11 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_color_select:n, \@@_color_select:V}
-% \begin{macro}[aux, EXP]{\@@_convert_model:w}
-% \begin{macro}[aux, EXP]{\@@_color_convert_spot:}
-% \begin{macro}[aux, EXP]{\@@_color_convert_spot:w}
-% \begin{macro}[aux]{\@@_color_reset:}
+% \begin{macro}{\@@_color_select:n, \@@_color_select:V}
+% \begin{macro}[EXP]{\@@_convert_model:w}
+% \begin{macro}[EXP]{\@@_color_convert_spot:}
+% \begin{macro}[EXP]{\@@_color_convert_spot:w}
+% \begin{macro}{\@@_color_reset:}
% Mainly no conversation but a little work with \texttt{spot} colors as they
% can't have a tint level here! The easy route of just picking up
% \texttt{spot} as a model won't work as there could be additional models
@@ -597,8 +597,8 @@
%<*pdfmode>
% \end{macrocode}
%
-% \begin{macro}[aux]{\@@_color_pickup:N}
-% \begin{macro}[aux]{\@@_color_pickup_aux:w}
+% \begin{macro}{\@@_color_pickup:N}
+% \begin{macro}{\@@_color_pickup_aux:w}
% The current color in driver-dependent format: pick up the package-mode
% data if available. We end up converting back and forward in this route as
% we store our color data in \texttt{dvips} format.
@@ -656,16 +656,16 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int]{\@@_color_select:n, \@@_color_select:V}
-% \begin{macro}[aux, EXP]{\@@_color_convert:w}
-% \begin{macro}[aux, EXP]
+% \begin{macro}{\@@_color_select:n, \@@_color_select:V}
+% \begin{macro}[EXP]{\@@_color_convert:w}
+% \begin{macro}[EXP]
% {
% \@@_color_convert_gray:w ,
% \@@_color_convert_cmyk:w ,
% \@@_color_convert_rgb:w ,
% \@@_color_convert_spot:w
% }
-% \begin{macro}[aux]{\@@_color_reset:}
+% \begin{macro}{\@@_color_reset:}
% There is a dedicated primitive/primitive interface for setting colors.
% As with scoping, this approach is not suitable for cached operations.
% Most of the conversions are trivial but the need to cover spot colors
@@ -721,7 +721,7 @@
%
% \subsubsection{Basics}
%
-% \begin{macro}[int]{\@@_literal:n}
+% \begin{macro}{\@@_literal:n}
% In the case of \texttt{dvips} there is no build-in saving of the current
% position, and so some additional PostScript is required to set up the
% transformation matrix and also to restore it afterwards. Notice the use
@@ -756,7 +756,7 @@
%
% \subsection{Driver-specific auxiliaries}
%
-% \begin{macro}[int, EXP]{\@@_absolute_lengths:n}
+% \begin{macro}[EXP]{\@@_absolute_lengths:n}
% The \texttt{dvips} driver scales all absolute dimensions based
% on the output resolution selected and any \TeX{} magnification. Thus
% for any operation involving absolute lengths there is a correction to
@@ -844,14 +844,14 @@
%
% \subsection{Images}
%
-% \begin{macro}[int]{\@@_image_getbb_eps:n}
+% \begin{macro}{\@@_image_getbb_eps:n}
% Simply use the generic function.
% \begin{macrocode}
\cs_new_eq:NN \@@_image_getbb_eps:n \__image_read_bb:n
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_image_include_eps:n}
+% \begin{macro}{\@@_image_include_eps:n}
% The special syntax is relatively clear here: remember we need PostScript
% sizes here.
% \begin{macrocode}
@@ -864,7 +864,7 @@
%
% \subsection{Drawing}
%
-% \begin{macro}[aux]{\@@_draw_literal:n, \@@_draw_literal:x}
+% \begin{macro}{\@@_draw_literal:n, \@@_draw_literal:x}
% Literals with no positioning (using |ps:| each one is positioned but
% cut off from everything else, so no good for the stepwise approach needed
% here).
@@ -875,7 +875,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_begin:, \@@_draw_end:}
+% \begin{macro}{\@@_draw_begin:, \@@_draw_end:}
% The |ps::[begin]| special here deals with positioning but allows us to
% continue on to a matching |ps::[end]|: contrast with |ps:|, which positions
% but where we can't split material between separate calls. The
@@ -899,7 +899,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_scope_begin:, \@@_draw_scope_end:}
+% \begin{macro}{\@@_draw_scope_begin:, \@@_draw_scope_end:}
% Scope here may need to contain saved definitions, so the entire memory
% rather than just the graphic state has to be sent to the stack.
% \begin{macrocode}
@@ -910,9 +910,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_moveto:nn, \@@_draw_lineto:nn}
-% \begin{macro}[int]{\@@_draw_rectangle:nnnn}
-% \begin{macro}[int]{\@@_draw_curveto:nnnnnn}
+% \begin{macro}{\@@_draw_moveto:nn, \@@_draw_lineto:nn}
+% \begin{macro}{\@@_draw_rectangle:nnnn}
+% \begin{macro}{\@@_draw_curveto:nnnnnn}
% Path creation operations mainly resolve directly to PostScript primitive
% steps, with only the need to convert to \texttt{bp}. Notice that
% \texttt{x}-type expansion is included here to ensure that any variable
@@ -954,8 +954,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_evenodd_rule:, \@@_draw_nonzero_rule:}
-% \begin{variable}[aux]{\g_@@_draw_eor_bool}
+% \begin{macro}{\@@_draw_evenodd_rule:, \@@_draw_nonzero_rule:}
+% \begin{variable}{\g_@@_draw_eor_bool}
% The even-odd rule here can be implemented as a simply switch.
% \begin{macrocode}
\cs_new_protected:Npn \@@_draw_evenodd_rule:
@@ -967,7 +967,7 @@
% \end{variable}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {
% \@@_draw_closepath: ,
% \@@_draw_stroke: ,
@@ -977,7 +977,7 @@
% \@@_draw_clip: ,
% \@@_draw_discardpath:
% }
-% \begin{variable}[aux]{\g_@@_draw_clip_bool}
+% \begin{variable}{\g_@@_draw_clip_bool}
% Unlike PDF, PostScript doesn't track separate colors for strokes and other
% elements. It is also desirable to have the |clip| keyword after a stroke or
% fill. To achieve those outcomes, there is some work to do. For color, if a
@@ -1074,11 +1074,11 @@
% \end{variable}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_dash:nn}
-% \begin{macro}[aux]{\@@_draw_dash:n}
-% \begin{macro}[int]{\@@_draw_linewidth:n}
-% \begin{macro}[int]{\@@_draw_miterlimit:n}
-% \begin{macro}[int]
+% \begin{macro}{\@@_draw_dash:nn}
+% \begin{macro}{\@@_draw_dash:n}
+% \begin{macro}{\@@_draw_linewidth:n}
+% \begin{macro}{\@@_draw_miterlimit:n}
+% \begin{macro}
% {
% \@@_draw_cap_butt:, \@@_draw_cap_round:, \@@_draw_cap_rectangle:,
% \@@_draw_join_miter:, \@@_draw_join_round:, \@@_draw_join_bevel:
@@ -1124,20 +1124,20 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\_@@_draw_color_reset:}
-% \begin{macro}[int]
+% \begin{macro}{\_@@_draw_color_reset:}
+% \begin{macro}
% {
% \@@_draw_color_cmyk:nnnn ,
% \@@_draw_color_cmyk_fill:nnnn ,
% \@@_draw_color_cmyk_stroke:nnnn
% }
-% \begin{macro}[int]
+% \begin{macro}
% {
% \@@_draw_color_gray:n ,
% \@@_draw_color_gray_fill:n ,
% \@@_draw_color_gray_stroke:n
% }
-% \begin{macro}[int]
+% \begin{macro}
% {
% \@@_draw_color_rgb:nnn ,
% \@@_draw_color_rgb_fill:nnn ,
@@ -1237,7 +1237,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_transformcm:nnnnnn}
+% \begin{macro}{\@@_draw_transformcm:nnnnnn}
% The first four arguments here are floats (the affine matrix), the last
% two are a displacement vector. Once again, force evaluation to allow for
% caching.
@@ -1257,7 +1257,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_hbox:Nnnnnnn}
+% \begin{macro}{\@@_draw_hbox:Nnnnnnn}
% Inside a picture |@beginspecial|/|@endspecial| are active, which is
% normally a good thing but means that the position and scaling would be off
% if the box was inserted directly. Instead, we need to reverse the effect of
@@ -1303,7 +1303,7 @@
%
% \subsubsection{Basics}
%
-% \begin{macro}[int]{\@@_literal:n}
+% \begin{macro}{\@@_literal:n}
% This is equivalent to \verb|\special{pdf:}| but the engine can
% track it. Without the \texttt{direct} keyword everything is kept in
% sync: the transformation matrix is set to the current point automatically.
@@ -1320,7 +1320,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_scope_begin:, \@@_scope_end:}
+% \begin{macro}{\@@_scope_begin:, \@@_scope_end:}
% Higher-level interfaces for saving and restoring the graphic state.
% \begin{macrocode}
\cs_new_protected:Npx \@@_scope_begin:
@@ -1338,7 +1338,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_matrix:n}
+% \begin{macro}{\@@_matrix:n}
% Here the appropriate function is set up to insert an affine matrix
% into the PDF. With \pdfTeX{} and \LuaTeX{} in direct PDF output mode there
% is a primitive for this, which only needs the rotation/scaling/skew part.
@@ -1382,7 +1382,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_box_use_rotate:Nn}
+% \begin{macro}{\@@_box_use_rotate:Nn}
% \begin{variable}{\l_@@_cos_fp, \l_@@_sin_fp}
% Rotations are set using an affine transformation matrix which therefore
% requires sine/cosine values not the angle itself. We store the rounded
@@ -1454,9 +1454,9 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int]
+% \begin{macro}
% {\@@_image_getbb_jpg:n, \@@_image_getbb_pdf:n, \@@_image_getbb_png:n}
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_image_getbb_auxi:n, \@@_image_getbb_auxii:n}
% Getting the bounding box here requires us to box up the image and
% measure it. To deal with the difference in feature support in bitmap
@@ -1546,7 +1546,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {\@@_image_include_jpg:n, \@@_image_include_pdf:n, \@@_image_include_png:n}
% Images are already loaded for the measurement part of the code, so
% inclusion is straight-forward, with only any attributes to worry about. The
@@ -1580,7 +1580,7 @@
%
% \subsubsection{Basics}
%
-% \begin{macro}[int]{\@@_literal:n}
+% \begin{macro}{\@@_literal:n}
% Equivalent to \texttt{pdf:content} but favored as the link to
% the \pdfTeX{} primitive approach is clearer. Some higher-level operations
% use |\tex_special:D| directly: see the later comments on where this is
@@ -1591,7 +1591,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_scope_begin:, \@@_scope_end:}
+% \begin{macro}{\@@_scope_begin:, \@@_scope_end:}
% Scoping is done using the driver-specific specials.
% \begin{macrocode}
\cs_new_protected:Npn \@@_scope_begin:
@@ -1625,7 +1625,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_box_use_rotate:Nn}
+% \begin{macro}{\@@_box_use_rotate:Nn}
% Rotating in \texttt{(x)}dvipdmfx can be implemented using either PDF or
% driver-specific code. The former approach however is not \enquote{aware}
% of the content of boxes: this means that any embedded links would not be
@@ -1671,7 +1671,7 @@
%
% \subsection{Images}
%
-% \begin{macro}[int]
+% \begin{macro}
% {
% \@@_image_getbb_eps:n, \@@_image_getbb_jpg:n,
% \@@_image_getbb_pdf:n, \@@_image_getbb_png:n
@@ -1698,21 +1698,21 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}[aux]{\g_@@_image_int}
+% \begin{variable}{\g_@@_image_int}
% Used to track the object number associated with each image.
% \begin{macrocode}
\int_new:N \g_@@_image_int
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int]
+% \begin{macro}
% {
% \@@_image_include_eps:n, \@@_image_include_jpg:n,
% \@@_image_include_pdf:n, \@@_image_include_png:n
% }
-% \begin{macro}[aux]{\@@_image_include_auxi:nn}
-% \begin{macro}[aux]{\@@_image_include_auxii:nnn, \@@_image_include_auxii:xnn}
-% \begin{macro}[aux]{\@@_image_include_auxiii:nn}
+% \begin{macro}{\@@_image_include_auxi:nn}
+% \begin{macro}{\@@_image_include_auxii:nnn, \@@_image_include_auxii:xnn}
+% \begin{macro}{\@@_image_include_auxiii:nn}
% The special syntax depends on the file type. There is a difference in
% how PDF images are best handled between |dvipdfmx| and |xdvipdfmx|: for
% the latter it is better to use the primitive route. The relevant code for
@@ -1817,14 +1817,14 @@
%
% \subsection{Images}
%
-% \begin{macro}[int]
+% \begin{macro}
% {\@@_image_getbb_jpg:n, \@@_image_getbb_pdf:n, \@@_image_getbb_png:n}
-% \begin{macro}[aux]{\@@_image_getbb_auxi:nN}
-% \begin{macro}[aux]{\@@_image_getbb_auxii:nnN, \@@_image_getbb_auxii:VnN}
-% \begin{macro}[aux]{\@@_image_getbb_auxiii:nNnn}
-% \begin{macro}[aux]{\@@_image_getbb_auxiv:nnNnn, \@@_image_getbb_auxiv:VnNnn}
-% \begin{macro}[aux]{\@@_image_getbb_auxv:nNnn, \@@_image_getbb_auxv:nNnn}
-% \begin{macro}[aux, EXP]{\@@_image_getbb_pagebox:w}
+% \begin{macro}{\@@_image_getbb_auxi:nN}
+% \begin{macro}{\@@_image_getbb_auxii:nnN, \@@_image_getbb_auxii:VnN}
+% \begin{macro}{\@@_image_getbb_auxiii:nNnn}
+% \begin{macro}{\@@_image_getbb_auxiv:nnNnn, \@@_image_getbb_auxiv:VnNnn}
+% \begin{macro}{\@@_image_getbb_auxv:nNnn, \@@_image_getbb_auxv:nNnn}
+% \begin{macro}[EXP]{\@@_image_getbb_pagebox:w}
% For \texttt{xdvipdfmx}, there are two primitives that allow us to obtain
% the bounding box without needing \texttt{extractbb}. The only complexity
% is passing the various minor variations to a common core process. The
@@ -1900,7 +1900,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_image_include_pdf:n}
+% \begin{macro}{\@@_image_include_pdf:n}
% For PDF images, properly supporting the |pagebox| concept in \XeTeX{}
% is best done using the |\xetex_pdffile:D| primitive. The syntax here
% is the same as for the image measurement part, although we know at this
@@ -1931,7 +1931,7 @@
%
% \subsection{Drawing}
%
-% \begin{macro}[aux]{\@@_draw_literal:n, \@@_draw_literal:x}
+% \begin{macro}{\@@_draw_literal:n, \@@_draw_literal:x}
% Pass data through using a dedicated interface.
% \begin{macrocode}
\cs_new_eq:NN \@@_draw_literal:n \@@_literal:n
@@ -1939,7 +1939,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_begin:, \@@_draw_end:}
+% \begin{macro}{\@@_draw_begin:, \@@_draw_end:}
% No special requirements here, so simply set up a drawing scope.
% \begin{macrocode}
\cs_new_protected:Npn \@@_draw_begin:
@@ -1949,7 +1949,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_scope_begin:, \@@_draw_scope_end:}
+% \begin{macro}{\@@_draw_scope_begin:, \@@_draw_scope_end:}
% In contrast to a general scope, a drawing scope is always done using
% the PDF operators so is the same for all relevant drivers.
% \begin{macrocode}
@@ -1960,9 +1960,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_moveto:nn, \@@_draw_lineto:nn}
-% \begin{macro}[int]{\@@_draw_curveto:nnnnnn}
-% \begin{macro}[int]{\@@_draw_rectangle:nnnn}
+% \begin{macro}{\@@_draw_moveto:nn, \@@_draw_lineto:nn}
+% \begin{macro}{\@@_draw_curveto:nnnnnn}
+% \begin{macro}{\@@_draw_rectangle:nnnn}
% Path creation operations all resolve directly to PDF primitive steps, with
% only the need to convert to \texttt{bp}. Notice that \texttt{x}-type
% expansion is included here to ensure that any variable values are
@@ -2002,8 +2002,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_evenodd_rule:, \@@_draw_nonzero_rule:}
-% \begin{variable}[int]{\g_@@_draw_eor_bool}
+% \begin{macro}{\@@_draw_evenodd_rule:, \@@_draw_nonzero_rule:}
+% \begin{variable}{\g_@@_draw_eor_bool}
% The even-odd rule here can be implemented as a simply switch.
% \begin{macrocode}
\cs_new_protected:Npn \@@_draw_evenodd_rule:
@@ -2015,7 +2015,7 @@
% \end{variable}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {
% \@@_draw_closepath: ,
% \@@_draw_stroke: ,
@@ -2054,11 +2054,11 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_dash:nn}
-% \begin{macro}[aux]{\@@_draw_dash:n}
-% \begin{macro}[int]{\@@_draw_linewidth:n}
-% \begin{macro}[int]{\@@_draw_miterlimit:n}
-% \begin{macro}[int]
+% \begin{macro}{\@@_draw_dash:nn}
+% \begin{macro}{\@@_draw_dash:n}
+% \begin{macro}{\@@_draw_linewidth:n}
+% \begin{macro}{\@@_draw_miterlimit:n}
+% \begin{macro}
% {
% \@@_draw_cap_butt:, \@@_draw_cap_round:, \@@_draw_cap_rectangle:,
% \@@_draw_join_miter:, \@@_draw_join_round:, \@@_draw_join_bevel:
@@ -2104,27 +2104,27 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {
% \@@_draw_color_cmyk:nnnn ,
% \@@_draw_color_cmyk_fill:nnnn ,
% \@@_draw_color_cmyk_stroke:nnnn
% }
-% \begin{macro}[aux]{\@@_draw_color_cmyk_aux:nnnn}
-% \begin{macro}[int]
+% \begin{macro}{\@@_draw_color_cmyk_aux:nnnn}
+% \begin{macro}
% {
% \@@_draw_color_gray:n ,
% \@@_draw_color_gray_fill:n ,
% \@@_draw_color_gray_stroke:n
% }
-% \begin{macro}[aux]{\@@_draw_color_gray_aux:n}
-% \begin{macro}[int]
+% \begin{macro}{\@@_draw_color_gray_aux:n}
+% \begin{macro}
% {
% \@@_draw_color_rgb:nnn ,
% \@@_draw_color_rgb_fill:nnn ,
% \@@_draw_color_rgb_stroke:nnn
% }
-% \begin{macro}[aux]{\@@_draw_color_rgb_aux:nnn}
+% \begin{macro}{\@@_draw_color_rgb_aux:nnn}
% Yet more fast conversion, all using the FPU to allow for expressions
% in numerical input.
% \begin{macrocode}
@@ -2208,7 +2208,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_transformcm:nnnnnn}
+% \begin{macro}{\@@_draw_transformcm:nnnnnn}
% The first four arguments here are floats (the affine matrix), the last
% two are a displacement vector. Once again, force evaluation to allow for
% caching.
@@ -2226,8 +2226,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_hbox:Nnnnnnn}
-% \begin{variable}[aux]{\l_@@_tmp_box}
+% \begin{macro}{\@@_draw_hbox:Nnnnnnn}
+% \begin{variable}{\l_@@_tmp_box}
% Inserting a \TeX{} box transformed to the requested position and using
% the current matrix is done using a mixture of \TeX{} and low-level
% manipulation. The offset can be handled by \TeX{}, so only any rotation/^^A
@@ -2239,7 +2239,7 @@
{
\hbox_set:Nn \l_@@_tmp_box
{
- \tex_kern:D \__dim_eval:w #6 \__dim_eval_end:
+ \tex_kern:D \__dim_eval:n {#6}
\@@_scope_begin:
\@@_draw_transformcm:nnnnnn {#2} {#3} {#4} {#5}
{ 0pt } { 0pt }
@@ -2268,7 +2268,7 @@
%
% \subsubsection{Basics}
%
-% \begin{macro}[int]{\@@_literal:n}
+% \begin{macro}{\@@_literal:n}
% Unlike the other drivers, the requirements for making SVG files mean
% that we can't conveniently transform all operations to the current point.
% That makes life a bit more tricky later as that needs to be accounted for.
@@ -2280,7 +2280,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_scope_begin:, \@@_scope_end:}
+% \begin{macro}{\@@_scope_begin:, \@@_scope_end:}
% A scope in SVG terms is slightly different to the other drivers as
% operations have to be \enquote{tied} to these not simply inside them.
% \begin{macrocode}
@@ -2293,7 +2293,7 @@
%
% \subsection{Driver-specific auxiliaries}
%
-% \begin{macro}[int]{\@@_scope_begin:n}
+% \begin{macro}{\@@_scope_begin:n}
% In SVG transformations, clips and so on are attached directly to scopes so
% we need a way or allowing for that. This is rather more useful than
% \cs{@@_scope_begin:} as a result. No assumptions are made about the nature
@@ -2306,8 +2306,8 @@
%
% \subsubsection{Box operations}
%
-% \begin{macro}[int]{\@@_box_use_clip:N}
-% \begin{variable}[aux]{\g_@@_clip_path_int}
+% \begin{macro}{\@@_box_use_clip:N}
+% \begin{variable}{\g_@@_clip_path_int}
% Clipping in SVG is more involved than with other drivers. The first issue
% is that the clipping path must be defined separately from where it is used,
% so we need to track how many paths have applied. The naming here uses
@@ -2381,7 +2381,7 @@
% \end{variable}
% \end{macro}
%
-% \begin{macro}[int]{\@@_box_use_rotate:Nn}
+% \begin{macro}{\@@_box_use_rotate:Nn}
% Rotation has a dedicated operation which includes a centre-of-rotation
% optional pair. That can be picked up from the driver syntax, so there is
% no need to worry about the transformation matrix.
@@ -2431,7 +2431,7 @@
%
% \subsection{Images}
%
-% \begin{macro}[int]{\@@_image_getbb_png:n, \@@_image_getbb_jpg:n}
+% \begin{macro}{\@@_image_getbb_png:n, \@@_image_getbb_jpg:n}
% These can be included by extracting the bounding box data.
% \begin{macrocode}
\cs_new_eq:NN \@@_image_getbb_png:n \__image_extract_bb:n
@@ -2439,8 +2439,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_image_include_png:n, \@@_image_include_jpg:n}
-% \begin{macro}[aux]{\@@_image_include_bitmap_quote:w}
+% \begin{macro}{\@@_image_include_png:n, \@@_image_include_jpg:n}
+% \begin{macro}{\@@_image_include_bitmap_quote:w}
% The driver here has built-in support for basic image inclusion (see
% \texttt{dvisvgm.def} for a more complex approach, needed if clipping,
% \emph{etc.}, is covered at the image driver level). The only issue is
@@ -2466,7 +2466,7 @@
%
% \subsection{Drawing}
%
-% \begin{macro}[aux]{\@@_draw_literal:n, \@@_draw_literal:x}
+% \begin{macro}{\@@_draw_literal:n, \@@_draw_literal:x}
% The same as the more general literal call.
% \begin{macrocode}
\cs_new_eq:NN \@@_draw_literal:n \@@_literal:n
@@ -2474,7 +2474,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_begin:, \@@_draw_end:}
+% \begin{macro}{\@@_draw_begin:, \@@_draw_end:}
% A drawing needs to be set up such that the co-ordinate system is
% translated. That is done inside a scope, which as described below
% \begin{macrocode}
@@ -2488,9 +2488,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_scope_begin:, \@@_draw_scope_end:}
-% \begin{macro}[aux]{\@@_draw_scope:n, \@@_draw_scope:x}
-% \begin{variable}[aux]{\g_@@_draw_scope_int, \l_@@_draw_scope_int}
+% \begin{macro}{\@@_draw_scope_begin:, \@@_draw_scope_end:}
+% \begin{macro}{\@@_draw_scope:n, \@@_draw_scope:x}
+% \begin{variable}{\g_@@_draw_scope_int, \l_@@_draw_scope_int}
% Several settings that with other drivers are \enquote{stand alone} have
% to be given as part of a scope in SVG. As a result, there is a need to
% provide a mechanism to automatically close these extra scopes. That is
@@ -2530,11 +2530,11 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_moveto:nn, \@@_draw_lineto:nn}
-% \begin{macro}[int]{\@@_draw_rectangle:nnnn}
-% \begin{macro}[int]{\@@_draw_curveto:nnnnnn}
-% \begin{macro}[aux]{\@@_draw_add_to_path:n}
-% \begin{variable}[aux]{\g_@@_draw_path_tl}
+% \begin{macro}{\@@_draw_moveto:nn, \@@_draw_lineto:nn}
+% \begin{macro}{\@@_draw_rectangle:nnnn}
+% \begin{macro}{\@@_draw_curveto:nnnnnn}
+% \begin{macro}{\@@_draw_add_to_path:n}
+% \begin{variable}{\g_@@_draw_path_tl}
% Once again, some work is needed to get path constructs correct. Rather
% then write the values as they are given, the entire path needs to be
% collected up before being output in one go. For that we use a dedicated
@@ -2590,7 +2590,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_evenodd_rule:, \@@_draw_nonzero_rule:}
+% \begin{macro}{\@@_draw_evenodd_rule:, \@@_draw_nonzero_rule:}
% The fill rules here have to be handled as scopes.
% \begin{macrocode}
\cs_new_protected:Npn \@@_draw_evenodd_rule:
@@ -2600,8 +2600,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_draw_path:n}
-% \begin{macro}[int]
+% \begin{macro}{\@@_draw_path:n}
+% \begin{macro}
% {
% \@@_draw_closepath: ,
% \@@_draw_stroke: ,
@@ -2611,8 +2611,8 @@
% \@@_draw_clip: ,
% \@@_draw_discardpath:
% }
-% \begin{variable}[aux]{\g_@@_draw_clip_bool}
-% \begin{variable}[aux]{\g_@@_draw_path_int}
+% \begin{variable}{\g_@@_draw_clip_bool}
+% \begin{variable}{\g_@@_draw_path_int}
% Setting fill and stroke effects and doing clipping all has to be done using
% scopes. This means setting up the various requirements in a shared
% auxiliary which deals with the bits and pieces. Clipping paths are reused
@@ -2693,12 +2693,12 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_dash:nn}
-% \begin{macro}[aux]{\@@_draw_dash:n}
-% \begin{macro}[aux]{\@@_draw_dash_aux:nn}
-% \begin{macro}[int]{\@@_draw_linewidth:n}
-% \begin{macro}[int]{\@@_draw_miterlimit:n}
-% \begin{macro}[int]
+% \begin{macro}{\@@_draw_dash:nn}
+% \begin{macro}{\@@_draw_dash:n}
+% \begin{macro}{\@@_draw_dash_aux:nn}
+% \begin{macro}{\@@_draw_linewidth:n}
+% \begin{macro}{\@@_draw_miterlimit:n}
+% \begin{macro}
% {
% \@@_draw_cap_butt:, \@@_draw_cap_round:, \@@_draw_cap_rectangle:,
% \@@_draw_join_miter:, \@@_draw_join_round:, \@@_draw_join_bevel:
@@ -2755,19 +2755,19 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {
% \@@_draw_color_cmyk:nnnn ,
% \@@_draw_color_cmyk_fill:nnnn ,
% \@@_draw_color_cmyk_stroke:nnnn
% }
-% \begin{macro}[int]
+% \begin{macro}
% {
% \@@_draw_color_gray:n ,
% \@@_draw_color_gray_fill:n ,
% \@@_draw_color_gray_stroke:n
% }
-% \begin{macro}[int]
+% \begin{macro}
% {
% \@@_draw_color_rgb:nnn ,
% \@@_draw_color_rgb_fill:nnn ,
@@ -2865,7 +2865,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_transformcm:nnnnnn}
+% \begin{macro}{\@@_draw_transformcm:nnnnnn}
% The first four arguments here are floats (the affine matrix), the last
% two are a displacement vector. Once again, force evaluation to allow for
% caching.
@@ -2888,7 +2888,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_draw_hbox:Nnnnnnn}
+% \begin{macro}{\@@_draw_hbox:Nnnnnnn}
% No special savings can be made here: simply displace the box inside
% a scope. As there is nothing to re-box, just make the box passed of
% zero size.
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
index 249309ab8cf..5479105b596 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -74,7 +74,7 @@
% \begin{verbatim}
% \exp_args:NNo \seq_gpush:Nn
% \g_file_name_stack
-% \l_tmpa_tl
+% { \l_tmpa_tl }
% \end{verbatim}
% In other words, the first argument to \cs{exp_args:NNo} is the base
% function and the other arguments are preprocessed and then passed to
@@ -90,7 +90,7 @@
% \begin{quote}
% |\cs_new:Npn \seq_gpush:No { \exp_args:NNo \seq_gpush:Nn }|
% \end{quote}
-% Providing variants in this way in style files is uncritical as the
+% Providing variants in this way in style files is safe as the
% \cs{cs_generate_variant:Nn} function will only create new definitions if
% there is not already one available. Therefore adding
% such definition to later releases of the kernel will not make such
@@ -114,12 +114,13 @@
% once, |f|~expands fully the first token, |x|~expands fully all
% tokens at the price of being non-expandable.
% \item A few odd argument types remain: |T|~and |F|~for conditional
-% processing, otherwise identical to~|n|, |p|~for the parameter text
+% processing, otherwise identical to |n|-type arguments,
+% |p|~for the parameter text
% in definitions, |w|~for arguments with a specific syntax, and |D|~to
% denote primitives that should not be used directly.
% \end{itemize}
%
-% \begin{function}[updated = 2015-08-06]{\cs_generate_variant:Nn}
+% \begin{function}[updated = 2017-11-28]{\cs_generate_variant:Nn}
% \begin{syntax}
% \cs{cs_generate_variant:Nn} \meta{parent control sequence} \Arg{variant argument specifiers}
% \end{syntax}
@@ -129,9 +130,9 @@
% \meta{base name} and \meta{original argument specifier}. The
% comma-separated list of \meta{variant argument specifiers} is
% then used to define variants of the
-% \meta{original argument specifier} where these are not already
+% \meta{original argument specifier} if these are not already
% defined. For each \meta{variant} given, a function is created
-% which expands its arguments as detailed and passes them
+% that expands its arguments as detailed and passes them
% to the \meta{parent control sequence}. So for example
% \begin{verbatim}
% \cs_set:Npn \foo:Nn #1#2 { code here }
@@ -145,51 +146,71 @@
% \end{verbatim}
% generates the functions |\foo:NV| and |\foo:cV| in the same
% way. The \cs{cs_generate_variant:Nn} function can only be applied if
-% the \meta{parent control sequence} is already defined. Only |n|~and
-% |N| arguments can be changed to other types. If the \meta{parent
+% the \meta{parent control sequence} is already defined. If the \meta{parent
% control sequence} is protected or if the \meta{variant} involves
% |x|~arguments, then the \meta{variant control sequence} is also
% protected. The \meta{variant} is created globally, as is any
% \cs[no-index]{exp_args:N\meta{variant}} function needed to carry out the
% expansion.
%
-% While \cs{cs_generate_variant:Nn} |\foo:N { o }| is currently
-% allowed, one must know that it will break if the result of the
-% expansion is more than one token or if |\foo:N| requires its
-% argument not to be braced.
+% Only |n|~and |N| arguments can be changed to other types. The only
+% allowed changes are
+% \begin{itemize}
+% \item |c|~variant of an |N|~parent;
+% \item |o|, |V|, |v|, |f|, or~|x| variant of an |n|~parent;
+% \item |N|, |n|, |T|, |F|, or |p| argument unchanged.
+% \end{itemize}
+% This means the \meta{parent} of a \meta{variant} form is always
+% unambiguous, even in cases where both an |n|-type parent and an
+% |N|-type parent exist, such as for \cs{tl_count:n} and
+% \cs{tl_count:N}.
+%
+% For backward compatibility it is currently possible to make |n|,
+% |o|, |V|, |v|, |f|, or |x|-type variants of an |N|-type argument or
+% |N| or |c|-type variants of an |n|-type argument. Both are
+% deprecated. The first because passing more than one token to an
+% |N|-type argument will typically break the parent function's code.
+% The second because programmers who use that most often want to
+% access the value of a variable given its name, hence should use a
+% |V|-type or |v|-type variant instead of |c|-type. In those cases,
+% using the lower-level \cs{exp_args:No} or \cs{exp_args:Nc}
+% functions explicitly is preferred to defining confusing variants.
% \end{function}
%
% \section{Introducing the variants}
%
-% The available internal functions for argument expansion come in two
-% flavours, some of them are faster then others. Therefore
-% (when speed is important) it is usually
-% best to follow the following guidelines when defining new functions
-% that are supposed to come with variant forms:
+% It is usually best to follow the following guidelines when defining
+% new functions that are supposed to come with variant forms.
% \begin{itemize}
% \item
-% Arguments that might need expansion should come first in the list of
-% arguments to make processing faster.
-% \item
-% Arguments that should consist of single tokens should come first.
-% \item
% Arguments that need full expansion (\emph{i.e.}, are denoted
% with |x|) should be avoided if possible as they can not be
% processed expandably, \emph{i.e.}, functions of this type
% cannot work correctly in arguments that are themselves subject to |x|
% expansion.
+% \end{itemize}
+% When speed is essential (for functions that do very little work and
+% are used numerous times in a document) the following applies because
+% internal functions for argument expansion come in two flavours, some
+% faster than others.
+% \begin{itemize}
% \item
-% In general, unless in the last position, multi-token arguments
-% |n|, |f|, and |o| need special processing when more than
-% one argument is being expanded. This special processing is not fast.
-% Therefore it is best to use the optimized functions, namely
-% those that contain only |N|, |c|, |V|, and |v|, and, in the last
-% position, |o|, |f|, with possible trailing |N| or |n|, which are
-% not expanded.
+% Arguments that might need expansion should come first in the list of
+% arguments.
+% \item
+% Arguments that should consist of single tokens |N|, |c|, |V|, or
+% |v| should come first among these.
+% \item
+% Arguments that appear after the first multi-token argument |n|, |f|
+% or |o| require slightly slower special processing to be expanded.
+% Therefore it is best to use the optimized functions,
+% namely those that contain only |N|, |c|, |V|, and |v|, and, in the
+% last position, |o|, |f|, with possible trailing |N| or |n| or |T|
+% or |F|, which are not expanded.
% \end{itemize}
%
% The |V| type returns the value of a register, which can be one of
-% |tl|, |int|, |skip|, |dim|, |toks|, or built-in \TeX{}
+% |tl|, |clist|, |int|, |skip|, |dim|, |muskip|, or built-in \TeX{}
% registers. The |v| type is the same except it first creates a
% control sequence out of its argument before returning the
% value.
@@ -228,10 +249,10 @@
% while using |\example:x| instead results in |\example:n { 3 , 7 }|
% at the cost of being protected.
% If you use this type of expansion in conditional processing then
-% you should stick to using |TF| type functions only as it does not
-% try to finish any |\if... \fi:| itself!
+% you should stick to using |TF| type functions only as the expansion
+% does not finish any |\if... \fi:| itself!
%
-% If is important to note that both \texttt{f}- and \texttt{o}-type
+% It is important to note that both \texttt{f}- and \texttt{o}-type
% expansion are concerned with the expansion of tokens from left to
% right in their arguments. In particular, \texttt{o}-type expansion
% applies to the first \emph{token} in the argument it receives: it
@@ -239,7 +260,7 @@
% \begin{verbatim}
% \exp_after:wN <base function> \exp_after:wN { <argument> }
% \end{verbatim}
-% At the same time, \texttt{f}-type expansion stops at the emph{first}
+% At the same time, \texttt{f}-type expansion stops at the \emph{first}
% non-expandable token. This means for example that both
% \begin{verbatim}
% \tl_set:No \l_tmpa_tl { { \g_tmpb_tl } }
@@ -256,17 +277,6 @@
% These functions are described in detail: expansion of multiple tokens follows
% the same rules but is described in a shorter fashion.
%
-% \begin{function}[EXP]{\exp_args:No}
-% \begin{syntax}
-% \cs{exp_args:No} \meta{function} \Arg{tokens} ...
-% \end{syntax}
-% This function absorbs two arguments (the \meta{function} name and
-% the \meta{tokens}). The \meta{tokens} are expanded once, and the result
-% is inserted in braces into the input stream \emph{after} reinsertion
-% of the \meta{function}. Thus the \meta{function} may take more than
-% one argument: all others are left unchanged.
-% \end{function}
-%
% \begin{function}[EXP]{\exp_args:Nc, \exp_args:cc}
% \begin{syntax}
% \cs{exp_args:Nc} \meta{function} \Arg{tokens}
@@ -274,8 +284,8 @@
% This function absorbs two arguments (the \meta{function} name and
% the \meta{tokens}). The \meta{tokens} are expanded until only characters
% remain, and are then turned into a control sequence. (An internal error
-% occurs if such a conversion is not possible). The result
-% is inserted into the input stream \emph{after} reinsertion
+% occurs if non-characters remain, as the conversion is not possible.)
+% The result is inserted into the input stream \emph{after} reinsertion
% of the \meta{function}. Thus the \meta{function} may take more than
% one argument: all others are left unchanged.
%
@@ -283,6 +293,17 @@
% manner as described for the \meta{tokens}.
% \end{function}
%
+% \begin{function}[EXP]{\exp_args:No}
+% \begin{syntax}
+% \cs{exp_args:No} \meta{function} \Arg{tokens} ...
+% \end{syntax}
+% This function absorbs two arguments (the \meta{function} name and
+% the \meta{tokens}). The \meta{tokens} are expanded once, and the result
+% is inserted in braces into the input stream \emph{after} reinsertion
+% of the \meta{function}. Thus the \meta{function} may take more than
+% one argument: all others are left unchanged.
+% \end{function}
+%
% \begin{function}[EXP]{\exp_args:NV}
% \begin{syntax}
% \cs{exp_args:NV} \meta{function} \meta{variable}
@@ -301,8 +322,8 @@
% This function absorbs two arguments (the \meta{function} name and
% the \meta{tokens}). The \meta{tokens} are expanded until only characters
% remain, and are then turned into a control sequence. (An internal error
-% occurs if such a conversion is not possible). This control sequence
-% should
+% occurs if non-characters remain, as the conversion is not possible.)
+% This control sequence should
% be the name of a \meta{variable}. The content of the \meta{variable} are
% recovered and placed inside braces into the input stream \emph{after}
% reinsertion of the \meta{function}. Thus the \meta{function} may take more
@@ -315,7 +336,8 @@
% \end{syntax}
% This function absorbs two arguments (the \meta{function} name and
% the \meta{tokens}). The \meta{tokens} are fully expanded until the
-% first non-expandable token or space is found, and the result
+% first non-expandable token is found (if that is a space it is
+% removed), and the result
% is inserted in braces into the input stream \emph{after} reinsertion
% of the \meta{function}. Thus the \meta{function} may take more than
% one argument: all others are left unchanged.
@@ -326,8 +348,8 @@
% \cs{exp_args:Nx} \meta{function} \Arg{tokens}
% \end{syntax}
% This function absorbs two arguments (the \meta{function} name and
-% the \meta{tokens}) and exhaustively expands the \meta{tokens}
-% second. The result is inserted in braces into the input stream
+% the \meta{tokens}) and exhaustively expands the \meta{tokens}.
+% The result is inserted in braces into the input stream
% \emph{after} reinsertion of the \meta{function}.
% Thus the \meta{function} may take more
% than one argument: all others are left unchanged.
@@ -337,14 +359,16 @@
%
% \begin{function}[EXP]
% {
-% \exp_args:NNo,
% \exp_args:NNc,
-% \exp_args:NNv,
+% \exp_args:NNo,
% \exp_args:NNV,
+% \exp_args:NNv,
% \exp_args:NNf,
+% \exp_args:Ncc,
% \exp_args:Nco,
+% \exp_args:NcV,
+% \exp_args:Ncv,
% \exp_args:Ncf,
-% \exp_args:Ncc,
% \exp_args:NVV
% }
% \begin{syntax}
@@ -358,15 +382,17 @@
%
% \begin{function}[EXP, updated = 2012-01-14]
% {
+% \exp_args:Nnc,
% \exp_args:Nno,
% \exp_args:NnV,
+% \exp_args:Nnv,
% \exp_args:Nnf,
+% \exp_args:Noc,
% \exp_args:Noo,
% \exp_args:Nof,
-% \exp_args:Noc,
-% \exp_args:Nff,
+% \exp_args:NVo,
% \exp_args:Nfo,
-% \exp_args:Nnc
+% \exp_args:Nff,
% }
% \begin{syntax}
% \cs{exp_args:Noo} \meta{token} \Arg{tokens_1} \Arg{tokens_2}
@@ -375,14 +401,14 @@
% third as detailed by their argument specifier. The first argument
% of the function is then the next item on the input stream, followed
% by the expansion of the second and third arguments.
-% These functions need special (slower) processing.
+% These functions need slower processing.
% \end{function}
%
% \begin{function}
% {
% \exp_args:NNx,
-% \exp_args:Nnx,
% \exp_args:Ncx,
+% \exp_args:Nnx,
% \exp_args:Nox,
% \exp_args:Nxo,
% \exp_args:Nxx
@@ -394,7 +420,7 @@
% third as detailed by their argument specifier. The first argument
% of the function is then the next item on the input stream, followed
% by the expansion of the second and third arguments. These functions
-% are not expandable.
+% are not expandable due to their |x|-type argument.
% \end{function}
%
% \section{Manipulating three arguments}
@@ -419,11 +445,22 @@
%
% \begin{function}[EXP]
% {
-% \exp_args:NNoo,
+% \exp_args:NNcf,
% \exp_args:NNno,
-% \exp_args:Nnno,
+% \exp_args:NNnV,
+% \exp_args:NNoo,
+% \exp_args:NNVV,
+% \exp_args:Ncno,
+% \exp_args:NcnV,
+% \exp_args:Ncoo,
+% \exp_args:NcVV,
% \exp_args:Nnnc,
+% \exp_args:Nnno,
+% \exp_args:Nnnf,
+% \exp_args:Nnff,
% \exp_args:Nooo,
+% \exp_args:Noof,
+% \exp_args:Nffo,
% }
% \begin{syntax}
% \cs{exp_args:NNoo} \meta{token_1} \meta{token_2} \Arg{token_3} \Arg{tokens}
@@ -432,7 +469,7 @@
% and fourth as detailed by their argument specifier. The first
% argument of the function is then the next item on the input stream,
% followed by the expansion of the second argument, \emph{etc}.
-% These functions need special (slower) processing.
+% These functions need slower processing.
% \end{function}
%
% \begin{function}[added = 2015-08-12]
@@ -440,11 +477,11 @@
% \exp_args:NNNx,
% \exp_args:NNnx,
% \exp_args:NNox,
+% \exp_args:Nccx,
+% \exp_args:Ncnx,
% \exp_args:Nnnx,
% \exp_args:Nnox,
% \exp_args:Noox,
-% \exp_args:Ncnx,
-% \exp_args:Nccx
% }
% \begin{syntax}
% \cs{exp_args:NNnx} \meta{token_1} \meta{token_2} \Arg{tokens_1} \Arg{tokens_2}
@@ -459,21 +496,22 @@
%
% \begin{function}[EXP, updated = 2012-02-12]
% {
-% \exp_last_unbraced:NV,
-% \exp_last_unbraced:Nf,
% \exp_last_unbraced:No,
+% \exp_last_unbraced:NV,
% \exp_last_unbraced:Nv,
+% \exp_last_unbraced:Nf,
+% \exp_last_unbraced:NNo,
+% \exp_last_unbraced:NNV,
% \exp_last_unbraced:Nco,
% \exp_last_unbraced:NcV,
-% \exp_last_unbraced:NNV,
-% \exp_last_unbraced:NNo,
% \exp_last_unbraced:Nno,
% \exp_last_unbraced:Noo,
% \exp_last_unbraced:Nfo,
-% \exp_last_unbraced:NNNV,
% \exp_last_unbraced:NNNo,
-% \exp_last_unbraced:NnNo
-% }
+% \exp_last_unbraced:NNNV,
+% \exp_last_unbraced:NnNo,
+% \exp_last_unbraced:NNNNo,
+% }
% \begin{syntax}
% \cs{exp_last_unbraced:Nno} \meta{token} \Arg{tokens_1} \Arg{tokens_2}
% \end{syntax}
@@ -481,8 +519,8 @@
% specification, carry out the expansion
% indicated and leave the results in the input stream, with the
% last argument not surrounded by the usual braces.
-% Of these, the \texttt{:Nno}, \texttt{:Noo}, and \texttt{:Nfo}
-% variants need special (slower) processing.
+% Of these, the |:Nno|, |:Noo|, |:Nfo| and |:NnNo|
+% variants need slower processing.
% \begin{texnote}
% As an optimization, the last argument is unbraced by some
% of those functions before expansion. This can cause problems
@@ -496,8 +534,8 @@
% \begin{syntax}
% \cs{exp_last_unbraced:Nx} \meta{function} \Arg{tokens}
% \end{syntax}
-% This functions fully expands the \meta{tokens} and leaves
-% the result in the input stream after reinsertion of \meta{function}.
+% This function fully expands the \meta{tokens} and leaves the result
+% in the input stream after reinsertion of the \meta{function}.
% This function is not expandable.
% \end{function}
%
@@ -505,7 +543,7 @@
% \begin{syntax}
% \cs{exp_last_two_unbraced:Noo} \meta{token} \Arg{tokens_1} \Arg{tokens_2}
% \end{syntax}
-% This function absorbs three arguments and expand the second and third
+% This function absorbs three arguments and expands the second and third
% once. The first argument of the function is then the next item on the
% input stream, followed by the expansion of the second and third arguments,
% which are not wrapped in braces.
@@ -522,9 +560,9 @@
% unchanged. It is important to notice that \meta{token_1} may be
% \emph{any} single token, including group-opening and -closing
% tokens (|{| or |}| assuming normal \TeX{} category codes). Unless
-% specifically required, expansion should be carried out using an
+% specifically required this should be avoided: expansion should be carried out using an
% appropriate argument specifier variant or the appropriate
-% \cs{exp_arg:N} function.
+% \cs[no-index]{exp_arg:N} function.
% \begin{texnote}
% This is the \TeX{} primitive \tn{expandafter} renamed.
% \end{texnote}
@@ -542,10 +580,16 @@
% \begin{syntax}
% \cs{exp_not:N} \meta{token}
% \end{syntax}
-% Prevents expansion of the \meta{token} in a context where it would otherwise
-% be expanded, for example an |x|-type argument.
+% Prevents expansion of the \meta{token} in a context where it would
+% otherwise be expanded, for example an |x|-type argument or the first
+% token in an |o| or |f| argument.
% \begin{texnote}
-% This is the \TeX{} \tn{noexpand} primitive.
+% This is the \TeX{} \tn{noexpand} primitive. It only prevents
+% expansion. At the beginning of an |f|-type argument, a space
+% \meta{token} is removed despite \cs{exp_not:N}. In an
+% |x|-expanding definition (\cs{cs_new:Npx}) a macro parameter
+% \meta{token} (normally~|#|) denotes an argument despite
+% \cs{exp_not:N} (see \cs{exp_not:n}).
% \end{texnote}
% \end{function}
%
@@ -553,60 +597,65 @@
% \begin{syntax}
% \cs{exp_not:c} \Arg{tokens}
% \end{syntax}
-% Expands the \meta{tokens} until only unexpandable content remains, and then
-% converts this into a control sequence. Further expansion of this control
-% sequence is then inhibited.
+% Expands the \meta{tokens} until only characters remain, and then
+% converts this into a control sequence. (An internal error occurs if
+% non-characters remain, as the conversion is not possible.)
+% Further expansion of this control sequence is then inhibited using
+% \cs{exp_not:N}.
% \end{function}
%
% \begin{function}[EXP]{\exp_not:n}
% \begin{syntax}
% \cs{exp_not:n} \Arg{tokens}
% \end{syntax}
-% Prevents expansion of the \meta{tokens} in a context where they
-% would otherwise be expanded, for example an |x|-type argument.
+% Prevents expansion of the \meta{tokens} in an |x|-type argument. In
+% other cases (input stream or |o| or |f| arguments) the \meta{tokens}
+% continue being expanded.
% \begin{texnote}
% This is the \eTeX{} \tn{unexpanded} primitive. Hence its argument
-% \emph{must} be surrounded by braces.
+% \emph{must} be surrounded by braces. In an |x|-expanding
+% definition (\cs{cs_new:Npx}), \cs{exp_not:n}~|{#}| inserts a macro
+% parameter character in the replacement text.
% \end{texnote}
% \end{function}
%
+% \begin{function}[EXP]{\exp_not:o}
+% \begin{syntax}
+% \cs{exp_not:o} \Arg{tokens}
+% \end{syntax}
+% Expands the \meta{tokens} once, then prevents any further expansion
+% in |x|-type arguments using \cs{exp_not:n}.
+% \end{function}
+%
% \begin{function}[EXP]{\exp_not:V}
% \begin{syntax}
% \cs{exp_not:V} \meta{variable}
% \end{syntax}
% Recovers the content of the \meta{variable}, then prevents expansion
-% of this material in a context where it would otherwise
-% be expanded, for example an |x|-type argument.
+% of this material in |x|-type arguments using \cs{exp_not:n}.
% \end{function}
%
% \begin{function}[EXP]{\exp_not:v}
% \begin{syntax}
% \cs{exp_not:v} \Arg{tokens}
% \end{syntax}
-% Expands the \meta{tokens} until only unexpandable content remains, and then
-% converts this into a control sequence (which should be a \meta{variable}
-% name). The content of the \meta{variable} is recovered, and further
-% expansion is prevented in a context where it would otherwise
-% be expanded, for example an |x|-type argument.
-% \end{function}
-%
-% \begin{function}[EXP]{\exp_not:o}
-% \begin{syntax}
-% \cs{exp_not:o} \Arg{tokens}
-% \end{syntax}
-% Expands the \meta{tokens} once, then prevents any further expansion in a
-% context where they would otherwise
-% be expanded, for example an |x|-type argument.
+% Expands the \meta{tokens} until only characters remains, and then
+% converts this into a control sequence which should be a \meta{variable}
+% name. (An internal error occurs if
+% non-characters remain, as the conversion is not possible.)
+% The content of the \meta{variable} is recovered, and further
+% expansion in |x|-type arguments is prevented using \cs{exp_not:n}.
% \end{function}
%
% \begin{function}[EXP]{\exp_not:f}
% \begin{syntax}
% \cs{exp_not:f} \Arg{tokens}
% \end{syntax}
-% Expands \meta{tokens} fully until the first unexpandable token
-% is found. Expansion then stops, and the result of the expansion
-% (including any tokens which were not expanded) is protected from
-% further expansion.
+% Expands \meta{tokens} fully until the first unexpandable token is
+% found (if it is a space it is removed). Expansion then stops, and
+% the result of the expansion (including any tokens which were not
+% expanded) is protected from further expansion in |x|-type arguments
+% using \cs{exp_not:n}.
% \end{function}
%
% \begin{function}[updated = 2011-06-03, EXP]{\exp_stop_f:}
@@ -710,7 +759,7 @@
% in |#2|. For technical reasons this has to happen using two tokens
% (if they would be hidden inside another command \cs{exp_after:wN}
% would only expand the command but not trigger any additional
-% f-expansion).
+% |f|-expansion).
%
% You might wonder why there are two different approaches available,
% after all the effect of
@@ -740,18 +789,18 @@
% \cs{exp:w} \meta{expandable-tokens} \cs{exp_end_continue_f:nw} \meta{further-tokens}
% \end{syntax}
% The difference to \cs{exp_end_continue_f:w} is that we first we pick
-% up an argument which is then returned to the input stream. If
-% \meta{further-tokens} starts with a brace group then the braces
-% are removed. If on the other hand it starts with space tokens then
-% these space tokens are removed while searching for the
-% argument. Thus such space tokens will not terminate the \texttt{f}-type expansion.
+% up an argument which is then returned to the input stream. If
+% \meta{further-tokens} starts with space tokens then these space
+% tokens are removed while searching for the argument. If it starts
+% with a brace group then the braces are removed. Thus such spaces or
+% braces will not terminate the \texttt{f}-type expansion.
% \end{function}
%
% \section{Internal functions and variables}
%
% \begin{variable}{\l__exp_internal_tl}
-% The |\exp_| module has its private variables to temporarily store
-% results of the argument expansion. This is done to avoid interference
+% The |\exp_| module has its private variable to temporarily store the
+% result of |x|-type argument expansion. This is done to avoid interference
% with other functions using temporary variables.
% \end{variable}
%
@@ -781,15 +830,16 @@
% \begin{macro}{\exp_after:wN}
% \begin{macro}{\exp_not:N}
% \begin{macro}{\exp_not:n}
-% These are defined in \pkg{l3basics}.
+% These are defined in \pkg{l3basics}, as they are needed
+% \enquote{early}. This is just a reminder of that fact!
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{General expansion}
%
-% In this section a general mechanism for defining functions to handle
-% argument handling is defined. These general expansion functions are
+% In this section a general mechanism for defining functions that handle
+% arguments is defined. These general expansion functions are
% expandable unless |x| is used. (Any version of |x| is going to have
% to use one of the \LaTeX3 names for \cs{cs_set:Npx} at some
% point, and so is never going to be expandable.)
@@ -800,15 +850,12 @@
% method for efficiency, typically using calls to \cs{exp_after:wN}.
%
% \begin{variable}{\l_@@_internal_tl}
-% This scratch token list variable is defined in \pkg{l3basics}, as it
-% is needed \enquote{early}. This is just a reminder that is the
-% case!
+% This scratch token list variable is defined in \pkg{l3basics}.
% \end{variable}
%
-% This code uses internal functions with names that start with |\::|
-% to perform the expansions. All macros are |long| as this turned out
-% to be desirable since the tokens undergoing expansion may be
-% arbitrary user input.
+% This code uses internal functions with names that start with |\::| to
+% perform the expansions. All macros are |long| since the tokens
+% undergoing expansion may be arbitrary user input.
%
% An argument manipulator |\::|\meta{Z} always has signature |#1\:::#2#3|
% where |#1| holds the remaining argument manipulations to be performed,
@@ -818,8 +865,8 @@
% One exception to this rule is \cs{::p}, which has to grab an argument
% delimited by a left brace.
%
-% \begin{macro}[aux, EXP]{\@@_arg_next:nnn}
-% \begin{macro}[aux, EXP]{\@@_arg_next:Nnn}
+% \begin{macro}[EXP]{\@@_arg_next:nnn}
+% \begin{macro}[EXP]{\@@_arg_next:Nnn}
% |#1| is the result of an expansion step, |#2| is the remaining
% argument manipulations and |#3| is the current result of the
% expansion chain. This auxiliary function moves |#1| back after
@@ -836,14 +883,14 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\:::}
+% \begin{macro}{\:::}
% The end marker is just another name for the identity function.
% \begin{macrocode}
\cs_new:Npn \::: #1 {#1}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\::n}
+% \begin{macro}[EXP]{\::n}
% This function is used to skip an argument that doesn't need to
% be expanded.
% \begin{macrocode}
@@ -851,7 +898,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\::N}
+% \begin{macro}[EXP]{\::N}
% This function is used to skip an argument that consists of a
% single token and doesn't need to be expanded.
% \begin{macrocode}
@@ -859,16 +906,16 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\::p}
+% \begin{macro}[EXP]{\::p}
% This function is used to skip an argument that is delimited by a
-% left brace and doesn't need to be expanded. It should not be
+% left brace and doesn't need to be expanded. It is not
% wrapped in braces in the result.
% \begin{macrocode}
\cs_new:Npn \::p #1 \::: #2#3# { #1 \::: {#2#3} }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\::c}
+% \begin{macro}[EXP]{\::c}
% This function is used to skip an argument that is turned into
% a control sequence without expansion.
% \begin{macrocode}
@@ -877,7 +924,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\::o}
+% \begin{macro}[EXP]{\::o}
% This function is used to expand an argument once.
% \begin{macrocode}
\cs_new:Npn \::o #1 \::: #2#3
@@ -885,23 +932,22 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\::f}
+% \begin{macro}[EXP]{\::f}
% \begin{macro}{\exp_stop_f:}
% This function is used to expand a token list until the first
% unexpandable token is found. This is achieved through \cs{exp:w}
-% \cs{exp_end_continue_f:w} that
-% expands everything in its way following it. This
-% scanning procedure is terminated once the expansion hits
-% something non-expandable or a space. We introduce \cs{exp_stop_f:}
-% to mark such an end of expansion marker.
-% In the example shown earlier the scanning was stopped
-% once \TeX{} had fully expanded |\cs_set_eq:Nc \aaa { b \l_tmpa_tl b }|
-% into |\cs_set_eq:NN \aaa = \blurb| which then turned out to contain
-% the non-expandable token \cs{cs_set_eq:NN}. Since the expansion of
-% \cs{exp:w} \cs{exp_end_continue_f:w} is \meta{null}, we wind up with a fully
-% expanded list, only \TeX{} has not tried to execute any of the
-% non-expandable tokens. This is what differentiates this function
-% from the |x| argument type.
+% \cs{exp_end_continue_f:w} that expands everything in its way
+% following it. This scanning procedure is terminated once the
+% expansion hits something non-expandable (if that is a space it is
+% removed). We introduce \cs{exp_stop_f:} to mark such an
+% end-of-expansion marker. For example, |f|-expanding
+% |\cs_set_eq:Nc \aaa { b \l_tmpa_tl b }| where |\l_tmpa_tl| contains
+% the characters |lur| gives |\tex_let:D \aaa = \blurb| which then
+% turns out to start with the non-expandable token |\tex_let:D|.
+% Since the expansion of \cs{exp:w} \cs{exp_end_continue_f:w} is
+% empty, we wind up with a fully expanded list, only \TeX{} has not
+% tried to execute any of the non-expandable tokens. This is what
+% differentiates this function from the |x| argument type.
% \begin{macrocode}
\cs_new:Npn \::f #1 \::: #2#3
{
@@ -914,7 +960,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\::x}
+% \begin{macro}{\::x}
% This function is used to expand an argument fully.
% \begin{macrocode}
\cs_new_protected:Npn \::x #1 \::: #2#3
@@ -925,10 +971,11 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\::v}
-% \begin{macro}[int, EXP]{\::V}
+% \begin{macro}[EXP]{\::v}
+% \begin{macro}[EXP]{\::V}
% These functions return the value of a register, i.e., one of
-% |tl|, |clist|, |int|, |skip|, |dim| and |muskip|. The |V| version
+% |tl|, |clist|, |int|, |skip|, |dim|, |muskip|, or built-in
+% \TeX{} register. The |V| version
% expects a single token whereas |v| like |c| creates a csname from
% its argument given in braces and then evaluates it as if it was a
% |V|. The \cs{exp:w} sets off an expansion
@@ -951,8 +998,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_eval_register:N, \@@_eval_register:c}
-% \begin{macro}[aux, EXP]{\@@_eval_error_msg:w}
+% \begin{macro}[EXP]{\@@_eval_register:N, \@@_eval_register:c}
+% \begin{macro}[EXP]{\@@_eval_error_msg:w}
% This function evaluates a register. Now a register might exist as
% one of two things: A parameter-less macro or a built-in \TeX{}
% register such as |\count|. For the \TeX{} registers we have to
@@ -1027,23 +1074,7 @@
% \label{sec:l3expan:handtune}
%
% One of the most important features of these functions is that they
-% are fully expandable and therefore allow to prefix them with
-% \cs{tex_global:D} for example.
-%
-% \begin{macro}[EXP]{\exp_args:No}
-% \begin{macro}[EXP]{\exp_args:NNo}
-% \begin{macro}[EXP]{\exp_args:NNNo}
-% Those lovely runs of expansion!
-% \begin{macrocode}
-\cs_new:Npn \exp_args:No #1#2 { \exp_after:wN #1 \exp_after:wN {#2} }
-\cs_new:Npn \exp_args:NNo #1#2#3
- { \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN {#3} }
-\cs_new:Npn \exp_args:NNNo #1#2#3#4
- { \exp_after:wN #1 \exp_after:wN#2 \exp_after:wN #3 \exp_after:wN {#4} }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
+% are fully expandable.
%
% \begin{macro}[EXP]{\exp_args:Nc, \exp_args:cc}
% In \pkg{l3basics}.
@@ -1067,6 +1098,21 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}[EXP]{\exp_args:No}
+% \begin{macro}[EXP]{\exp_args:NNo}
+% \begin{macro}[EXP]{\exp_args:NNNo}
+% Those lovely runs of expansion!
+% \begin{macrocode}
+\cs_new:Npn \exp_args:No #1#2 { \exp_after:wN #1 \exp_after:wN {#2} }
+\cs_new:Npn \exp_args:NNo #1#2#3
+ { \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN {#3} }
+\cs_new:Npn \exp_args:NNNo #1#2#3#4
+ { \exp_after:wN #1 \exp_after:wN#2 \exp_after:wN #3 \exp_after:wN {#4} }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}[EXP]{\exp_args:Nf, \exp_args:NV, \exp_args:Nv}
% \begin{macrocode}
\cs_new:Npn \exp_args:Nf #1#2
@@ -1087,19 +1133,19 @@
% \begin{macro}[EXP]
% {
% \exp_args:NNV, \exp_args:NNv, \exp_args:NNf,
+% \exp_args:Nco, \exp_args:NcV, \exp_args:Ncv, \exp_args:Ncf,
% \exp_args:NVV,
-% \exp_args:Ncf, \exp_args:Nco
% }
% Some more hand-tuned function with three arguments.
% If we forced that an |o| argument always has braces,
% we could implement \cs{exp_args:Nco} with less tokens
% and only two arguments.
% \begin{macrocode}
-\cs_new:Npn \exp_args:NNf #1#2#3
+\cs_new:Npn \exp_args:NNV #1#2#3
{
\exp_after:wN #1
\exp_after:wN #2
- \exp_after:wN { \exp:w \exp_end_continue_f:w #3 }
+ \exp_after:wN { \exp:w \@@_eval_register:N #3 }
}
\cs_new:Npn \exp_args:NNv #1#2#3
{
@@ -1107,11 +1153,11 @@
\exp_after:wN #2
\exp_after:wN { \exp:w \@@_eval_register:c {#3} }
}
-\cs_new:Npn \exp_args:NNV #1#2#3
+\cs_new:Npn \exp_args:NNf #1#2#3
{
\exp_after:wN #1
\exp_after:wN #2
- \exp_after:wN { \exp:w \@@_eval_register:N #3 }
+ \exp_after:wN { \exp:w \exp_end_continue_f:w #3 }
}
\cs_new:Npn \exp_args:Nco #1#2#3
{
@@ -1119,6 +1165,18 @@
\cs:w #2 \exp_after:wN \cs_end:
\exp_after:wN {#3}
}
+\cs_new:Npn \exp_args:NcV #1#2#3
+ {
+ \exp_after:wN #1
+ \cs:w #2 \exp_after:wN \cs_end:
+ \exp_after:wN { \exp:w \@@_eval_register:N #3 }
+ }
+\cs_new:Npn \exp_args:Ncv #1#2#3
+ {
+ \exp_after:wN #1
+ \cs:w #2 \exp_after:wN \cs_end:
+ \exp_after:wN { \exp:w \@@_eval_register:c {#3} }
+ }
\cs_new:Npn \exp_args:Ncf #1#2#3
{
\exp_after:wN #1
@@ -1137,8 +1195,8 @@
%
% \begin{macro}[EXP]
% {
-% \exp_args:Ncco, \exp_args:NcNc, \exp_args:NcNo,
-% \exp_args:NNNV
+% \exp_args:NNNV, \exp_args:NcNc, \exp_args:NcNo,
+% \exp_args:Ncco,
% }
% A few more that we can hand-tune.
% \begin{macrocode}
@@ -1178,7 +1236,7 @@
%
% Some of these could be done more efficiently, but the complexity of
% coding then becomes an issue. Notice that the auto-generated functions
-% are all not long: they don't actually take any arguments themselves.
+% actually take no arguments themselves.
%
% \begin{macro}{\exp_args:Nx}
% \begin{macrocode}
@@ -1188,9 +1246,9 @@
%
% \begin{macro}[EXP]
% {
-% \exp_args:Nnc, \exp_args:Nfo, \exp_args:Nff, \exp_args:Nnf,
-% \exp_args:Nno, \exp_args:NnV, \exp_args:Noo, \exp_args:Nof,
-% \exp_args:Noc
+% \exp_args:Nnc, \exp_args:Nno, \exp_args:NnV, \exp_args:Nnv, \exp_args:Nnf,
+% \exp_args:Noc, \exp_args:Noo, \exp_args:Nof,
+% \exp_args:NVo, \exp_args:Nfo, \exp_args:Nff,
% }
% \begin{macro}
% {
@@ -1201,14 +1259,16 @@
% above.
% \begin{macrocode}
\cs_new:Npn \exp_args:Nnc { \::n \::c \::: }
-\cs_new:Npn \exp_args:Nfo { \::f \::o \::: }
-\cs_new:Npn \exp_args:Nff { \::f \::f \::: }
-\cs_new:Npn \exp_args:Nnf { \::n \::f \::: }
\cs_new:Npn \exp_args:Nno { \::n \::o \::: }
\cs_new:Npn \exp_args:NnV { \::n \::V \::: }
+\cs_new:Npn \exp_args:Nnv { \::n \::v \::: }
+\cs_new:Npn \exp_args:Nnf { \::n \::f \::: }
+\cs_new:Npn \exp_args:Noc { \::o \::c \::: }
\cs_new:Npn \exp_args:Noo { \::o \::o \::: }
\cs_new:Npn \exp_args:Nof { \::o \::f \::: }
-\cs_new:Npn \exp_args:Noc { \::o \::c \::: }
+\cs_new:Npn \exp_args:NVo { \::V \::o \::: }
+\cs_new:Npn \exp_args:Nfo { \::f \::o \::: }
+\cs_new:Npn \exp_args:Nff { \::f \::f \::: }
\cs_new_protected:Npn \exp_args:NNx { \::N \::x \::: }
\cs_new_protected:Npn \exp_args:Ncx { \::c \::x \::: }
\cs_new_protected:Npn \exp_args:Nnx { \::n \::x \::: }
@@ -1221,21 +1281,35 @@
%
% \begin{macro}[EXP]
% {
-% \exp_args:NNno, \exp_args:NNoo,
-% \exp_args:Nnnc, \exp_args:Nnno, \exp_args:Nooo,
+% \exp_args:NNcf,
+% \exp_args:NNno, \exp_args:NNnV, \exp_args:NNoo, \exp_args:NNVV,
+% \exp_args:Ncno, \exp_args:NcnV, \exp_args:Ncoo, \exp_args:NcVV,
+% \exp_args:Nnnc, \exp_args:Nnno, \exp_args:Nnnf, \exp_args:Nnff,
+% \exp_args:Nooo, \exp_args:Noof, \exp_args:Nffo,
% }
% \begin{macro}
% {
-% \exp_args:NNNx,
-% \exp_args:NNnx, \exp_args:NNox, \exp_args:Nnnx, \exp_args:Nnox,
-% \exp_args:Nccx, \exp_args:Ncnx, \exp_args:Noox,
+% \exp_args:NNNx, \exp_args:NNnx, \exp_args:NNox,
+% \exp_args:Nccx, \exp_args:Ncnx,
+% \exp_args:Nnnx, \exp_args:Nnox, \exp_args:Noox,
% }
% \begin{macrocode}
+\cs_new:Npn \exp_args:NNcf { \::N \::c \::f \::: }
\cs_new:Npn \exp_args:NNno { \::N \::n \::o \::: }
+\cs_new:Npn \exp_args:NNnV { \::N \::n \::V \::: }
\cs_new:Npn \exp_args:NNoo { \::N \::o \::o \::: }
+\cs_new:Npn \exp_args:NNVV { \::N \::V \::V \::: }
+\cs_new:Npn \exp_args:Ncno { \::c \::n \::o \::: }
+\cs_new:Npn \exp_args:NcnV { \::c \::n \::V \::: }
+\cs_new:Npn \exp_args:Ncoo { \::c \::o \::o \::: }
+\cs_new:Npn \exp_args:NcVV { \::c \::V \::V \::: }
\cs_new:Npn \exp_args:Nnnc { \::n \::n \::c \::: }
\cs_new:Npn \exp_args:Nnno { \::n \::n \::o \::: }
+\cs_new:Npn \exp_args:Nnnf { \::n \::n \::f \::: }
+\cs_new:Npn \exp_args:Nnff { \::n \::f \::f \::: }
\cs_new:Npn \exp_args:Nooo { \::o \::o \::o \::: }
+\cs_new:Npn \exp_args:Noof { \::o \::o \::f \::: }
+\cs_new:Npn \exp_args:Nffo { \::f \::f \::o \::: }
\cs_new_protected:Npn \exp_args:NNNx { \::N \::N \::x \::: }
\cs_new_protected:Npn \exp_args:NNnx { \::N \::n \::x \::: }
\cs_new_protected:Npn \exp_args:NNox { \::N \::o \::x \::: }
@@ -1250,21 +1324,16 @@
%
% \subsection{Last-unbraced versions}
%
-% \begin{macro}[aux, EXP]{\@@_arg_last_unbraced:nn}
-% \begin{macro}[aux, EXP]{\::f_unbraced}
-% \begin{macro}[aux, EXP]{\::o_unbraced}
-% \begin{macro}[aux, EXP]{\::V_unbraced}
-% \begin{macro}[aux, EXP]{\::v_unbraced}
-% \begin{macro}[aux, EXP]{\::x_unbraced}
+% \begin{macro}[EXP]{\@@_arg_last_unbraced:nn}
+% \begin{macro}[EXP]{\::o_unbraced}
+% \begin{macro}[EXP]{\::V_unbraced}
+% \begin{macro}[EXP]{\::v_unbraced}
+% \begin{macro}[EXP]{\::f_unbraced}
+% \begin{macro}[EXP]{\::x_unbraced}
% There are a few places where the last argument needs to be available
% unbraced. First some helper macros.
% \begin{macrocode}
\cs_new:Npn \@@_arg_last_unbraced:nn #1#2 { #2#1 }
-\cs_new:Npn \::f_unbraced \::: #1#2
- {
- \exp_after:wN \@@_arg_last_unbraced:nn
- \exp_after:wN { \exp:w \exp_end_continue_f:w #2 } {#1}
- }
\cs_new:Npn \::o_unbraced \::: #1#2
{ \exp_after:wN \@@_arg_last_unbraced:nn \exp_after:wN {#2} {#1} }
\cs_new:Npn \::V_unbraced \::: #1#2
@@ -1277,6 +1346,11 @@
\exp_after:wN \@@_arg_last_unbraced:nn
\exp_after:wN { \exp:w \@@_eval_register:c {#2} } {#1}
}
+\cs_new:Npn \::f_unbraced \::: #1#2
+ {
+ \exp_after:wN \@@_arg_last_unbraced:nn
+ \exp_after:wN { \exp:w \exp_end_continue_f:w #2 } {#1}
+ }
\cs_new_protected:Npn \::x_unbraced \::: #1#2
{
\cs_set_nopar:Npx \l_@@_internal_tl { \exp_not:n {#1} #2 }
@@ -1290,47 +1364,53 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP]{\exp_last_unbraced:NV}
-% \begin{macro}[EXP]{\exp_last_unbraced:Nv}
-% \begin{macro}[EXP]{\exp_last_unbraced:Nf}
-% \begin{macro}[EXP]{\exp_last_unbraced:No}
-% \begin{macro}[EXP]{\exp_last_unbraced:Nco}
-% \begin{macro}[EXP]{\exp_last_unbraced:NcV}
-% \begin{macro}[EXP]{\exp_last_unbraced:NNV}
-% \begin{macro}[EXP]{\exp_last_unbraced:NNo}
-% \begin{macro}[EXP]{\exp_last_unbraced:NNNV}
-% \begin{macro}[EXP]{\exp_last_unbraced:NNNo}
-% \begin{macro}[EXP]{\exp_last_unbraced:Nno}
-% \begin{macro}[EXP]{\exp_last_unbraced:Noo}
-% \begin{macro}[EXP]{\exp_last_unbraced:Nfo}
-% \begin{macro}[EXP]{\exp_last_unbraced:NnNo}
+% \begin{macro}[EXP]
+% {
+% \exp_last_unbraced:No,
+% \exp_last_unbraced:NV,
+% \exp_last_unbraced:Nv,
+% \exp_last_unbraced:Nf,
+% \exp_last_unbraced:NNo,
+% \exp_last_unbraced:NNV,
+% \exp_last_unbraced:Nco,
+% \exp_last_unbraced:NcV,
+% \exp_last_unbraced:NNNo,
+% \exp_last_unbraced:NNNV,
+% \exp_last_unbraced:Nno,
+% \exp_last_unbraced:Noo,
+% \exp_last_unbraced:Nfo,
+% \exp_last_unbraced:NnNo,
+% \exp_last_unbraced:NNNNo,
+% }
% \begin{macro}{\exp_last_unbraced:Nx}
% Now the business end: most of these are hand-tuned for speed, but the
% general system is in place.
% \begin{macrocode}
+\cs_new:Npn \exp_last_unbraced:No #1#2 { \exp_after:wN #1 #2 }
\cs_new:Npn \exp_last_unbraced:NV #1#2
{ \exp_after:wN #1 \exp:w \@@_eval_register:N #2 }
\cs_new:Npn \exp_last_unbraced:Nv #1#2
{ \exp_after:wN #1 \exp:w \@@_eval_register:c {#2} }
-\cs_new:Npn \exp_last_unbraced:No #1#2 { \exp_after:wN #1 #2 }
\cs_new:Npn \exp_last_unbraced:Nf #1#2
{ \exp_after:wN #1 \exp:w \exp_end_continue_f:w #2 }
-\cs_new:Npn \exp_last_unbraced:Nco #1#2#3
- { \exp_after:wN #1 \cs:w #2 \exp_after:wN \cs_end: #3 }
-\cs_new:Npn \exp_last_unbraced:NcV #1#2#3
+\cs_new:Npn \exp_last_unbraced:NNo #1#2#3
+ { \exp_after:wN #1 \exp_after:wN #2 #3 }
+\cs_new:Npn \exp_last_unbraced:NNV #1#2#3
{
\exp_after:wN #1
- \cs:w #2 \exp_after:wN \cs_end:
+ \exp_after:wN #2
\exp:w \@@_eval_register:N #3
}
-\cs_new:Npn \exp_last_unbraced:NNV #1#2#3
+\cs_new:Npn \exp_last_unbraced:Nco #1#2#3
+ { \exp_after:wN #1 \cs:w #2 \exp_after:wN \cs_end: #3 }
+\cs_new:Npn \exp_last_unbraced:NcV #1#2#3
{
\exp_after:wN #1
- \exp_after:wN #2
+ \cs:w #2 \exp_after:wN \cs_end:
\exp:w \@@_eval_register:N #3
}
-\cs_new:Npn \exp_last_unbraced:NNo #1#2#3
- { \exp_after:wN #1 \exp_after:wN #2 #3 }
+\cs_new:Npn \exp_last_unbraced:NNNo #1#2#3#4
+ { \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN #3 #4 }
\cs_new:Npn \exp_last_unbraced:NNNV #1#2#3#4
{
\exp_after:wN #1
@@ -1338,32 +1418,19 @@
\exp_after:wN #3
\exp:w \@@_eval_register:N #4
}
-\cs_new:Npn \exp_last_unbraced:NNNo #1#2#3#4
- { \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN #3 #4 }
\cs_new:Npn \exp_last_unbraced:Nno { \::n \::o_unbraced \::: }
\cs_new:Npn \exp_last_unbraced:Noo { \::o \::o_unbraced \::: }
\cs_new:Npn \exp_last_unbraced:Nfo { \::f \::o_unbraced \::: }
\cs_new:Npn \exp_last_unbraced:NnNo { \::n \::N \::o_unbraced \::: }
+\cs_new:Npn \exp_last_unbraced:NNNNo #1#2#3#4#5
+ { \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN #3 \exp_after:wN #4 #5 }
\cs_new_protected:Npn \exp_last_unbraced:Nx { \::x_unbraced \::: }
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \begin{macro}[EXP]{\exp_last_two_unbraced:Noo}
-% \begin{macro}[EXP, aux]{\@@_last_two_unbraced:noN}
+% \begin{macro}[EXP]{\@@_last_two_unbraced:noN}
% If |#2| is a single token then this can be implemented as
% \begin{verbatim}
% \cs_new:Npn \exp_last_two_unbraced:Noo #1 #2 #3
@@ -1382,14 +1449,16 @@
%
% \subsection{Preventing expansion}
%
-% \begin{macro}[EXP]{\exp_not:o}
% \begin{macro}[EXP]{\exp_not:c}
+% \begin{macro}[EXP]{\exp_not:o}
% \begin{macro}[EXP]{\exp_not:f}
% \begin{macro}[EXP]{\exp_not:V}
% \begin{macro}[EXP]{\exp_not:v}
+% All these except \cs{exp_not:c} call the primitive
+% \cs{etex_unexpanded:D} namely \cs{exp_not:n}.
% \begin{macrocode}
-\cs_new:Npn \exp_not:o #1 { \etex_unexpanded:D \exp_after:wN {#1} }
\cs_new:Npn \exp_not:c #1 { \exp_after:wN \exp_not:N \cs:w #1 \cs_end: }
+\cs_new:Npn \exp_not:o #1 { \etex_unexpanded:D \exp_after:wN {#1} }
\cs_new:Npn \exp_not:f #1
{ \etex_unexpanded:D \exp_after:wN { \exp:w \exp_end_continue_f:w #1 } }
\cs_new:Npn \exp_not:V #1
@@ -1415,57 +1484,54 @@
% \begin{macro}{\exp_end:}
% \begin{macro}{\exp_end_continue_f:w}
% \begin{macro}{\exp_end_continue_f:nw}
-%
-% To trigger a sequence of \enquote{arbitrary} many expansions we need a
-% method to invoke \TeX's expansion mechanism in such a way that a)
-% we are able to stop it in a controlled manner and b) that the
-% result of what triggered the expansion in the first place is
-% null, i.e., that we do not get any unwanted side effects. There
-% aren't that many possibilities in \TeX{}; in fact the one
-% explained below might well be the only one (as normally the
-% result of expansion is not null).
-%
-% The trick here is to make use of the fact that
-% \cs{tex_romannumeral:D} expands the tokens following it when
-% looking for a number and that its expansion is null if that
-% number turns out to be zero or negative. So we use that to start
-% the expansion sequence.
+% To trigger a sequence of \enquote{arbitrarily} many expansions we
+% need a method to invoke \TeX's expansion mechanism in such a way
+% that (a) we are able to stop it in a controlled manner and (b) the
+% result of what triggered the expansion in the first place is null,
+% i.e.\@, that we do not get any unwanted side effects. There aren't
+% that many possibilities in \TeX{}; in fact the one explained below
+% might well be the only one (as normally the result of expansion is
+% not null).
+%
+% The trick here is to make use of the fact that
+% \cs{tex_romannumeral:D} expands the tokens following it when looking
+% for a number and that its expansion is null if that number turns out
+% to be zero or negative. So we use that to start the expansion
+% sequence: \cs{exp:w} is set equal to \cs{tex_romannumeral:D} in
+% \pkg{l3basics}. To stop the expansion sequence in a controlled way
+% all we need to provide is a constant integer zero as part of
+% expanded tokens. As this is an integer constant it immediately stops
+% \cs{tex_romannumeral:D}'s search for a number. Again, the
+% definition of \cs{exp_end:} as the integer constant zero is in
+% \pkg{l3basics}. (Note that according to our specification all
+% tokens we expand initiated by \cs{exp:w} are supposed to be
+% expandable (as well as their replacement text in the expansion) so
+% we will not encounter a \enquote{number} that actually result in a
+% roman numeral being generated. Or if we do then the programmer made
+% a mistake.)
+%
+% If on the other hand we want to stop the initial expansion sequence
+% but continue with an \texttt{f}-type expansion we provide the
+% alphabetic constant |`^^@| that also represents |0| but this time
+% \TeX's syntax for a \meta{number} continues searching for an
+% optional space (and it continues expansion doing that) --- see
+% \TeX{}book page~269 for details.
% \begin{macrocode}
-%\cs_new_eq:NN \exp:w \tex_romannumeral:D
-% \end{macrocode}
-% So to stop the expansion sequence in a controlled way all we need
-% to provide is a constant integer zero as part of expanded tokens. As this is
-% an integer constant it immediately stops
-% \cs{tex_romannumerl:D}'s search for a number.
-% \begin{macrocode}
-%\int_const:Nn \exp_end: { 0 }
-% \end{macrocode}
-% (Note that according to our specification all tokens we expand
-% initiated by \cs{exp:w} are supposed to be expandable (as well as
-% their replacement text in the expansion) so we will not encounter
-% a \enquote{number} that actually result in a roman numeral being
-% generated. Or if we do then the programmer made a mistake.)
-%
-% If on the other hand we want to stop the initial expansion
-% sequence but continue with an \texttt{f}-type expansion we provide the
-% alphabetic constant |`^^@| that also represents |0| but this time
-% \TeX's syntax for a \meta{number} continues searching for an
-% optional space (and it continues expansion doing that) ---
-% see \TeX{}book page~269 for details.
-% \begin{macrocode}
-\tex_catcode:D `\^^@=13
-\cs_new_protected:Npn \exp_end_continue_f:w {`^^@}
+\group_begin:
+ \tex_catcode:D `\^^@ = 13
+ \cs_new_protected:Npn \exp_end_continue_f:w { `^^@ }
% \end{macrocode}
% If the above definition ever appears outside its proper context
% the active character |^^@| will be executed so we turn this into an
-% error.\footnote{Need to get a real error message.}
+% error.
% \begin{macrocode}
-\cs_new:Npn ^^@{\expansionERROR}
+ \cs_new:Npn ^^@
+ { \__msg_kernel_expandable_error:nn { kernel } { bad-exp-end-f } }
% \end{macrocode}
-%
+% The same but grabbing an argument to remove spaces and braces.
% \begin{macrocode}
-\cs_new:Npn \exp_end_continue_f:nw #1 { `^^@ #1 }
-\tex_catcode:D `\^^@=15
+ \cs_new:Npn \exp_end_continue_f:nw #1 { `^^@ #1 }
+\group_end:
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1507,13 +1573,13 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_generate_variant:N}
-% \begin{macro}[aux]{\@@_generate_variant:ww, \@@_generate_variant:wwNw}
+% \begin{macro}{\@@_generate_variant:N}
+% \begin{macro}{\@@_generate_variant:ww, \@@_generate_variant:wwNw}
% The goal here is to pick up protected parent functions. There are
% four cases: the parent function can be a primitive or a macro, and
% can be expandable or not. For non-expandable primitives, all
% variants should be protected; skipping the \cs{else:} branch is safe
-% because all primitive \TeX{} conditionals are expandable.
+% because non-expandable primitives cannot be \TeX{} conditionals.
%
% The other case where variants should be protected is when the parent
% function is a protected macro: then |protected| appears in the
@@ -1546,24 +1612,19 @@
\exp_not:N \q_stop
\exp_not:N \fi:
}
-\use:x
- {
- \cs_new_protected:Npn \exp_not:N \@@_generate_variant:ww
- ##1 \tl_to_str:n { ma } ##2 \exp_not:N \q_mark
- }
- { \@@_generate_variant:wwNw #1 }
-\use:x
- {
- \cs_new_protected:Npn \exp_not:N \@@_generate_variant:wwNw
- ##1 \tl_to_str:n { pr } ##2 \exp_not:N \q_mark
- ##3 ##4 \exp_not:N \q_stop
- }
- { \cs_set_eq:NN \@@_tmp:w #3 }
+\exp_last_unbraced:NNNNo
+ \cs_new_protected:Npn \@@_generate_variant:ww
+ #1 { \tl_to_str:n { ma } } #2 \q_mark
+ { \@@_generate_variant:wwNw #1 }
+\exp_last_unbraced:NNNNo
+ \cs_new_protected:Npn \@@_generate_variant:wwNw
+ #1 { \tl_to_str:n { pr } } #2 \q_mark #3 #4 \q_stop
+ { \cs_set_eq:NN \@@_tmp:w #3 }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_generate_variant:nnNN}
+% \begin{macro}{\@@_generate_variant:nnNN}
% \begin{arguments}
% \item Base name.
% \item Base signature.
@@ -1587,7 +1648,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_generate_variant:Nnnw}
+% \begin{macro}{\@@_generate_variant:Nnnw}
% \begin{arguments}
% \item Base function.
% \item Base name.
@@ -1603,32 +1664,34 @@
%
% There are further subtleties:
% \begin{itemize}
-% \item In \cs{cs_generate_variant:Nn} |\foo:nnTF| |{xxTF}|, it
-% would be better to define |\foo:xxTF| using |\exp_args:Nxx|,
+% \item In \cs{cs_generate_variant:Nn} |\foo:nnTF| |{xxTF}|, we must define
+% |\foo:xxTF| using |\exp_args:Nxx|,
% rather than a hypothetical |\exp_args:NxxTF|. Thus, we wish to
% trim a common trailing part from the base signature and the
% variant signature.
% \item In \cs{cs_generate_variant:Nn} |\foo:on| |{ox}|, the
-% function |\foo:ox| should be defined using |\exp_args:Nnx|, not
+% function |\foo:ox| must be defined using |\exp_args:Nnx|, not
% |\exp_args:Nox|, to avoid double |o| expansion.
-% \item Lastly, \cs{cs_generate_variant:Nn} |\foo:on| |{xn}| should
+% \item Lastly, \cs{cs_generate_variant:Nn} |\foo:on| |{xn}| must
% trigger an error, because we do not have a means to replace
% |o|-expansion by |x|-expansion.
+% More generally, we can only convert |N| to |c|, or convert |n|
+% to |V|, |v|, |o|, |f|, |x|.
% \end{itemize}
% All this boils down to a few rules. Only |n| and |N|-type
% arguments can be replaced by \cs{cs_generate_variant:Nn}. Other
% argument types are allowed to be passed unchanged from the base
% form to the variant: in the process they are changed to |n|
-% (except for two cases: |N| and |p|-type arguments). A common
-% trailing part is ignored.
+% except for |N| and |p|-type arguments. A common trailing
+% part is ignored.
%
% We compare the base and variant signatures one character at a time
% within |x|-expansion. The result is given to
-% \cs{@@_generate_variant:wwNN} in the form \meta{processed variant
-% signature} \cs{q_mark} \meta{errors} \cs{q_stop} \meta{base
-% function} \meta{new function}. If all went well, \meta{errors}
-% is empty; otherwise, it is a kernel error message, followed by
-% some clean-up code (\cs{use_none:nnn}).
+% \cs{@@_generate_variant:wwNN} (defined later) in the form
+% \meta{processed variant signature} \cs{q_mark} \meta{errors}
+% \cs{q_stop} \meta{base function} \meta{new function}. If all went
+% well, \meta{errors} is empty; otherwise, it is a kernel error
+% message and some clean-up code.
%
% Note the space after |#3| and after the following brace group.
% Those are ignored by \TeX{} when fetching the last argument for
@@ -1658,17 +1721,20 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[rEXP]
% {
% \@@_generate_variant_loop:nNwN,
+% \@@_generate_variant_loop_base:N,
% \@@_generate_variant_loop_same:w,
% \@@_generate_variant_loop_end:nwwwNNnn,
% \@@_generate_variant_loop_long:wNNnn,
% \@@_generate_variant_loop_invalid:NNwNNnn,
+% \@@_generate_variant_loop_special:NNwNNnn,
+% \@@_generate_variant_loop_warning:nnxxxx
% }
% \begin{arguments}
-% \item Last few (consecutive) letters common between the base
-% and variant (in fact, \cs{@@_generate_variant_same:N}
+% \item Last few consecutive letters common between the base and
+% variant (more precisely, \cs{@@_generate_variant_same:N}
% \meta{letter} for each letter).
% \item Next variant letter.
% \item Remainder of variant form.
@@ -1680,15 +1746,16 @@
% two letters are different: if the loop ends before, the argument is
% dropped, which means that trailing common letters are ignored.
%
-% The case where the two letters are different is only allowed with a
-% base letter of |N| or |n|. Otherwise, call
+% The case where the two letters are different is only allowed if the
+% base is |N| and the variant is |c|, or when the base is |n| and the
+% variant is |o|, |V|, |v|, |f| or |x|. Otherwise, call
% \cs{@@_generate_variant_loop_invalid:NNwNNnn} to remove the end of
% the loop, get arguments at the end of the loop, and place an
% appropriate error message as a second argument of
-% \cs{@@_generate_variant:wwNN}. If the letters are distinct and
-% the base letter is indeed |n| or |N|, leave in the input stream
-% whatever argument was collected, and the next variant letter |#2|,
-% then loop by calling \cs{@@_generate_variant_loop:nNwN}.
+% \cs{@@_generate_variant:wwNN}. If the letters are distinct and the
+% base letter is indeed |n| or |N|, leave in the input stream whatever
+% argument |#1| was collected, and the next variant letter |#2|, then
+% loop by calling \cs{@@_generate_variant_loop:nNwN}.
%
% The loop can stop in three ways.
% \begin{itemize}
@@ -1706,8 +1773,9 @@
% \cs{@@_generate_variant:wwNN}.
% \item The loop can be interrupted early if the requested expansion
% is unavailable, namely when the variant and base letters differ
-% and the base is neither |n| nor |N|. Again, an error is placed
-% as the second argument of \cs{@@_generate_variant:wwNN}.
+% and the base is not the right one (|n| or |N| to support the
+% variant). In that case too an error is placed as the second
+% argument of \cs{@@_generate_variant:wwNN}.
% \end{itemize}
% Note that if the variant form has the same length as the base form,
% |#2| is as described in the first point, and |#4| as described in
@@ -1715,14 +1783,23 @@
% breaking function takes the empty brace group in |#4| as its first
% argument: this empty brace group produces the correct signature for
% the full variant.
+%
+% Since people seem to have tried generating |N| or |c|-type variants
+% of |n|-type arguments, and |n|, |o|, |V|, |v|, |f|, |x| variants of
+% |N|-type arguments, in those cases we only produce a warning.
% \begin{macrocode}
\cs_new:Npn \@@_generate_variant_loop:nNwN #1#2#3 \q_mark #4
{
\if:w #2 #4
\exp_after:wN \@@_generate_variant_loop_same:w
\else:
- \if:w N #4 \else:
- \if:w n #4 \else:
+ \if:w #4 \@@_generate_variant_loop_base:N #2 \else:
+ \if:w 0
+ \if:w N #4 \else: \if:w n #4 \else: 1 \fi: \fi:
+ \if:w \scan_stop: \@@_generate_variant_loop_base:N #2 1 \fi:
+ 0
+ \@@_generate_variant_loop_special:NNwNNnn #4#2
+ \else:
\@@_generate_variant_loop_invalid:NNwNNnn #4#2
\fi:
\fi:
@@ -1732,11 +1809,29 @@
#2
\@@_generate_variant_loop:nNwN { } #3 \q_mark
}
-\cs_new:Npn \@@_generate_variant_loop_same:w
- #1 \prg_do_nothing: #2#3#4
+\cs_new:Npn \@@_generate_variant_loop_base:N #1
{
- #3 { #1 \@@_generate_variant_same:N #2 }
+ \if:w c #1 N \else:
+ \if:w o #1 n \else:
+ \if:w V #1 n \else:
+ \if:w v #1 n \else:
+ \if:w f #1 n \else:
+ \if:w x #1 n \else:
+ \if:w n #1 n \else:
+ \if:w N #1 N \else:
+ \scan_stop:
+ \fi:
+ \fi:
+ \fi:
+ \fi:
+ \fi:
+ \fi:
+ \fi:
+ \fi:
}
+\cs_new:Npn \@@_generate_variant_loop_same:w
+ #1 \prg_do_nothing: #2#3#4
+ { #3 { #1 \@@_generate_variant_same:N #2 } }
\cs_new:Npn \@@_generate_variant_loop_end:nwwwNNnn
#1#2 \q_mark #3 ~ #4 \q_stop #5#6#7#8
{
@@ -1774,31 +1869,42 @@
#5
}
}
+\cs_new:Npn \@@_generate_variant_loop_special:NNwNNnn #1#2#3 \q_stop #4#5#6#7
+ {
+ #3 \q_stop #4 #5 {#6} {#7}
+ \exp_not:n
+ {
+ \@@_generate_variant_loop_warning:nnxxxx { kernel } { invalid-variant }
+ {#7} { \token_to_str:N #5 } {#1} {#2}
+ }
+ }
+\cs_new_protected:Npn \@@_generate_variant_loop_warning:nnxxxx
+ { \__msg_kernel_warning:nnxxxx }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_generate_variant_same:N}
+% \begin{macro}[rEXP]{\@@_generate_variant_same:N}
% When the base and variant letters are identical, don't do any
% expansion. For most argument types, we can use the |n|-type
% no-expansion, but the |N| and |p| types require a slightly different
-% behaviour with respect to braces.
+% behaviour with respect to braces. For |V|-type this function could
+% output |N| to avoid adding useless braces but that is not a problem.
% \begin{macrocode}
\cs_new:Npn \@@_generate_variant_same:N #1
{
- \if:w N #1
- N
- \else:
- \if:w p #1
- p
- \else:
+ \if:w N #1 N \else:
+ \if:w p #1 p \else:
n
+ \if:w n #1 \else:
+ \@@_generate_variant_loop_special:NNwNNnn #1#1
+ \fi:
\fi:
\fi:
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_generate_variant:wwNN}
+% \begin{macro}{\@@_generate_variant:wwNN}
% If the variant form has already been defined, log its existence
% (provided \texttt{log-functions} is active).
% Otherwise, make sure that the |\exp_args:N #3| form is defined, and
@@ -1833,9 +1939,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_generate_internal_variant:n}
-% \begin{macro}[aux]{\@@_generate_internal_variant:wwnw}
-% \begin{macro}[aux, rEXP]{\@@_generate_internal_variant_loop:n}
+% \begin{macro}{\@@_generate_internal_variant:n}
+% \begin{macro}{\@@_generate_internal_variant:wwnw}
+% \begin{macro}[rEXP]{\@@_generate_internal_variant_loop:n}
% Test if |\exp_args:N #1| is already defined and if not define it via
% the |\::| commands using the chars in |#1|. If |#1| contains an |x|
% (this is the place where having converted the original comma-list
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index d7d94f5cf3a..271a66e704f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\PrintIndex
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -381,8 +381,8 @@
% Use outside of a \cs[no-index]{ior_map_\ldots} scenario leads to low
% level \TeX{} errors.
% \begin{texnote}
-% When the mapping is broken, additional tokens may be inserted by the
-% internal macro \cs{__prg_break_point:Nn} before further items are taken
+% When the mapping is broken, additional tokens may be inserted
+% before further items are taken
% from the input stream. This depends on the design of the mapping
% function.
% \end{texnote}
@@ -390,17 +390,17 @@
%
% \begin{function}[added = 2012-06-29]{\ior_map_break:n}
% \begin{syntax}
-% \cs{ior_map_break:n} \Arg{tokens}
+% \cs{ior_map_break:n} \Arg{code}
% \end{syntax}
% Used to terminate a \cs[no-index]{ior_map_\ldots} function before all
% lines in the \meta{stream} have been processed, inserting
-% the \meta{tokens} after the mapping has ended. This
+% the \meta{code} after the mapping has ended. This
% normally takes place within a conditional statement, for example
% \begin{verbatim}
% \ior_map_inline:Nn \l_my_ior
% {
% \str_if_eq:nnTF { #1 } { bingo }
-% { \ior_map_break:n { <tokens> } }
+% { \ior_map_break:n { <code> } }
% {
% % Do something useful
% }
@@ -409,8 +409,8 @@
% Use outside of a \cs[no-index]{ior_map_\ldots} scenario leads to low
% level \TeX{} errors.
% \begin{texnote}
-% When the mapping is broken, additional tokens may be inserted by the
-% internal macro \cs{__prg_break_point:Nn} before the \meta{tokens} are
+% When the mapping is broken, additional tokens may be inserted
+% before the \meta{code} is
% inserted into the input stream.
% This depends on the design of the mapping function.
% \end{texnote}
@@ -532,7 +532,7 @@
%
% \subsection{Wrapping lines in output}
%
-% \begin{function}[added = 2012-06-28, updated = 2017-07-17]{\iow_wrap:nnnN}
+% \begin{function}[added = 2012-06-28, updated = 2017-12-04]{\iow_wrap:nnnN}
% \begin{syntax}
% \cs{iow_wrap:nnnN} \Arg{text} \Arg{run-on text} \Arg{set up} \meta{function}
% \end{syntax}
@@ -546,7 +546,7 @@
% \meta{text} and \meta{run-on text} are exhaustively expanded by the
% function, with the following substitutions:
% \begin{itemize}
-% \item |\\| may be used to force a new line,
+% \item |\\| or \cs{iow_newline:} may be used to force a new line,
% \item \verb*|\ | may be used to represent a forced space
% (for example after a control sequence),
% \item |\#|, |\%|, |\{|, |\}|, |\~| may be used to represent
@@ -841,9 +841,9 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int]{\__file_name_sanitize:nN}
-% \begin{macro}[int]{\__file_name_quote:nN}
-% \begin{macro}[int, aux]{\@@_name_sanitize_aux:n}
+% \begin{macro}{\__file_name_sanitize:nN}
+% \begin{macro}{\__file_name_quote:nN}
+% \begin{macro}{\@@_name_sanitize_aux:n}
% For converting a token list to a string where active characters are treated
% as strings from the start. The logic to the quoting normalisation is the
% same as used by \texttt{lualatexquotejobname}: check for balanced |"|, and
@@ -885,7 +885,7 @@
% \end{macro}
%
% \begin{macro}{\file_get_full_name:nN, \file_get_full_name:VN}
-% \begin{macro}[aux]{\@@_get_full_name_search:nN}
+% \begin{macro}{\@@_get_full_name_search:nN}
% The way to test if a file exists is to try to open it: if it does
% not exist then \TeX{} reports end-of-file. A search is made
% looking at each potential path in turn (starting from the current
@@ -955,7 +955,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\__file_missing:n}
+% \begin{macro}{\__file_missing:n}
% An error message for a missing file, also used in \cs{ior_open:Nn}.
% \begin{macrocode}
\cs_new_protected:Npn \__file_missing:n #1
@@ -968,10 +968,10 @@
% \end{macro}
%
% \begin{macro}{\file_input:n}
-% \begin{macro}[aux]{\@@_input:n, \@@_input:V}
-% \begin{macro}[aux]{\@@_input_push:n}
-% \begin{macro}[aux]{\@@_input_pop:}
-% \begin{macro}[aux]{\@@_input_pop:nnn}
+% \begin{macro}{\@@_input:n, \@@_input:V}
+% \begin{macro}{\@@_input_push:n}
+% \begin{macro}{\@@_input_pop:}
+% \begin{macro}{\@@_input_pop:nnn}
% 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
% \cs{g_@@_stack_seq}, and add it to the file list, either
@@ -1036,7 +1036,7 @@
% \end{macro}
%
% \begin{macro}{\file_parse_full_name:nNNN}
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_parse_full_name_auxi:w, \@@_parse_full_name_split:nNNNTF}
% Parsing starts by stripping off any surrounding quotes. Then find
% the directory |#4| by splitting at the last~|/|. (The auxiliary
@@ -1091,19 +1091,17 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\file_show_list:, \file_log_list:}
-% \begin{macro}[aux, EXP]{\@@_list_aux:n}
+% \begin{macro}{\file_show_list:, \file_log_list:, \@@_list:N}
+% \begin{macro}[EXP]{\@@_list_aux:n}
% A function to list all files used to the log, without duplicates.
% In package mode, if \cs{@filelist} is still defined, we need to take
% this list of file names into account (we capture it
% \cs{AtBeginDocument} into \cs{g_@@_record_seq}), turning it to a
-% string (this does not affect the commas of this comma list). The
-% message system is a bit finnicky (it can only display results that
-% start with |>~| and end with a dot) so that constrains the possible
-% markup. The advantage is that we get terminal and log outputs for
-% free.
+% string (this does not affect the commas of this comma list).
% \begin{macrocode}
-\cs_new_protected:Npn \file_show_list:
+\cs_new_protected:Npn \file_show_list: { \@@_list:N \msg_show:nnxxxx }
+\cs_new_protected:Npn \file_log_list: { \@@_list:N \msg_log:nnxxxx }
+\cs_new_protected:Npn \@@_list:N #1
{
\seq_clear:N \l_@@_tmp_seq
%<*package>
@@ -1115,16 +1113,10 @@
%</package>
\seq_concat:NNN \l_@@_tmp_seq \l_@@_tmp_seq \g_@@_record_seq
\seq_remove_duplicates:N \l_@@_tmp_seq
- \__msg_show_wrap:n
- {
- >~File~List~< \\
- \seq_map_function:NN \l_@@_tmp_seq \@@_list_aux:n
- ............
- }
+ #1 { LaTeX/kernel } { file-list }
+ { \seq_map_function:NN \l_@@_tmp_seq \@@_list_aux:n } { } { } { }
}
-\cs_new:Npn \@@_list_aux:n #1 { #1 \\ }
-\cs_new_protected:Npn \file_log_list:
- { \__msg_log_next: \file_show_list: }
+\cs_new:Npn \@@_list_aux:n #1 { \iow_newline: #1 }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1255,7 +1247,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_new:N}
+% \begin{macro}{\@@_new:N}
% In package mode, streams are reserved using \tn{newread} before they
% can be managed by \pkg{ior}. To prevent \pkg{ior} from being
% affected by redefinitions of \tn{newread} (such as done by the
@@ -1271,8 +1263,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_open:Nn, \@@_open:No}
-% \begin{macro}[aux]{\@@_open_stream:Nn}
+% \begin{macro}{\@@_open:Nn, \@@_open:No}
+% \begin{macro}{\@@_open_stream:Nn}
% The stream allocation itself uses the fact that there is a list of all of
% those available, so allocation is simply a question of using the number at
% the top of the list. In package mode, life gets more complex as it's
@@ -1331,25 +1323,26 @@
% \end{macro}
%
% \begin{macro}{\ior_show_list:, \ior_log_list:}
-% \begin{macro}[aux]{\@@_list:Nn}
+% \begin{macro}{\@@_list:N}
% Show the property lists, but with some \enquote{pretty printing}.
% See the \pkg{l3msg} module. The first argument of the message is
% |ior| (as opposed to |iow|) and the second is empty if no read
-% stream is open and non-empty (in fact a question mark) otherwise.
-% The code of the message \texttt{show-streams} takes care of
-% translating |ior|/|iow| to English. The list of streams is
-% formatted using \cs{__msg_show_item_unbraced:nn}.
+% stream is open and non-empty (the list of streams formatted using
+% \cs{msg_show_item_unbraced:nn}) otherwise. The code of the message
+% \texttt{show-streams} takes care of translating |ior|/|iow| to
+% English.
% \begin{macrocode}
-\cs_new_protected:Npn \ior_show_list:
- { \@@_list:Nn \g_@@_streams_prop { ior } }
-\cs_new_protected:Npn \ior_log_list:
- { \__msg_log_next: \ior_show_list: }
-\cs_new_protected:Npn \@@_list:Nn #1#2
+\cs_new_protected:Npn \ior_show_list: { \@@_list:N \msg_show:nnxxxx }
+\cs_new_protected:Npn \ior_log_list: { \@@_list:N \msg_log:nnxxxx }
+\cs_new_protected:Npn \@@_list:N #1
{
- \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-streams }
- {#2} { \prop_if_empty:NF #1 { ? } } { } { }
- \__msg_show_wrap:n
- { \prop_map_function:NN #1 \__msg_show_item_unbraced:nn }
+ #1 { LaTeX / kernel } { show-streams }
+ { ior }
+ {
+ \prop_map_function:NN \g_@@_streams_prop
+ \msg_show_item_unbraced:nn
+ }
+ { } { }
}
% \end{macrocode}
% \end{macro}
@@ -1357,7 +1350,7 @@
%
% \subsubsection{Reading input}
%
-% \begin{macro}[int]{\if_eof:w}
+% \begin{macro}{\if_eof:w}
% The primitive conditional
% \begin{macrocode}
\cs_new_eq:NN \if_eof:w \tex_ifeof:D
@@ -1424,9 +1417,9 @@
% \end{macro}
%
% \begin{macro}{\ior_map_inline:Nn, \ior_str_map_inline:Nn}
-% \begin{macro}[aux]{\@@_map_inline:NNn}
-% \begin{macro}[aux]{\@@_map_inline:NNNn}
-% \begin{macro}[aux]{\@@_map_inline_loop:NNN}
+% \begin{macro}{\@@_map_inline:NNn}
+% \begin{macro}{\@@_map_inline:NNNn}
+% \begin{macro}{\@@_map_inline_loop:NNN}
% \begin{variable}{\l_@@_internal_tl}
% Mapping to an input stream can be done on either a token or a string
% basis, hence the set up. Within that, there is a check to avoid reading
@@ -1567,7 +1560,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_new:N}
+% \begin{macro}{\@@_new:N}
% As for read streams, copy \tn{newwrite} in package mode, making sure
% that it is not \tn{outer}.
% \begin{macrocode}
@@ -1579,7 +1572,7 @@
% \end{macro}
%
% \begin{macro}{\iow_open:Nn, \iow_open:cn}
-% \begin{macro}[aux]{\@@_open_stream:Nn, \@@_open_stream:NV}
+% \begin{macro}{\@@_open_stream:Nn, \@@_open_stream:NV}
% The same idea as for reading, but without the path and without the need
% to allow for a conditional version.
% \begin{macrocode}
@@ -1634,14 +1627,21 @@
% \end{macro}
%
% \begin{macro}{\iow_show_list:, \iow_log_list:}
-% \begin{macro}{\@@_list:Nn}
+% \begin{macro}{\@@_list:N}
% Done as for input, but with a copy of the auxiliary so the name is correct.
% \begin{macrocode}
-\cs_new_protected:Npn \iow_show_list:
- { \@@_list:Nn \g_@@_streams_prop { iow } }
-\cs_new_protected:Npn \iow_log_list:
- { \__msg_log_next: \iow_show_list: }
-\cs_new_eq:NN \@@_list:Nn \__ior_list:Nn
+\cs_new_protected:Npn \iow_show_list: { \@@_list:N \msg_show:nnxxxx }
+\cs_new_protected:Npn \iow_log_list: { \@@_list:N \msg_log:nnxxxx }
+\cs_new_protected:Npn \@@_list:N #1
+ {
+ #1 { LaTeX / kernel } { show-streams }
+ { iow }
+ {
+ \prop_map_function:NN \g_@@_streams_prop
+ \msg_show_item_unbraced:nn
+ }
+ { } { }
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1669,8 +1669,8 @@
%
% \subsubsection{Immediate writing}
%
-% \begin{macro}[int]{\@@_with:Nnn}
-% \begin{macro}[aux]{\@@_with_aux:nNnn}
+% \begin{macro}{\@@_with:Nnn}
+% \begin{macro}{\@@_with_aux:nNnn}
% If the integer~|#1| is equal to~|#2|, just leave~|#3| in the input
% stream. Otherwise, pass the old value to an auxiliary, which sets
% the integer to the new value, runs the code, and restores the
@@ -1776,8 +1776,8 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[aux]{\@@_set_indent:n}
-% \begin{macro}[aux]{\@@_unindent:w}
+% \begin{macro}{\@@_set_indent:n}
+% \begin{macro}{\@@_unindent:w}
% \begin{variable}{\l_@@_one_indent_tl, \l_@@_one_indent_int}
% The \texttt{one_indent} variables hold one indentation marker and
% its length. The \cs{@@_unindent:w} auxiliary removes one
@@ -1872,8 +1872,8 @@
% \end{variable}
%
% \begin{macro}{\iow_indent:n}
-% \begin{macro}[EXP,aux]{\@@_indent:n}
-% \begin{macro}[EXP,aux]{\@@_indent_error:n}
+% \begin{macro}[EXP]{\@@_indent:n}
+% \begin{macro}[EXP]{\@@_indent_error:n}
% We set \cs{iow_indent:n} to produce an error when outside
% messages. Within wrapped message, it is set to \cs{@@_indent:n} when
% valid and otherwise to \cs{@@_indent_error:n}. The first places the
@@ -1923,7 +1923,7 @@
\cs_set:Npx \% { \token_to_str:N \% }
\cs_set:Npx \~ { \token_to_str:N \~ }
\int_set:Nn \tex_escapechar:D { 92 }
- \cs_set_eq:NN \\ \c_@@_wrap_newline_marker_tl
+ \cs_set_eq:NN \\ \iow_newline:
\cs_set_eq:NN \ \c_catcode_other_space_tl
\cs_set_eq:NN \iow_indent:n \@@_indent:n
#3
@@ -1962,8 +1962,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_wrap_do:, \@@_wrap_start:w}
-% Escape spaces. Set up a few variables, in particular the initial
+% \begin{macro}{\@@_wrap_do:, \@@_wrap_fix_newline:w, \@@_wrap_start:w}
+% Escape spaces and change newlines to \cs{c_@@_wrap_newline_marker_tl}.
+% Set up a few variables, in particular the initial
% value of \cs{l_@@_wrap_tl}: the space stops the
% \texttt{f}-expansion of the main wrapping function and
% \cs{use_none:n} removes a newline marker inserted by later code.
@@ -1978,8 +1979,22 @@
\exp_args:No \__str_to_other_fast:n \l_@@_wrap_tl
\c_@@_wrap_end_marker_tl
}
+ \tl_set:Nx \l_@@_wrap_tl
+ {
+ \exp_after:wN \@@_wrap_fix_newline:w \l_@@_wrap_tl
+ ^^J \q_nil ^^J \q_stop
+ }
\exp_after:wN \@@_wrap_start:w \l_@@_wrap_tl
}
+\cs_new:Npn \@@_wrap_fix_newline:w #1 ^^J #2 ^^J
+ {
+ #1
+ \if_meaning:w \q_nil #2
+ \use_i_delimit_by_q_stop:nw
+ \fi:
+ \c_@@_wrap_newline_marker_tl
+ \@@_wrap_fix_newline:w #2 ^^J
+ }
\cs_new_protected:Npn \@@_wrap_start:w
{
\bool_set_false:N \l_@@_line_break_bool
@@ -1993,7 +2008,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_wrap_chunk:nw, \@@_wrap_next:nw}
+% \begin{macro}{\@@_wrap_chunk:nw, \@@_wrap_next:nw}
% The \texttt{chunk} and \texttt{next} auxiliaries are defined
% indirectly to obtain the expansions of \cs{c_catcode_other_space_tl}
% and \cs{c_@@_wrap_marker_tl} in their definition. The \texttt{next}
@@ -2035,8 +2050,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_wrap_line:nw}
-% \begin{macro}[EXP,aux]
+% \begin{macro}{\@@_wrap_line:nw}
+% \begin{macro}[EXP]
% {
% \@@_wrap_line_loop:w,
% \@@_wrap_line_aux:Nw,
@@ -2126,8 +2141,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP,aux]{\@@_wrap_break:w}
-% \begin{macro}[EXP,aux]
+% \begin{macro}[EXP]{\@@_wrap_break:w}
+% \begin{macro}[EXP]
% {
% \@@_wrap_break_first:w,
% \@@_wrap_break_none:w,
@@ -2189,7 +2204,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_wrap_next_line:w}
+% \begin{macro}{\@@_wrap_next_line:w}
% The special case where the end of a line coincides with the end of a
% chunk is detected here, to avoid a spurious empty line. Otherwise,
% call \cs{@@_wrap_line:nw} to find characters for the next line
@@ -2214,7 +2229,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_wrap_indent:, \@@_wrap_unindent:}
+% \begin{macro}{\@@_wrap_indent:, \@@_wrap_unindent:}
% These functions are called after a chunk has been wrapped, when
% encountering \texttt{indent}/\texttt{unindent} markers. Add the
% line part (last line part of the previous chunk) to the line so far
@@ -2242,7 +2257,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_wrap_newline:, \@@_wrap_end:}
+% \begin{macro}{\@@_wrap_newline:, \@@_wrap_end:}
% These functions are called after a chunk has been line-wrapped, when
% encountering a \texttt{newline}/\texttt{end} marker. Unless we just
% took a line-break, store the line part and the line so far into the
@@ -2266,7 +2281,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_wrap_store_do:n}
+% \begin{macro}{\@@_wrap_store_do:n}
% First add the last line part to the line, then append it to
% \cs{l_@@_wrap_tl} with the appropriate new line (with
% \enquote{run-on} text), possibly with its last space removed (|#1|
@@ -2287,7 +2302,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP, aux]{\@@_wrap_trim:N, \@@_wrap_trim:w}
+% \begin{macro}[EXP]{\@@_wrap_trim:N, \@@_wrap_trim:w}
% Remove one trailing \enquote{other} space from the argument.
% \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:w #1
@@ -2309,6 +2324,12 @@
The~requested~file~could~not~be~found~in~the~current~directory,~
in~the~TeX~search~path~or~in~the~LaTeX~search~path.
}
+\__msg_kernel_new:nnn { kernel } { file-list }
+ {
+ >~File~List~<
+ #1 \\
+ .............
+ }
\__msg_kernel_new:nnnn { kernel } { input-streams-exhausted }
{ Input~streams~exhausted }
{
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
index c426117e160..babef188b69 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
index effd406c020..81b44527cee 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
-%% File: l3flag.dtx Copyright (C) 2011-2012,2014-2017 The LaTeX3 Project
+%% File: l3flag.dtx Copyright (C) 2011-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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -189,7 +189,7 @@
% \end{macro}
%
% \begin{macro}{\flag_clear:n}
-% \begin{macro}[aux]{\@@_clear:wn}
+% \begin{macro}{\@@_clear:wn}
% Undefine control sequences, starting from the |0| flag, upwards,
% until reaching an undefined control sequence. We don't use
% \cs{cs_undefine:c} because that would act globally.
@@ -223,23 +223,26 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\flag_show:n, \flag_log:n}
+% \begin{macro}{\flag_show:n, \flag_log:n, \@@_show:Nn}
% Show the height (terminal or log file) using appropriate \pkg{l3msg}
% auxiliaries.
% \begin{macrocode}
-\cs_new_protected:Npn \flag_show:n #1
+\cs_new_protected:Npn \flag_show:n { \@@_show:Nn \tl_show:n }
+\cs_new_protected:Npn \flag_log:n { \@@_show:Nn \tl_log:n }
+\cs_new_protected:Npn \@@_show:Nn #1#2
{
- \exp_args:Nc \__msg_show_variable:NNNnn { flag~#1 } \cs_if_exist:NTF ? { }
- { > ~ flag ~ #1 ~ height = \flag_height:n {#1} }
+ \exp_args:Nc \__kernel_check_defined:NT { flag~#2 }
+ {
+ \exp_args:Nx #1
+ { \tl_to_str:n { flag~#2~height } = \flag_height:n {#2} }
+ }
}
-\cs_new_protected:Npn \flag_log:n
- { \__msg_log_next: \flag_show:n }
% \end{macrocode}
% \end{macro}
%
% \subsection{Expandable flag commands}
%
-% \begin{macro}[EXP,aux]{\@@_chk_exist:n}
+% \begin{macro}[EXP]{\@@_chk_exist:n}
% Analogue of \cs{__debug_chk_var_exist:N} for flags, and with an
% expandable error. We need to add checks by hand because flags are
% not implemented in terms of other variables. Not all functions need
@@ -288,7 +291,7 @@
% \end{macro}
%
% \begin{macro}[EXP]{\flag_height:n}
-% \begin{macro}[EXP, aux]{\@@_height_loop:wn, \@@_height_end:wn}
+% \begin{macro}[EXP]{\@@_height_loop:wn, \@@_height_end:wn}
% Extract the value of the flag by going through all of the
% control sequences starting from |0|.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3format.ins b/Master/texmf-dist/source/latex/l3kernel/l3format.ins
index ec089835e9d..a17cdbdc311 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3format.ins
+++ b/Master/texmf-dist/source/latex/l3kernel/l3format.ins
@@ -7,7 +7,7 @@ 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
+ https://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.
@@ -40,7 +40,7 @@ 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
+ https://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.
@@ -128,7 +128,7 @@ 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
+ https://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.
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
index 9c3252e5a39..165aa66f09a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
% \maketitle
%
% \begin{documentation}
@@ -136,7 +136,7 @@
% \fp_add:Nn, \fp_add:cn, \fp_gadd:Nn, \fp_gadd:cn,
% \fp_sub:Nn, \fp_sub:cn, \fp_gsub:Nn, \fp_gsub:cn,
% }
-% \begin{macro}[aux]{\@@_add:NNNn}
+% \begin{macro}{\@@_add:NNNn}
% For the sake of error recovery we should not simply set |#1| to
% $|#1| \pm (|#2|)$: for instance, if |#2| is % ^^A(
% |0)+2|, the parsing error would be raised at the last closing
@@ -162,29 +162,29 @@
%
% \subsection{Showing values}
%
-% \begin{macro}{\fp_show:N, \fp_show:c, \fp_show:n}
-% This shows the result of computing its argument. The input of
-% \cs{__msg_show_variable:NNNnn} must start with |>~| (or be empty).
+% \begin{macro}{\fp_show:N, \fp_show:c, \fp_log:N, \fp_log:c, \@@_show:NN}
+% This shows the result of computing its argument by
+% passing the right data to \cs{tl_show:n} or \cs{tl_log:n}.
% \begin{macrocode}
-\cs_new_protected:Npn \fp_show:N #1
+\cs_new_protected:Npn \fp_show:N { \@@_show:NN \tl_show:n }
+\cs_generate_variant:Nn \fp_show:N { c }
+\cs_new_protected:Npn \fp_log:N { \@@_show:NN \tl_log:n }
+\cs_generate_variant:Nn \fp_log:N { c }
+\cs_new_protected:Npn \@@_show:NN #1#2
{
- \__msg_show_variable:NNNnn #1 \fp_if_exist:NTF ? { }
- { > ~ \token_to_str:N #1 = \fp_to_tl:N #1 }
+ \__kernel_check_defined:NT #2
+ { \exp_args:Nx #1 { \token_to_str:N #2 = \fp_to_tl:N #2 } }
}
-\cs_new_protected:Npn \fp_show:n
- { \__msg_show_wrap:Nn \fp_to_tl:n }
-\cs_generate_variant:Nn \fp_show:N { c }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\fp_log:N, \fp_log:c, \fp_log:n}
-% Redirect output of \cs{fp_show:N} and \cs{fp_show:n} to the log.
+% \begin{macro}{\fp_show:n, \fp_log:n}
+% Use general tools.
% \begin{macrocode}
-\cs_new_protected:Npn \fp_log:N
- { \__msg_log_next: \fp_show:N }
+\cs_new_protected:Npn \fp_show:n
+ { \msg_show_eval:Nn \fp_to_tl:n }
\cs_new_protected:Npn \fp_log:n
- { \__msg_log_next: \fp_show:n }
-\cs_generate_variant:Nn \fp_log:N { c }
+ { \msg_log_eval:Nn \fp_to_tl:n }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
index 87a64248736..a62a2eb6718 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
-%% File: l3fp-aux.dtx Copyright(C) 2011-2014,2016-2017 The LaTeX3 Project
+%% File: l3fp-aux.dtx Copyright(C) 2011-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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -147,7 +147,7 @@
%
% \subsection{Using arguments and semicolons}
%
-% \begin{macro}[int, EXP]{\@@_use_none_stop_f:n}
+% \begin{macro}[EXP]{\@@_use_none_stop_f:n}
% This function removes an argument (typically a digit) and replaces
% it by \cs{exp_stop_f:}, a marker which stops \texttt{f}-type
% expansion.
@@ -156,7 +156,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_use_s:n, \@@_use_s:nn}
+% \begin{macro}[EXP]{\@@_use_s:n, \@@_use_s:nn}
% Those functions place a semicolon after one or two arguments
% (typically digits).
% \begin{macrocode}
@@ -165,7 +165,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]
+% \begin{macro}[EXP]
% {\@@_use_none_until_s:w, \@@_use_i_until_s:nw, \@@_use_ii_until_s:nnw}
% Those functions select specific arguments among a set of arguments
% delimited by a semicolon.
@@ -176,7 +176,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_reverse_args:Nww}
+% \begin{macro}[EXP]{\@@_reverse_args:Nww}
% Many internal functions take arguments delimited by semicolons, and
% it is occasionally useful to swap two such arguments.
% \begin{macrocode}
@@ -184,7 +184,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_rrot:www}
+% \begin{macro}[EXP]{\@@_rrot:www}
% Rotate three arguments delimited by semicolons. This is the inverse
% (or the square) of the Forth primitive |ROT|, hence the name.
% \begin{macrocode}
@@ -192,7 +192,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_use_i:ww, \@@_use_i:www}
+% \begin{macro}[EXP]{\@@_use_i:ww, \@@_use_i:www}
% Many internal functions take arguments delimited by semicolons, and
% it is occasionally useful to remove one or two such arguments.
% \begin{macrocode}
@@ -203,7 +203,7 @@
%
% \subsection{Constants, and structure of floating points}
%
-% \begin{macro}[int]{\s_@@, \@@_chk:w}
+% \begin{macro}{\s_@@, \@@_chk:w}
% Floating points numbers all start with \cs{s_@@} \cs{@@_chk:w},
% where \cs{s_@@} is equal to the \TeX{} primitive \tn{relax}, and
% \cs{@@_chk:w} is protected. The rest of the floating point number
@@ -221,7 +221,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\s_@@_mark, \s_@@_stop}
+% \begin{macro}{\s_@@_mark, \s_@@_stop}
% Aliases of \cs{tex_relax:D}, used to terminate expressions.
% \begin{macrocode}
\__scan_new:N \s_@@_mark
@@ -229,7 +229,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {
% \s_@@_invalid, \s_@@_underflow, \s_@@_overflow,
% \s_@@_division, \s_@@_exact
@@ -273,7 +273,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}[int]{\c_@@_minus_min_exponent_int, \c_@@_max_exponent_int}
+% \begin{variable}{\c_@@_minus_min_exponent_int, \c_@@_max_exponent_int}
% Normal floating point numbers have an exponent between $-$
% \texttt{minus_min_exponent} and \texttt{max_exponent} inclusive.
% Larger numbers are rounded to $\pm\infty$. Smaller numbers are
@@ -308,7 +308,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int, EXP]{\@@_zero_fp:N, \@@_inf_fp:N}
+% \begin{macro}[EXP]{\@@_zero_fp:N, \@@_inf_fp:N}
% In case of overflow or underflow, we have to output
% a zero or infinity with a given sign.
% \begin{macrocode}
@@ -319,7 +319,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_exponent:w}
+% \begin{macro}[EXP]{\@@_exponent:w}
% For normal numbers, the function expands to the exponent, otherwise
% to $0$. This is used in \pkg{l3str-format}.
% \begin{macrocode}
@@ -335,7 +335,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_neg_sign:N}
+% \begin{macro}[EXP]{\@@_neg_sign:N}
% When appearing in an integer expression or after \cs{__int_value:w},
% this expands to the sign opposite to |#1|, namely $0$ (positive) is
% turned to $2$ (negative), $1$ (\texttt{nan}) to $1$, and $2$ to $0$.
@@ -349,8 +349,8 @@
%
%^^A todo: the sign of exact zeros should depend on the rounding mode.
%
-% \begin{macro}[int, EXP]{\@@_sanitize:Nw, \@@_sanitize:wN}
-% \begin{macro}[aux, EXP]{\@@_sanitize_zero:w}
+% \begin{macro}[EXP]{\@@_sanitize:Nw, \@@_sanitize:wN}
+% \begin{macro}[EXP]{\@@_sanitize_zero:w}
% Expects the sign and the exponent in some order, then the
% significand (which we don't touch). Outputs the corresponding
% floating point number, possibly underflowed to $\pm 0$ or overflowed
@@ -378,8 +378,8 @@
%
% \subsection{Expanding after a floating point number}
%
-% \begin{macro}[int, EXP]{\@@_exp_after_o:w}
-% \begin{macro}[int, EXP]{\@@_exp_after_f:nw}
+% \begin{macro}[EXP]{\@@_exp_after_o:w}
+% \begin{macro}[EXP]{\@@_exp_after_f:nw}
% \begin{syntax}
% \cs{@@_exp_after_o:w} \meta{floating point}
% \cs{@@_exp_after_f:nw} \Arg{tokens} \meta{floating point}
@@ -417,7 +417,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_exp_after_special:nNNw}
+% \begin{macro}[EXP]{\@@_exp_after_special:nNNw}
% \begin{syntax}
% \cs{@@_exp_after_special:nNNw} \Arg{after} \meta{case} \meta{sign} \meta{scan mark} |;|
% \end{syntax}
@@ -437,7 +437,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_exp_after_normal:nNNw}
+% \begin{macro}[EXP]{\@@_exp_after_normal:nNNw}
% For normal floating point numbers, life is slightly harder, since we
% have many tokens to jump over. Here it would be slightly better if
% the digits were not braced but instead were delimited arguments (for
@@ -459,8 +459,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_exp_after_array_f:w}
-% \begin{macro}[aux, EXP]{\@@_exp_after_stop_f:nw}
+% \begin{macro}[EXP]{\@@_exp_after_array_f:w}
+% \begin{macro}[EXP]{\@@_exp_after_stop_f:nw}
% \begin{syntax}
% \cs{@@_exp_after_array_f:w}
% \meta{fp_1} |;|
@@ -540,8 +540,8 @@
% provide different sets of packing functions and shifts, depending on
% ranges of input.
%
-% \begin{macro}[int, EXP]{\@@_pack:NNNNNw}
-% \begin{variable}[int]
+% \begin{macro}[EXP]{\@@_pack:NNNNNw}
+% \begin{variable}
% {
% \c_@@_trailing_shift_int ,
% \c_@@_middle_shift_int ,
@@ -559,8 +559,8 @@
% \end{variable}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_pack_big:NNNNNNw}
-% \begin{variable}[int]
+% \begin{macro}[EXP]{\@@_pack_big:NNNNNNw}
+% \begin{variable}
% {
% \c_@@_big_trailing_shift_int ,
% \c_@@_big_middle_shift_int ,
@@ -583,8 +583,8 @@
% \end{macro}
%
% ^^A \@@_pack_Bigg:NNNNNNw = \@@_pack_big:NNNNNNw ?
-% \begin{macro}[int, EXP]{\@@_pack_Bigg:NNNNNNw}
-% \begin{variable}[int]
+% \begin{macro}[EXP]{\@@_pack_Bigg:NNNNNNw}
+% \begin{variable}
% {
% \c_@@_Bigg_trailing_shift_int ,
% \c_@@_Bigg_middle_shift_int ,
@@ -604,7 +604,7 @@
% \end{variable}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_pack_twice_four:wNNNNNNNN}
+% \begin{macro}[EXP]{\@@_pack_twice_four:wNNNNNNNN}
% \begin{syntax}
% \cs{@@_pack_twice_four:wNNNNNNNN} \meta{tokens} |;| \meta{$\geq 8$ digits}
% \end{syntax}
@@ -618,7 +618,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_pack_eight:wNNNNNNNN}
+% \begin{macro}[EXP]{\@@_pack_eight:wNNNNNNNN}
% \begin{syntax}
% \cs{@@_pack_eight:wNNNNNNNN} \meta{tokens} |;| \meta{$\geq 8$ digits}
% \end{syntax}
@@ -632,7 +632,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_basics_pack_low:NNNNNw,
% \@@_basics_pack_high:NNNNNw,
@@ -663,7 +663,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_basics_pack_weird_low:NNNNw,
% \@@_basics_pack_weird_high:NNNNNNNNw
@@ -687,7 +687,7 @@
% \subsection{Decimate (dividing by a power of 10)}
%
% ^^A begin[todo]
-% \begin{macro}[int, EXP]{\@@_decimate:nNnnnn}
+% \begin{macro}[EXP]{\@@_decimate:nNnnnn}
% \begin{syntax}
% \cs{@@_decimate:nNnnnn} \Arg{shift} \meta{f_1}
% ~~\Arg{X_1} \Arg{X_2} \Arg{X_3} \Arg{X_4}
@@ -742,7 +742,7 @@
% followed by $4$ blocks of $4$ digits.
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_decimate_:Nnnnn, \@@_decimate_tiny:Nnnnn}
+% \begin{macro}[EXP]{\@@_decimate_:Nnnnn, \@@_decimate_tiny:Nnnnn}
% If the \meta{shift} is zero, or too big, life is very easy.
% \begin{macrocode}
\cs_new:Npn \@@_decimate_:Nnnnn #1 #2#3#4#5
@@ -752,7 +752,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_decimate_auxi:Nnnnn, \@@_decimate_auxii:Nnnnn,
% \@@_decimate_auxiii:Nnnnn, \@@_decimate_auxiv:Nnnnn,
@@ -812,7 +812,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP, aux]{\@@_decimate_pack:nnnnnnnnnnw}
+% \begin{macro}[EXP]{\@@_decimate_pack:nnnnnnnnnnw}
% The computation of the \meta{rounding} digit leaves an unfinished
% \cs{__int_value:w}, which expands the following functions. This
% allows us to repack nicely the digits we keep. Those digits come
@@ -864,7 +864,7 @@
% other operation on the \meta{floating point}. We provide similar
% functions with two trailing \meta{floating points}.
%
-% \begin{macro}[int, EXP]{\@@_case_use:nw}
+% \begin{macro}[EXP]{\@@_case_use:nw}
% This function ends a \TeX{} conditional, removes junk until the next
% floating point, and places its first argument before that floating
% point, to perform some operation on the floating point.
@@ -873,7 +873,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_case_return:nw}
+% \begin{macro}[EXP]{\@@_case_return:nw}
% This function ends a \TeX{} conditional, removes junk and a floating
% point, and places its first argument in the input stream. A quirk
% is that we don't define this function requiring a floating point to
@@ -884,7 +884,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_case_return_o:Nw}
+% \begin{macro}[EXP]{\@@_case_return_o:Nw}
% This function ends a \TeX{} conditional, removes junk and a floating
% point, and returns its first argument (an \meta{fp~var}) then expands
% once after it.
@@ -894,7 +894,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_case_return_same_o:w}
+% \begin{macro}[EXP]{\@@_case_return_same_o:w}
% This function ends a \TeX{} conditional, removes junk, and returns
% the following floating point, expanding once after it.
% \begin{macrocode}
@@ -903,7 +903,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_case_return_o:Nww}
+% \begin{macro}[EXP]{\@@_case_return_o:Nww}
% Same as \cs{@@_case_return_o:Nw} but with two trailing floating
% points.
% \begin{macrocode}
@@ -912,7 +912,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_case_return_i_o:ww, \@@_case_return_ii_o:ww}
+% \begin{macro}[EXP]{\@@_case_return_i_o:ww, \@@_case_return_ii_o:ww}
% Similar to \cs{@@_case_return_same_o:w}, but this returns the first
% or second of two trailing floating point numbers, expanding once
% after the result.
@@ -926,7 +926,7 @@
%
% \subsection{Integer floating points}
%
-% \begin{macro}[int, EXP, pTF]{\@@_int:w}
+% \begin{macro}[EXP, pTF]{\@@_int:w}
% Tests if the floating point argument is an integer. For normal
% floating point numbers, this holds if the rounding digit resulting
% from \cs{@@_decimate:nNnnnn} is~$0$.
@@ -952,8 +952,8 @@
%
% \subsection{Small integer floating points}
%
-% \begin{macro}[int, EXP]{\@@_small_int:wTF}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_small_int:wTF}
+% \begin{macro}[EXP]
% {
% \@@_small_int_true:wTF,
% \@@_small_int_normal:NnwTF,
@@ -1013,8 +1013,8 @@
%
% \subsection{Length of a floating point array}
%
-% \begin{macro}[int, EXP]{\@@_array_count:n}
-% \begin{macro}[aux, EXP]{\@@_array_count_loop:Nw}
+% \begin{macro}[EXP]{\@@_array_count:n}
+% \begin{macro}[EXP]{\@@_array_count_loop:Nw}
% Count the number of items in an array of floating points. The
% technique is very similar to \cs{tl_count:n}, but with the loop
% built-in. Checking for the end of the loop is done with the
@@ -1035,8 +1035,8 @@
%
% \subsection{\texttt{x}-like expansion expandably}
%
-% \begin{macro}[int, EXP]{\@@_expand:n}
-% \begin{macro}[aux, EXP]{\@@_expand_loop:nwnN}
+% \begin{macro}[EXP]{\@@_expand:n}
+% \begin{macro}[EXP]{\@@_expand_loop:nwnN}
% This expandable function behaves in a way somewhat similar to
% \cs{use:x}, but much less robust. The argument is
% \texttt{f}-expanded, then the leading item (often a single character
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
index 60a4e2a60e4..20cf9ed759c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -70,7 +70,7 @@
% Floating Point Arithmetic}, by David Goldberg, which can be found at
% \texttt{http://cr.yp.to/2005-590/goldberg.pdf}.
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_word_abs:N ,
% \@@_parse_word_sign:N ,
@@ -117,7 +117,7 @@
%
% \subsubsection{Sign, exponent, and special numbers}
%
-% \begin{macro}[int, EXP]{\@@_-_o:ww}
+% \begin{macro}[EXP]{\@@_-_o:ww}
% The \cs{@@_+_o:ww} auxiliary has a hook: it takes one argument
% between the first \cs{s_@@} and \cs{@@_chk:w}, which is applied to
% the sign of the second operand. Positioning the hook there means
@@ -132,7 +132,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_+_o:ww}
+% \begin{macro}[EXP]{\@@_+_o:ww}
% This function is either called directly with an empty |#1| to
% compute an addition, or it is called by \cs{@@_-_o:ww} with
% \cs{@@_neg_sign:N} as |#1| to compute a subtraction, in which case
@@ -175,7 +175,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_add_return_ii_o:Nww}
+% \begin{macro}[EXP]{\@@_add_return_ii_o:Nww}
% Ignore the first operand, and return the second, but using the sign
% |#1| rather than |#4|. As usual, expand after the floating point.
% \begin{macrocode}
@@ -184,7 +184,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_add_zeros_o:Nww}
+% \begin{macro}[EXP]{\@@_add_zeros_o:Nww}
% Adding two zeros yields \cs{c_zero_fp}, except if both zeros were
% $-0$.
% \begin{macrocode}
@@ -201,7 +201,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_add_inf_o:Nww}
+% \begin{macro}[EXP]{\@@_add_inf_o:Nww}
% If both infinities have the same sign, just return that infinity,
% otherwise, it is an invalid operation. We find out if that invalid
% operation is an addition or a subtraction by testing whether the
@@ -226,7 +226,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_add_normal_o:Nww}
+% \begin{macro}[EXP]{\@@_add_normal_o:Nww}
% \begin{quote}
% \cs{@@_add_normal_o:Nww} \meta{sign_2}
% \cs{s_@@} \cs{@@_chk:w} |1| \meta{sign_1}
@@ -254,7 +254,7 @@
% In this subsection, we perform the addition of two positive normal
% numbers.
%
-% \begin{macro}[aux, EXP]{\@@_add_npos_o:NnwNnw}
+% \begin{macro}[EXP]{\@@_add_npos_o:NnwNnw}
% \begin{quote}
% \cs{@@_add_npos_o:NnwNnw} \meta{sign_1} \meta{exp_1} \meta{body_1}
% |;| \cs{s_@@} \cs{@@_chk:w} |1| \meta{initial sign_2} \meta{exp_2}
@@ -288,8 +288,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, rEXP]{\@@_add_big_i_o:wNww}
-% \begin{macro}[aux, rEXP]{\@@_add_big_ii_o:wNww}
+% \begin{macro}[rEXP]{\@@_add_big_i_o:wNww}
+% \begin{macro}[rEXP]{\@@_add_big_ii_o:wNww}
% \begin{quote}
% \cs{@@_add_big_i_o:wNww} \meta{shift} |;| \meta{final sign}
% \meta{body_1} |;| \meta{body_2} |;|
@@ -318,8 +318,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_add_significand_o:NnnwnnnnN}
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]{\@@_add_significand_o:NnnwnnnnN}
+% \begin{macro}[rEXP]
% {\@@_add_significand_pack:NNNNNNN, \@@_add_significand_test_o:N}
% \begin{quote}\raggedright
% \cs{@@_add_significand_o:NnnwnnnnN}
@@ -363,7 +363,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_add_significand_no_carry_o:wwwNN}
+% \begin{macro}[rEXP]{\@@_add_significand_no_carry_o:wwwNN}
% \begin{quote}
% \cs{@@_add_significand_no_carry_o:wwwNN}
% \meta{8d} |;| \meta{6d} |;| \meta{2d} |;|
@@ -386,7 +386,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_add_significand_carry_o:wwwNN}
+% \begin{macro}[rEXP]{\@@_add_significand_carry_o:wwwNN}
% \begin{quote}
% \cs{@@_add_significand_carry_o:wwwNN}
% \meta{8d} |;| \meta{6d} |;| \meta{2d} |;|
@@ -414,8 +414,8 @@
%
% \subsubsection{Absolute subtraction}
%
-% \begin{macro}[aux, EXP]{\@@_sub_npos_o:NnwNnw}
-% \begin{macro}[aux, EXP]{\@@_sub_eq_o:Nnwnw, \@@_sub_npos_ii_o:Nnwnw}
+% \begin{macro}[EXP]{\@@_sub_npos_o:NnwNnw}
+% \begin{macro}[EXP]{\@@_sub_eq_o:Nnwnw, \@@_sub_npos_ii_o:Nnwnw}
% \begin{quote}
% \cs{@@_sub_npos_o:NnwNnw}
% \meta{sign_1} \meta{exp_1} \meta{body_1} |;|
@@ -450,7 +450,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_sub_npos_i_o:Nnwnw}
+% \begin{macro}[EXP]{\@@_sub_npos_i_o:Nnwnw}
% After the computation is done, \cs{@@_sanitize:Nw} checks for
% overflow/underflow. It expects the \meta{final sign} and the
% \meta{exponent} (delimited by |;|). Start an integer expression for
@@ -481,8 +481,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_sub_back_near_o:nnnnnnnnN}
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]{\@@_sub_back_near_o:nnnnnnnnN}
+% \begin{macro}[rEXP]
% {\@@_sub_back_near_pack:NNNNNNw, \@@_sub_back_near_after:wNNNNw}
% \begin{quote}
% \cs{@@_sub_back_near_o:nnnnnnnnN}
@@ -517,8 +517,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_sub_back_shift:wnnnn}
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]{\@@_sub_back_shift:wnnnn}
+% \begin{macro}[rEXP]
% {
% \@@_sub_back_shift_ii:ww,
% \@@_sub_back_shift_iii:NNNNNNNNw,
@@ -568,7 +568,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_sub_back_far_o:NnnwnnnnN}
+% \begin{macro}[rEXP]{\@@_sub_back_far_o:NnnwnnnnN}
% \begin{quote}\raggedright
% \cs{@@_sub_back_far_o:NnnwnnnnN}
% \meta{rounding} \Arg{Y'_1} \Arg{Y'_2} \meta{extra-digits} |;|
@@ -608,8 +608,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_sub_back_quite_far_o:wwNN}
-% \begin{macro}[aux, EXP]{\@@_sub_back_quite_far_ii:NN}
+% \begin{macro}[EXP]{\@@_sub_back_quite_far_o:wwNN}
+% \begin{macro}[EXP]{\@@_sub_back_quite_far_ii:NN}
% The easiest case is when $x-y$ is extremely close to a power of
% $10$, namely the first digit of $x$ is $1$, and all others vanish
% when subtracting $y$. Then the \meta{rounding} |#3| and the
@@ -639,7 +639,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_sub_back_not_far_o:wwwwNN}
+% \begin{macro}[rEXP]{\@@_sub_back_not_far_o:wwwwNN}
% In the present case, $x$ and $y$ have different exponents, but
% $y$~is large enough that $x-y$ has a smaller exponent than~$x$.
% Decrement the exponent (with |-1|). Then proceed in a way
@@ -669,8 +669,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_sub_back_very_far_o:wwwwNN}
-% \begin{macro}[aux, EXP]{\@@_sub_back_very_far_ii_o:nnNwwNN}
+% \begin{macro}[EXP]{\@@_sub_back_very_far_o:wwwwNN}
+% \begin{macro}[EXP]{\@@_sub_back_very_far_ii_o:nnNwwNN}
% The case where $x-y$ and $x$ have the same exponent is a bit more
% tricky, mostly because it cannot reuse the same auxiliaries. Shift
% the $y$~significand by adding a leading~$0$. Then the logic is similar
@@ -710,7 +710,7 @@
%
% \subsubsection{Signs, and special numbers}
%
-% \begin{macro}[int, EXP]{\@@_*_o:ww}
+% \begin{macro}[EXP]{\@@_*_o:ww}
% We go through an auxiliary, which is common with \cs{@@_/_o:ww}.
% The first argument is the operation, used for the invalid operation
% exception. The second is inserted in a formula to dispatch cases
@@ -729,7 +729,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_mul_cases_o:nNnnww}
+% \begin{macro}[EXP]{\@@_mul_cases_o:nNnnww}
% Split into $10$ cases ($12$ for division).
% If both numbers are normal, go to case $0$
% (same sign) or case $1$ (opposite signs): in both cases, call
@@ -795,7 +795,7 @@
% In this subsection, we perform the multiplication
% of two positive normal numbers.
%
-% \begin{macro}[int, EXP]{\@@_mul_npos_o:Nww}
+% \begin{macro}[EXP]{\@@_mul_npos_o:Nww}
% \begin{quote}
% \cs{@@_mul_npos_o:Nww} \meta{final sign}
% \cs{s_@@} \cs{@@_chk:w} |1| \meta{sign_1} \Arg{exp_1} \meta{body_1} |;|
@@ -822,8 +822,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_mul_significand_o:nnnnNnnnn}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[rEXP]{\@@_mul_significand_o:nnnnNnnnn}
+% \begin{macro}[EXP]
% {\@@_mul_significand_drop:NNNNNw, \@@_mul_significand_keep:NNNNNw}
% \begin{quote}
% \cs{@@_mul_significand_o:nnnnNnnnn}
@@ -873,7 +873,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_mul_significand_test_f:NNN}
+% \begin{macro}[rEXP]{\@@_mul_significand_test_f:NNN}
% \begin{quote}
% \cs{@@_mul_significand_test_f:NNN} \meta{sign} |1|
% \meta{digits 1--8} |;| \meta{digits 9--12} |;| \meta{digits 13--16} |;|
@@ -899,7 +899,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_mul_significand_large_f:NwwNNNN}
+% \begin{macro}[EXP]{\@@_mul_significand_large_f:NwwNNNN}
% In this branch, \meta{digit 1} is non-zero. The result is thus
% \meta{digits 1--16}, plus some rounding which depends on the digits
% $16$, $17$, and whether all subsequent digits are zero or not.
@@ -921,7 +921,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_mul_significand_small_f:NNwwwN}
+% \begin{macro}[rEXP]{\@@_mul_significand_small_f:NNwwwN}
% In this branch, \meta{digit 1} is zero. Our result is thus
% \meta{digits 2--17}, plus some rounding which depends on the digits
% $17$, $18$, and whether all subsequent digits are zero or not.
@@ -951,7 +951,7 @@
% Time is now ripe to tackle the hardest of the four elementary
% operations: division.
%
-% \begin{macro}[int, EXP]{\@@_/_o:ww}
+% \begin{macro}[EXP]{\@@_/_o:ww}
% Filtering special floating point is very similar to what we did for
% multiplications, with a few variations. Invalid operation
% exceptions display |/| rather than |*|. In the formula for
@@ -981,7 +981,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_div_npos_o:Nww}
+% \begin{macro}[EXP]{\@@_div_npos_o:Nww}
% \begin{quote}
% \cs{@@_div_npos_o:Nww} \meta{final sign}
% \cs{s_@@} \cs{@@_chk:w} |1| \meta{sign_A} \Arg{exp A}
@@ -1185,7 +1185,7 @@
%
% \subsubsection{Implementing the significand division}
%
-% \begin{macro}[aux, rEXP]{\@@_div_significand_i_o:wnnw}
+% \begin{macro}[rEXP]{\@@_div_significand_i_o:wnnw}
% \begin{quote}
% \cs{@@_div_significand_i_o:wnnw} \meta{y} |;|
% \Arg{A_1} \Arg{A_2} \Arg{A_3} \Arg{A_4}
@@ -1215,8 +1215,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, rEXP]{\@@_div_significand_calc:wwnnnnnnn}
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]{\@@_div_significand_calc:wwnnnnnnn}
+% \begin{macro}[rEXP]
% {
% \@@_div_significand_calc_i:wwnnnnnnn,
% \@@_div_significand_calc_ii:wwnnnnnnn,
@@ -1320,7 +1320,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_div_significand_ii:wwn}
+% \begin{macro}[EXP]{\@@_div_significand_ii:wwn}
% \begin{quote}
% \cs{@@_div_significand_ii:wwn} \meta{y} |;|
% \meta{B_1} |;| \Arg{B_2} \Arg{B_3} \Arg{B_4}
@@ -1346,7 +1346,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_div_significand_iii:wwnnnnn}
+% \begin{macro}[rEXP]{\@@_div_significand_iii:wwnnnnn}
% \begin{quote}
% \cs{@@_div_significand_iii:wwnnnnn} \meta{y} |;|
% \meta{E_1} |;| \Arg{E_2} \Arg{E_3} \Arg{E_4}
@@ -1368,7 +1368,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {
% \@@_div_significand_iv:wwnnnnnnn,
% \@@_div_significand_v:NNw,
@@ -1439,7 +1439,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_div_significand_pack:NNN}
+% \begin{macro}[EXP]{\@@_div_significand_pack:NNN}
% At this stage, we are in the following situation: \TeX{} is in the
% process of expanding several integer expressions, thus functions at
% the bottom expand before those above.
@@ -1461,7 +1461,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_div_significand_test_o:w}
+% \begin{macro}[rEXP]{\@@_div_significand_test_o:w}
% \begin{quote}
% \cs{@@_div_significand_test_o:w} |1| |0| \meta{5d} |;|
% ~~\meta{4d} |;| \meta{4d} |;| \meta{5d} |;| \meta{sign}
@@ -1487,7 +1487,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_div_significand_small_o:wwwNNNNwN}
+% \begin{macro}[EXP]{\@@_div_significand_small_o:wwwNNNNwN}
% \begin{quote}
% \cs{@@_div_significand_small_o:wwwNNNNwN} |0| \meta{4d} |;|
% ~~\meta{4d} |;| \meta{4d} |;| \meta{5d} |;| \meta{final sign}
@@ -1509,7 +1509,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_div_significand_large_o:wwwNNNNwN}
+% \begin{macro}[rEXP]{\@@_div_significand_large_o:wwwNNNNwN}
% \begin{quote}
% \cs{@@_div_significand_large_o:wwwNNNNwN} \meta{5d} |;|
% ~~\meta{4d} |;| \meta{4d} |;| \meta{5d} |;| \meta{sign}
@@ -1538,7 +1538,7 @@
%
% \subsection{Square root}
%
-% \begin{macro}[int, EXP]{\@@_sqrt_o:w}
+% \begin{macro}[EXP]{\@@_sqrt_o:w}
% Zeros are unchanged: $\sqrt{-0} = -0$ and $\sqrt{+0} = +0$.
% Negative numbers (other than $-0$) have no real square root.
% Positive infinity, and \texttt{nan}, are unchanged. Finally, for
@@ -1557,8 +1557,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_sqrt_npos_o:w}
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[EXP]{\@@_sqrt_npos_o:w}
+% \begin{macro}[rEXP]
% {\@@_sqrt_npos_auxi_o:wwnnN, \@@_sqrt_npos_auxii_o:wNNNNNNNN}
% Prepare \cs{@@_sanitize:Nw} to receive the final sign~|0| (the
% result is always positive) and the exponent, equal to half of the
@@ -1595,7 +1595,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_sqrt_Newton_o:wwn}
+% \begin{macro}[rEXP]{\@@_sqrt_Newton_o:wwn}
% Newton's method maps $x\mapsto\bigl[(x + [10^{8} a_1 / x])/2\bigr]$
% in each iteration, where $[b/c]$ denotes \eTeX{}'s division. This
% division rounds the real number $b/c$ to the closest integer,
@@ -1673,7 +1673,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_sqrt_auxi_o:NNNNwnnN}
+% \begin{macro}[rEXP]{\@@_sqrt_auxi_o:NNNNwnnN}
% This function is followed by $10^{8}+x-1$, which has~$9$ digits
% starting with~$1$, then |;| \Arg{a_1} \Arg{a_2} \meta{a'}. Here, $x
% \simeq \sqrt{10^{8} a_1}$ and we want to estimate the square root of
@@ -1706,7 +1706,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_sqrt_auxii_o:NnnnnnnnN}
+% \begin{macro}[rEXP]{\@@_sqrt_auxii_o:NnnnnnnnN}
% This receives a continuation function~|#1|, then five blocks of~$4$
% digits for~$y$, then two $8$-digit blocks and a single digit
% for~$a$. A common estimate of $\sqrt{a} - y = (a - y^2) / (\sqrt{a}
@@ -1791,7 +1791,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {
% \@@_sqrt_auxiii_o:wnnnnnnnn,
% \@@_sqrt_auxiv_o:NNNNNw,
@@ -1871,7 +1871,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {\@@_sqrt_auxviii_o:nnnnnnn, \@@_sqrt_auxix_o:wnwnw}
% Simply add the two $8$-digit blocks of~$z$, aligned to the last four
% of the five $4$-digit blocks of~$y$, then call the \texttt{auxii}
@@ -1894,7 +1894,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {\@@_sqrt_auxx_o:Nnnnnnnn, \@@_sqrt_auxxi_o:wwnnN}
% At this stage, $j=6$ and $10^{24} z < 10^{7}$, hence
% \[
@@ -1944,7 +1944,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {\@@_sqrt_auxxii_o:nnnnnnnnw, \@@_sqrt_auxxiii_o:w}
% The difference $0\leq a+10^{-16}-m^2\leq
% 10^{-16}+(\sqrt{a}-m)(\sqrt{a}+m)\leq 2\cdot 10^{-16}$ was just
@@ -1984,7 +1984,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_sqrt_auxxiv_o:wnnnnnnnN}
+% \begin{macro}[rEXP]{\@@_sqrt_auxxiv_o:wnnnnnnnN}
% This receives $9998$, $9999$ or $10000$ as~|#1| when $m$~is an
% underestimate, exact, or an overestimate, respectively. Then
% comes~$m$ as five blocks of~$4$ digits, but where the last
@@ -2027,8 +2027,8 @@
%
% \subsection{About the sign}
%
-% \begin{macro}[int, EXP]{\@@_sign_o:w}
-% \begin{macro}[aux, EXP]{\@@_sign_aux_o:w}
+% \begin{macro}[EXP]{\@@_sign_o:w}
+% \begin{macro}[EXP]{\@@_sign_aux_o:w}
% Find the sign of the floating point: \texttt{nan}, |+0|, |-0|, |+1| or |-1|.
% \begin{macrocode}
\cs_new:Npn \@@_sign_o:w ? \s_@@ \@@_chk:w #1#2; @
@@ -2047,7 +2047,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_set_sign_o:w}
+% \begin{macro}[EXP]{\@@_set_sign_o:w}
% This function is used for the unary minus and for \texttt{abs}. It
% leaves the sign of \texttt{nan} invariant, turns negative numbers
% (sign~$2$) to positive numbers (sign~$0$) and positive numbers
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
index d6bfaf24b98..3d6a2b04121 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
-%% File: l3fp-convert.dtx Copyright(C) 2011-2014,2016,2017 The LaTeX3 Project
+%% File: l3fp-convert.dtx Copyright(C) 2011-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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -63,8 +63,8 @@
%
% \subsection{Trimming trailing zeros}
%
-% \begin{macro}[aux, EXP]{\@@_trim_zeros:w}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_trim_zeros:w}
+% \begin{macro}[EXP]
% {\@@_trim_zeros_loop:w, \@@_trim_zeros_dot:w, \@@_trim_zeros_end:w}
% If |#1| ends with a $0$, the \texttt{loop} auxiliary takes that zero
% as an end-delimiter for its first argument, and the second argument
@@ -103,7 +103,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_to_scientific_dispatch:w,
% \@@_to_scientific_normal:wnnnnn,
@@ -177,7 +177,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_to_decimal_dispatch:w,
% \@@_to_decimal_normal:wnnnnn,
@@ -275,7 +275,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_to_tl_dispatch:w, \@@_to_tl_normal:nnnnn,
% \@@_to_tl_scientific:wnnnnn, \@@_to_tl_scientific:wNw
@@ -352,7 +352,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_to_int_dispatch:w}
+% \begin{macro}[EXP]{\@@_to_int_dispatch:w}
% To convert to an integer, first round to $0$ places (to the nearest
% integer), then express the result as a decimal number: the
% definition of \cs{@@_to_decimal_dispatch:w} is such that there are no
@@ -369,7 +369,7 @@
% \subsection{Convert from a dimension}
%
% \begin{macro}[EXP]{\dim_to_fp:n}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_from_dim_test:ww,
% \@@_from_dim:wNw,
@@ -463,8 +463,8 @@
%
% \subsection{Convert an array of floating points to a comma list}
%
-% \begin{macro}[int, EXP]{\@@_array_to_clist:n}
-% \begin{macro}[aux, EXP]{\@@_array_to_clist_loop:Nw}
+% \begin{macro}[EXP]{\@@_array_to_clist:n}
+% \begin{macro}[EXP]{\@@_array_to_clist_loop:Nw}
% Converts an array of floating point numbers to a comma-list. If
% speed here ends up irrelevant, we can simplify the code for the
% auxiliary to become
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
index ca4f32809f2..e04403ccadb 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
-%% File: l3fp-expo.dtx Copyright (C) 2011-2014,2016,2017 The LaTeX3 Project
+%% File: l3fp-expo.dtx Copyright (C) 2011-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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -58,7 +58,7 @@
%<@@=fp>
% \end{macrocode}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_word_exp:N ,
% \@@_parse_word_ln:N ,
@@ -112,7 +112,7 @@
%
% \subsubsection{Some constants}
%
-% \begin{variable}[aux]
+% \begin{variable}
% {
% \c_@@_ln_i_fixed_tl ,
% \c_@@_ln_ii_fixed_tl ,
@@ -142,7 +142,7 @@
%
% \subsubsection{Sign, exponent, and special numbers}
%
-% \begin{macro}[EXP, int]{\@@_ln_o:w}
+% \begin{macro}[EXP]{\@@_ln_o:w}
% The logarithm of negative numbers (including $-\infty$ and $-0$)
% raises the \enquote{invalid} exception. The logarithm of $+0$ is
% $-\infty$, raising a division by zero exception. The logarithm of
@@ -168,7 +168,7 @@
%
% \subsubsection{Absolute ln}
%
-% \begin{macro}[aux, EXP]{\@@_ln_npos_o:w}
+% \begin{macro}[EXP]{\@@_ln_npos_o:w}
% We catch the case of a significand very close to $0.1$ or to $1$.
% In all other cases, the final result is at least $10^{-4}$, and
% then an error of $0.5\cdot 10^{-20}$ is acceptable.
@@ -190,7 +190,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_ln_significand:NNNNnnnN}
+% \begin{macro}[EXP]{\@@_ln_significand:NNNNnnnN}
% \begin{syntax}
% \cs{@@_ln_significand:NNNNnnnN} \meta{X_1} \Arg{X_2} \Arg{X_3} \Arg{X_4} \meta{continuation}
% \end{syntax}
@@ -223,7 +223,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_ln_x_ii:wnnnn}
+% \begin{macro}[EXP]{\@@_ln_x_ii:wnnnn}
% We have thus found $c \in [1,10]$ such that $0.7\leq ac < 1.4$
% in all cases. Compute $ 1 + x = 1 + ac \in [1.7,2.4)$.
% \begin{macrocode}
@@ -603,7 +603,7 @@
%
% \subsubsection{Sign, exponent, and special numbers}
%
-% \begin{macro}[int, EXP]{\@@_exp_o:w}
+% \begin{macro}[EXP]{\@@_exp_o:w}
% \begin{macrocode}
\cs_new:Npn \@@_exp_o:w #1 \s_@@ \@@_chk:w #2#3#4; @
{
@@ -627,7 +627,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_exp_normal_o:w, \@@_exp_pos_o:Nnwnw, \@@_exp_overflow:NN}
+% \begin{macro}[EXP]{\@@_exp_normal_o:w, \@@_exp_pos_o:Nnwnw, \@@_exp_overflow:NN}
% \begin{macrocode}
\cs_new:Npn \@@_exp_normal_o:w \s_@@ \@@_chk:w 1#1
{
@@ -679,8 +679,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_exp_Taylor:Nnnwn}
-% \begin{macro}[aux, EXP]{\@@_exp_Taylor_loop:www, \@@_exp_Taylor_break:Nww}
+% \begin{macro}[EXP]{\@@_exp_Taylor:Nnnwn}
+% \begin{macro}[EXP]{\@@_exp_Taylor_loop:www, \@@_exp_Taylor_break:Nww}
% This function is called for numbers in the range $[10^{-9},
% 10^{-1})$. We compute $10$ terms of the Taylor series. The
% first argument is irrelevant (rounding digit used by some other
@@ -719,7 +719,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {
% \@@_exp_pos_large:NnnNwn ,
% \@@_exp_large_after:wwn ,
@@ -887,7 +887,7 @@
% One peculiarity of this operation is that $\nan^0 = 1^\nan = 1$,
% because this relation is obeyed for any number, even $\pm\infty$.
%
-% \begin{macro}[int, EXP]+\@@_^_o:ww+
+% \begin{macro}[EXP]+\@@_^_o:ww+
% We cram most of the tests into a single function to save csnames.
% First treat the case $b=0$: $a^0=1$ for any $a$, even \texttt{nan}.
% Then test the sign of $a$.
@@ -935,7 +935,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_pow_zero_or_inf:ww}
+% \begin{macro}[EXP]{\@@_pow_zero_or_inf:ww}
% Raising $-0$ or $-\infty$ to \texttt{nan} yields \texttt{nan}. For
% other powers, the result is $+0$ if $0$ is raised to a positive
% power or $\infty$ to a negative power, and $+\infty$ otherwise.
@@ -971,7 +971,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_pow_normal_o:ww}
+% \begin{macro}[EXP]{\@@_pow_normal_o:ww}
% We have in front of us $a$, and $b\neq 0$, we know that $a$ is a
% normal number, and we wish to compute $\lvert a\rvert^{b}$. If
% $\lvert a\rvert=1$, we return $1$, unless $a=-1$ and $b$ is
@@ -1019,7 +1019,7 @@
% \end{macro}
%
% ^^A todo: check that we compute ln to 21 digits!
-% \begin{macro}[aux, EXP]{\@@_pow_npos_o:Nww}
+% \begin{macro}[EXP]{\@@_pow_npos_o:Nww}
% We now know that $a\neq\pm 1$ is a normal number, and $b$ is a
% normal number too. We want to compute $\lvert a\rvert^{b} = (\lvert
% x\rvert\cdot 10^{n})^{y\cdot 10^{p}} = \exp((\ln\lvert x\rvert + n
@@ -1052,7 +1052,7 @@
% \end{macro}
%
%^^A begin[todo]
-% \begin{macro}[aux, EXP]{\@@_pow_npos_aux:NNnww}
+% \begin{macro}[EXP]{\@@_pow_npos_aux:NNnww}
% The first argument is the conversion function from fixed point to
% float. Then comes an exponent and the $4$ brace groups of $x$,
% followed by $b$. Compute $-\ln(x)$.
@@ -1146,7 +1146,7 @@
% \end{macro}
%^^A end[todo]
%
-% \begin{macro}[aux, EXP]{\@@_pow_neg:www, \@@_pow_neg_aux:wNN}
+% \begin{macro}[EXP]{\@@_pow_neg:www, \@@_pow_neg_aux:wNN}
% This function is followed by three floating point numbers: $|a|^b$,
% $a\in[-\infty,-0]$, and $b$. If $b$ is an even integer (case $-1$),
% $a^b=|a|^b$. If $b$ is an odd integer (case $0$), $a^b=-|a|^b$,
@@ -1184,7 +1184,7 @@
% ^^A todo: is this \@@_exp_after_o:w necessary? Appropriate?
% \end{macro}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {
% \@@_pow_neg_case:w, \@@_pow_neg_case_aux:nnnnn,
% \@@_pow_neg_case_aux:Nnnw
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
index 044133c8932..d4b82639a68 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
-%% File: l3fp-extended.dtx Copyright (C) 2011-2014,2016,2017 The LaTeX3 Project
+%% File: l3fp-extended.dtx Copyright (C) 2011-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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -108,7 +108,7 @@
%
% \subsection{Helpers for numbers with extended precision}
%
-% \begin{variable}[int]{\c_@@_one_fixed_tl}
+% \begin{variable}{\c_@@_one_fixed_tl}
% The fixed-point number~$1$, used in \pkg{l3fp-expo}.
% \begin{macrocode}
\tl_const:Nn \c_@@_one_fixed_tl
@@ -116,14 +116,14 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int, EXP]{\@@_fixed_continue:wn}
+% \begin{macro}[EXP]{\@@_fixed_continue:wn}
% This function simply calls the next function.
% \begin{macrocode}
\cs_new:Npn \@@_fixed_continue:wn #1; #2 { #2 #1; }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_fixed_add_one:wN}
+% \begin{macro}[EXP]{\@@_fixed_add_one:wN}
% \begin{syntax}
% \cs{@@_fixed_add_one:wN} \meta{a} |;| \meta{continuation}
% \end{syntax}
@@ -139,7 +139,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_fixed_div_myriad:wn}
+% \begin{macro}[EXP]{\@@_fixed_div_myriad:wn}
% Divide a fixed point number by $10000$. This is a little bit more
% subtle than just removing the last group and adding a leading group
% of zeros: the first group~|#1| may have any number of digits, and we
@@ -158,7 +158,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_fixed_mul_after:wwn}
+% \begin{macro}[EXP]{\@@_fixed_mul_after:wwn}
% The fixed point operations which involve multiplication end by
% calling this auxiliary. It braces the last block of digits, and
% places the \meta{continuation} |#3| in front.
@@ -169,7 +169,7 @@
%
% \subsection{Multiplying a fixed point number by a short one}
%
-% \begin{macro}[int, EXP]{\@@_fixed_mul_short:wwn}
+% \begin{macro}[EXP]{\@@_fixed_mul_short:wwn}
% \begin{syntax}
% \cs{@@_fixed_mul_short:wwn}
% \ \ \Arg{a_1} \Arg{a_2} \Arg{a_3} \Arg{a_4} \Arg{a_5} \Arg{a_6} |;|
@@ -213,8 +213,8 @@
%
% \subsection{Dividing a fixed point number by a small integer}
%
-% \begin{macro}[int, EXP]{\@@_fixed_div_int:wwN}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_fixed_div_int:wwN}
+% \begin{macro}[EXP]
% {
% \@@_fixed_div_int:wnN, \@@_fixed_div_int_auxi:wnn,
% \@@_fixed_div_int_auxii:wnn, \@@_fixed_div_int_pack:Nw,
@@ -301,8 +301,8 @@
%
% \subsection{Adding and subtracting fixed points}
%
-% \begin{macro}[int, EXP]{\@@_fixed_add:wwn, \@@_fixed_sub:wwn}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_fixed_add:wwn, \@@_fixed_sub:wwn}
+% \begin{macro}[EXP]
% {
% \@@_fixed_add:Nnnnnwnn,
% \@@_fixed_add:nnNnnnwn,
@@ -354,8 +354,8 @@
% \subsection{Multiplying fixed points}
%
% ^^A todo: may a_1 or b_1 be = 10000? Used in ediv_epsi later.
-% \begin{macro}[int, EXP]{\@@_fixed_mul:wwn}
-% \begin{macro}[aux, EXP]{\@@_fixed_mul:nnnnnnnw}
+% \begin{macro}[EXP]{\@@_fixed_mul:wwn}
+% \begin{macro}[EXP]{\@@_fixed_mul:nnnnnnnw}
% \begin{syntax}
% \cs{@@_fixed_mul:wwn} \meta{a} |;| \meta{b} |;| \Arg{continuation}
% \end{syntax}
@@ -431,7 +431,7 @@
%
% \subsection{Combining product and sum of fixed points}
%
-% \begin{macro}[int, EXP]
+% \begin{macro}[EXP]
% {
% \@@_fixed_mul_add:wwwn,
% \@@_fixed_mul_sub_back:wwwn,
@@ -515,7 +515,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_fixed_mul_add:Nwnnnwnnn}
+% \begin{macro}[EXP]{\@@_fixed_mul_add:Nwnnnwnnn}
% \begin{syntax}
% \cs{@@_fixed_mul_add:Nwnnnwnnn} \meta{op} |+| \meta{c_3} \meta{c_4} |;|
% ~~\meta{b} |;| \meta{a} |;| \meta{b} |;| \meta{op}
@@ -549,7 +549,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_fixed_mul_add:nnnnwnnnn}
+% \begin{macro}[EXP]{\@@_fixed_mul_add:nnnnwnnnn}
% \begin{syntax}
% \cs{@@_fixed_mul_add:nnnnwnnnn} \meta{a} |;| \meta{b} |;| \meta{op}
% ~~|+| \meta{c_5} \meta{c_6} |;|
@@ -585,7 +585,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_fixed_mul_add:nnnnwnnwN}
+% \begin{macro}[EXP]{\@@_fixed_mul_add:nnnnwnnwN}
% \begin{syntax}
% \cs{@@_fixed_mul_add:nnnnwnnwN} \Arg{partial_1} \Arg{partial_2}
% ~~\Arg{a_1} \Arg{a_5} \Arg{a_6} |;| \Arg{b_1} \Arg{b_5} \Arg{b_6} |;|
@@ -621,8 +621,8 @@
% corresponding value is $0.\meta{digits}\cdot 10^{\meta{exponent}}$.
% This convention differs from floating points.
%
-% \begin{macro}[int, EXP]{\@@_ep_to_fixed:wwn}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_ep_to_fixed:wwn}
+% \begin{macro}[EXP]
% {\@@_ep_to_fixed_auxi:www, \@@_ep_to_fixed_auxii:nnnnnnnwn}
% Converts an extended-precision number with an exponent at most~$4$
% and a first block less than $10^{8}$ to a fixed point number whose
@@ -651,9 +651,9 @@
% \end{macro}
%
% ^^A todo: make it work when the arg is zero.
-% \begin{macro}[aux, EXP]{\@@_ep_to_ep:wwN}
-% \begin{macro}[aux, rEXP]{\@@_ep_to_ep_loop:N, \@@_ep_to_ep_end:www}
-% \begin{macro}[aux, EXP]{\@@_ep_to_ep_zero:ww}
+% \begin{macro}[EXP]{\@@_ep_to_ep:wwN}
+% \begin{macro}[rEXP]{\@@_ep_to_ep_loop:N, \@@_ep_to_ep_end:www}
+% \begin{macro}[EXP]{\@@_ep_to_ep_zero:ww}
% Normalize an extended-precision number. More precisely, leading
% zeros are removed from the mantissa of the argument, decreasing its
% exponent as appropriate. Then the digits are packed into $6$~groups
@@ -708,8 +708,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_ep_compare:wwww}
-% \begin{macro}[aux, EXP]{\@@_ep_compare_aux:wwww}
+% \begin{macro}[EXP]{\@@_ep_compare:wwww}
+% \begin{macro}[EXP]{\@@_ep_compare_aux:wwww}
% In \pkg{l3fp-trig} we need to compare two extended-precision
% numbers. This is based on the same function for positive floating
% point numbers, with an extra test if comparing only $16$ decimals is
@@ -737,7 +737,7 @@
% \end{macro}
%
% ^^A todo: doc that neither operand may be zero (or fix ep_to_ep above)
-% \begin{macro}[int, EXP]{\@@_ep_mul:wwwwn, \@@_ep_mul_raw:wwwwN}
+% \begin{macro}[EXP]{\@@_ep_mul:wwwwn, \@@_ep_mul_raw:wwwwN}
% Multiply two extended-precision numbers: first normalize them to
% avoid losing too much precision, then multiply the mantissas |#2|
% and~|#4| as fixed point numbers, and sum the exponents |#1|
@@ -886,7 +886,7 @@
% ^^A todo: provide ep_inv, not ep_div?
% ^^A todo: make extra sure that the result's first block cannot be 99
% ^^A todo: doc that neither operand may be zero (or fix ep_to_ep)
-% \begin{macro}[int, EXP]{\@@_ep_div:wwwwn}
+% \begin{macro}[EXP]{\@@_ep_div:wwwwn}
% Compute the ratio of two extended-precision numbers. The result is
% an extended-precision number whose first block lies in the range
% $[100,9999]$, and is placed after the \meta{continuation} once we
@@ -907,7 +907,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_ep_div_esti:wwwwn,
% \@@_ep_div_estii:wwnnwwn,
@@ -953,7 +953,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_ep_div_epsi:wnNNNNNn,
% \@@_ep_div_eps_pack:NNNNNw,
@@ -1021,8 +1021,8 @@
% with $y^{-1/2}$ as $x^{-1/2} = 10^{-2} r y^{-1/2}$.
%
% ^^A todo: doc that the operand may not be zero (or fix ep_to_ep above)
-% \begin{macro}[int, EXP]{\@@_ep_isqrt:wwn}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_ep_isqrt:wwn}
+% \begin{macro}[EXP]
% {\@@_ep_isqrt_aux:wwn, \@@_ep_isqrt_auxii:wwnnnwn}
% First normalize the input, then check the parity of the
% exponent~|#1|. If it is even, the result's exponent will be
@@ -1063,7 +1063,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_ep_isqrt_esti:wwwnnwn,
% \@@_ep_isqrt_estii:wwwnnwn,
@@ -1111,7 +1111,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_ep_isqrt_epsi:wN, \@@_ep_isqrt_epsii:wwN}
+% \begin{macro}[EXP]{\@@_ep_isqrt_epsi:wN, \@@_ep_isqrt_epsii:wwN}
% Here, we receive a fixed point number $y/2$ with $y\in[1,1.0201]$.
% Starting from $z = 1$ we iterate $z \mapsto z(3/2 - z^2 y/2)$. In
% fact, we start from the first iteration $z=3/2-y/2$ to avoid useless
@@ -1143,7 +1143,7 @@
% floating point format. The functions here should be called within an
% integer expression for the overall exponent of the floating point.
%
-% \begin{macro}[int, rEXP]{\@@_ep_to_float_o:wwN, \@@_ep_inv_to_float_o:wwN}
+% \begin{macro}[rEXP]{\@@_ep_to_float_o:wwN, \@@_ep_inv_to_float_o:wwN}
% An extended-precision number is simply a comma-delimited exponent
% followed by a fixed point number. Leave the exponent in the current
% integer expression then convert the fixed point number.
@@ -1158,7 +1158,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[rEXP, int]{\@@_fixed_inv_to_float_o:wN}
+% \begin{macro}[rEXP]{\@@_fixed_inv_to_float_o:wN}
% Another function which reduces to converting an extended precision
% number to a float.
% \begin{macrocode}
@@ -1167,7 +1167,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[rEXP, int]{\@@_fixed_to_float_rad_o:wN}
+% \begin{macro}[rEXP]{\@@_fixed_to_float_rad_o:wN}
% Converts the fixed point number~|#1| from degrees to radians then to
% a floating point number. This could perhaps remain in
% \pkg{l3fp-trig}.
@@ -1181,7 +1181,7 @@
% \end{macro}
%
% ^^A todo: make exponents end in ',' consistently throughout l3fp
-% \begin{macro}[int, rEXP]
+% \begin{macro}[rEXP]
% {\@@_fixed_to_float_o:wN, \@@_fixed_to_float_o:Nw}
% \begin{syntax}
% \ldots{} \cs{__int_eval:w} \meta{exponent} \cs{@@_fixed_to_float_o:wN} \Arg{a_1} \Arg{a_2} \Arg{a_3} \Arg{a_4} \Arg{a_5} \Arg{a_6} |;| \meta{sign}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
index 5938ae067db..6008c321da8 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
-%% File: l3fp-logic.dtx Copyright (C) 2011-2014,2016,2017 The LaTeX3 Project
+%% File: l3fp-logic.dtx Copyright (C) 2011-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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -58,7 +58,7 @@
%<@@=fp>
% \end{macrocode}
%
-% \begin{macro}[aux, EXP]{\@@_parse_word_max:N , \@@_parse_word_min:N}
+% \begin{macro}[EXP]{\@@_parse_word_max:N , \@@_parse_word_min:N}
% Those functions may receive a variable number of arguments.
% \begin{macrocode}
\cs_new:Npn \@@_parse_word_max:N
@@ -94,7 +94,7 @@
% \subsection{Comparison}
%
% \begin{macro}[pTF, EXP]{\fp_compare:n}
-% \begin{macro}[aux, EXP]{\@@_compare_return:w}
+% \begin{macro}[EXP]{\@@_compare_return:w}
% Within floating point expressions, comparison operators are treated
% as operations, so we evaluate |#1|, then compare with $0$.
% \begin{macrocode}
@@ -116,7 +116,7 @@
% \end{macro}
%
% \begin{macro}[pTF, EXP]{\fp_compare:nNn}
-% \begin{macro}[aux, EXP]{\@@_compare_aux:wn}
+% \begin{macro}[EXP]{\@@_compare_aux:wn}
% Evaluate |#1| and |#3|, using an auxiliary to expand both, and feed
% the two floating point numbers swapped to \cs{@@_compare_back:ww},
% defined below. Compare the result with |`#2-`=|, which is $-1$ for
@@ -142,7 +142,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_compare_back:ww, \@@_compare_nan:w}
+% \begin{macro}[EXP]{\@@_compare_back:ww, \@@_compare_nan:w}
% \begin{quote}
% \cs{@@_compare_back:ww} \meta{y} |;| \meta{x} |;|
% \end{quote}
@@ -188,8 +188,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_compare_npos:nwnw}
-% \begin{macro}[aux, EXP]{\@@_compare_significand:nnnnnnnn}
+% \begin{macro}[EXP]{\@@_compare_npos:nwnw}
+% \begin{macro}[EXP]{\@@_compare_significand:nnnnnnnn}
% \begin{quote}
% \cs{@@_compare_npos:nwnw}
% \Arg{expo_1} \meta{body_1} |;|
@@ -309,8 +309,8 @@
% \end{macro}
%
% \begin{macro}[EXP]{\fp_step_function:nnnN, \fp_step_function:nnnc}
-% \begin{macro}[EXP, aux]{\@@_step:wwwN}
-% \begin{macro}[EXP, aux]{\@@_step:NnnnnN, \@@_step:NfnnnN}
+% \begin{macro}[EXP]{\@@_step:wwwN}
+% \begin{macro}[EXP]{\@@_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
@@ -376,7 +376,7 @@
% \end{macro}
%
% \begin{macro}{\fp_step_inline:nnnn, \fp_step_variable:nnnNn}
-% \begin{macro}[aux]{\@@_step:NNnnnn}
+% \begin{macro}{\@@_step:NNnnnn}
% As for \cs{int_step_inline:nnnn}, create a global function and apply it,
% following up with a break point.
% \begin{macrocode}
@@ -418,7 +418,7 @@
%
% \subsection{Extrema}
%
-% \begin{macro}[int, EXP]{\@@_minmax_o:Nw}
+% \begin{macro}[EXP]{\@@_minmax_o:Nw}
% The argument~|#1| is $2$~to find the maximum of an array~|#2| of
% floating point numbers, and $0$~to find the minimum. We read
% numbers sequentially, keeping track of the largest (smallest) number
@@ -444,7 +444,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_minmax_loop:Nww}
+% \begin{macro}[EXP]{\@@_minmax_loop:Nww}
% 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
@@ -482,7 +482,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_minmax_auxi:ww, \@@_minmax_auxii:ww}
+% \begin{macro}[EXP]{\@@_minmax_auxi:ww, \@@_minmax_auxii:ww}
% Keep the first/second number, and remove the other.
% \begin{macrocode}
\cs_new:Npn \@@_minmax_auxi:ww #1 \fi: \fi: #2 \s_@@ #3 ; \s_@@ #4;
@@ -492,7 +492,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_minmax_break_o:w}
+% \begin{macro}[EXP]{\@@_minmax_break_o:w}
% This function is called from within an \cs{if_meaning:w} test. Skip
% to the end of the tests, close the current test with \cs{fi:}, clean
% up, and return the appropriate number with one post-expansion.
@@ -504,7 +504,7 @@
%
% \subsection{Boolean operations}
%
-% \begin{macro}[int, EXP]{\@@_not_o:w}
+% \begin{macro}[EXP]{\@@_not_o:w}
% Return \texttt{true} or \texttt{false}, with two expansions, one to
% exit the conditional, and one to please \pkg{l3fp-parse}. The first
% argument is provided by \pkg{l3fp-parse} and is ignored.
@@ -520,9 +520,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]+\@@_&_o:ww+
-% \begin{macro}[int, EXP]+\@@_|_o:ww+
-% \begin{macro}[aux, EXP]{\@@_and_return:wNw}
+% \begin{macro}[EXP]+\@@_&_o:ww+
+% \begin{macro}[EXP]+\@@_|_o:ww+
+% \begin{macro}[EXP]{\@@_and_return:wNw}
% For \texttt{and}, if the first number is zero, return it (with the
% same sign). Otherwise, return the second one. For \texttt{or}, the
% logic is reversed: if the first number is non-zero, return it,
@@ -551,9 +551,9 @@
% \subsection{Ternary operator}
%
%^^A todo: understand and optimize.
-% \begin{macro}[int, EXP]
+% \begin{macro}[EXP]
% {\@@_ternary:NwwN, \@@_ternary_auxi:NwwN, \@@_ternary_auxii:NwwN}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_ternary_loop_break:w, \@@_ternary_loop:Nw,
% \@@_ternary_map_break:, \@@_ternary_break_point:n
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
index 2a1d9fb0ddf..8b3157fa376 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -65,7 +65,7 @@
% (almost) right the first time. Let us first describe our goal, then
% discuss the design precisely before writing any code.
%
-% \begin{macro}[EXP, int]{\@@_parse:n}
+% \begin{macro}[EXP]{\@@_parse:n}
% \begin{syntax}
% \cs{@@_parse:n} \Arg{fpexpr}
% \end{syntax}
@@ -563,7 +563,7 @@
%
% \subsection{Main auxiliary functions}
%
-% \begin{macro}[rEXP, aux]{\@@_parse_operand:Nw}
+% \begin{macro}[rEXP]{\@@_parse_operand:Nw}
% \begin{syntax}
% \cs{exp:w} \cs{@@_parse_operand:Nw} \meta{precedence} \cs{@@_parse_expand:w}
% \end{syntax}
@@ -577,7 +577,7 @@
% \enquote{\ttfamily\ldots{}} start just after the \meta{operation}.
% \end{macro}
%
-% \begin{macro}[EXP, aux]{\@@_parse_infix_+:N}
+% \begin{macro}[EXP]{\@@_parse_infix_+:N}
% \begin{syntax}
% \cs{@@_parse_infix_+:N} \meta{precedence} \ldots{}
% \end{syntax}
@@ -594,7 +594,7 @@
% A similar function exists for each infix operator.
% \end{macro}
%
-% \begin{macro}[EXP, aux]{\@@_parse_one:Nw}
+% \begin{macro}[EXP]{\@@_parse_one:Nw}
% \begin{syntax}
% \cs{@@_parse_one:Nw} \meta{precedence} \ldots{}
% \end{syntax}
@@ -615,7 +615,7 @@
%
% \subsection{Helpers}
%
-% \begin{macro}[aux, rEXP]{\@@_parse_expand:w}
+% \begin{macro}[rEXP]{\@@_parse_expand:w}
% \begin{syntax}
% \cs{exp:w} \cs{@@_parse_expand:w} \meta{tokens}
% \end{syntax}
@@ -628,7 +628,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_parse_return_semicolon:w}
+% \begin{macro}[EXP]{\@@_parse_return_semicolon:w}
% This very odd function swaps its position with the following
% \cs{fi:} and removes \cs{@@_parse_expand:w} normally responsible for
% expansion. That turns out to be useful.
@@ -638,7 +638,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_type_from_scan:N, \@@_type_from_scan:w}
+% \begin{macro}[EXP]{\@@_type_from_scan:N, \@@_type_from_scan:w}
% \begin{syntax}
% \cs{@@_type_from_scan:N} \meta{token}
% \end{syntax}
@@ -661,7 +661,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[rEXP, aux]
+% \begin{macro}[rEXP]
% {
% \@@_parse_digits_vii:N ,
% \@@_parse_digits_vi:N ,
@@ -714,7 +714,7 @@
%
% \subsection{Parsing one number}
%
-% \begin{macro}[aux, EXP]{\@@_parse_one:Nw}
+% \begin{macro}[EXP]{\@@_parse_one:Nw}
% This function finds one number, and packs the symbol which follows
% in an \cs[no-index]{@@_parse_infix_\ldots{}} csname.
% |#1|~is the previous \meta{precedence},
@@ -754,7 +754,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_one_fp:NN,
% \@@_exp_after_mark_f:nw,
@@ -826,7 +826,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_one_register:NN,
% \@@_parse_one_register_aux:Nw,
@@ -881,15 +881,14 @@
. \tl_to_str:n { pt } ; \exp_not:N \@@_parse_one_register_int:www
\exp_not:N \q_stop
}
-\use:x
- {
- \cs_new:Npn \exp_not:N \@@_parse_one_register_auxii:wwwNw
- ##1 . ##2 \tl_to_str:n { pt } ##3 ; ##4##5 \exp_not:N \q_stop
- { ##4 ##1.##2; }
- \cs_new:Npn \exp_not:N \@@_parse_one_register_mu:www
- ##1 \tl_to_str:n { mu } ; ##2 ;
- { \exp_not:N \@@_parse_one_register_dim:ww ##1 ; }
- }
+\exp_args:Nno \use:nn
+ { \cs_new:Npn \@@_parse_one_register_auxii:wwwNw #1 . #2 }
+ { \tl_to_str:n { pt } #3 ; #4#5 \q_stop }
+ { #4 #1.#2; }
+\exp_args:Nno \use:nn
+ { \cs_new:Npn \@@_parse_one_register_mu:www #1 }
+ { \tl_to_str:n { mu } ; #2 ; }
+ { \@@_parse_one_register_dim:ww #1 ; }
\cs_new:Npn \@@_parse_one_register_int:www #1; #2.; #3;
{ \@@_parse:n { #1 e #3 } }
\cs_new:Npn \@@_parse_one_register_dim:ww #1; #2;
@@ -922,7 +921,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_parse_one_digit:NN}
+% \begin{macro}[EXP]{\@@_parse_one_digit:NN}
% A digit marks the beginning of an explicit floating point number.
% Once the number is found, we catch the case of overflow and
% underflow with \cs{@@_sanitize:wN}, then
@@ -942,7 +941,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_parse_one_other:NN}
+% \begin{macro}[EXP]{\@@_parse_one_other:NN}
% For this function, |#2|~is a character token which is not a digit.
% If it is an \textsc{ascii} letter, \cs{@@_parse_letters:N} beyond this one and give
% the result to \cs{@@_parse_word:Nw}. Otherwise, the character is
@@ -975,8 +974,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_parse_word:Nw}
-% \begin{macro}[aux, rEXP]{\@@_parse_letters:N}
+% \begin{macro}[EXP]{\@@_parse_word:Nw}
+% \begin{macro}[rEXP]{\@@_parse_letters:N}
% Finding letters is a simple recursion. Once \cs{@@_parse_letters:N}
% has done its job, we try to build a control sequence from the
% word~|#2|. If it is a known word, then the corresponding action is
@@ -1028,7 +1027,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {\@@_parse_prefix:NNN, \@@_parse_prefix_unknown:NNN}
% For this function, |#1|~is the previous \meta{precedence}, |#2|~is
% the operator just seen, and |#3|~is a control sequence which
@@ -1077,7 +1076,7 @@
% set of functions |\__fp_parse_small|\ldots{} Once the significand is
% read, read the exponent if |e|~is present.
%
-% \begin{macro}[aux, rEXP]{\@@_parse_trim_zeros:N, \@@_parse_trim_end:w}
+% \begin{macro}[rEXP]{\@@_parse_trim_zeros:N, \@@_parse_trim_end:w}
% This function expects an already expanded token. It removes any
% leading zero, then distinguishes three cases: if the first non-zero
% token is a digit, then call \cs{@@_parse_large:N} (the significand
@@ -1114,7 +1113,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {\@@_parse_strim_zeros:N, \@@_parse_strim_end:w}
% If we have removed all digits until a period (or if the body started
% with a period), then enter the \enquote{\texttt{small_trim}} loop
@@ -1147,7 +1146,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_parse_zero:}
+% \begin{macro}[EXP]{\@@_parse_zero:}
% After reading a significand of~$0$, find any exponent, then put a
% sign of~|1| for \cs{@@_sanitize:wN}, which removes everything
% and leaves an exact zero.
@@ -1162,7 +1161,7 @@
%
% \subsubsection{Number: small significand}
%
-% \begin{macro}[aux, rEXP]{\@@_parse_small:N}
+% \begin{macro}[rEXP]{\@@_parse_small:N}
% This function is called after we have passed the decimal separator
% and removed all leading zeros from the significand. It is followed
% by a non-zero digit (with any catcode). The goal is to read up to
@@ -1188,7 +1187,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_parse_small_leading:wwNN}
+% \begin{macro}[rEXP]{\@@_parse_small_leading:wwNN}
% \begin{syntax}
% \cs{@@_parse_small_leading:wwNN} |1| \meta{digits} |;| \meta{zeros} |;| \meta{number~of~zeros}
% \end{syntax}
@@ -1222,7 +1221,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_parse_small_trailing:wwNN}
+% \begin{macro}[rEXP]{\@@_parse_small_trailing:wwNN}
% \begin{syntax}
% \cs{@@_parse_small_trailing:wwNN} |1| \meta{digits} |;| \meta{zeros} |;| \meta{number~of~zeros} \meta{next~token}
% \end{syntax}
@@ -1250,7 +1249,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {
% \@@_parse_pack_trailing:NNNNNNww ,
% \@@_parse_pack_leading:NNNNNww ,
@@ -1296,7 +1295,7 @@
% run out of digits, and branch to the appropriate \texttt{parse_small}
% function in those cases.
%
-% \begin{macro}[aux, EXP]{\@@_parse_large:N}
+% \begin{macro}[EXP]{\@@_parse_large:N}
% This function is followed by the first non-zero digit of a
% \enquote{large} significand ($\geq 1$). It is called within an
% integer expression for the exponent. Grab up to $7$~more digits,
@@ -1312,7 +1311,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_parse_large_leading:wwNN}
+% \begin{macro}[rEXP]{\@@_parse_large_leading:wwNN}
% \begin{syntax}
% \cs{@@_parse_large_leading:wwNN} |1| \meta{digits} |;| \meta{zeros} |;| \meta{number~of~zeros} \meta{next~token}
% \end{syntax}
@@ -1360,7 +1359,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_parse_large_trailing:wwNN}
+% \begin{macro}[EXP]{\@@_parse_large_trailing:wwNN}
% \begin{syntax}
% \cs{@@_parse_large_trailing:wwNN} |1| \meta{digits} |;| \meta{zeros} |;| \meta{number~of~zeros} \meta{next~token}
% \end{syntax}
@@ -1411,7 +1410,7 @@
%
% \subsubsection{Number: beyond 16 digits, rounding}
%
-% \begin{macro}[aux, rEXP]{\@@_parse_round_loop:N, \@@_parse_round_up:N}
+% \begin{macro}[rEXP]{\@@_parse_round_loop:N, \@@_parse_round_up:N}
% This loop is called when rounding a number (whether the mantissa is
% small or large). It should appear in an integer expression. This
% function reads digits one by one, until reaching a non-digit, and
@@ -1451,7 +1450,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_parse_round_after:wN}
+% \begin{macro}[rEXP]{\@@_parse_round_after:wN}
% After the loop \cs{@@_parse_round_loop:N}, this function fetches an
% exponent with \cs{@@_parse_exponent:N}, and combines it with the
% number of digits counted by \cs{@@_parse_round_loop:N}. At the same
@@ -1466,7 +1465,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {\@@_parse_small_round:NN, \@@_parse_round_after:wN}
% Here, |#1|~is the digit that we are currently rounding (we only care
% whether it is even or odd). If |#2|~is not a digit, then fetch an
@@ -1503,7 +1502,7 @@
% \end{macro}
%
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {
% \@@_parse_large_round:NN,
% \@@_parse_large_round_test:NN,
@@ -1598,7 +1597,7 @@
% token ahead is |e|. Then we expand (and possibly unpack) the second
% token.
%
-% \begin{macro}[aux, rEXP]{\@@_parse_exponent:Nw}
+% \begin{macro}[rEXP]{\@@_parse_exponent:Nw}
% This auxiliary is convenient to smuggle some material through
% \cs{fi:} ending conditional processing. We place those \cs{fi:}
% (argument~|#2|) at a very odd place because this allows us to insert
@@ -1612,7 +1611,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {\@@_parse_exponent:N, \@@_parse_exponent_aux:N}
% This function should be called within an \cs{__int_value:w}
% expansion (or within an integer expression). It leaves digits of the
@@ -1647,7 +1646,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_parse_exponent_sign:N}
+% \begin{macro}[rEXP]{\@@_parse_exponent_sign:N}
% Read signs one by one (if there is any).
% \begin{macrocode}
\cs_new:Npn \@@_parse_exponent_sign:N #1
@@ -1663,7 +1662,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_parse_exponent_body:N}
+% \begin{macro}[rEXP]{\@@_parse_exponent_body:N}
% An exponent can be an explicit integer (most common case), or
% various other things (most of which are invalid).
% \begin{macrocode}
@@ -1686,7 +1685,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_parse_exponent_digits:N}
+% \begin{macro}[rEXP]{\@@_parse_exponent_digits:N}
% Read digits one by one, and leave them behind in the input stream.
% When finding a non-digit, stop, and insert a semicolon. Note that
% we do not check for overflow of the exponent, hence there can be a
@@ -1708,7 +1707,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_parse_exponent_keep:NTF}
+% \begin{macro}[rEXP]{\@@_parse_exponent_keep:NTF}
% This is the last building block for parsing exponents. The
% argument~|#1| is already fully expanded, and neither |+| nor~|-| nor
% a digit. It can be:
@@ -1765,14 +1764,14 @@
%
% \subsubsection{Prefix operators}
%
-% \begin{macro}[EXP, aux]{\@@_parse_prefix_+:Nw}
+% \begin{macro}[EXP]{\@@_parse_prefix_+:Nw}
% A unary~|+| does nothing: we should continue looking for a number.
% \begin{macrocode}
\cs_new_eq:cN { @@_parse_prefix_+:Nw } \@@_parse_one:Nw
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_parse_apply_unary:NNNwN}
+% \begin{macro}[EXP]{\@@_parse_apply_unary:NNNwN}
% Here, |#1| is a precedence, |#2| is some extra data used by some
% functions, |#3| is \emph{e.g.}, \cs{@@_sin_o:w}, and expands once
% after the calculation, |#4| is the operand, and |#5| is a
@@ -1790,7 +1789,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP, aux]{\@@_parse_prefix_-:Nw, \@@_parse_prefix_!:Nw}
+% \begin{macro}[EXP]{\@@_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_@@_prec_not_int} of the unary operator, then call
@@ -1819,7 +1818,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP, aux]{\@@_parse_prefix_.:Nw}
+% \begin{macro}[EXP]{\@@_parse_prefix_.:Nw}
% Numbers which start with a decimal separator (a~period) end up here.
% Of course, we do not look for an operand, but for the rest of the
% number. This function is very similar to \cs{@@_parse_one_digit:NN}
@@ -1838,7 +1837,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {\@@_parse_prefix_(:Nw, \@@_parse_lparen_after:NwN}
% The left parenthesis is treated as a unary prefix operator because
% it appears in exactly the same settings. Commas are allowed if
@@ -1884,7 +1883,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_parse_prefix_):Nw}
+% \begin{macro}[EXP]{\@@_parse_prefix_):Nw}
% 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
@@ -1905,7 +1904,7 @@
%
% \subsubsection{Constants}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_word_inf:N , \@@_parse_word_nan:N ,
% \@@_parse_word_pi:N , \@@_parse_word_deg:N ,
@@ -1929,7 +1928,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_caseless_inf:N,
% \@@_parse_caseless_infinity:N,
@@ -1944,7 +1943,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_word_pt:N , \@@_parse_word_in:N ,
% \@@_parse_word_pc:N , \@@_parse_word_cm:N , \@@_parse_word_mm:N ,
@@ -1977,7 +1976,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_parse_word_em:N, \@@_parse_word_ex:N}
+% \begin{macro}[EXP]{\@@_parse_word_em:N, \@@_parse_word_ex:N}
% The font-dependent units |em| and |ex| must be evaluated on the fly.
% We reuse an auxiliary of \cs{dim_to_fp:n}.
% \begin{macrocode}
@@ -1998,7 +1997,7 @@
%
% ^^A begin[todo]
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {\@@_parse_unary_function:NNN, \@@_parse_function:NNN}
% \begin{macrocode}
\cs_new:Npn \@@_parse_unary_function:NNN #1#2#3
@@ -2024,8 +2023,8 @@
%
% \subsection{Main functions}
%
-% \begin{macro}[int, EXP]{\@@_parse:n}
-% \begin{macro}[aux, EXP]{\@@_parse_after:ww}
+% \begin{macro}[EXP]{\@@_parse:n}
+% \begin{macro}[EXP]{\@@_parse_after:ww}
% Start an \cs{exp:w} expansion so that \cs{@@_parse:n} expands
% in two steps. The \cs{@@_parse_operand:Nw} function performs
% computations until reaching an operation with precedence
@@ -2053,7 +2052,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_parse_o:n}
+% \begin{macro}[EXP]{\@@_parse_o:n}
% ^^A todo: optimize, comment, make it work for arrays.
% \begin{macrocode}
\cs_new:Npn \@@_parse_o:n #1
@@ -2065,8 +2064,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_parse_operand:Nw}
-% \begin{macro}[aux, EXP]{\@@_parse_continue:NwN}
+% \begin{macro}[EXP]{\@@_parse_operand:Nw}
+% \begin{macro}[EXP]{\@@_parse_continue:NwN}
% This is just a shorthand which sets up both \cs{@@_parse_continue:NwN}
% and \cs{@@_parse_one:Nw} with the same precedence. Note the
% trailing \cs{exp:w}.
@@ -2086,7 +2085,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_parse_apply_binary:NwNwN}
+% \begin{macro}[EXP]{\@@_parse_apply_binary:NwNwN}
% Receives \meta{precedence} \meta{operand_1} |@| \meta{operation}
% \meta{operand_2} |@| \meta{infix command}. Builds the appropriate
% call to the \meta{operation}~|#3|.
@@ -2105,7 +2104,7 @@
%
% \subsection{Infix operators}
%
-% \begin{macro}[aux, EXP]{\@@_parse_infix_after_operand:NwN}
+% \begin{macro}[EXP]{\@@_parse_infix_after_operand:NwN}
% \begin{macrocode}
\cs_new:Npn \@@_parse_infix_after_operand:NwN #1 #2;
{
@@ -2164,7 +2163,7 @@
%
% \subsubsection{Closing parentheses and commas}
%
-% \begin{macro}[aux, EXP]{\@@_parse_infix_mark:NNN}
+% \begin{macro}[EXP]{\@@_parse_infix_mark:NNN}
% As an infix operator, \cs{s_@@_mark} means that the next
% token~(|#3|) has already gone through \cs{@@_parse_infix:NN} and
% should be provided the precedence~|#1|. The scan mark~|#2| is
@@ -2174,7 +2173,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_parse_infix_end:N}
+% \begin{macro}[EXP]{\@@_parse_infix_end:N}
% This one is a little bit odd: force every previous operator to end,
% regardless of the precedence.
% \begin{macrocode}
@@ -2183,7 +2182,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]+\@@_parse_infix_):N+
+% \begin{macro}[EXP]+\@@_parse_infix_):N+
% This is very similar to \cs{@@_parse_infix_end:N}, complaining about
% an extra closing parenthesis if the previous operator was the
% beginning of the expression.
@@ -2208,9 +2207,9 @@
% \end{macrocode}
% \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}
+% \begin{macro}[verb, EXP]{\__fp_parse_infix_,:N}
+% \begin{macro}[EXP]{\@@_parse_infix_comma:w, \@@_parse_infix_comma_error:w}
+% \begin{macro}[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}
@@ -2264,13 +2263,13 @@
%
% \subsubsection{Usual infix operators}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_infix_+:N, \@@_parse_infix_-:N,
% \@@_parse_infix_/:N, \@@_parse_infix_mul:N,
% \@@_parse_infix_and:N, \@@_parse_infix_or:N,
% }
-% \begin{macro}[aux, EXP]+\@@_parse_infix_^:N+
+% \begin{macro}[EXP]+\@@_parse_infix_^:N+
% As described in the \enquote{work plan}, each infix operator has an
% associated |\..._infix_...| function, a computing function, and
% precedence, given as arguments to \cs{@@_tmp:w}. Using the general
@@ -2316,7 +2315,7 @@
%
% \subsubsection{Juxtaposition}
%
-% \begin{macro}[aux, EXP]+\@@_parse_infix_(:N+
+% \begin{macro}[EXP]+\@@_parse_infix_(:N+
% When an opening parenthesis appears where we expect an infix
% operator, we compute the product of the previous operand and the
% contents of the parentheses using \cs{@@_parse_infix_juxtapose:N}.
@@ -2327,7 +2326,7 @@
% \end{macro}
%
% ^^A todo: can |...(1,2,3)pt| really occur? If not, simplify.
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {\@@_parse_infix_juxtapose:N, \@@_parse_apply_juxtapose:NwwN}
% Juxtaposition follows the same scheme as other binary operations,
% but calls \cs{@@_parse_apply_juxtapose:NwwN} rather than directly
@@ -2366,7 +2365,7 @@
%
% \subsubsection{Multi-character cases}
%
-% \begin{macro}[aux, EXP]{\@@_parse_infix_*:N}
+% \begin{macro}[EXP]{\@@_parse_infix_*:N}
% \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:w #1
{
@@ -2386,8 +2385,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]+\@@_parse_infix_|:Nw+
-% \begin{macro}[aux, EXP]+\@@_parse_infix_&:Nw+
+% \begin{macro}[EXP]+\@@_parse_infix_|:Nw+
+% \begin{macro}[EXP]+\@@_parse_infix_&:Nw+
% \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:w #1#2#3
{
@@ -2412,7 +2411,7 @@
%
% \subsubsection{Ternary operator}
%
-% \begin{macro}[aux, EXP]{\@@_parse_infix_?:N, \@@_parse_infix_::N}
+% \begin{macro}[EXP]{\@@_parse_infix_?:N, \@@_parse_infix_::N}
% \begin{macrocode}
\cs_set_protected:Npn \@@_tmp:w #1#2#3#4
{
@@ -2445,12 +2444,12 @@
%
% \subsubsection{Comparisons}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_infix_<:N, \@@_parse_infix_=:N,
% \@@_parse_infix_>:N, \@@_parse_infix_!:N
% }
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_excl_error:,
% \@@_parse_compare:NNNNNNN,
@@ -2573,7 +2572,7 @@
%
% \subsection{Candidate: defining new \pkg{l3fp} functions}
%
-% \begin{macro}[EXP,int]{\fp_function:Nw}
+% \begin{macro}[EXP]{\fp_function:Nw}
% Parse the argument of the function~|#1| using
% \cs{@@_parse_operand:Nw} with a precedence of~$16$, and pass the
% function and argument to \cs{@@_function_apply:nw}.
@@ -2588,9 +2587,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\fp_new_function:Npn}
-% \begin{macro}[aux]{\@@_new_function:NNnnn, \@@_new_function:Ncfnn}
-% \begin{macro}[aux]{\@@_function_args:Nwn}
+% \begin{macro}{\fp_new_function:Npn}
+% \begin{macro}{\@@_new_function:NNnnn, \@@_new_function:Ncfnn}
+% \begin{macro}{\@@_function_args:Nwn}
% Save the code provided by the user in the control sequence
% |\__fp_user_#1|. Define |#1| to call \cs{@@_function_apply:nw}
% after parsing one operand using \cs{@@_parse_operand:Nw} with
@@ -2639,7 +2638,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_function_apply:nw,
% \@@_function_store:wwNwnn,
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
index 266d4c40cac..1ae8f1727c1 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -58,7 +58,7 @@
%<@@=fp>
% \end{macrocode}
%
-% \begin{macro}[aux, EXP]{\@@_parse_word_rand:N , \@@_parse_word_randint:N}
+% \begin{macro}[EXP]{\@@_parse_word_rand:N , \@@_parse_word_randint:N}
% Those functions may receive a variable number of arguments. We
% won't use the argument~|?|.
% \begin{macrocode}
@@ -92,7 +92,7 @@
{
% \end{macrocode}
%
-% \begin{macro}[EXP, int]{\@@_rand_uniform:}
+% \begin{macro}[EXP]{\@@_rand_uniform:}
% \begin{variable}
% {
% \c_@@_rand_size_int,
@@ -118,8 +118,8 @@
% \end{variable}
% \end{macro}
%
-% \begin{macro}[EXP, int]{\@@_rand_myriads:n}
-% \begin{macro}[EXP, aux]
+% \begin{macro}[EXP]{\@@_rand_myriads:n}
+% \begin{macro}[EXP]
% {
% \@@_rand_myriads_loop:nn,
% \@@_rand_myriads_get:w,
@@ -187,8 +187,8 @@
%
% \subsection{Random floating point}
%
-% \begin{macro}[EXP, int]{\@@_rand_o:Nw}
-% \begin{macro}[EXP, aux]{\@@_rand_o:, \@@_rand_o:w}
+% \begin{macro}[EXP]{\@@_rand_o:Nw}
+% \begin{macro}[EXP]{\@@_rand_o:, \@@_rand_o:w}
% First we check that |random| was called without argument. Then get
% four blocks of four digits.
% \begin{macrocode}
@@ -210,8 +210,8 @@
%
% \subsection{Random integer}
%
-% \begin{macro}[EXP, int]{\@@_randint_o:Nw}
-% \begin{macro}[EXP, aux]
+% \begin{macro}[EXP]{\@@_randint_o:Nw}
+% \begin{macro}[EXP]
% {
% \@@_randint_badarg:w,
% \@@_randint_e:w,
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
index a5992f64041..46122b59ead 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
-%% File: l3fp-round.dtx Copyright(C) 2011-2012,2014-2017 The LaTeX3 Project
+%% File: l3fp-round.dtx Copyright(C) 2011-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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -67,7 +67,7 @@
% ^^A todo: optimize all rounding functions for various rounding modes.
% ^^A todo: reduce the number of almost identical functions.
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_word_trunc:N,
% \@@_parse_word_floor:N,
@@ -83,13 +83,13 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_word_round:N, \@@_parse_round:Nw,
% \@@_parse_round_no_error:Nw,
% \@@_parse_round_deprecation_error:Nw
% }
-% \begin{macro}[aux, deprecated = 2017-12-31]{round+, round0, round-}
+% \begin{macro}[deprecated = 2017-12-31]{round+, round0, round-}
% This looks for |+|, |-|, |0| after |round|. That syntax was
% deprecated in 2013 but the system to tell users about deprecated
% syntax was not really available then, so we did not have anything
@@ -198,8 +198,8 @@
% \end{itemize}
% See implementation comments for details on the syntax.
%
-% \begin{macro}[int, rEXP]{\@@_round:NNN}
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]{\@@_round:NNN}
+% \begin{macro}[rEXP]
% {
% \@@_round_to_nearest:NNN,
% \@@_round_to_nearest_ninf:NNN,
@@ -313,7 +313,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP, int]{\@@_round_s:NNNw}
+% \begin{macro}[EXP]{\@@_round_s:NNNw}
% \begin{syntax}
% \cs{@@_round_s:NNNw} \meta{final sign} \meta{digit} \meta{more digits} |;|
% \end{syntax}
@@ -344,7 +344,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_round_digit:Nw}
+% \begin{macro}[EXP]{\@@_round_digit:Nw}
% \begin{syntax}
% \cs{__int_value:w} \cs{@@_round_digit:Nw} \meta{digit} \meta{intexpr} |;|
% \end{syntax}
@@ -368,8 +368,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_round_neg:NNN}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_round_neg:NNN}
+% \begin{macro}[EXP]
% {
% \@@_round_to_nearest_neg:NNN,
% \@@_round_to_nearest_ninf_neg:NNN,
@@ -423,7 +423,7 @@
%
% ^^A todo: This macro is intermingled with l3fp-parse.
% ^^A todo: Add explanations.
-% \begin{macro}[aux,EXP]{\@@_round_o:Nw}
+% \begin{macro}[EXP]{\@@_round_o:Nw}
% The |trunc|, |ceil| and |floor| functions expect one or two
% arguments (the second is $0$ by default), and the |round| function
% also accepts a third argument (\texttt{nan} by default), which
@@ -444,7 +444,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_round_no_arg_o:Nw}
+% \begin{macro}[EXP]{\@@_round_no_arg_o:Nw}
% \begin{macrocode}
\cs_new:Npn \@@_round_no_arg_o:Nw #1
{
@@ -459,7 +459,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_round:Nwww}
+% \begin{macro}[EXP]{\@@_round:Nwww}
% Having three arguments is only allowed for |round|, not |trunc|,
% |ceil|, |floor|, so check for that case. If all is well, construct
% one of \cs{@@_round_to_nearest:NNN}, \cs{@@_round_to_nearest_zero:NNN},
@@ -495,7 +495,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_round_name_from_cs:N}
+% \begin{macro}[EXP]{\@@_round_name_from_cs:N}
% \begin{macrocode}
\cs_new:Npn \@@_round_name_from_cs:N #1
{
@@ -511,8 +511,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_round:Nww, \@@_round:Nwn}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_round:Nww, \@@_round:Nwn}
+% \begin{macro}[EXP]
% {
% \@@_round_normal:NwNNnw ,
% \@@_round_normal:NnnwNNnn ,
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
index 2a9fe63993d..61aab83a401 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
% \maketitle
%
% \begin{documentation}
@@ -137,7 +137,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_trap_invalid_operation_set_error: ,
% \@@_trap_invalid_operation_set_flag: ,
@@ -187,7 +187,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_trap_division_by_zero_set_error: ,
% \@@_trap_division_by_zero_set_flag: ,
@@ -229,21 +229,21 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_trap_overflow_set_error: ,
% \@@_trap_overflow_set_flag: ,
% \@@_trap_overflow_set_none: ,
% \@@_trap_overflow_set:N ,
% }
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_trap_underflow_set_error: ,
% \@@_trap_underflow_set_flag: ,
% \@@_trap_underflow_set_none: ,
% \@@_trap_underflow_set:N ,
% }
-% \begin{macro}[aux]{\@@_trap_overflow_set:NnNn}
+% \begin{macro}{\@@_trap_overflow_set:NnNn}
% Just as for invalid operations and division by zero, the three
% different behaviours are obtained by feeding \cs{prg_do_nothing:},
% \cs{use_none:nnnnn} or \cs{use_none:nnnnnnn} to an auxiliary, with a
@@ -294,7 +294,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, EXP]
+% \begin{macro}[EXP]
% {
% \@@_invalid_operation:nnw, \@@_invalid_operation_o:Nww,
% \@@_invalid_operation_tl_o:ff,
@@ -320,7 +320,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]
+% \begin{macro}[EXP]
% {\@@_invalid_operation_o:nw, \@@_invalid_operation_o:fw}
% Convenient short-hands for returning \cs{c_nan_fp} for a unary or
% binary operation, and expanding after.
@@ -333,7 +333,7 @@
%
% \subsection{Errors}
%
-% \begin{macro}[int, EXP]{\@@_error:nnnn, \@@_error:nnfn, \@@_error:nffn}
+% \begin{macro}[EXP]{\@@_error:nnnn, \@@_error:nnfn, \@@_error:nffn}
% \begin{macrocode}
\cs_new:Npn \@@_error:nnnn
{ \__msg_kernel_expandable_error:nnnnn { kernel } }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
index 32b3340cabe..f5ffadf5220 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
-%% File: l3fp-trig.dtx Copyright (C) 2011-2014,2016,2017 The LaTeX3 Project
+%% File: l3fp-trig.dtx Copyright (C) 2011-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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -58,7 +58,7 @@
%<@@=fp>
% \end{macrocode}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_word_acos:N ,
% \@@_parse_word_acosd:N ,
@@ -105,7 +105,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_parse_word_acot:N , \@@_parse_word_acotd:N,
% \@@_parse_word_atan:N , \@@_parse_word_atand:N,
@@ -149,7 +149,7 @@
%
% \subsubsection{Filtering special cases}
%
-% \begin{macro}[int, EXP]{\@@_sin_o:w}
+% \begin{macro}[EXP]{\@@_sin_o:w}
% This function, and its analogs for \texttt{cos}, \texttt{csc},
% \texttt{sec}, \texttt{tan}, and \texttt{cot} instead of
% \texttt{sin}, are followed either by \cs{use_i:nn} and a float in
@@ -182,7 +182,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_cos_o:w}
+% \begin{macro}[EXP]{\@@_cos_o:w}
% The cosine of $\pm 0$ is $1$. The cosine of $\pm\infty$ raises an
% invalid operation exception. The cosine of \nan{} is itself.
% Otherwise, the \texttt{trig} function reduces the argument to at
@@ -209,7 +209,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_csc_o:w}
+% \begin{macro}[EXP]{\@@_csc_o:w}
% The cosecant of $\pm 0$ is $\pm \infty$ with the same sign, with a
% division by zero exception (see \cs{@@_cot_zero_o:Nfw} defined
% below), which requires the function name. The cosecant of
@@ -239,7 +239,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_sec_o:w}
+% \begin{macro}[EXP]{\@@_sec_o:w}
% The secant of $\pm 0$ is $1$. The secant of $\pm \infty$ raises an
% invalid operation exception. The secant of \nan{} is itself.
% Otherwise, the \texttt{trig} function reduces the argument and turns
@@ -265,7 +265,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_tan_o:w}
+% \begin{macro}[EXP]{\@@_tan_o:w}
% The tangent of $\pm 0$ or \nan{} is the same floating point number.
% The tangent of $\pm\infty$ raises an invalid operation exception.
% Once more, the \texttt{trig} function does the argument reduction
@@ -292,8 +292,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_cot_o:w}
-% \begin{macro}[aux, EXP]{\@@_cot_zero_o:Nfw}
+% \begin{macro}[EXP]{\@@_cot_o:w}
+% \begin{macro}[EXP]{\@@_cot_zero_o:Nfw}
% The cotangent of $\pm 0$ is $\pm \infty$ with the same sign, with a
% division by zero exception (see \cs{@@_cot_zero_o:Nfw}. The
% cotangent of $\pm\infty$ raises an invalid operation exception. The
@@ -333,7 +333,7 @@
%
% \subsubsection{Distinguishing small and large arguments}
%
-% \begin{macro}[aux, EXP]{\@@_trig:NNNNNwn}
+% \begin{macro}[EXP]{\@@_trig:NNNNNwn}
% The first argument is \cs{use_i:nn} if the operand is in radians and
% \cs{use_ii:nn} if it is in degrees. Arguments |#2| to~|#5| control
% what trigonometric function we compute, and |#6| to~|#8| are pieces
@@ -377,7 +377,7 @@
%
% \subsubsection{Small arguments}
%
-% \begin{macro}[aux, EXP]{\@@_trig_small:ww}
+% \begin{macro}[EXP]{\@@_trig_small:ww}
% This receives a small extended-precision number in radians and
% converts it to a fixed point number. Some trailing digits may be
% lost in the conversion, so we keep the original floating point
@@ -391,7 +391,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_trigd_small:ww}
+% \begin{macro}[EXP]{\@@_trigd_small:ww}
% Convert the extended-precision number to radians, then call
% \cs{@@_trig_small:ww} to massage it in the form appropriate for the
% \texttt{_series} auxiliary.
@@ -407,7 +407,7 @@
%
% \subsubsection{Argument reduction in degrees}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {
% \@@_trigd_large:ww, \@@_trigd_large_auxi:nnnnwNNNN,
% \@@_trigd_large_auxii:wNw, \@@_trigd_large_auxiii:www
@@ -513,7 +513,7 @@
% $0.6\cdot\text{ulp}$ in all cases.
%
% ^^A todo: if the exponent range is reduced, store 1/2pi as a simple tl
-% \begin{variable}[aux, EXP]{\@@_trig_inverse_two_pi:}
+% \begin{variable}[EXP]{\@@_trig_inverse_two_pi:}
% This macro expands to |,,!| or~|,!| followed by $10112$~decimals of
% $10^{-16}/(2\pi)$. The number of decimals we really need is the
% maximum exponent plus the number of digits we later need,~$52$,
@@ -688,7 +688,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {
% \@@_trig_large:ww,
% \@@_trig_large_auxi:wwwwww,
@@ -733,7 +733,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {
% \@@_trig_large_auxv:www,
% \@@_trig_large_auxvi:wnnnnnnnn,
@@ -780,12 +780,12 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]
+% \begin{macro}[rEXP]
% {
% \@@_trig_large_auxvii:w,
% \@@_trig_large_auxviii:w,
% }
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_trig_large_auxix:Nw,
% \@@_trig_large_auxx:wNNNNN,
@@ -853,7 +853,7 @@
%
% \subsubsection{Computing the power series}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {\@@_sin_series_o:NNwwww, \@@_sin_series_aux_o:NNnwww}
% Here we receive a conversion function \cs{@@_ep_to_float_o:wwN} or
% \cs{@@_ep_inv_to_float_o:wwN}, a \meta{sign} ($0$ or~$2$), a
@@ -941,7 +941,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {\@@_tan_series_o:NNwwww, \@@_tan_series_aux_o:Nnwww}
% Contrarily to \cs{@@_sin_series_o:NNwwww} which received a
% conversion auxiliary as~|#1|, here, |#1| is $0$ for tangent
@@ -1087,8 +1087,8 @@
%
% \subsubsection{Arctangent and arccotangent}
%
-% \begin{macro}[int, EXP]{\@@_atan_o:Nw, \@@_acot_o:Nw}
-% \begin{macro}[aux, EXP]{\@@_atan_dispatch_o:NNnNw}
+% \begin{macro}[EXP]{\@@_atan_o:Nw, \@@_acot_o:Nw}
+% \begin{macro}[EXP]{\@@_atan_dispatch_o:NNnNw}
% The parsing step manipulates \texttt{atan} and \texttt{acot} like
% \texttt{min} and \texttt{max}, reading in an array of operands, but
% also leaves \cs{use_i:nn} or \cs{use_ii:nn} depending on whether the
@@ -1126,7 +1126,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_atanii_o:Nww, \@@_acotii_o:Nww}
+% \begin{macro}[EXP]{\@@_atanii_o:Nww, \@@_acotii_o:Nww}
% If either operand is \texttt{nan}, we return it. If both are
% normal, we call \cs{@@_atan_normal_o:NNnwNnw}. If both are zero or
% both infinity, we call \cs{@@_atan_inf_o:NNNw} with argument~$2$,
@@ -1163,7 +1163,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_atan_inf_o:NNNw}
+% \begin{macro}[EXP]{\@@_atan_inf_o:NNNw}
% This auxiliary is called whenever one number is $\pm 0$ or
% $\pm\infty$ (and neither is \nan{}). Then the result only depends
% on the signs, and its value is a multiple of $\pi/4$. We use the
@@ -1189,7 +1189,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_atan_normal_o:NNnwNnw}
+% \begin{macro}[EXP]{\@@_atan_normal_o:NNnwNnw}
% Here we simply reorder the floating point data into a pair of signed
% extended-precision numbers, that is, a sign, an exponent ending with
% a comma, and a six-block mantissa ending with a semi-colon. This
@@ -1207,7 +1207,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_atan_test_o:NwwNwwN}
+% \begin{macro}[EXP]{\@@_atan_test_o:NwwNwwN}
% This receives: the sign~|#1| of~$y$, its exponent~|#2|, its $24$
% digits~|#3| in groups of~$4$, and similarly for~$x$. We prepare to
% call \cs{@@_atan_combine_o:NwwwwwN} which expects the sign~|#1|, the
@@ -1241,8 +1241,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_atan_div:wnwwnw, \@@_atan_near:wwwn}
-% \begin{macro}[aux, EXP]{\@@_atan_near_aux:wwn}
+% \begin{macro}[rEXP]{\@@_atan_div:wnwwnw, \@@_atan_near:wwwn}
+% \begin{macro}[EXP]{\@@_atan_near_aux:wwn}
% This receives two positive numbers $a$ and~$b$ (equal to $\lvert
% x\rvert$ and~$\lvert y\rvert$ in some order), each as an exponent
% and $6$~blocks of $4$~digits, such that $0<a<b$. If $0.41421b<a$,
@@ -1284,7 +1284,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_atan_auxi:ww, \@@_atan_auxii:w}
+% \begin{macro}[EXP]{\@@_atan_auxi:ww, \@@_atan_auxii:w}
% Convert~$z$ from a representation as an exponent and a fixed point
% number in $[0.01,1)$ to a fixed point number only, then set up the
% call to \cs{@@_atan_Taylor_loop:www}, followed by the fixed point
@@ -1304,7 +1304,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {\@@_atan_Taylor_loop:www, \@@_atan_Taylor_break:w}
% We compute the series of $(\operatorname{atan} z)/z$. A typical intermediate
% stage has $|#1|=2k-1$, $|#2| =
@@ -1335,7 +1335,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {\@@_atan_combine_o:NwwwwwN, \@@_atan_combine_aux:ww}
% This receives a \meta{sign}, an \meta{octant}, a fixed point value
% of $(\operatorname{atan} z)/z$, a fixed point number~$z$, and another
@@ -1399,7 +1399,7 @@
%
% \subsubsection{Arcsine and arccosine}
%
-% \begin{macro}[int, EXP]{\@@_asin_o:w}
+% \begin{macro}[EXP]{\@@_asin_o:w}
% Again, the first argument provided by \pkg{l3fp-parse} is
% \cs{use_i:nn} if we are to work in radians and \cs{use_ii:nn} for
% degrees. Then comes a floating point number. The arcsine of $\pm
@@ -1427,7 +1427,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_acos_o:w}
+% \begin{macro}[EXP]{\@@_acos_o:w}
% The arccosine of $\pm 0$ is $\pi / 2$ (in degrees,~$90$). The
% arccosine of $\pm\infty$ raises an invalid operation exception. The
% arccosine of \nan{} is itself. Otherwise, call an auxiliary common
@@ -1456,7 +1456,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_asin_normal_o:NfwNnnnnw}
+% \begin{macro}[EXP]{\@@_asin_normal_o:NfwNnnnnw}
% If the exponent~|#5| is at most $0$, the operand lies
% within $(-1,1)$ and the operation is permitted: call
% \cs{@@_asin_auxi_o:NnNww} with the appropriate arguments. If the
@@ -1485,7 +1485,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_asin_auxi_o:NnNww, \@@_asin_isqrt:wn}
+% \begin{macro}[EXP]{\@@_asin_auxi_o:NnNww, \@@_asin_isqrt:wn}
% We compute $x/\sqrt{1-x^2}$. This function is used by \texttt{asin}
% and \texttt{acos}, but also by \texttt{acsc} and \texttt{asec} after
% inverting the operand, thus it must manipulate extended-precision
@@ -1527,7 +1527,7 @@
%
% \subsubsection{Arccosecant and arcsecant}
%
-% \begin{macro}[int, EXP]{\@@_acsc_o:w}
+% \begin{macro}[EXP]{\@@_acsc_o:w}
% Cases are mostly labelled by~|#2|, except when |#2| is~$2$: then we
% use |#3#2|, which is $02=2$ when the number is $+\infty$ and
% $22$~when the number is $-\infty$. The arccosecant of $\pm 0$
@@ -1553,7 +1553,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_asec_o:w}
+% \begin{macro}[EXP]{\@@_asec_o:w}
% The arcsecant of $\pm 0$ raises an invalid operation exception. The
% arcsecant of $\pm\infty$ is $\pi / 2$ (in degrees,~$90$). The
% arcosecant of \nan{} is itself. Otherwise, do some more tests,
@@ -1581,7 +1581,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_acsc_normal_o:NfwNnw}
+% \begin{macro}[EXP]{\@@_acsc_normal_o:NfwNnw}
% If the exponent is non-positive, the operand is less than~$1$ in
% absolute value, which is always an invalid operation: complain.
% Otherwise, compute the inverse of the operand, and feed it to
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
index ce110047e1b..a927a2344fe 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\usepackage{amsmath}
\begin{document}
\DocInput{\jobname.dtx}
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
index db696612204..f0e0cca5938 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -900,31 +900,46 @@
%
% \section{Internal functions}
%
-% \begin{function}[EXP]{\__int_to_roman:w}
+% \begin{function}[EXP]{\__int_value:w}
% \begin{syntax}
-% \cs{__int_to_roman:w} \meta{integer} \meta{space} \textit{or} \meta{non-expandable token}
+% \cs{__int_value:w} \meta{integer}
+% \cs{__int_value:w} \meta{integer denotation} \meta{optional space}
% \end{syntax}
-% Converts \meta{integer} to it lower case Roman representation. Expansion
-% ends when a space or non-expandable token is found.
-% Note that this function produces a string of letters with category code
-% $12$ and that protected functions \emph{are} expanded by this
-% process. Negative \meta{integer} values result in no output, although
-% the function does not terminate expansion until a suitable endpoint
-% is found in the same way as for positive numbers.
+% Expands the following tokens until an \meta{integer} is formed, and
+% leaves a normalized form (no leading sign except for negative
+% numbers, no leading digit~|0| except for zero) in the input stream
+% as category code $12$ (other) characters. The \meta{integer} can
+% consist of any number of signs (with intervening spaces) followed
+% by
+% \begin{itemize}
+% \item an integer variable (in fact, any \TeX{} register except
+% \tn{toks}) or
+% \item \cs{__int_eval:w} \meta{intexpr} \cs{__int_eval_end:} (or
+% another \eTeX{} expression) or
+% \item explicit digits (or by |'|\meta{octal digits} or |"|\meta{hexadecimal digits} or |`|\meta{character}
+% \end{itemize}
+% In this last case expansion stops once a non-digit is found; if that is a space it is removed as in \texttt{f}-expansion.
+% Note that protected functions \emph{are} expanded by this process
% \begin{texnote}
-% This is the \TeX{} primitive \tn{romannumeral} renamed.
+% This is the \TeX{} primitive \tn{number}.
% \end{texnote}
% \end{function}
%
-% \begin{function}[EXP]{\__int_value:w}
+% \begin{function}[EXP]{\__int_to_roman:w}
% \begin{syntax}
-% \cs{__int_value:w} \meta{integer}
-% \cs{__int_value:w} \meta{tokens} \meta{optional space}
+% \cs{__int_to_roman:w} \meta{integer}
+% \cs{__int_to_roman:w} \meta{integer denotation} \meta{optional space}
% \end{syntax}
-% Expands \meta{tokens} until an \meta{integer} is formed. One space may be
-% gobbled in the process.
+% Converts an \meta{integer} to lower case Roman representation. The
+% \meta{integer} is found as in \cs{__int_value:w} by expanding what
+% follows exhaustively. One (optional) space is lost if the
+% \meta{integer} is given by explicit digits. Note that this function
+% produces a string of letters with category code~$12$. Negative
+% \meta{integer} values result in no output, although the function
+% does not terminate expansion until a suitable endpoint is found in
+% the same way as for positive numbers.
% \begin{texnote}
-% This is the \TeX{} primitive \tn{number}.
+% This is the \TeX{} primitive \tn{romannumeral} renamed.
% \end{texnote}
% \end{function}
%
@@ -943,6 +958,16 @@
% \end{texnote}
% \end{function}
%
+% \begin{function}[EXP]{\__int_eval:n}
+% \begin{syntax}
+% \cs{__int_eval:n} \Arg{intexpr}
+% \end{syntax}
+% By default this expands to \cs{__int_eval:w} \meta{intexpr}
+% \cs{__int_eval_end:} but when debugging is enabled this expands to a
+% more complicated construction that evaluates \meta{intexpr} with
+% parentheses and within a brace group to detect early termination.
+% \end{function}
+%
% \begin{function}{\__prg_compare_error:, \__prg_compare_error:Nw}
% \begin{syntax}
% \cs{__prg_compare_error:}
@@ -1017,12 +1042,23 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_eval:n}
+% Only differ from \cs{int_eval:n} by the absence of \cs{@@_value:w},
+% so as to produce an internal integer rather than expanding into
+% characters. This is for use in other modules.
+% \begin{macrocode}
+\__debug_patch_args:nNNpn
+ { { \__debug_chk_expr:nNnN {#1} \@@_eval:w { } \@@_eval:n } }
+\cs_new:Npn \@@_eval:n #1 { \@@_eval:w #1 \@@_eval_end: }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}[EXP]{\int_abs:n}
-% \begin{macro}[aux, EXP]{\@@_abs:N}
+% \begin{macro}[EXP]{\@@_abs:N}
% \UnitTested
% \begin{macro}[EXP]{\int_max:nn}
% \begin{macro}[EXP]{\int_min:nn}
-% \begin{macro}[aux, EXP]{\@@_maxmin:wwN}
+% \begin{macro}[EXP]{\@@_maxmin:wwN}
% \UnitTested
% \UnitTested
% Functions for $\min$, $\max$, and absolute value with only one
@@ -1086,8 +1122,8 @@
% \UnitTested
% \begin{macro}[EXP]{\int_mod:nn}
% \UnitTested
-% \begin{macro}[aux, EXP]{\@@_div_truncate:NwNw}
-% \begin{macro}[aux, EXP]{\@@_mod:ww}
+% \begin{macro}[EXP]{\@@_div_truncate:NwNw}
+% \begin{macro}[EXP]{\@@_mod:ww}
% As \cs{@@_eval:w} rounds the result of a division we also provide a
% version that truncates the result. We use an auxiliary to make sure
% numerator and denominator are only evaluated once: this comes in
@@ -1178,35 +1214,39 @@
% \end{macro}
%
% \begin{macro}{\int_const:Nn, \int_const:cn}
-% \begin{macro}[aux]{\@@_constdef:Nw}
+% \begin{macro}{\@@_constdef:Nw}
% \begin{variable}{\c__max_constdef_int}
% \UnitTested
% As stated, most constants can be defined as \tn{chardef} or
% \tn{mathchardef} but that's engine dependent. As a result, there is some
% set up code to determine what can be done. No full engine testing just yet
% so everything is a little awkward.
+% We cannot use \cs{int_gset:Nn} because (when |check-declarations| is
+% enabled) this runs some checks that constants would fail.
% \begin{macrocode}
-\__debug_patch_args:nNNpn
+\__debug_patch_args:nnnNNpn
+ { \__debug_chk_var_scope:NN c #1 }
+ { }
{ {#1} { \__debug_chk_expr:nNnN {#2} \@@_eval:w { } \int_const:Nn } }
\cs_new_protected:Npn \int_const:Nn #1#2
{
\int_compare:nNnTF {#2} < \c_zero
{
\int_new:N #1
- \int_gset:Nn #1 {#2}
+ \tex_global:D
}
{
\int_compare:nNnTF {#2} > \c__max_constdef_int
{
\int_new:N #1
- \int_gset:Nn #1 {#2}
+ \tex_global:D
}
{
\__chk_if_free_cs:N #1
- \tex_global:D \@@_constdef:Nw #1 =
- \@@_eval:w #2 \@@_eval_end:
+ \tex_global:D \@@_constdef:Nw
}
}
+ #1 = \@@_eval:w #2 \@@_eval_end:
}
\cs_generate_variant:Nn \int_const:Nn { c }
\if_int_odd:w 0
@@ -1233,7 +1273,9 @@
% \UnitTested
% Functions that reset an \meta{integer} register to zero.
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \int_zero:N #1 { #1 = \c_zero }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \int_gzero:N #1 { \tex_global:D #1 = \c_zero }
\cs_generate_variant:Nn \int_zero:N { c }
\cs_generate_variant:Nn \int_gzero:N { c }
@@ -1260,11 +1302,14 @@
% {\int_gset_eq:NN, \int_gset_eq:cN, \int_gset_eq:Nc, \int_gset_eq:cc}
% \UnitTested
% Setting equal means using one integer inside the set function of
-% another.
+% another. Check that assigned integer is local/global. No need to
+% check that the other one is defined as \TeX{} does it for us.
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \int_set_eq:NN #1#2 { #1 = #2 }
\cs_generate_variant:Nn \int_set_eq:NN { c }
\cs_generate_variant:Nn \int_set_eq:NN { Nc , cc }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \int_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
\cs_generate_variant:Nn \int_gset_eq:NN { c }
\cs_generate_variant:Nn \int_gset_eq:NN { Nc , cc }
@@ -1284,6 +1329,22 @@
%
% \subsection{Setting and incrementing integers}
%
+% Several functions here have a signature |:Nn| and are such that when
+% debugging, the first argument should be checked to be a local/global
+% variable and the second should be wrapped in code for an expression.
+% The temporary function \cs{@@_tmp:w} finds the name |#3| of the
+% function being redefined and writes the appropriate patch.
+% \begin{macrocode}
+\cs_set_protected:Npn \@@_tmp:w #1#2#3
+ {
+ \__debug_patch_args:nnnNNpn
+ { #1 ##1 }
+ { }
+ { {##1} { \__debug_chk_expr:nNnN {##2} \@@_eval:w { } #3 } }
+ #2 #3
+ }
+% \end{macrocode}
+%
% \begin{macro}{\int_add:Nn, \int_add:cn}
% \UnitTested
% \begin{macro}{\int_gadd:Nn, \int_gadd:cn}
@@ -1292,20 +1353,23 @@
% \UnitTested
% \begin{macro}{\int_gsub:Nn, \int_gsub:cn}
% \UnitTested
-% Adding and subtracting to and from a counter \ldots
+% Adding and subtracting to and from a counter. For each function,
+% the debugging code produced by \cs{@@_tmp:w} checks that the
+% assigned variable is correctly local/global and wraps the
+% expression in some checking code.
% \begin{macrocode}
-\__debug_patch_args:nNNpn
- { {#1} { \__debug_chk_expr:nNnN {#2} \@@_eval:w { } \int_add:Nn } }
+\@@_tmp:w \__debug_chk_var_local:N
\cs_new_protected:Npn \int_add:Nn #1#2
{ \tex_advance:D #1 by \@@_eval:w #2 \@@_eval_end: }
-\__debug_patch_args:nNNpn
- { {#1} { \__debug_chk_expr:nNnN {#2} \@@_eval:w { } \int_sub:Nn } }
+\@@_tmp:w \__debug_chk_var_local:N
\cs_new_protected:Npn \int_sub:Nn #1#2
{ \tex_advance:D #1 by - \@@_eval:w #2 \@@_eval_end: }
-\cs_new_protected:Npn \int_gadd:Nn
- { \tex_global:D \int_add:Nn }
-\cs_new_protected:Npn \int_gsub:Nn
- { \tex_global:D \int_sub:Nn }
+\@@_tmp:w \__debug_chk_var_global:N
+\cs_new_protected:Npn \int_gadd:Nn #1#2
+ { \tex_global:D \tex_advance:D #1 by \@@_eval:w #2 \@@_eval_end: }
+\@@_tmp:w \__debug_chk_var_global:N
+\cs_new_protected:Npn \int_gsub:Nn #1#2
+ { \tex_global:D \tex_advance:D #1 by - \@@_eval:w #2 \@@_eval_end: }
\cs_generate_variant:Nn \int_add:Nn { c }
\cs_generate_variant:Nn \int_gadd:Nn { c }
\cs_generate_variant:Nn \int_sub:Nn { c }
@@ -1327,14 +1391,18 @@
% Incrementing and decrementing of integer registers is done with
% the following functions.
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \int_incr:N #1
{ \tex_advance:D #1 \c_one }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \int_decr:N #1
{ \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
- { \tex_global:D \int_decr:N }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \int_gincr:N #1
+ { \tex_global:D \tex_advance:D #1 \c_one }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \int_gdecr:N #1
+ { \tex_global:D \tex_advance:D #1 - \c_one }
\cs_generate_variant:Nn \int_incr:N { c }
\cs_generate_variant:Nn \int_decr:N { c }
\cs_generate_variant:Nn \int_gincr:N { c }
@@ -1350,14 +1418,16 @@
% \begin{macro}{\int_gset:Nn, \int_gset:cn}
% \UnitTested
% As integers are register-based \TeX{} issues an error
-% if they are not defined. Thus there is no need for the checking
-% code seen with token list variables.
+% if they are not defined. Thus there is no need to check their
+% existence as for token list variables. However, the code that
+% checks whether the assignment is local or global is still needed.
% \begin{macrocode}
-\__debug_patch_args:nNNpn
- { {#1} { \__debug_chk_expr:nNnN {#2} \@@_eval:w { } \int_set:Nn } }
+\@@_tmp:w \__debug_chk_var_local:N
\cs_new_protected:Npn \int_set:Nn #1#2
{ #1 ~ \@@_eval:w #2 \@@_eval_end: }
-\cs_new_protected:Npn \int_gset:Nn { \tex_global:D \int_set:Nn }
+\@@_tmp:w \__debug_chk_var_global:N
+\cs_new_protected:Npn \int_gset:Nn #1#2
+ { \tex_global:D #1 ~ \@@_eval:w #2 \@@_eval_end: }
\cs_generate_variant:Nn \int_set:Nn { c }
\cs_generate_variant:Nn \int_gset:Nn { c }
% \end{macrocode}
@@ -1381,7 +1451,7 @@
%
% \subsection{Integer expression conditionals}
%
-% \begin{macro}[int, EXP]{\__prg_compare_error:, \__prg_compare_error:Nw}
+% \begin{macro}[EXP]{\__prg_compare_error:, \__prg_compare_error:Nw}
% Those functions are used for comparison tests which use a simple
% syntax where only one set of braces is required and additional
% operators such as |!=| and |>=| are supported. The tests first
@@ -1414,9 +1484,9 @@
% \end{macro}
%
% \begin{macro}[pTF, EXP]{\int_compare:n}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {\@@_compare:w, \@@_compare:Nw, \@@_compare:NNw, \@@_compare:nnN}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_compare_end_=:NNw,
% \@@_compare_=:NNw,
@@ -1577,8 +1647,8 @@
% \end{macro}
%
% \begin{macro}[EXP, noTF]{\int_case:nn}
-% \begin{macro}[aux]{\@@_case:nnTF}
-% \begin{macro}[aux]{\@@_case:nw, \@@_case_end:nw}
+% \begin{macro}{\@@_case:nnTF}
+% \begin{macro}{\@@_case:nw, \@@_case_end:nw}
% For integer cases, the first task to fully expand the check
% condition. The over all idea is then much the same as for
% \cs{str_case:nn(TF)} as described in \pkg{l3basics}.
@@ -1742,7 +1812,7 @@
% \subsection{Integer step functions}
%
% \begin{macro}{\int_step_function:nnnN}
-% \begin{macro}[aux]{\@@_step:wwwN, \@@_step:NnnnN}
+% \begin{macro}{\@@_step:wwwN, \@@_step:NnnnN}
% Before all else, evaluate the initial value, step, and final value.
% Repeating a function by steps first needs a check on the direction
% of the steps. After that, do the function for the start value then
@@ -1793,7 +1863,7 @@
% \begin{macro}{\int_step_inline:nnnn}
% \begin{macro}{\int_step_variable:nnnNn}
% \UnitTested
-% \begin{macro}[aux]{\@@_step:NNnnnn}
+% \begin{macro}{\@@_step:NNnnnn}
% The approach here is to build a function, with a global integer
% required to make the nesting safe (as seen in other in line
% functions), and map that function using \cs{int_step_function:nnnN}.
@@ -1845,7 +1915,7 @@
%
% \begin{macro}{\int_to_symbols:nnn}
% \UnitTested
-% \begin{macro}[aux]{\@@_to_symbols:nnnn}
+% \begin{macro}{\@@_to_symbols:nnnn}
% For conversion of integers to arbitrary symbols the method is in
% general as follows. The input number (|#1|) is compared to the total
% number of symbols available at each place (|#2|). If the input is larger
@@ -1954,9 +2024,9 @@
%
% \begin{macro}{\int_to_base:nn, \int_to_Base:nn}
% \UnitTested
-% \begin{macro}[aux]{\@@_to_base:nn, \@@_to_Base:nn,
+% \begin{macro}{\@@_to_base:nn, \@@_to_Base:nn,
% \@@_to_base:nnN, \@@_to_Base:nnN, \@@_to_base:nnnN, \@@_to_Base:nnnN}
-% \begin{macro}[aux]{\@@_to_letter:n, \@@_to_Letter:n}
+% \begin{macro}{\@@_to_letter:n, \@@_to_Letter:n}
% \UnitTested
% Converting from base ten (|#1|) to a second base (|#2|) starts with
% computing |#1|: if it is a complicated calculation, we shouldn't
@@ -2129,8 +2199,8 @@
%
% \begin{macro}{\int_to_roman:n, \int_to_Roman:n}
% \UnitTested
-% \begin{macro}[aux]{\@@_to_roman:N, \@@_to_roman:N}
-% \begin{macro}[aux]
+% \begin{macro}{\@@_to_roman:N, \@@_to_roman:N}
+% \begin{macro}
% {
% \@@_to_roman_i:w, \@@_to_roman_v:w, \@@_to_roman_x:w,
% \@@_to_roman_l:w, \@@_to_roman_c:w, \@@_to_roman_d:w,
@@ -2189,7 +2259,7 @@
%
% \subsection{Converting from other formats to integers}
%
-% \begin{macro}[aux,rEXP]{\@@_pass_signs:wn, \@@_pass_signs_end:wn}
+% \begin{macro}[rEXP]{\@@_pass_signs:wn, \@@_pass_signs_end:wn}
% Called as \cs{@@_pass_signs:wn} \meta{signs and digits} \cs{q_stop}
% \Arg{code}, this function leaves in the input stream any sign it
% finds, then inserts the \meta{code} before the first non-sign token
@@ -2212,7 +2282,7 @@
%
% \begin{macro}{\int_from_alph:n}
% \UnitTested
-% \begin{macro}[aux]{\@@_from_alph:nN, \@@_from_alph:N}
+% \begin{macro}{\@@_from_alph:nN, \@@_from_alph:N}
% First take care of signs then loop through the input using the
% \texttt{recursion} quarks. The \cs{@@_from_alph:nN} auxiliary
% collects in its first argument the value obtained so far, and the
@@ -2242,7 +2312,7 @@
%
% \begin{macro}{\int_from_base:nn}
% \UnitTested
-% \begin{macro}[aux]{\@@_from_base:nnN, \@@_from_base:N}
+% \begin{macro}{\@@_from_base:nnN, \@@_from_base:N}
% Leave the signs into the integer expression, then loop through
% characters, collecting the value found so far in the first argument
% of \cs{@@_from_base:nnN}. To convert a single character,
@@ -2323,8 +2393,8 @@
% \begin{macro}{\int_from_roman:n}
% \UnitTested
% \TestMissing{boundary cases / wrong input?}
-% \begin{macro}[aux]{\@@_from_roman:NN}
-% \begin{macro}[aux]{\@@_from_roman_error:w}
+% \begin{macro}{\@@_from_roman:NN}
+% \begin{macro}{\@@_from_roman_error:w}
% The method here is to iterate through the input, finding the
% appropriate value for each letter and building up a sum. This is
% then evaluated by \TeX{}. If any unknown letter is found, skip to
@@ -2376,7 +2446,7 @@
%
% \begin{macro}{\int_show:N, \int_show:c}
% \UnitTested
-% \begin{macro}[aux]{\@@_show:nN}
+% \begin{macro}{\@@_show:nN}
% Diagnostics.
% \begin{macrocode}
\cs_new_eq:NN \int_show:N \__kernel_register_show:N
@@ -2391,7 +2461,7 @@
% expressions: this gives a more unified output.
% \begin{macrocode}
\cs_new_protected:Npn \int_show:n
- { \__msg_show_wrap:Nn \int_eval:n }
+ { \msg_show_eval:Nn \int_eval:n }
% \end{macrocode}
% \end{macro}
%
@@ -2404,10 +2474,10 @@
% \end{macro}
%
% \begin{macro}{\int_log:n}
-% Redirect output of \cs{int_show:n} to the log.
+% Similar to \cs{int_show:n}.
% \begin{macrocode}
\cs_new_protected:Npn \int_log:n
- { \__msg_log_next: \int_show:n }
+ { \msg_log_eval:Nn \int_eval:n }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
index ffb9ff10ed4..3441f7ab0d7 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -133,7 +133,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int]{\@@_new:Nn}
+% \begin{macro}{\@@_new:Nn}
% Declare |#1| to be a font (arbitrarily |cmr10| at a never-used
% size). Store the array's size as the \tn{hyphenchar} of that font
% and make sure enough \tn{fontdimen} are allocated, by setting the
@@ -156,7 +156,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_count:N}
+% \begin{macro}[EXP]{\@@_count:N}
% Size of an array.
% \begin{macrocode}
\cs_new:Npn \@@_count:N #1 { \tex_the:D \tex_hyphenchar:D #1 }
@@ -165,8 +165,8 @@
%
% \subsection{Array items}
%
-% \begin{macro}[int]{\@@_gset:Nnn, \@@_gset_fast:Nnn}
-% \begin{macro}[aux]{\@@_gset_aux:Nnn}
+% \begin{macro}{\@@_gset:Nnn, \@@_gset_fast:Nnn}
+% \begin{macro}{\@@_gset_aux:Nnn}
% Set the appropriate \tn{fontdimen}. The slow version checks the
% position and value are within bounds.
% \begin{macrocode}
@@ -201,7 +201,7 @@
% \end{macro}
%
% \begin{macro}[EXP]{\@@_item:Nn, \@@_item_fast:Nn}
-% \begin{macro}[aux]{\@@_item_aux:Nn}
+% \begin{macro}{\@@_item_aux:Nn}
% Get the appropriate \tn{fontdimen} and perform bound checks if requested.
% \begin{macrocode}
\cs_new:Npn \@@_item_fast:Nn #1#2
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
index aee66866591..c6d11150a4d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -935,8 +935,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_sanitise_equals:, \@@_sanitise_comma:}
-% \begin{macro}[aux]
+% \begin{macro}{\@@_sanitise_equals:, \@@_sanitise_comma:}
+% \begin{macro}
% {
% \@@_sanitise_equals_auxi:w, \@@_sanitise_equals_auxii:w,
% \@@_sanitise_comma_auxi:w, \@@_sanitise_comma_auxii:w,
@@ -1007,7 +1007,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_loop:NNw}
+% \begin{macro}{\@@_loop:NNw}
% A fast test for the end of the loop, remembering to remove the leading
% quark first. Assuming that is not the case, look for a key and value then
% loop around, re-inserting a leading quark in front of the next position.
@@ -1025,9 +1025,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_split:NNw, \@@_split_value:NNw}
-% \begin{macro}[aux]{\@@_split_tidy:w}
-% \begin{macro}[aux]{\@@_action:}
+% \begin{macro}{\@@_split:NNw, \@@_split_value:NNw}
+% \begin{macro}{\@@_split_tidy:w}
+% \begin{macro}{\@@_action:}
% The value is picked up separately from the key so there can be another
% quark inserted at the front, keeping braces and allowing both parts to
% share the same code paths. The key is found first then there's a check
@@ -1085,9 +1085,9 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_def:Nn}
-% \begin{macro}[aux, EXP]{\@@_def_aux:n}
-% \begin{macro}[aux, EXP]{\@@_def_aux:w}
+% \begin{macro}{\@@_def:Nn}
+% \begin{macro}[EXP]{\@@_def_aux:n}
+% \begin{macro}[EXP]{\@@_def_aux:w}
% First trim spaces off, then potentially remove a set of braces. By using
% the internal interface |\__tl_trim_spaces:nn| we can take advantage of the
% fact it needs a leading |\q_mark| in this process. The |\exp_after:wN|
@@ -1250,7 +1250,7 @@
% \subsection{The key defining mechanism}
%
% \begin{macro}{\keys_define:nn}
-% \begin{macro}[aux]{\@@_define:nnn, \@@_define:onn}
+% \begin{macro}{\@@_define:nnn, \@@_define:onn}
% The public function for definitions is just a wrapper for the lower
% level mechanism, more or less. The outer function is designed to
% keep a track of the current module, to allow safe nesting. The module is set
@@ -1269,9 +1269,9 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_define:n}
-% \begin{macro}[int]{\@@_define:nn}
-% \begin{macro}[aux]{\@@_define_aux:nn}
+% \begin{macro}{\@@_define:n}
+% \begin{macro}{\@@_define:nn}
+% \begin{macro}{\@@_define_aux:nn}
% The outer functions here record whether a value was given and then
% converge on a common internal mechanism. There is first a search for
% a property in the current key name, then a check to make sure it is
@@ -1305,8 +1305,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_property_find:n}
-% \begin{macro}[aux]{\@@_property_find:w}
+% \begin{macro}{\@@_property_find:n}
+% \begin{macro}{\@@_property_find:w}
% Searching for a property means finding the last |.| in the input,
% and storing the text before and after it. Everything is turned into
% strings, so there is no problem using an \texttt{x}-type expansion.
@@ -1356,8 +1356,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_define_code:n}
-% \begin{macro}[aux, EXP]{\@@_define_code:w}
+% \begin{macro}{\@@_define_code:n}
+% \begin{macro}[EXP]{\@@_define_code:w}
% Two possible cases. If there is a value for the key, then just use
% the function. If not, then a check to make sure there is no need for
% a value with the property. If there should be one then complain,
@@ -1391,7 +1391,7 @@
%
% \subsection{Turning properties into actions}
%
-% \begin{macro}[int]{\@@_bool_set:Nn, \@@_bool_set:cn}
+% \begin{macro}{\@@_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
% global.
@@ -1415,7 +1415,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_bool_set_inverse:Nn, \@@_bool_set_inverse:cn}
+% \begin{macro}{\@@_bool_set_inverse:Nn, \@@_bool_set_inverse:cn}
% Inverse boolean setting is much the same.
% \begin{macrocode}
\cs_new_protected:Npn \@@_bool_set_inverse:Nn #1#2
@@ -1437,9 +1437,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_choice_make:, \@@_multichoice_make:}
-% \begin{macro}[aux]{\@@_choice_make:N}
-% \begin{macro}[aux]{\@@_choice_make_aux:N}
+% \begin{macro}{\@@_choice_make:, \@@_multichoice_make:}
+% \begin{macro}{\@@_choice_make:N}
+% \begin{macro}{\@@_choice_make_aux:N}
% To make a choice from a key, two steps: set the code, and set the
% unknown key. As multichoices and choices are essentially the same bar one
% function, the code is given together.
@@ -1479,8 +1479,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_choices_make:nn, \@@_multichoices_make:nn}
-% \begin{macro}[aux]{\@@_choices_make:Nnn}
+% \begin{macro}{\@@_choices_make:nn, \@@_multichoices_make:nn}
+% \begin{macro}{\@@_choices_make:Nnn}
% Auto-generating choices means setting up the root key as a choice, then
% defining each choice in turn.
% \begin{macrocode}
@@ -1508,7 +1508,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {\@@_cmd_set:nn, \@@_cmd_set:nx, \@@_cmd_set:Vn, \@@_cmd_set:Vo}
% Setting the code for a key first logs if appropriate that we are
% defining a new key, then saves the code.
@@ -1525,7 +1525,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_default_set:n}
+% \begin{macro}{\@@_default_set:n}
% Setting a default value is easy. These are stored using \cs{cs_set:cpx} as this
% avoids any worries about whether a token list exists.
% \begin{macrocode}
@@ -1546,7 +1546,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_groups_set:n}
+% \begin{macro}{\@@_groups_set:n}
% 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
@@ -1569,7 +1569,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_inherit:n}
+% \begin{macro}{\@@_inherit:n}
% Inheritance means ignoring anything already said about the key:
% zap the lot and set up.
% \begin{macrocode}
@@ -1581,7 +1581,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_initialise:n}
+% \begin{macro}{\@@_initialise:n}
% A set up for initialisation: just run the code if it exists.
% \begin{macrocode}
\cs_new_protected:Npn \@@_initialise:n #1
@@ -1591,8 +1591,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_meta_make:n}
-% \begin{macro}[int]{\@@_meta_make:nn}
+% \begin{macro}{\@@_meta_make:n}
+% \begin{macro}{\@@_meta_make:nn}
% To create a meta-key, simply set up to pass data through.
% \begin{macrocode}
\cs_new_protected:Npn \@@_meta_make:n #1
@@ -1609,7 +1609,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_undefine:}
+% \begin{macro}{\@@_undefine:}
% Undefining a key has to be done without \cs{cs_undefine:c} as that
% function acts globally.
% \begin{macrocode}
@@ -1626,9 +1626,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_value_requirement:nn}
-% \begin{macro}[aux]{\@@_validate_forbidden:, \@@_validate_required:}
-% \begin{macro}[aux]{\@@_validate_cleanup:w}
+% \begin{macro}{\@@_value_requirement:nn}
+% \begin{macro}{\@@_validate_forbidden:, \@@_validate_required:}
+% \begin{macro}{\@@_validate_cleanup:w}
% Validating key input is done using a second function which runs before
% the main key code. Setting that up means setting it equal to a generic
% stub which does the check. This approach makes the lookup very fast at
@@ -1686,7 +1686,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_variable_set:NnnN, \@@_variable_set:cnnN}
+% \begin{macro}{\@@_variable_set:NnnN, \@@_variable_set:cnnN}
% Setting a variable takes the type and scope separately so that
% it is easy to make a new variable if needed.
% \begin{macrocode}
@@ -1996,7 +1996,7 @@
% \subsection{Setting keys}
%
% \begin{macro}{\keys_set:nn, \keys_set:nV, \keys_set:nv, \keys_set:no}
-% \begin{macro}[aux]{\@@_set:nnn, \@@_set:onn}
+% \begin{macro}{\@@_set:nnn, \@@_set:onn}
% A simple wrapper again.
% \begin{macrocode}
\cs_new_protected:Npn \keys_set:nn
@@ -2018,13 +2018,13 @@
% \keys_set_known:nnN, \keys_set_known:nVN,
% \keys_set_known:nvN, \keys_set_known:noN
% }
-% \begin{macro}[aux]{\@@_set_known:nnnN, \@@_set_known:onnN}
+% \begin{macro}{\@@_set_known:nnnN, \@@_set_known:onnN}
% \begin{macro}
% {
% \keys_set_known:nn, \keys_set_known:nV,
% \keys_set_known:nv, \keys_set_known:no
% }
-% \begin{macro}[aux]{\@@_keys_set_known:nn}
+% \begin{macro}{\@@_keys_set_known:nn}
% Setting known keys simply means setting the appropriate flag, then
% running the standard code. To allow for nested setting, any existing
% value of \cs{l_@@_unused_clist} is saved on the stack and reset
@@ -2067,22 +2067,22 @@
% \keys_set_filter:nnnN, \keys_set_filter:nnVN, \keys_set_filter:nnvN,
% \keys_set_filter:nnoN
% }
-% \begin{macro}[aux]{\@@_set_filter:nnnnN, \@@_set_filter:onnnN}
+% \begin{macro}{\@@_set_filter:nnnnN, \@@_set_filter:onnnN}
% \begin{macro}
% {
% \keys_set_filter:nnn, \keys_set_filter:nnV, \keys_set_filter:nnv,
% \keys_set_filter:nno
% }
-% \begin{macro}[aux]{\@@_set_filter:nnn}
+% \begin{macro}{\@@_set_filter:nnn}
% \begin{macro}
% {
% \keys_set_groups:nnn, \keys_set_groups:nnV, \keys_set_groups:nnv,
% \keys_set_groups:nno
% }
-% \begin{macro}[aux]{\@@_set_groups:nnn}
-% \begin{macro}[aux]{\@@_set_selective:nnn}
-% \begin{macro}[aux]{\@@_set_selective:nnnn, \@@_set_selective:onnn}
-% \begin{macro}[aux]{\@@_set_selective:nn}
+% \begin{macro}{\@@_set_groups:nnn}
+% \begin{macro}{\@@_set_selective:nnn}
+% \begin{macro}{\@@_set_selective:nnnn, \@@_set_selective:onnn}
+% \begin{macro}{\@@_set_selective:nn}
% The idea of setting keys in a selective manner again uses flags
% wrapped around the basic code. The comments on \cs{keys_set_known:nnN}
% also apply here. We have a bit more shuffling to do to keep everything
@@ -2156,10 +2156,10 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_set:n, \@@_set:nn}
-% \begin{macro}[aux]{\@@_set_aux:nnn, \@@_set_aux:onn}
-% \begin{macro}[aux]{\@@_find_key_module:w}
-% \begin{macro}[aux]{\@@_set_aux:, \@@_set_selective:}
+% \begin{macro}{\@@_set:n, \@@_set:nn}
+% \begin{macro}{\@@_set_aux:nnn, \@@_set_aux:onn}
+% \begin{macro}{\@@_find_key_module:w}
+% \begin{macro}{\@@_set_aux:, \@@_set_selective:}
% A shared system once again. First, set the current path and add a
% default if needed. There are then checks to see if the a value is
% required or forbidden. If everything passes, move on to execute the
@@ -2270,7 +2270,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_value_or_default:n}
+% \begin{macro}{\@@_value_or_default:n}
% If a value is given, return it as |#1|, otherwise send a default if
% available.
% \begin{macrocode}
@@ -2291,9 +2291,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_execute:, \@@_execute_unknown:}
-% \begin{macro}[aux, EXP]{\@@_execute:nn}
-% \begin{macro}[aux]{\@@_store_unused:}
+% \begin{macro}{\@@_execute:, \@@_execute_unknown:}
+% \begin{macro}[EXP]{\@@_execute:nn}
+% \begin{macro}{\@@_store_unused:}
% Actually executing a key is done in two parts. First, look for the
% key itself, then look for the \texttt{unknown} key with the same
% path. If both of these fail, complain. What exactly happens if a key
@@ -2367,8 +2367,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_choice_find:n}
-% \begin{macro}[int, EXP]{\@@_multichoice_find:n}
+% \begin{macro}[EXP]{\@@_choice_find:n}
+% \begin{macro}[EXP]{\@@_multichoice_find:n}
% Executing a choice has two parts. First, try the choice given, then
% if that fails call the unknown key. That always exists, as it is created
% when a choice is first made. So there is no need for any escape code.
@@ -2387,8 +2387,8 @@
%
% \subsection{Utilities}
%
-% \begin{macro}[EXP, int]{\@@_parent:n, \@@_parent:o}
-% \begin{macro}[EXP, aux]{\@@_parent:w}
+% \begin{macro}[EXP]{\@@_parent:n, \@@_parent:o}
+% \begin{macro}[EXP]{\@@_parent:w}
% Used to strip off the ending part of the key path after the last~|/|.
% \begin{macrocode}
\cs_new:Npn \@@_parent:n #1
@@ -2406,7 +2406,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP, int]{\@@_remove_spaces:n}
+% \begin{macro}[EXP]{\@@_remove_spaces:n}
% Used in a few places so worth handling as a dedicated function.
% \begin{macrocode}
\cs_new:Npn \@@_remove_spaces:n #1
@@ -2441,52 +2441,31 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\keys_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
-% about the key, call an intermediate auxiliary which constructs the
-% code to be displayed to the terminal, and finally conclude
-% with \cs{__msg_show_wrap:n}.
+% \begin{macro}{\keys_show:nn, \keys_log:nn, \@@_show:Nnn}
+% To show a key, show its code using a message.
% \begin{macrocode}
-\cs_new_protected:Npn \keys_show:nn #1#2
- {
- \keys_if_exist:nnTF {#1} {#2}
- {
- \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-key }
- { \@@_remove_spaces:n { #1 / #2 } } { t } { } { }
- \exp_args:Nc \@@_show:N
- { \c_@@_code_root_tl \@@_remove_spaces:n { #1 / #2 } }
- }
- {
- \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-key }
- { \@@_remove_spaces:n { #1 / #2 } } { f } { } { }
- \__msg_show_wrap:n { }
- }
- }
-\cs_new_protected:Npn \@@_show:N #1
+\cs_new_protected:Npn \keys_show:nn
+ { \@@_show:Nnn \msg_show:nnxxxx }
+\cs_new_protected:Npn \keys_log:nn
+ { \@@_show:Nnn \msg_log:nnxxxx }
+\cs_new_protected:Npn \@@_show:Nnn #1#2#3
{
- \use:x
+ #1 { LaTeX / kernel } { show-key }
+ { \@@_remove_spaces:n { #2 / #3 } }
{
- \__msg_show_wrap:n
+ \keys_if_exist:nnT {#2} {#3}
{
- \exp_not:N \__msg_show_item_unbraced:nn { code }
- { \token_get_replacement_spec:N #1 }
+ \exp_args:Nnf \msg_show_item_unbraced:nn { code }
+ {
+ \exp_args:Nc \token_get_replacement_spec:N
+ { \c_@@_code_root_tl \@@_remove_spaces:n { #2 / #3 } }
+ }
}
}
+ { } { }
}
% \end{macrocode}
% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\keys_log:nn}
-% Redirect output of \cs{keys_show:nn} to the log.
-% \begin{macrocode}
-\cs_new_protected:Npn \keys_log:nn
- { \__msg_log_next: \keys_show:nn }
-% \end{macrocode}
-% \end{macro}
%
% \subsection{Messages}
%
@@ -2557,9 +2536,9 @@
\__msg_kernel_new:nnn { kernel } { show-key }
{
The~key~#1~
- \str_if_eq:nnTF {#2} { t }
- { has~the~properties: }
+ \tl_if_empty:nTF {#2}
{ is~undefined. }
+ { has~the~properties: #2 . }
}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
index 2da757dfc0b..581b8e8469b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -253,7 +253,7 @@
% Most of the emulation of \pdfTeX{} here is based heavily on Heiko Oberdiek's
% \pkg{pdftexcmds} package.
%
-% \begin{macro}[int]{l3kernel}
+% \begin{macro}{l3kernel}
% Create a table for the kernel's own use.
% \begin{macrocode}
l3kernel = l3kernel or { }
@@ -292,7 +292,7 @@ local write = tex.write
local utf8_char = unicode.utf8.char
% \end{macrocode}
%
-% \begin{macro}[aux]{escapehex}
+% \begin{macro}{escapehex}
% An internal auxiliary to convert a string to the matching hex escape.
% This works on a byte basis: extension to handled UTF-8 input is
% covered in \pkg{pdftexcmds} but is not currently required here.
@@ -304,7 +304,7 @@ end
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{l3kernel.charcat}
+% \begin{macro}{l3kernel.charcat}
% Creating arbitrary chars needs a category code table. As set up here,
% one may have been assigned earlier (see \pkg{l3bootstrap}) or a hard-coded
% one is used. The latter is intended for format mode and should be adjusted
@@ -319,7 +319,7 @@ l3kernel.charcat = charcat
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{l3kernel.filemdfivesum}
+% \begin{macro}{l3kernel.filemdfivesum}
% Read an entire file and hash it: the hash function itself is a built-in.
% As Lua is byte-based there is no work needed here in terms of UTF-8
% (see \pkg{pdftexcmds} and how it handles strings that have passed through
@@ -341,7 +341,7 @@ l3kernel.filemdfivesum = filemdfivesum
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{l3kernel.filemoddate}
+% \begin{macro}{l3kernel.filemoddate}
% See procedure \texttt{makepdftime} in \texttt{utils.c} of
% \pdfTeX{}.
% \begin{macrocode}
@@ -393,7 +393,7 @@ l3kernel.filemoddate = filemoddate
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{l3kernel.filesize}
+% \begin{macro}{l3kernel.filesize}
% A simple disk lookup.
% \begin{macrocode}
local function filesize(name)
@@ -409,7 +409,7 @@ l3kernel.filesize = filesize
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{l3kernel.strcmp}
+% \begin{macro}{l3kernel.strcmp}
% String comparison which gives the same results as \pdfTeX{}'s
% \tn{pdfstrcmp}, although the ordering should likely not be relied upon!
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index 073980e325f..b3810e18fff 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -683,89 +683,6 @@
%
% \section{Internal \pkg{l3msg} functions}
%
-% The following functions are used in several kernel modules.
-%
-% \begin{function}[added = 2015-08-05]{\__msg_log_next:}
-% \begin{syntax}
-% \cs{__msg_log_next:} \meta{show-command}
-% \end{syntax}
-% Causes the next \meta{show-command} to send its output to the log
-% file instead of the terminal. This allows for instance
-% \cs{cs_log:N} to be defined as \cs{__msg_log_next:} \cs{cs_show:N}.
-% The effect of this command lasts until the next use of
-% \cs{__msg_show_wrap:Nn} or \cs{__msg_show_wrap:n} or
-% \cs{__msg_show_variable:NNNnn}, in other words until the next time
-% the \eTeX{} primitive \tn{showtokens} would have been used for
-% showing to the terminal or until the next
-% \texttt{variable-not-defined} error.
-% \end{function}
-%
-% \begin{function}[added = 2015-08-05]
-% {
-% \__msg_show_pre:nnnnnn,
-% \__msg_show_pre:nnxxxx,
-% \__msg_show_pre:nnnnnV
-% }
-% \begin{syntax}
-% \cs{__msg_show_pre:nnnnnn} \Arg{module} \Arg{message} \Arg{arg one} \Arg{arg two} \Arg{arg three} \Arg{arg four}
-% \end{syntax}
-% Prints the \meta{message} from \meta{module} in the terminal (or
-% log file if \cs{__msg_log_next:} was issued) without formatting.
-% Used in messages which print complex variable contents completely.
-% \end{function}
-%
-% \begin{function}[added = 2015-08-04]{\__msg_show_variable:NNNnn}
-% \begin{syntax}
-% \cs{__msg_show_variable:NNNnn} \meta{variable} \meta{if-exist} \meta{if-empty} \Arg{msg} \Arg{formatted content}
-% \end{syntax}
-% If the \meta{variable} does not exist according to \meta{if-exist}
-% (typically \cs{cs_if_exist:NTF}) then throw an error and do nothing
-% more. Otherwise, if \meta{msg} is not empty, display the message
-% |LaTeX/kernel/show-|\meta{msg} with \cs{token_to_str:N}
-% \meta{variable} as a first argument, and a second argument that is
-% |?| or empty depending on the result of \meta{if-empty} (typically
-% \cs{tl_if_empty:NTF}) on the \meta{variable}. Then display the
-% \meta{formatted content} by giving it as an argument to
-% \cs{__msg_show_wrap:n}.
-% \end{function}
-%
-% \begin{function}[added = 2015-08-03, updated = 2015-08-07]{\__msg_show_wrap:Nn}
-% \begin{syntax}
-% \cs{__msg_show_wrap:Nn} \meta{function} \Arg{expression}
-% \end{syntax}
-% Shows or logs the \meta{expression} (turned into a string), an
-% equal sign, and the result of applying the \meta{function} to the
-% \Arg{expression}. For instance, if the \meta{function} is
-% \cs{int_eval:n} and the \meta{expression} is |1+2| then this
-% logs |> 1+2=3.| The case where the \meta{function} is
-% \cs{tl_to_str:n} is special: then the string representation of the
-% \meta{expression} is only logged once.
-% \end{function}
-%
-% \begin{function}[added = 2015-08-03]{\__msg_show_wrap:n}
-% \begin{syntax}
-% \cs{__msg_show_wrap:n} \Arg{formatted text}
-% \end{syntax}
-% Shows or logs the \meta{formatted text}. After expansion,
-% unless it is empty, the \meta{formatted text} must contain |>|,
-% and the part of \meta{formatted text} before the first |>| is
-% removed. Failure to do so causes low-level \TeX{} errors.
-% \end{function}
-%
-% \begin{function}[updated = 2012-09-09]
-% {\__msg_show_item:n, \__msg_show_item:nn, \__msg_show_item_unbraced:nn}
-% \begin{syntax}
-% \cs{__msg_show_item:n} \Arg{item}
-% \cs{__msg_show_item:nn} \Arg{item-key} \Arg{item-value}
-% \end{syntax}
-% Auxiliary functions used within the last argument of
-% \cs{__msg_show_variable:NNNnn} or \cs{__msg_show_wrap:n}
-% to format variable items correctly for
-% display. The \cs{__msg_show_item:n} version is used for simple lists,
-% the \cs{__msg_show_item:nn} and \cs{__msg_show_item_unbraced:nn} versions
-% for key--value like data structures.
-% \end{function}
-%
% \begin{variable}{\c__msg_coding_error_text_tl}
% The text
% \begin{verbatim}
@@ -829,7 +746,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\__chk_if_free_msg:nn}
+% \begin{macro}{\__chk_if_free_msg:nn}
% This auxiliary is similar to \cs{__chk_if_free_cs:N}, and is used when
% defining messages with \cs{msg_new:nnnn}.
% \begin{macrocode}
@@ -972,8 +889,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_interrupt_wrap:nn}
-% \begin{macro}[aux]{\@@_interrupt_more_text:n}
+% \begin{macro}{\@@_interrupt_wrap:nn}
+% \begin{macro}{\@@_interrupt_more_text:n}
% First setup \TeX{}'s \tn{errhelp} register with the extra help |#1|,
% then build a nice-looking error message with |#2|. Everything is
% done using \texttt{x}-type expansion as the new line markers are
@@ -999,7 +916,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_interrupt_text:n}
+% \begin{macro}{\@@_interrupt_text:n}
% The business end of the process starts by producing some visual
% separation of the message from the main part of the log. The error
% message needs to be printed with everything made
@@ -1264,7 +1181,7 @@
% \msg_error:nnxx ,
% \msg_error:nnx
% }
-% \begin{macro}[aux]{\@@_error:cnnnnn, \@@_no_more_text:nnnn}
+% \begin{macro}{\@@_error:cnnnnn, \@@_no_more_text:nnnn}
% For an error, the interrupt routine is called. We check if there is
% a \enquote{more text} by comparing that control sequence with a
% permanently empty text.
@@ -1386,12 +1303,74 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}
+% {
+% \msg_show:nnnnnn ,
+% \msg_show:nnnnn ,
+% \msg_show:nnnn ,
+% \msg_show:nnn ,
+% \msg_show:nn ,
+% \msg_show:nnxxxx ,
+% \msg_show:nnxxx ,
+% \msg_show:nnxx ,
+% \msg_show:nnx
+% }
+% \begin{macro}[aux]{\@@_show:n, \@@_show:w, \@@_show_dot:w, \@@_show:nn}
+% The \texttt{show} message type is used for \cs{seq_show:N} and
+% similar complicated data structures. Wrap the given text with a
+% trailing dot (important later) then pass it to \cs{@@_show:n}. If
+% there is |\\>~| (or if the whole thing starts with |>~|) we split
+% there, print the first part and show the second part using
+% \tn{showtokens} (the \cs{exp_after:wN} ensure a nice display). Note
+% that that primitive adds a leading |>~| and trailing dot. That is
+% why we included a trailing dot before wrapping and removed it
+% afterwards. If there is no |\\>~| do the same but with an empty
+% second part which adds a spurious but inevitable |>~.|
+% \begin{macrocode}
+ \@@_class_new:nn { show }
+ {
+ \iow_wrap:nnnN
+ { \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6} }
+ { } { } \@@_show:n
+ }
+ \cs_new_protected:Npn \@@_show:n #1
+ {
+ \tl_if_in:nnTF { ^^J #1 } { ^^J > ~ }
+ {
+ \tl_if_in:nnTF { #1 \q_mark } { . \q_mark }
+ { \@@_show_dot:w } { \@@_show:w }
+ ^^J #1 \q_stop
+ }
+ { \@@_show:nn { ? #1 } { } }
+ }
+ \cs_new:Npn \@@_show_dot:w #1 ^^J > ~ #2 . \q_stop
+ { \@@_show:nn {#1} {#2} }
+ \cs_new:Npn \@@_show:w #1 ^^J > ~ #2 \q_stop
+ { \@@_show:nn {#1} {#2} }
+ \cs_new_protected:Npn \@@_show:nn #1#2
+ {
+ \tl_if_empty:nF {#1}
+ { \exp_args:No \iow_term:n { \use_none:n #1 } }
+ \tl_set:Nn \l_@@_internal_tl {#2}
+ \__iow_with:Nnn \tex_newlinechar:D { 10 }
+ {
+ \__iow_with:Nnn \tex_errorcontextlines:D { -1 }
+ {
+ \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN
+ { \exp_after:wN \l_@@_internal_tl }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% End the group to eliminate \cs{@@_class_new:nn}.
% \begin{macrocode}
\group_end:
% \end{macrocode}
%
-% \begin{macro}[aux]{\@@_class_chk_exist:nT}
+% \begin{macro}{\@@_class_chk_exist:nT}
% Checking that a message class exists. We build this from
% \cs{cs_if_free:cTF} rather than \cs{cs_if_exist:cTF} because that
% avoids reading the second argument earlier than necessary.
@@ -1434,8 +1413,8 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int]{\@@_use:nnnnnnn}
-% \begin{macro}[aux]
+% \begin{macro}{\@@_use:nnnnnnn}
+% \begin{macro}
% {
% \@@_use_redirect_name:n , \@@_use_hierarchy:nwwN ,
% \@@_use_redirect_module:n, \@@_use_code:
@@ -1557,8 +1536,8 @@
% \end{macro}
%
% \begin{macro}{\msg_redirect_class:nn, \msg_redirect_module:nnn}
-% \begin{macro}[aux]{\@@_redirect:nnn, \@@_redirect_loop_chk:nnn}
-% \begin{macro}[aux]{\@@_redirect_loop_list:n}
+% \begin{macro}{\@@_redirect:nnn, \@@_redirect_loop_chk:nnn}
+% \begin{macro}{\@@_redirect_loop_list:n}
% If the target class is empty, eliminate the corresponding
% redirection. Otherwise, add the redirection. We must then check
% for a loop: as an initialization, we start by storing the initial
@@ -1655,8 +1634,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_kernel_class_new:nN}
-% \begin{macro}[aux]{\@@_kernel_class_new_aux:nN}
+% \begin{macro}{\@@_kernel_class_new:nN}
+% \begin{macro}{\@@_kernel_class_new_aux:nN}
% All the functions for kernel messages come in variants ranging
% from~$0$ to~$4$ arguments. Those with less than~$4$ arguments are
% defined in terms of the $4$-argument variant, in a way very similar
@@ -1960,6 +1939,15 @@
'check-declarations',~'deprecation',~'log-functions',~not~'#1'.
}
\@@_kernel_new:nnn { kernel } { expr } { '#2'~in~#1 }
+ \@@_kernel_new:nnnn { kernel } { local-global }
+ { Inconsistent~local/global~assignment }
+ {
+ \c_@@_coding_error_text_tl
+ \if:w l #2 Local \else: Global \fi: \
+ assignment~to~a~
+ \if:w l #1 local \else: \if:w g #1 global \else: constant \fi: \fi: \
+ variable~'#3'.
+ }
\@@_kernel_new:nnnn { kernel } { non-declared-variable }
{ The~variable~#1~has~not~been~declared~\msg_line_context:. }
{
@@ -1999,6 +1987,8 @@
% Some errors only appear in expandable settings,
% hence don't need a \enquote{more-text} argument.
% \begin{macrocode}
+\@@_kernel_new:nnn { kernel } { bad-exp-end-f }
+ { Misused~\exp_end_continue_f:w or~:nw }
\@@_kernel_new:nnn { kernel } { bad-variable }
{ Erroneous~variable~#1 used! }
\@@_kernel_new:nnn { kernel } { misused-sequence }
@@ -2007,6 +1997,8 @@
{ A~property~list~was~misused. }
\@@_kernel_new:nnn { kernel } { negative-replication }
{ Negative~argument~for~\prg_replicate:nn. }
+\@@_kernel_new:nnn { kernel } { prop-keyval }
+ { Missing/extra~'='~in~'#1'~(in~'..._keyval:Nn') }
\@@_kernel_new:nnn { kernel } { unknown-comparison }
{ Relation~'#1'~unknown:~use~=,~<,~>,~==,~!=,~<=,~>=. }
\@@_kernel_new:nnn { kernel } { zero-step }
@@ -2019,22 +2011,22 @@
{
The~comma~list~ \tl_if_empty:nF {#1} { #1 ~ }
\tl_if_empty:nTF {#2}
- { is~empty }
- { contains~the~items~(without~outer~braces): }
+ { is~empty \\>~ . }
+ { contains~the~items~(without~outer~braces): #2 . }
}
\@@_kernel_new:nnn { kernel } { show-prop }
{
The~property~list~#1~
\tl_if_empty:nTF {#2}
- { is~empty }
- { contains~the~pairs~(without~outer~braces): }
+ { is~empty \\>~ . }
+ { contains~the~pairs~(without~outer~braces): #2 . }
}
\@@_kernel_new:nnn { kernel } { show-seq }
{
The~sequence~#1~
\tl_if_empty:nTF {#2}
- { is~empty }
- { contains~the~items~(without~outer~braces): }
+ { is~empty \\>~ . }
+ { contains~the~items~(without~outer~braces): #2 . }
}
\@@_kernel_new:nnn { kernel } { show-streams }
{
@@ -2045,14 +2037,14 @@
{ iow } { output ~ }
}
streams~are~
- \tl_if_empty:nTF {#2} { open } { in~use: }
+ \tl_if_empty:nTF {#2} { open } { in~use: #2 . }
}
% \end{macrocode}
%
% \subsection{Expandable errors}
%
-% \begin{macro}[int]{\@@_expandable_error:n}
-% \begin{macro}[aux]{\@@_expandable_error:w}
+% \begin{macro}{\@@_expandable_error:n}
+% \begin{macro}{\@@_expandable_error:w}
% In expansion only context, we cannot use the normal means of
% reporting errors. Instead, we feed \TeX{} an undefined control
% sequence, \cs{LaTeX3 error:}. It is thus interrupted, and shows
@@ -2138,213 +2130,6 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{Showing variables}
-%
-% Functions defined in this section are used for diagnostic functions
-% in \pkg{l3clist}, \pkg{l3file}, \pkg{l3prop}, \pkg{l3seq}, \pkg{xtemplate}
-%
-% \begin{variable}{\g_@@_log_next_bool}
-% \begin{macro}[int]{\@@_log_next:}
-% \begin{macrocode}
-\bool_new:N \g_@@_log_next_bool
-\cs_new_protected:Npn \@@_log_next:
- { \bool_gset_true:N \g_@@_log_next_bool }
-% \end{macrocode}
-% \end{macro}
-% \end{variable}
-%
-% \begin{macro}[int]{\@@_show_pre:nnnnnn, \@@_show_pre:nnxxxx, \@@_show_pre:nnnnnV}
-% \begin{macro}[aux]{\@@_show_pre_aux:n}
-% Print the text of a message to the terminal or log file without
-% formatting: short cuts around \cs{iow_wrap:nnnN}. The choice of
-% terminal or log file is done by \cs{@@_show_pre_aux:n}.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_show_pre:nnnnnn #1#2#3#4#5#6
- {
- \exp_args:Nx \iow_wrap:nnnN
- {
- \exp_not:c { \c_@@_text_prefix_tl #1 / #2 }
- { \tl_to_str:n {#3} }
- { \tl_to_str:n {#4} }
- { \tl_to_str:n {#5} }
- { \tl_to_str:n {#6} }
- }
- { } { } \@@_show_pre_aux:n
- }
-\cs_new_protected:Npn \@@_show_pre:nnxxxx #1#2#3#4#5#6
- {
- \use:x
- { \exp_not:n { \@@_show_pre:nnnnnn {#1} {#2} } {#3} {#4} {#5} {#6} }
- }
-\cs_generate_variant:Nn \@@_show_pre:nnnnnn { nnnnnV }
-\cs_new_protected:Npn \@@_show_pre_aux:n
- { \bool_if:NTF \g_@@_log_next_bool { \iow_log:n } { \iow_term:n } }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[int]{\@@_show_variable:NNNnn}
-% The arguments of \cs{@@_show_variable:NNNnn} are
-% \begin{itemize}
-% \item The \meta{variable} to be shown as |#1|.
-% \item An \meta{if-exist} conditional |#2| with \texttt{NTF}
-% signature.
-% \item An \meta{if-empty} conditional |#3| or other function with
-% \texttt{NTF} signature (sometimes \cs{use_ii:nnn}).
-% \item The \meta{message} |#4| to use.
-% \item A construction |#5| which produces the formatted string
-% eventually passed to the \tn{showtokens} primitive. Typically
-% this is a mapping of the form \cs{seq_map_function:NN}
-% \meta{variable} \cs{@@_show_item:n}.
-% \end{itemize}
-% If \meta{if-exist} \meta{variable} is \texttt{false}, throw an
-% error and remember to reset \cs{g_@@_log_next_bool}, which is
-% otherwise reset by \cs{@@_show_wrap:n}. If \meta{message} is not
-% empty, output the message |LaTeX/kernel/show-|\meta{message} with
-% as its arguments the \meta{variable}, and either an empty second
-% argument or |?| depending on the result of \meta{if-empty}
-% \meta{variable}. Afterwards, show the contents of |#5| using
-% \cs{@@_show_wrap:n} or \cs{@@_log_wrap:n}.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_show_variable:NNNnn #1#2#3#4#5
- {
- #2 #1
- {
- \tl_if_empty:nF {#4}
- {
- \@@_show_pre:nnxxxx { LaTeX / kernel } { show- #4 }
- { \token_to_str:N #1 } { #3 #1 { } { ? } } { } { }
- }
- \@@_show_wrap:n {#5}
- }
- {
- \@@_kernel_error:nnx { kernel } { variable-not-defined }
- { \token_to_str:N #1 }
- \bool_gset_false:N \g_@@_log_next_bool
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[int]{\@@_show_wrap:Nn}
-% A short-hand used for \cs{int_show:n} and many other functions that
-% passes to \cs{@@_show_wrap:n} the result of applying |#1| (a
-% function such as \cs{int_eval:n}) to the expression |#2|. The
-% leading |>~| is needed by \cs{@@_show_wrap:n}. The use of
-% \texttt{x}-expansion ensures that |#1| is expanded in the scope in which the
-% show command is called, rather than in the group created by
-% \cs{iow_wrap:nnnN}. This is only important for expressions
-% involving the \tn{currentgrouplevel} or \tn{currentgrouptype}.
-% On the other hand we want the expression to be converted to a string
-% with the usual escape character, hence within the wrapping code.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_show_wrap:Nn #1#2
- {
- \exp_args:Nx \@@_show_wrap:n
- {
- > ~ \exp_not:n { \tl_to_str:n {#2} } =
- \exp_not:N \tl_to_str:n { #1 {#2} }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[int]{\@@_show_wrap:n}
-% \begin{macro}[aux]{\@@_show_wrap_aux:n}
-% \begin{macro}[aux, EXP]{\@@_show_wrap_aux:w}
-% The argument of \cs{@@_show_wrap:n} is line-wrapped using
-% \cs{iow_wrap:nnnN}. Everything before the first~|>| in the wrapped
-% text is removed, as well as an optional space following it (because
-% of \texttt{f}-expansion). In order for line-wrapping to give the
-% correct result, the first~|>| must in fact appear at the beginning
-% of a line and be followed by a space (or a line-break), so in
-% practice, the argument of \cs{@@_show_wrap:n} begins with |>~| or
-% |\\>~|.
-%
-% The line-wrapped text is then either sent to the log file through
-% \cs{iow_log:x}, or shown in the terminal using the
-% \eTeX{} primitive \tn{showtokens} after removing a leading |>~| and
-% trailing dot since those are added automatically by
-% \tn{showtokens}. The trailing dot was included in the first place
-% because its presence can affect line-wrapping. Note that the space
-% after |>| is removed through \texttt{f}-expansion rather than by
-% using an argument delimited by |>~| because the space may have been
-% replaced by a line-break when line-wrapping.
-%
-% A special case is that if the line-wrapped text is a single dot (in
-% other words if the argument of \cs{@@_show_wrap:n}
-% \texttt{x}-expands to nothing) then no |>~| should be removed.
-% This makes it unnecessary to check explicitly for emptyness when
-% using for instance \cs{seq_map_function:NN} \meta{seq~var}
-% \cs{@@_show_item:n} as the argument of \cs{@@_show_wrap:n}.
-%
-% Finally, the token list \cs{l_@@_internal_tl} containing the result
-% of all these manipulations is displayed to the terminal using
-% \cs{etex_showtokens:D} and odd \cs{exp_after:wN} which expand the
-% closing brace to improve the output slightly. The calls to
-% \cs{__iow_with:Nnn} ensure that the \tn{newlinechar} is set to~$10$
-% so that the \cs{iow_newline:} inserted by the line-wrapping code
-% are correctly recognized by \TeX{}, and that \tn{errorcontextlines}
-% is $-1$ to avoid printing irrelevant context.
-%
-% Note also that \cs{g_@@_log_next_bool} is only reset if that is
-% necessary. This allows the user of an interactive prompt to insert
-% tokens as a response to \eTeX{}'s \tn{showtokens}.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_show_wrap:n #1
- { \iow_wrap:nnnN { #1 . } { } { } \@@_show_wrap_aux:n }
-\cs_new_protected:Npn \@@_show_wrap_aux:n #1
- {
- \tl_if_single:nTF {#1}
- { \tl_clear:N \l_@@_internal_tl }
- { \tl_set:Nf \l_@@_internal_tl { \@@_show_wrap_aux:w #1 \q_stop } }
- \bool_if:NTF \g_@@_log_next_bool
- {
- \iow_log:x { > ~ \l_@@_internal_tl . }
- \bool_gset_false:N \g_@@_log_next_bool
- }
- {
- \__iow_with:Nnn \tex_newlinechar:D { 10 }
- {
- \__iow_with:Nnn \tex_errorcontextlines:D { -1 }
- {
- \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN
- { \exp_after:wN \l_@@_internal_tl }
- }
- }
- }
- }
-\cs_new:Npn \@@_show_wrap_aux:w #1 > #2 . \q_stop {#2}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[int,EXP]{\@@_show_item:n}
-% \begin{macro}[int,EXP]{\@@_show_item:nn}
-% \begin{macro}[int,EXP]{\@@_show_item_unbraced:nn}
-% Each item in the variable is formatted using one of
-% the following functions.
-% \begin{macrocode}
-\cs_new:Npn \@@_show_item:n #1
- {
- \\ > \ \ \{ \tl_to_str:n {#1} \}
- }
-\cs_new:Npn \@@_show_item:nn #1#2
- {
- \\ > \ \ \{ \tl_to_str:n {#1} \}
- \ \ => \ \ \{ \tl_to_str:n {#2} \}
- }
-\cs_new:Npn \@@_show_item_unbraced:nn #1#2
- {
- \\ > \ \ \tl_to_str:n {#1}
- \ \ => \ \ \tl_to_str:n {#2}
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index cc937640a20..66f91b4b932 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -95,7 +95,7 @@
% names. In format mode, it also deletes all of the existing names (although
% some do come back later).
%
-% \begin{macro}[int]{\tex_undefined:D}
+% \begin{macro}{\tex_undefined:D}
% This function does not exist at all, but is the name used by the
% plain \TeX{} format for an undefined function. So it should
% be marked here as \enquote{taken}.
@@ -115,7 +115,7 @@
\begingroup
% \end{macrocode}
%
-% \begin{macro}[aux]{\@@_primitive:NN}
+% \begin{macro}{\@@_primitive:NN}
% A temporary function to actually do the renaming. This also allows the
% original names to be removed in format mode.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx b/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx
index 75527766bf7..a46bef6643c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
-%% File: l3oldmodules.dtx Copyright (C) 2014,2016,2017 The LaTeX3 Project
+%% File: l3oldmodules.dtx Copyright (C) 2014-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
+% https://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.
@@ -23,7 +23,7 @@
%<*driver|oldmodules>
%</driver|oldmodules>
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -42,7 +42,7 @@
% }
%
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index 642c030015c..6c4bb867e3b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -679,12 +679,12 @@
%
% \begin{function}[EXP]{\__prg_break_point:Nn}
% \begin{syntax}
-% \cs{__prg_break_point:Nn} \cs[no-index]{\meta{type}_map_break:} \Arg{tokens}
+% \cs{__prg_break_point:Nn} \cs[no-index]{\meta{type}_map_break:} \Arg{code}
% \end{syntax}
% Used to mark the end of a recursion or mapping: the functions
% \cs[no-index]{\meta{type}_map_break:} and \cs[no-index]{\meta{type}_map_break:n} use
% this to break out of the loop. After the loop ends, the
-% \meta{tokens} are inserted into the input stream. This occurs even
+% \meta{code} is inserted into the input stream. This occurs even
% if the break functions are \emph{not} applied:
% \cs{__prg_break_point:Nn} is functionally-equivalent in these cases
% to \cs{use_ii:nn}.
@@ -720,11 +720,11 @@
%
% \begin{function}[EXP]{\__prg_break:, \__prg_break:n}
% \begin{syntax}
-% \cs{__prg_break:n} \Arg{tokens} \ldots{} \cs{__prg_break_point:}
+% \cs{__prg_break:n} \Arg{code} \ldots{} \cs{__prg_break_point:}
% \end{syntax}
% Breaks a recursion which has no \meta{ending code} and which is not
% a user-breakable mapping (see for instance \cs{prop_get:Nn}), and
-% inserts \meta{tokens} in the input stream.
+% inserts the \meta{code} in the input stream.
% \end{function}
%
% \end{documentation}
@@ -811,16 +811,16 @@
% make sure the boolean exists. This is needed because booleans are
% not based on token lists nor on \TeX{} registers.
% \begin{macrocode}
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \bool_set_true:N #1
{ \cs_set_eq:NN #1 \c_true_bool }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \bool_set_false:N #1
{ \cs_set_eq:NN #1 \c_false_bool }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \bool_gset_true:N #1
{ \cs_gset_eq:NN #1 \c_true_bool }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \bool_gset_false:N #1
{ \cs_gset_eq:NN #1 \c_false_bool }
\cs_generate_variant:Nn \bool_set_true:N { c }
@@ -855,10 +855,10 @@
% argument the meaning \cs{c_true_bool} or \cs{c_false_bool}.
% Again, we include some checking code.
% \begin{macrocode}
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \bool_set:Nn #1#2
{ \tex_chardef:D #1 = \bool_if_p:n {#2} }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \bool_gset:Nn #1#2
{ \tex_global:D \tex_chardef:D #1 = \bool_if_p:n {#2} }
\cs_generate_variant:Nn \bool_set:Nn { c }
@@ -887,33 +887,34 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\bool_show:N, \bool_show:c, \bool_show:n}
-% \begin{macro}[aux]{\@@_to_str:n}
+% \begin{macro}{\bool_show:n, \bool_log:n}
+% \begin{macro}{\@@_to_str:n}
% Show the truth value of the boolean, as \texttt{true} or
% \texttt{false}.
% \begin{macrocode}
-\cs_new_protected:Npn \bool_show:N #1
- {
- \__msg_show_variable:NNNnn #1 \bool_if_exist:NTF ? { }
- { > ~ \token_to_str:N #1 = \@@_to_str:n {#1} }
- }
\cs_new_protected:Npn \bool_show:n
- { \__msg_show_wrap:Nn \@@_to_str:n }
+ { \msg_show_eval:Nn \@@_to_str:n }
+\cs_new_protected:Npn \bool_log:n
+ { \msg_log_eval:Nn \@@_to_str:n }
\cs_new:Npn \@@_to_str:n #1
{ \bool_if:nTF {#1} { true } { false } }
-\cs_generate_variant:Nn \bool_show:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\bool_log:N, \bool_log:c, \bool_log:n}
-% Redirect output of \cs{bool_show:N} to the log.
+% \begin{macro}{\bool_show:N, \bool_show:c, \bool_log:N, \bool_log:c, \@@_show:NN}
+% Show the truth value of the boolean, as \texttt{true} or
+% \texttt{false}.
% \begin{macrocode}
-\cs_new_protected:Npn \bool_log:N
- { \__msg_log_next: \bool_show:N }
-\cs_new_protected:Npn \bool_log:n
- { \__msg_log_next: \bool_show:n }
+\cs_new_protected:Npn \bool_show:N { \@@_show:NN \tl_show:n }
+\cs_generate_variant:Nn \bool_show:N { c }
+\cs_new_protected:Npn \bool_log:N { \@@_show:NN \tl_log:n }
\cs_generate_variant:Nn \bool_log:N { c }
+\cs_new_protected:Npn \@@_show:NN #1#2
+ {
+ \__kernel_check_defined:NT #2
+ { \exp_args:Nx #1 { \token_to_str:N #2 = \@@_to_str:n {#2} } }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -1014,7 +1015,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_get_next:NN}
+% \begin{macro}{\@@_get_next:NN}
% The GetNext operation. Its first argument is \cs{use_i:nnnn},
% \cs{use_ii:nnnn}, \cs{use_iii:nnnn}, or \cs{use_iv:nnnn} (we call
% these \enquote{states}). In the first state, this function
@@ -1045,7 +1046,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_!:Nw}
+% \begin{macro}{\@@_!:Nw}
% The Not operation reverses the logic: it discards the |!|~token and
% calls the GetNext operation with the appropriate first argument.
% Namely the first and second states are interchanged, but after
@@ -1060,7 +1061,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_(:Nw}
+% \begin{macro}{\@@_(:Nw}
% The Open operation starts a sub-expression after discarding the open
% parenthesis. This is done by calling GetNext (which eventually
% discards the corresponding closing parenthesis), with a
@@ -1075,7 +1076,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_p:Nw}
+% \begin{macro}{\@@_p:Nw}
% If what follows GetNext is neither |!| nor |(|, evaluate the
% predicate using the primitive \cs{__int_value:w}. The canonical
% \texttt{true} and \texttt{false} values have numerical values $1$
@@ -1086,16 +1087,16 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_choose:NNN}
-% \begin{macro}[aux]+\@@_)_0:+
-% \begin{macro}[aux]+\@@_)_1:+
-% \begin{macro}[aux]+\@@_)_2:+
-% \begin{macro}[aux]+\@@_&_0:+
-% \begin{macro}[aux]+\@@_&_1:+
-% \begin{macro}[aux]+\@@_&_2:+
-% \begin{macro}[aux]+\@@_|_0:+
-% \begin{macro}[aux]+\@@_|_1:+
-% \begin{macro}[aux]+\@@_|_2:+
+% \begin{macro}{\@@_choose:NNN}
+% \begin{macro}+\@@_)_0:+
+% \begin{macro}+\@@_)_1:+
+% \begin{macro}+\@@_)_2:+
+% \begin{macro}+\@@_&_0:+
+% \begin{macro}+\@@_&_1:+
+% \begin{macro}+\@@_&_2:+
+% \begin{macro}+\@@_|_0:+
+% \begin{macro}+\@@_|_1:+
+% \begin{macro}+\@@_|_2:+
% The arguments are |#1|: a function such as \cs{use_i:nnnn}, |#2|:
% $0$ or $1$ encoding the current truth value, |#3|: the next
% operation, And, Or or Close. We distinguish three cases according
@@ -1149,7 +1150,7 @@
% \end{macro}
%
% \begin{macro}[pTF]{\bool_lazy_all:n}
-% \begin{macro}[aux]{\@@_lazy_all:n}
+% \begin{macro}{\@@_lazy_all:n}
% \UnitTested
% Go through the list of expressions, stopping whenever an expression
% is \texttt{false}. If the end is reached without finding any
@@ -1182,7 +1183,7 @@
% \end{macro}
%
% \begin{macro}[pTF]{\bool_lazy_any:n}
-% \begin{macro}[aux]{\@@_lazy_any:n}
+% \begin{macro}{\@@_lazy_any:n}
% \UnitTested
% Go through the list of expressions, stopping whenever an expression
% is \texttt{true}. If the end is reached without finding any
@@ -1324,9 +1325,9 @@
%
% \begin{macro}{\prg_replicate:nn}
% \UnitTested
-% \begin{macro}[aux]{\@@_replicate:N, \@@_replicate_first:N}
-% \begin{macro}[aux]{\@@_replicate_}
-% \begin{macro}[aux]
+% \begin{macro}{\@@_replicate:N, \@@_replicate_first:N}
+% \begin{macro}{\@@_replicate_}
+% \begin{macro}
% {
% \@@_replicate_0:n,
% \@@_replicate_1:n,
@@ -1339,7 +1340,7 @@
% \@@_replicate_8:n,
% \@@_replicate_9:n
% }
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_replicate_first_-:n,
% \@@_replicate_first_0:n,
@@ -1384,12 +1385,11 @@
% pool. Also, it is considerably slower than what we use here so the
% few extra csnames are well spent I would say.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { { (#1) } }
\cs_new:Npn \prg_replicate:nn #1
{
\exp:w
\exp_after:wN \@@_replicate_first:N
- \__int_value:w \__int_eval:w #1 \__int_eval_end:
+ \__int_value:w \__int_eval:n {#1}
\cs_end:
}
\cs_new:Npn \@@_replicate:N #1
@@ -1493,7 +1493,7 @@
%
% \subsection{Internal programming functions}
%
-% \begin{macro}[int]{\group_align_safe_begin:, \group_align_safe_end:}
+% \begin{macro}{\group_align_safe_begin:, \group_align_safe_end:}
% \TeX{}'s alignment structures present many problems. As Knuth says
% himself in \emph{\TeX : The Program}: \enquote{It's sort of a miracle
% whenever \tn{halign} or \tn{valign} work, [\ldots]} One problem relates
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
index 0a25ed683c7..303ce59414d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -373,21 +373,27 @@
% \end{verbatim}
% Use outside of a \cs[no-index]{prop_map_\ldots} scenario leads to low
% level \TeX{} errors.
+% \begin{texnote}
+% When the mapping is broken, additional tokens may be inserted
+% before further items are taken
+% from the input stream. This depends on the design of the mapping
+% function.
+% \end{texnote}
% \end{function}
%
% \begin{function}[updated = 2012-06-29, rEXP]{\prop_map_break:n}
% \begin{syntax}
-% \cs{prop_map_break:n} \Arg{tokens}
+% \cs{prop_map_break:n} \Arg{code}
% \end{syntax}
% Used to terminate a \cs[no-index]{prop_map_\ldots} function before all
% entries in the \meta{property list} have been processed, inserting
-% the \meta{tokens} after the mapping has ended. This
+% the \meta{code} after the mapping has ended. This
% normally takes place within a conditional statement, for example
% \begin{verbatim}
% \prop_map_inline:Nn \l_my_prop
% {
% \str_if_eq:nnTF { #1 } { bingo }
-% { \prop_map_break:n { <tokens> } }
+% { \prop_map_break:n { <code> } }
% {
% % Do something useful
% }
@@ -395,6 +401,12 @@
% \end{verbatim}
% Use outside of a \cs[no-index]{prop_map_\ldots} scenario leads to low
% level \TeX{} errors.
+% \begin{texnote}
+% When the mapping is broken, additional tokens may be inserted
+% before the \meta{code} is
+% inserted into the input stream.
+% This depends on the design of the mapping function.
+% \end{texnote}
% \end{function}
%
% \section{Viewing property lists}
@@ -510,7 +522,7 @@
% (equal to \cs{scan_stop:}), and \cs{@@_pair:wn} can be used to map
% through the property list.
%
-% \begin{macro}[int]{\s_@@}
+% \begin{macro}{\s_@@}
% A private scan mark is used as a marker after each key, and at the
% very beginning of the property list.
% \begin{macrocode}
@@ -518,7 +530,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_pair:wn}
+% \begin{macro}{\@@_pair:wn}
% The delimiter is always defined, but when misused simply triggers an
% error and removes its argument.
% \begin{macrocode}
@@ -614,11 +626,90 @@
% \end{variable}
% \end{variable}
%
+% \begin{macro}{\prop_set_from_keyval:Nn, \prop_set_from_keyval:cn}
+% \begin{macro}{\prop_gset_from_keyval:Nn, \prop_gset_from_keyval:cn}
+% \begin{macro}{\prop_const_from_keyval:Nn, \prop_const_from_keyval:cn}
+% \begin{macro}
+% {
+% \@@_from_keyval:n,
+% \@@_from_keyval_loop:w,
+% \@@_from_keyval_split:Nw,
+% \@@_from_keyval_key:w,
+% \@@_from_keyval_value:w
+% }
+% Loop through items separated by commas, with \cs{q_mark} to avoid
+% losing braces. After checking for termination, split the item at
+% the first then at the second |=| (which ought to be the first of the
+% trailing~|=|). At both splits, trim spaces (the internal
+% \cs{__tl_trim_spaces:nn} expects the \cs{q_mark} we give it) and
+% call \cs{@@_from_keyval_key:w}, then \cs{@@_from_keyval_value:w},
+% followed by the trimmed material, \cs{q_nil}, the subsequent part of
+% the item, and the trailing |=|'s and \cs{q_stop}. After finding the
+% \meta{key} just store it after \cs{q_stop}. After finding the
+% \meta{value} ignore completely empty items (both trailing~|=| were
+% used as delimiters and all parts are empty); if the remaining
+% part~|#2| consists exactly of the second trailing~|=| (namely there
+% was exactly one |=|~in the item) then output one key--value pair for
+% the property list; otherwise complain about a missing or extra~|=|.
+% \begin{macrocode}
+\cs_new_protected:Npn \prop_set_from_keyval:Nn #1#2
+ { \tl_set:Nx #1 { \@@_from_keyval:n {#2} } }
+\cs_generate_variant:Nn \prop_set_from_keyval:Nn { c }
+\cs_new_protected:Npn \prop_gset_from_keyval:Nn #1#2
+ { \tl_gset:Nx #1 { \@@_from_keyval:n {#2} } }
+\cs_generate_variant:Nn \prop_gset_from_keyval:Nn { c }
+\cs_new_protected:Npn \prop_const_from_keyval:Nn #1#2
+ { \tl_const:Nx #1 { \@@_from_keyval:n {#2} } }
+\cs_generate_variant:Nn \prop_const_from_keyval:Nn { c }
+\cs_new:Npn \@@_from_keyval:n #1
+ {
+ \s_@@
+ \@@_from_keyval_loop:w \q_mark #1 ,
+ \q_recursion_tail , \q_recursion_stop
+ }
+\cs_new:Npn \@@_from_keyval_loop:w #1 ,
+ {
+ \quark_if_recursion_tail_stop:o { \use_none:n #1 }
+ \@@_from_keyval_split:Nw \@@_from_keyval_key:w
+ #1 = = \q_stop { \use_none:n #1 }
+ \@@_from_keyval_loop:w \q_mark
+ }
+\cs_new:Npn \@@_from_keyval_split:Nw #1#2 =
+ {
+ \__tl_trim_spaces:nn {#2}
+ { \exp_last_unbraced:No #1 } \q_nil
+ }
+\cs_new:Npn \@@_from_keyval_key:w #1 \q_nil #2 \q_stop
+ {
+ \@@_from_keyval_split:Nw \@@_from_keyval_value:w
+ \q_mark #2 \q_stop {#1}
+ }
+\cs_new:Npn \@@_from_keyval_value:w #1 \q_nil #2 \q_stop #3#4
+ {
+ \tl_if_empty:nF { #3 #1 #2 }
+ {
+ \str_if_eq:nnTF {#2} { = }
+ {
+ \exp_not:N \@@_pair:wn \tl_to_str:n {#3}
+ \s_@@ { \exp_not:n {#1} }
+ }
+ {
+ \exp_args:Nnno \__msg_kernel_expandable_error:nnn
+ { kernel } { prop-keyval } {#4}
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Accessing data in property lists}
%
-% \begin{macro}[int]{\@@_split:NnTF}
-% \begin{macro}[aux]{\@@_split_aux:NnTF}
-% \begin{macro}[aux, EXP]{\@@_split_aux:w}
+% \begin{macro}{\@@_split:NnTF}
+% \begin{macro}{\@@_split_aux:NnTF}
+% \begin{macro}[EXP]{\@@_split_aux:w}
% This function is used by most of the module, and hence must be fast.
% It receives a \meta{property list}, a \meta{key}, a \meta{true code}
% and a \meta{false code}. The aim is to split the \meta{property
@@ -746,7 +837,7 @@
% \end{macro}
%
% \begin{macro}[EXP]{\prop_item:Nn, \prop_item:cn}
-% \begin{macro}[aux, EXP]{\@@_item_Nn:nwwn}
+% \begin{macro}[EXP]{\@@_item_Nn:nwwn}
% Getting the value corresponding to a key in a property list in an
% expandable fashion is similar to mapping some tokens. Go through
% the property list one \meta{key}--\meta{value} pair at a time: the
@@ -826,7 +917,7 @@
% \prop_gput:cnn, \prop_gput:cnV, \prop_gput:cno, \prop_gput:cnx,
% \prop_gput:cVn, \prop_gput:cVV, \prop_gput:con, \prop_gput:coo
% }
-% \begin{macro}[aux]{\@@_put:NNnn}
+% \begin{macro}{\@@_put:NNnn}
% Since the branches of \cs{@@_split:NnTF} are used as the replacement
% text of an internal macro, and since the \meta{key} and new
% \meta{value} may contain arbitrary tokens, it is not safe to include
@@ -870,7 +961,7 @@
% {\prop_put_if_new:Nnn, \prop_put_if_new:cnn}
% \begin{macro}[tested = m3prop002]
% {\prop_gput_if_new:Nnn, \prop_gput_if_new:cnn}
-% \begin{macro}[aux]{\@@_put_if_new:NNnn}
+% \begin{macro}{\@@_put_if_new:NNnn}
% Adding conditionally also splits. If the key is already present,
% the three brace groups given by \cs{@@_split:NnTF} are removed.
% If the key is new, then the value is added, being careful to
@@ -930,7 +1021,7 @@
% \prop_if_in:Nn, \prop_if_in:NV, \prop_if_in:No,
% \prop_if_in:cn, \prop_if_in:cV, \prop_if_in:co
% }
-% \begin{macro}[aux,EXP]{\@@_if_in:nwwn, \@@_if_in:N}
+% \begin{macro}[EXP]{\@@_if_in:nwwn, \@@_if_in:N}
% Testing expandably if a key is in a property list
% requires to go through the key--value pairs one by one.
% This is rather slow, and a faster test would be
@@ -1030,7 +1121,7 @@
% \prop_map_function:NN, \prop_map_function:Nc,
% \prop_map_function:cN, \prop_map_function:cc
% }
-% \begin{macro}[aux]{\@@_map_function:Nwwn}
+% \begin{macro}{\@@_map_function:Nwwn}
% The fastest way to do a recursion here is to use an
% \cs{if_meaning:w} test: the keys are strings, and thus cannot match
% the marker \cs{q_recursion_tail}. A special case to note is when
@@ -1100,27 +1191,27 @@
%
% \subsection{Viewing property lists}
%
-% \begin{macro}[tested = m3show001]{\prop_show:N, \prop_show:c}
-% Apply the general \cs{__msg_show_variable:NNNnn}. Contrarily
-% to sequences and comma lists, we use \cs{__msg_show_item:nn}
-% to format both the key and the value for each pair.
+% \begin{macro}[tested = m3show001]
+% {\prop_show:N, \prop_show:c, \prop_log:N, \prop_log:c}
+% Apply the general \cs{__kernel_check_defined:NT} and
+% \cs{msg_show:nnnnnn}. Contrarily to sequences and comma lists,
+% we use \cs{msg_show_item:nn} to format both the key and the value
+% for each pair.
% \begin{macrocode}
-\cs_new_protected:Npn \prop_show:N #1
- {
- \__msg_show_variable:NNNnn #1
- \prop_if_exist:NTF \prop_if_empty:NTF { prop }
- { \prop_map_function:NN #1 \__msg_show_item:nn }
- }
+\cs_new_protected:Npn \prop_show:N { \@@_show:NN \msg_show:nnxxxx }
\cs_generate_variant:Nn \prop_show:N { c }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\prop_log:N, \prop_log:c}
-% Redirect output of \cs{prop_show:N} to the log.
-% \begin{macrocode}
-\cs_new_protected:Npn \prop_log:N
- { \__msg_log_next: \prop_show:N }
+\cs_new_protected:Npn \prop_log:N { \@@_show:NN \msg_log:nnxxxx }
\cs_generate_variant:Nn \prop_log:N { c }
+\cs_new_protected:Npn \@@_show:NN #1#2
+ {
+ \__kernel_check_defined:NT #2
+ {
+ #1 { LaTeX/kernel } { show-prop }
+ { \token_to_str:N #2 }
+ { \prop_map_function:NN #2 \msg_show_item:nn }
+ { } { }
+ }
+ }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
index a62bd7ec8ea..a63a99c1385 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -375,7 +375,12 @@
% \UnitTested
% Allocate a new quark.
% \begin{macrocode}
-\cs_new_protected:Npn \quark_new:N #1 { \tl_const:Nn #1 {#1} }
+\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN q #1 } { }
+\cs_new_protected:Npn \quark_new:N #1
+ {
+ \__chk_if_free_cs:N #1
+ \cs_gset_nopar:Npn #1 {#1}
+ }
% \end{macrocode}
% \end{macro}
%
@@ -439,7 +444,7 @@
% \begin{macro}
% {\quark_if_recursion_tail_stop_do:nn, \quark_if_recursion_tail_stop_do:on}
% \UnitTested
-% \begin{macro}[aux]{\@@_if_recursion_tail:w}
+% \begin{macro}{\@@_if_recursion_tail:w}
% See \cs{quark_if_nil:nTF} for the details. Expanding
% \cs{@@_if_recursion_tail:w} once in front of the tokens chosen here
% gives an empty result if and only if |#1|~is exactly
@@ -529,7 +534,7 @@
% \UnitTested
% \begin{macro}[pTF]{\quark_if_no_value:n}
% \UnitTested
-% \begin{macro}[aux]{\@@_if_nil:w, \@@_if_no_value:w}
+% \begin{macro}{\@@_if_nil:w, \@@_if_no_value:w}
% Let us explain |\quark_if_nil:n(TF)|. Expanding \cs{@@_if_nil:w}
% once is safe thanks to the trailing \cs{q_nil} |??!|. The result of
% expanding once is empty if and only if both delimited arguments |#1|
@@ -589,7 +594,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int]{\@@_new:N}
+% \begin{macro}{\@@_new:N}
% \UnitTested
% Check whether the variable is already a scan mark,
% then declare it to be equal to \cs{scan_stop:} globally.
@@ -618,7 +623,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int]{\__use_none_delimit_by_s__stop:w}
+% \begin{macro}{\__use_none_delimit_by_s__stop:w}
% \UnitTested
% Similar to \cs{use_none_delimit_by_q_stop:w}.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
index 1d9b421c8d3..80aa7a25547 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -901,7 +901,7 @@
%
% \subsection{Helpers}
%
-% \begin{macro}[int]{\@@_standard_escapechar:}
+% \begin{macro}{\@@_standard_escapechar:}
% Make the \tn{escapechar} into the standard backslash.
% \begin{macrocode}
\cs_new_protected:Npn \@@_standard_escapechar:
@@ -909,14 +909,14 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_toks_use:w}
+% \begin{macro}[EXP]{\@@_toks_use:w}
% Unpack a \tn{toks} given its number.
% \begin{macrocode}
\cs_new:Npn \@@_toks_use:w { \tex_the:D \tex_toks:D }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_toks_clear:N, \@@_toks_set:Nn, \@@_toks_set:No}
+% \begin{macro}{\@@_toks_clear:N, \@@_toks_set:Nn, \@@_toks_set:No}
% Empty a \tn{toks} or set it to a value, given its number.
% \begin{macrocode}
\cs_new_protected:Npn \@@_toks_clear:N #1
@@ -927,7 +927,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_toks_memcpy:NNn}
+% \begin{macro}{\@@_toks_memcpy:NNn}
% Copy |#3| \tn{toks} registers from |#2| onwards to |#1| onwards,
% like |C|'s |memcpy|.
% \begin{macrocode}
@@ -943,8 +943,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_toks_put_left:Nx}
-% \begin{macro}[int]{\@@_toks_put_right:Nx, \@@_toks_put_right:Nn}
+% \begin{macro}{\@@_toks_put_left:Nx}
+% \begin{macro}{\@@_toks_put_right:Nx, \@@_toks_put_right:Nn}
% During the building phase we wish to add \texttt{x}-expanded
% material to \tn{toks}, either to the left or to the right. The
% expansion is done \enquote{by hand} for optimization (these
@@ -970,7 +970,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, rEXP]{\@@_curr_cs_to_str:}
+% \begin{macro}[rEXP]{\@@_curr_cs_to_str:}
% Expands to the string representation of the token (known to be a
% control sequence) at the current position \cs{l_@@_curr_pos_int}.
% It should only be used in \texttt{x}-expansion to avoid losing a
@@ -986,7 +986,7 @@
%
% \subsubsection{Constants and variables}
%
-% \begin{macro}[aux]{\@@_tmp:w}
+% \begin{macro}{\@@_tmp:w}
% Temporary function used for various short-term purposes.
% \begin{macrocode}
\cs_new:Npn \@@_tmp:w { }
@@ -1075,8 +1075,8 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int]{\@@_break_point:TF}
-% \begin{macro}[int]{\@@_break_true:w}
+% \begin{macro}{\@@_break_point:TF}
+% \begin{macro}{\@@_break_true:w}
% When testing whether a character of the query token list matches
% a given character class in the regular expression, we often
% have to test it against several ranges of characters, checking
@@ -1097,7 +1097,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_item_reverse:n}
+% \begin{macro}{\@@_item_reverse:n}
% This function makes showing regular expressions easier, and lets us
% define |\D| in terms of |\d| for instance. There is a subtlety: the
% end of the query is marked by $-2$, and thus matches |\D| and
@@ -1112,7 +1112,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {\@@_item_caseful_equal:n, \@@_item_caseful_range:nn}
% Simple comparisons triggering \cs{@@_break_true:w} when true.
% \begin{macrocode}
@@ -1133,7 +1133,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {\@@_item_caseless_equal:n, \@@_item_caseless_range:nn}
% For caseless matching, we perform the test both on the
% \texttt{current_char} and on the \texttt{case_changed_char}. Before
@@ -1171,7 +1171,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_compute_case_changed_char:}
+% \begin{macro}{\@@_compute_case_changed_char:}
% This function is called when \cs{l_@@_case_changed_char_int} has
% not yet been computed (or rather, when it is set to the marker value
% \cs{c_max_int}). If the current character code is in the range
@@ -1196,7 +1196,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_item_equal:n, \@@_item_range:nn}
+% \begin{macro}[EXP]{\@@_item_equal:n, \@@_item_range:nn}
% Those must always be defined to expand to a \texttt{caseful}
% (default) or \texttt{caseless} version, and not be protected: they
% must expand when compiling, to hard-code which tests are caseless or
@@ -1207,8 +1207,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_item_catcode:nT, \@@_item_catcode_reverse:nT}
-% \begin{macro}[aux]{\@@_item_catcode:}
+% \begin{macro}{\@@_item_catcode:nT, \@@_item_catcode_reverse:nT}
+% \begin{macro}{\@@_item_catcode:}
% The argument is a sum of powers of $4$ with exponents given by the
% allowed category codes (between $0$ and $13$). Dividing by a given
% power of $4$ gives an odd result if and only if that category code
@@ -1227,7 +1227,7 @@
}
\cs_new_protected:Npn \@@_item_catcode:nT #1
{
- \if_int_odd:w \__int_eval:w #1 / \@@_item_catcode: \__int_eval_end:
+ \if_int_odd:w \__int_eval:n { #1 / \@@_item_catcode: }
\exp_after:wN \use:n
\else:
\exp_after:wN \use_none:n
@@ -1239,7 +1239,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_item_exact:nn, \@@_item_exact_cs:n}
+% \begin{macro}{\@@_item_exact:nn, \@@_item_exact_cs:n}
% This matches an exact \meta{category}-\meta{character code} pair, or
% an exact control sequence, more precisely one of several possible control sequences.
% \begin{macrocode}
@@ -1265,7 +1265,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_item_cs:n}
+% \begin{macro}{\@@_item_cs:n}
% Match a control sequence (the argument is a compiled regex).
% First test the catcode of the current token to be zero.
% Then perform the matching test, and break if the csname
@@ -1298,7 +1298,7 @@
%
% \subsubsection{Character property tests}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_prop_d:, \@@_prop_h:, \@@_prop_s:,
% \@@_prop_v:, \@@_prop_w:, \@@_prop_N:
@@ -1344,7 +1344,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_posix_alnum:, \@@_posix_alpha:, \@@_posix_ascii:,
% \@@_posix_blank:, \@@_posix_cntrl:, \@@_posix_digit:,
@@ -1433,7 +1433,7 @@
% to that in general. For this, we use the general framework of
% \cs{__tl_build:Nw}.
%
-% \begin{macro}[int]{\@@_escape_use:nnnn}
+% \begin{macro}{\@@_escape_use:nnnn}
% The result is built in \cs{l_@@_internal_a_tl}, which is then
% left in the input stream. Go through |#4| once, applying |#1|,
% |#2|, or |#3| as relevant to each character (after de-escaping
@@ -1469,8 +1469,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_escape_loop:N}
-% \begin{macro}[aux]+\@@_escape_\:w+
+% \begin{macro}{\@@_escape_loop:N}
+% \begin{macro}+\@@_escape_\:w+
% \cs{@@_escape_loop:N} reads one character: if it is special
% (space, backslash, or end-marker), perform the associated action,
% otherwise it is simply an unescaped character. After a backslash,
@@ -1493,7 +1493,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_escape_unescaped:N, \@@_escape_escaped:N, \@@_escape_raw:N}
% Those functions are never called before being given a new meaning,
% so their definitions here don't matter.
@@ -1504,13 +1504,13 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_escape_break:w, \@@_escape_/break:w,
% \@@_escape_/a:w, \@@_escape_/e:w, \@@_escape_/f:w,
% \@@_escape_/n:w, \@@_escape_/r:w, \@@_escape_/t:w
% }
-% \begin{macro}[aux]+\@@_escape_ :w+
+% \begin{macro}+\@@_escape_ :w+
% The loop is ended upon seeing the end-marker
% \enquote{\texttt{break}}, with an error if the string ended in a
% backslash. Spaces are ignored, and |\a|, |\e|, |\f|, |\n|, |\r|,
@@ -1540,8 +1540,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_escape_/x:w}
-% \begin{macro}[aux]{\@@_escape_x_end:w, \@@_escape_x_large:n}
+% \begin{macro}{\@@_escape_/x:w}
+% \begin{macro}{\@@_escape_x_end:w, \@@_escape_x_large:n}
% When |\x| is encountered, \cs{@@_escape_x_test:N} is responsible for
% grabbing some hexadecimal digits, and feeding the result to
% \cs{@@_escape_x_end:w}. If the number is too big interrupt the
@@ -1572,7 +1572,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_escape_x_test:N, \@@_escape_x_testii:N}
+% \begin{macro}{\@@_escape_x_test:N, \@@_escape_x_testii:N}
% Find out whether the first character is a left brace (allowing any
% number of hexadecimal digits), or not (allowing up to two
% hexadecimal digits). We need to check for the end-of-string marker.
@@ -1604,7 +1604,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_escape_x:N}
+% \begin{macro}{\@@_escape_x:N}
% This looks for the second digit in the unbraced case.
% \begin{macrocode}
\cs_new:Npn \@@_escape_x:N #1
@@ -1619,7 +1619,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_escape_x_loop:N, \@@_escape_x_loop_error:}
+% \begin{macro}{\@@_escape_x_loop:N, \@@_escape_x_loop_error:}
% Grab hexadecimal digits, skip spaces, and at the end, check that
% there is a right brace, otherwise raise an error outside the
% assignment.
@@ -1655,7 +1655,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_hexadecimal_use:NTF}
+% \begin{macro}[rEXP]{\@@_hexadecimal_use:NTF}
% \TeX{} detects uppercase hexadecimal digits for us but not the
% lowercase letters, which we need to detect and replace by their
% uppercase counterpart.
@@ -1665,9 +1665,8 @@
\if_int_compare:w 1 < "1 \token_to_str:N #1 \exp_stop_f:
#1 \prg_return_true:
\else:
- \if_case:w \__int_eval:w
- \exp_after:wN ` \token_to_str:N #1 - `a
- \__int_eval_end:
+ \if_case:w
+ \__int_eval:n { \exp_after:wN ` \token_to_str:N #1 - `a }
A
\or: B
\or: C
@@ -1684,7 +1683,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP, aux]
+% \begin{macro}[EXP]
% {\@@_char_if_alphanumeric:NTF, \@@_char_if_special:NTF}
% These two tests are used in the first pass when parsing a regular
% expression. That pass is responsible for finding escaped and
@@ -1897,8 +1896,8 @@
%
% \subsubsection{Generic helpers used when compiling}
%
-% \begin{macro}[int]{\@@_get_digits:NTFw}
-% \begin{macro}[aux, rEXP]{\@@_get_digits_loop:w}
+% \begin{macro}{\@@_get_digits:NTFw}
+% \begin{macro}[rEXP]{\@@_get_digits_loop:w}
% If followed by some raw digits, collect them one by one in the
% integer variable |#1|, and take the \texttt{true} branch. Otherwise,
% take the \texttt{false} branch.
@@ -1919,7 +1918,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_if_raw_digit:NNTF}
+% \begin{macro}[EXP]{\@@_if_raw_digit:NNTF}
% Test used when grabbing digits for the |{m,n}| quantifier.
% It only accepts non-escaped digits.
% \begin{macrocode}
@@ -1981,7 +1980,7 @@
% any mode.
% \end{itemize}
%
-% \begin{macro}[int, EXP]{\@@_if_in_class:TF}
+% \begin{macro}[EXP]{\@@_if_in_class:TF}
% Test whether we are directly in a character class (at the innermost
% level of nesting). There, many escape sequences are not recognized,
% and special characters are normal. Also, for every raw character, we
@@ -1998,7 +1997,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_if_in_cs:TF}
+% \begin{macro}[EXP]{\@@_if_in_cs:TF}
% Right braces are special only directly inside control sequences (at
% the inner-most level of nesting, not counting groups).
% \begin{macrocode}
@@ -2017,7 +2016,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_if_in_class_or_catcode:TF}
+% \begin{macro}[EXP]{\@@_if_in_class_or_catcode:TF}
% Assertions are only allowed in modes $0$, $-2$, and $-6$,
% \emph{i.e.}, even, non-positive modes.
% \begin{macrocode}
@@ -2036,7 +2035,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_if_within_catcode:TF}
+% \begin{macro}[EXP]{\@@_if_within_catcode:TF}
% This test takes the true branch if we are in a catcode test, either
% immediately following it (modes $2$ and $6$) or in a class on which
% it applies (modes $23$ and $63$). This is used to tweak how left
@@ -2053,7 +2052,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_chk_c_allowed:T}
+% \begin{macro}{\@@_chk_c_allowed:T}
% The |\c| escape sequence is only allowed in modes $0$ and $3$,
% \emph{i.e.}, not within any other |\c| escape sequence.
% \begin{macrocode}
@@ -2073,7 +2072,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_mode_quit_c:}
+% \begin{macro}{\@@_mode_quit_c:}
% This function changes the mode as it is needed just after a catcode
% test.
% \begin{macrocode}
@@ -2092,7 +2091,7 @@
%
% \subsubsection{Framework}
%
-% \begin{macro}[int]{\@@_compile:w, \@@_compile_end:}
+% \begin{macro}{\@@_compile:w, \@@_compile_end:}
% Used when compiling a user regex or a regex for the |\c{...}| escape
% sequence within another regex. Start building a token list within a
% group (with \texttt{x}-expansion at the outset), and set a few
@@ -2140,7 +2139,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_compile:n}
+% \begin{macro}{\@@_compile:n}
% The compilation is done between \cs{@@_compile:w} and
% \cs{@@_compile_end:}, starting in mode~$0$. Then
% \cs{@@_escape_use:nnnn} distinguishes special characters, escaped
@@ -2184,7 +2183,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_compile_escaped:N, \@@_compile_special:N}
+% \begin{macro}{\@@_compile_escaped:N, \@@_compile_special:N}
% If the special character or escaped alphanumeric has a particular
% meaning in regexes, the corresponding function is used. Otherwise,
% it is interpreted as a raw character. We distinguish special
@@ -2204,7 +2203,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_compile_one:x}
+% \begin{macro}{\@@_compile_one:x}
% This is used after finding one \enquote{test}, such as |\d|, or a
% raw character. If that followed a catcode test (\emph{e.g.}, |\cL|),
% then restore the mode. If we are not in a class, then the test is
@@ -2235,7 +2234,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {\@@_compile_abort_tokens:n, \@@_compile_abort_tokens:x}
% This function places the collected tokens back in the input stream,
% each as a raw character. Spaces are not preserved.
@@ -2254,7 +2253,7 @@
%
% \subsubsection{Quantifiers}
%
-% \begin{macro}[int]{\@@_compile_quantifier:w}
+% \begin{macro}{\@@_compile_quantifier:w}
% This looks ahead and finds any quantifier (special character equal
% to either of \texttt{?+*\{}).
% \begin{macrocode}
@@ -2270,8 +2269,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_quantifier_none:}
-% \begin{macro}[aux]{\@@_compile_quantifier_abort:xNN}
+% \begin{macro}{\@@_compile_quantifier_none:}
+% \begin{macro}{\@@_compile_quantifier_abort:xNN}
% Those functions are called whenever there is no quantifier, or a
% braced construction is invalid (equivalent to no quantifier, and
% whatever characters were grabbed are left raw).
@@ -2289,7 +2288,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_quantifier_lazyness:nnNN}
+% \begin{macro}{\@@_compile_quantifier_lazyness:nnNN}
% Once the \enquote{main} quantifier (\texttt{?}, \texttt{*},
% \texttt{+} or a braced construction) is found, we check whether it
% is lazy (followed by a question mark). We then add to the compiled
@@ -2309,7 +2308,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_compile_quantifier_?:w,
% \@@_compile_quantifier_*:w,
@@ -2328,8 +2327,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]+\@@_compile_quantifier_{:w+ ^^A}
-% \begin{macro}[aux]
+% \begin{macro}+\@@_compile_quantifier_{:w+ ^^A}
+% \begin{macro}
% {
% \@@_compile_quantifier_braced_auxi:w,
% \@@_compile_quantifier_braced_auxii:w,
@@ -2421,7 +2420,7 @@
%
% \subsubsection{Raw characters}
%
-% \begin{macro}[int]{\@@_compile_raw_error:N}
+% \begin{macro}{\@@_compile_raw_error:N}
% Within character classes, and following catcode tests, some escaped
% alphanumeric sequences such as |\b| do not have any meaning. They
% are replaced by a raw character, after spitting out an error.
@@ -2434,7 +2433,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_compile_raw:N}
+% \begin{macro}{\@@_compile_raw:N}
% If we are in a character class and the next character is an
% unescaped dash, this denotes a range. Otherwise, the current
% character |#1| matches itself.
@@ -2460,7 +2459,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_range:Nw, \@@_if_end_range:NNTF}
+% \begin{macro}{\@@_compile_range:Nw, \@@_if_end_range:NNTF}
% We have just read a raw character followed by a dash; this should be
% followed by an end-point for the range. Valid end-points are: any
% raw character; any special character, except a right bracket. In
@@ -2516,7 +2515,7 @@
%
% \subsubsection{Character properties}
%
-% \begin{macro}[aux]{\@@_compile_.:, \@@_prop_.:}
+% \begin{macro}{\@@_compile_.:, \@@_prop_.:}
% In a class, the dot has no special meaning. Outside, insert
% \cs{@@_prop_.:}, which matches any character or control
% sequence, and refuses $-2$ (end-marker).
@@ -2536,7 +2535,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_compile_/d:, \@@_compile_/D:,
% \@@_compile_/h:, \@@_compile_/H:,
@@ -2572,11 +2571,11 @@
%
% \subsubsection{Anchoring and simple assertions}
%
-% \begin{macro}[aux]{\@@_compile_anchor:NF}
-% \begin{macro}[aux]+\@@_compile_^:+
-% \begin{macro}[aux]{\@@_compile_/A:, \@@_compile_/G:}
-% \begin{macro}[aux]+\@@_compile_$:+
-% \begin{macro}[aux]{\@@_compile_/Z:, \@@_compile_/z:}
+% \begin{macro}{\@@_compile_anchor:NF}
+% \begin{macro}+\@@_compile_^:+
+% \begin{macro}{\@@_compile_/A:, \@@_compile_/G:}
+% \begin{macro}+\@@_compile_$:+
+% \begin{macro}{\@@_compile_/Z:, \@@_compile_/z:}
% In modes where assertions are allowed, anchor to the start of the
% query, the start of the match, or the end of the query, depending on
% the integer |#1|. In other modes, |#2| treats the character as raw,
@@ -2614,7 +2613,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_/b:, \@@_compile_/B:}
+% \begin{macro}{\@@_compile_/b:, \@@_compile_/B:}
% Contrarily to |^| and |$|, which could be implemented without really
% knowing what precedes in the token list, this requires more
% information, namely, the knowledge of the last character code.
@@ -2642,7 +2641,7 @@
%
% \subsubsection{Character classes}
%
-% \begin{macro}[aux]{\@@_compile_]:}
+% \begin{macro}{\@@_compile_]:}
% Outside a class, right brackets have no meaning. In a class, change
% the mode ($m\to (m-15)/13$, truncated) to reflect the fact that we
% are leaving the class. Look for quantifiers, unless we are still in
@@ -2667,7 +2666,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_[:}
+% \begin{macro}{\@@_compile_[:}
% In a class, left brackets might introduce a \textsc{posix} character
% class, or mean nothing. Immediately following |\c|\meta{category},
% we must insert the appropriate catcode test, then parse the class; we
@@ -2690,7 +2689,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_class_normal:w}
+% \begin{macro}{\@@_compile_class_normal:w}
% In the \enquote{normal} case, we insert \cs{@@_class:NnnnN}
% \meta{boolean} in the compiled code. The \meta{boolean} is true for
% positive classes, and false for negative classes, characterized by a
@@ -2706,7 +2705,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_class_catcode:w}
+% \begin{macro}{\@@_compile_class_catcode:w}
% This function is called for a left bracket in modes $2$ or $6$
% (catcode test, and catcode test within a class). In mode $2$ the
% whole construction needs to be put in a class (like single
@@ -2729,7 +2728,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_compile_class:TFNN, \@@_compile_class:NN}
% If the first character is |^|, then the class is negative (use
% |#2|), otherwise it is positive (use |#1|). If the next character
@@ -2757,7 +2756,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_compile_class_posix_test:w,
% \@@_compile_class_posix:NNNNw,
@@ -2840,7 +2839,7 @@
%
% \subsubsection{Groups and alternations}
%
-% \begin{macro}[aux]{\@@_compile_group_begin:N, \@@_compile_group_end:}
+% \begin{macro}{\@@_compile_group_begin:N, \@@_compile_group_end:}
% The contents of a regex group are turned into compiled code in
% \cs{l_@@_internal_regex}, which ends up with items of the form
% \cs{@@_branch:n} \Arg{concatenation}. This construction is done
@@ -2878,7 +2877,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_(:}
+% \begin{macro}{\@@_compile_(:}
% In a class, parentheses are not special. Outside, check for a |?|,
% denoting special groups, and run the code for the corresponding
% special group.
@@ -2909,7 +2908,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]+\@@_compile_|:+
+% \begin{macro}+\@@_compile_|:+
% In a class, the pipe is not special. Otherwise, end the current
% branch and open another one.
% \begin{macrocode}
@@ -2924,7 +2923,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_):}
+% \begin{macro}{\@@_compile_):}
% Within a class, parentheses are not special. Outside, close a group.
% \begin{macrocode}
\cs_new_protected:cpn { @@_compile_): }
@@ -2935,8 +2934,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_special_group_::w}
-% \begin{macro}[aux]+\@@_compile_special_group_|:w+
+% \begin{macro}{\@@_compile_special_group_::w}
+% \begin{macro}+\@@_compile_special_group_|:w+
% Non-capturing, and resetting groups are easy to take care of during
% compilation; for those groups, the harder parts come when building.
% \begin{macrocode}
@@ -2948,7 +2947,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_compile_special_group_i:w, \@@_compile_special_group_-:w}
% The match can be made case-insensitive by setting the option with
% \texttt{(?i)}; the original behaviour is restored by \texttt{(?-i)}.
@@ -2990,7 +2989,7 @@
%
% \subsubsection{Catcodes and csnames}
%
-% \begin{macro}[aux]{\@@_compile_/c:, \@@_compile_c_test:NN}
+% \begin{macro}{\@@_compile_/c:, \@@_compile_c_test:NN}
% The |\c| escape sequence can be followed by a capital letter
% representing a character category, by a left bracket which starts a
% list of categories, or by a brace group holding a regular expression
@@ -3023,7 +3022,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_c_C:NN}
+% \begin{macro}{\@@_compile_c_C:NN}
% If |\cC| is not followed by |.| or |(...)| then complain because
% that construction cannot match anything, except in cases like
% |\cC[\c{...}]|, where it has no effect.
@@ -3043,7 +3042,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_compile_c_[:w,
% \@@_compile_c_lbrack_loop:NN,
@@ -3097,7 +3096,7 @@
}
\cs_new_protected:Npn \@@_compile_c_lbrack_add:N #1
{
- \if_int_odd:w \__int_eval:w \l_@@_catcodes_int / #1 \__int_eval_end:
+ \if_int_odd:w \__int_eval:n { \l_@@_catcodes_int / #1 }
\else:
\int_add:Nn \l_@@_catcodes_int {#1}
\fi:
@@ -3134,7 +3133,7 @@
%
% \begin{macro}+\@@_compile_}:+
% \begin{macro}{\@@_compile_end_cs:}
-% \begin{macro}[EXP,aux]{\@@_compile_cs_aux:Nn, \@@_compile_cs_aux:NNnnnN}
+% \begin{macro}[EXP]{\@@_compile_cs_aux:Nn, \@@_compile_cs_aux:NNnnnN}
% Non-escaped right braces are only special if they appear when
% compiling the regular expression for a csname, but not within a
% class: |\c{[{}]}| matches the control sequences |\{| and |\}|. So,
@@ -3213,8 +3212,8 @@
%
% \subsubsection{Raw token lists with \cs{u}}
%
-% \begin{macro}[aux]{\@@_compile_/u:}
-% \begin{macro}[aux, EXP]{\@@_compile_u_loop:NN}
+% \begin{macro}{\@@_compile_/u:}
+% \begin{macro}[EXP]{\@@_compile_u_loop:NN}
% The |\u| escape is invalid in classes and directly following a
% catcode test. Otherwise, it must be followed by a left brace. We
% then collect the characters for the argument of |\u| within an
@@ -3264,7 +3263,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_u_end:}
+% \begin{macro}{\@@_compile_u_end:}
% Once we have extracted the variable's name, we store the contents of
% that variable in \cs{l_@@_internal_a_tl}. The behaviour of |\u|
% then depends on whether we are within a |\c{...}| escape (in this
@@ -3282,7 +3281,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_u_in_cs:}
+% \begin{macro}{\@@_compile_u_in_cs:}
% When |\u| appears within a control sequence, we convert the variable
% to a string with escaped spaces. Then for each character insert a
% class matching exactly that character, once.
@@ -3306,7 +3305,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_compile_u_not_cs:}
+% \begin{macro}{\@@_compile_u_not_cs:}
% In mode $0$, the |\u| escape adds one state to the NFA for each
% token in \cs{l_@@_internal_a_tl}. If a given \meta{token} is a
% control sequence, then insert a string comparison test, otherwise,
@@ -3335,7 +3334,7 @@
%
% \subsubsection{Other}
%
-% \begin{macro}[aux]{\@@_compile_/K:}
+% \begin{macro}{\@@_compile_/K:}
% The |\K| control sequence is currently the only \enquote{command},
% which performs some action, rather than matching something. It is
% allowed in the same contexts as |\b|. At the compilation stage, we
@@ -3352,12 +3351,13 @@
%
% \subsubsection{Showing regexes}
%
-% \begin{macro}[aux]{\@@_show:Nn}
+% \begin{macro}{\@@_show:N}
% Within a \cs{__tl_build:Nw} \ldots{} \cs{__tl_build_end:} group, we
% redefine all the function that can appear in a compiled regex, then
-% run the regex. The result is then shown.
+% run the regex. The result stored in \cs{l_@@_internal_a_tl} is then
+% meant to be shown.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_show:Nn #1#2
+\cs_new_protected:Npn \@@_show:N #1
{
\__tl_build:Nw \l_@@_internal_a_tl
\cs_set_protected:Npn \@@_branch:n
@@ -3407,13 +3407,11 @@
\@@_show_push:n { ~ }
\cs_if_exist_use:N #1
\__tl_build_end:
- \__msg_show_variable:NNNnn #1 \cs_if_exist:NTF ? { }
- { >~Compiled~regex~#2: \l_@@_internal_a_tl }
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_show_one:n}
+% \begin{macro}{\@@_show_one:n}
% Every part of the final message go through this function, which adds
% one line to the output, with the appropriate prefix.
% \begin{macrocode}
@@ -3422,7 +3420,7 @@
\int_incr:N \l_@@_show_lines_int
\__tl_build_one:x
{
- \exp_not:N \\
+ \exp_not:N \iow_newline:
\seq_map_function:NN \l_@@_show_prefix_seq \use:n
#1
}
@@ -3430,7 +3428,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_show_push:n, \@@_show_pop:, \@@_show_scope:nn}
% Enter and exit levels of nesting. The \texttt{scope} function prints
% its first argument as an \enquote{introduction}, then performs its
@@ -3450,7 +3448,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_show_group_aux:nnnnN}
+% \begin{macro}{\@@_show_group_aux:nnnnN}
% We display all groups in the same way, simply adding a message,
% \texttt{(no capture)} or \texttt{(resetting)}, to special groups.
% The odd \cs{use_ii:nn} avoids printing a spurious \texttt{+-branch}
@@ -3468,7 +3466,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_show_class:NnnnN}
+% \begin{macro}{\@@_show_class:NnnnN}
% I'm entirely unhappy about this function: I couldn't find a way to
% test if a class is a single test. Instead, collect the
% representation of the tests in the class. If that had more than one
@@ -3521,7 +3519,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_show_anchor_to_str:N}
+% \begin{macro}[rEXP]{\@@_show_anchor_to_str:N}
% The argument is an integer telling us where the anchor is. We
% convert that to the relevant info.
% \begin{macrocode}
@@ -3539,7 +3537,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_show_item_catcode:NnT}
+% \begin{macro}{\@@_show_item_catcode:NnT}
% Produce a sequence of categories which the catcode bitmap |#2|
% contains, and show it, indenting the tests on which this catcode
% constraint applies.
@@ -3560,7 +3558,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_show_item_exact_cs:n}
+% \begin{macro}{\@@_show_item_exact_cs:n}
% \begin{macrocode}
\cs_new_protected:Npn \@@_show_item_exact_cs:n #1
{
@@ -3658,7 +3656,7 @@
% corresponding end-points of nested groups.
% \end{itemize}
%
-% \begin{macro}[int]{\@@_build:n, \@@_build:N}
+% \begin{macro}{\@@_build:n, \@@_build:N}
% The \texttt{n}-type function first compiles its argument. Reset some
% variables. Allocate two states, and put a wildcard in state $0$
% (transitions to state $1$ and $0$ state). Then build the regex
@@ -3693,7 +3691,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_build_for_cs:n}
+% \begin{macro}{\@@_build_for_cs:n}
% When using a regex to match a cs, we don't insert a wildcard, we
% anchor at the end, and since we ignore submatches, there is no need
% to surround the expression with a group. However, for branches to
@@ -3726,7 +3724,7 @@
%
% \subsubsection{Helpers for building an \textsc{nfa}}
%
-% \begin{macro}[int]{\@@_push_lr_states:, \@@_pop_lr_states:}
+% \begin{macro}{\@@_push_lr_states:, \@@_pop_lr_states:}
% When building the regular expression, we keep track of pointers to
% the left-end and right-end of each group without help from \TeX{}'s
% grouping.
@@ -3748,7 +3746,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]
+% \begin{macro}
% {
% \@@_build_transition_left:NNN,
% \@@_build_transition_right:nNn
@@ -3766,7 +3764,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_build_new_state:}
+% \begin{macro}{\@@_build_new_state:}
% Add a new empty state to the \textsc{nfa}. Then update the
% \texttt{left}, \texttt{right}, and \texttt{max} states, so that the
% \texttt{right} state is the new empty state, and the \texttt{left}
@@ -3794,7 +3792,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_build_transitions_lazyness:NNNNN}
+% \begin{macro}{\@@_build_transitions_lazyness:NNNNN}
% This function creates a new state, and puts two transitions starting
% from the old current state. The order of the transitions is
% controlled by |#1|, true for lazy quantifiers, and false for greedy
@@ -3819,8 +3817,8 @@
%
% \subsubsection{Building classes}
%
-% \begin{macro}[int]{\@@_class:NnnnN}
-% \begin{macro}[int, rEXP]{\@@_tests_action_cost:n}
+% \begin{macro}{\@@_class:NnnnN}
+% \begin{macro}[rEXP]{\@@_tests_action_cost:n}
% The arguments are: \meta{boolean} \Arg{tests} \Arg{min} \Arg{more}
% \meta{lazyness}. First store the tests with a trailing
% \cs{@@_action_cost:n}, in the true branch of
@@ -3849,7 +3847,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_class_repeat:n}
+% \begin{macro}{\@@_class_repeat:n}
% This is used for a fixed number of repetitions. Build one state for
% each repetition, with a transition controlled by the tests that we
% have collected. That works just fine for |#1|${}=0$ repetitions:
@@ -3867,7 +3865,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_class_repeat:nN}
+% \begin{macro}{\@@_class_repeat:nN}
% This implements unbounded repetitions of a single class (\emph{e.g.}
% the |*| and |+| quantifiers). If the minimum number |#1| of
% repetitions is $0$, then build a transition from the current state
@@ -3895,7 +3893,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_class_repeat:nnN}
+% \begin{macro}{\@@_class_repeat:nnN}
% We want to build the code to match from |#1| to $|#1|+|#2|$
% repetitions. Match |#1| repetitions (can be $0$). Compute the final
% state of the next construction as \texttt{a}. Build $|#2|>0$ states,
@@ -3921,7 +3919,7 @@
%
% \subsubsection{Building groups}
%
-% \begin{macro}[aux]{\@@_group_aux:nnnnN}
+% \begin{macro}{\@@_group_aux:nnnnN}
% Arguments: \Arg{label} \Arg{contents} \Arg{min} \Arg{more}
% \meta{lazyness}. If \meta{min} is $0$, we need to add a state before
% building the group, so that the thread which skips the group does
@@ -3962,7 +3960,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_group:nnnN, \@@_group_no_capture:nnnN}
+% \begin{macro}{\@@_group:nnnN, \@@_group_no_capture:nnnN}
% Hand to \cs{@@_group_aux:nnnnnN} the label of that group
% (expanded), and the group itself, with some extra commands to
% perform.
@@ -3981,8 +3979,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_group_resetting:nnnN}
-% \begin{macro}[aux]{\@@_group_resetting_loop:nnNn}
+% \begin{macro}{\@@_group_resetting:nnnN}
+% \begin{macro}{\@@_group_resetting_loop:nnNn}
% Again, hand the label $-1$ to \cs{@@_group_aux:nnnnN}, but this
% time we work a little bit harder to keep track of the maximum group
% label at the end of any branch, and to reset the group number at
@@ -4014,7 +4012,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_branch:n}
+% \begin{macro}{\@@_branch:n}
% Add a free transition from the left state of the current group to a
% brand new state, starting point of this branch. Once the branch is
% built, add a transition from its last state to the right state of
@@ -4039,7 +4037,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_group_repeat:nn}
+% \begin{macro}{\@@_group_repeat:nn}
% This function is called to repeat a group a fixed number of times
% |#2|; if this is $0$ we remove the group altogether (but don't reset
% the \texttt{capturing_group} label). Otherwise, the auxiliary
@@ -4065,7 +4063,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_group_submatches:nNN}
+% \begin{macro}{\@@_group_submatches:nNN}
% This inserts in states |#2| and |#3| the code for tracking
% submatches of the group |#1|, unless inhibited by a label of $-1$.
% \begin{macrocode}
@@ -4079,7 +4077,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_group_repeat_aux:n}
+% \begin{macro}{\@@_group_repeat_aux:n}
% Here we repeat \tn{toks} ranging from \texttt{left_state} to
% \texttt{max_state}, $|#1|>0$ times. First add a transition so that
% the copies \enquote{chain} properly. Compute the shift
@@ -4095,7 +4093,7 @@
\l_@@_right_state_int \l_@@_max_state_int
\int_set_eq:NN \l_@@_internal_a_int \l_@@_left_state_int
\int_set_eq:NN \l_@@_internal_b_int \l_@@_max_state_int
- \if_int_compare:w \__int_eval:w #1 > 1 \exp_stop_f:
+ \if_int_compare:w \__int_eval:n {#1} > 1 \exp_stop_f:
\int_set:Nn \l_@@_internal_c_int
{
( #1 - 1 )
@@ -4112,7 +4110,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_group_repeat:nnN}
+% \begin{macro}{\@@_group_repeat:nnN}
% This function is called to repeat a group at least $n$ times; the
% case $n=0$ is very different from $n>0$. Assume first that $n=0$.
% Insert submatch tracking information at the start and end of the
@@ -4166,7 +4164,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_group_repeat:nnnN}
+% \begin{macro}{\@@_group_repeat:nnnN}
% We wish to repeat the group between |#2| and $|#2|+|#3|$ times, with
% a lazyness controlled by |#4|. We insert submatch tracking up front:
% in principle, we could avoid recording submatches for the first |#2|
@@ -4222,7 +4220,7 @@
%
% \subsubsection{Others}
%
-% \begin{macro}[int]{\@@_assertion:Nn, \@@_b_test:, \@@_anchor:N}
+% \begin{macro}{\@@_assertion:Nn, \@@_b_test:, \@@_anchor:N}
% Usage: \cs{@@_assertion:Nn} \meta{boolean} \Arg{test}, where the
% \meta{test} is either of the two other functions. Add a free
% transition to a new state, conditionally to the assertion test. The
@@ -4269,7 +4267,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_command_K:}
+% \begin{macro}{\@@_command_K:}
% Change the starting point of the $0$-th submatch (full match), and
% transition to a new state, pretending that this is a fresh thread.
% \begin{macrocode}
@@ -4462,7 +4460,7 @@
% \end{variable}
%
% \begin{variable}{\l_@@_fresh_thread_bool, \l_@@_empty_success_bool}
-% \begin{macro}[aux]{\@@_if_two_empty_matches:F}
+% \begin{macro}{\@@_if_two_empty_matches:F}
% When doing multiple matches, we need to avoid infinite loops where
% each iteration matches the same empty token list. When an empty
% token list is matched, the next successful match of the same empty
@@ -4507,8 +4505,8 @@
%
% \subsubsection{Matching: framework}
%
-% \begin{macro}[int]{\@@_match:n}
-% \begin{macro}[aux]{\@@_match_init:}
+% \begin{macro}{\@@_match:n}
+% \begin{macro}{\@@_match_init:}
% First store the query into \tn{toks} registers and arrays (see
% \cs{@@_query_set:nnn}). Then initialize the variables that should
% be set once for each user function (even for multiple
@@ -4559,7 +4557,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_match_once:}
+% \begin{macro}{\@@_match_once:}
% This function finds one match, then does some action defined by the
% \texttt{every_match} token list, which may recursively call
% \cs{@@_match_once:}. First initialize some variables: set the
@@ -4595,7 +4593,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_single_match:, \@@_multi_match:n}
+% \begin{macro}{\@@_single_match:, \@@_multi_match:n}
% For a single match, the overall success is determined by whether the
% only match attempt is a success. When doing multiple matches, the
% overall matching is successful as soon as any match
@@ -4620,8 +4618,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_match_loop:}
-% \begin{macro}[aux, rEXP]{\@@_match_one_active:n}
+% \begin{macro}{\@@_match_loop:}
+% \begin{macro}[rEXP]{\@@_match_one_active:n}
% At each new position, set some variables and get the new character
% and category from the query. Then unpack the array of active
% threads, and clear it by resetting its length
@@ -4668,7 +4666,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_query_set:nnn}
+% \begin{macro}{\@@_query_set:nnn}
% The arguments are: tokens that \texttt{o} and \texttt{x} expand to
% one token of the query, the catcode, and the character code. Store
% those, and the current brace balance (used later to check for
@@ -4693,7 +4691,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_query_get:}
+% \begin{macro}{\@@_query_get:}
% Extract the current character and category codes at the current
% position from the appropriate arrays.
% \begin{macrocode}
@@ -4711,7 +4709,7 @@
%
% \subsubsection{Using states of the \textsc{nfa}}
%
-% \begin{macro}[int]{\@@_use_state:}
+% \begin{macro}{\@@_use_state:}
% Use the current \textsc{nfa} instruction. The state is initially
% marked as belonging to the current \texttt{step}: this allows normal
% free transition to repeat, but group-repeating transitions
@@ -4733,7 +4731,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_use_state_and_submatches:nn}
+% \begin{macro}{\@@_use_state_and_submatches:nn}
% This function is called as one item in the array of active threads
% after that array has been unpacked for a new step. Update the
% \texttt{current_state} and \texttt{current_submatches} and use the
@@ -4756,7 +4754,7 @@
%
% \subsubsection{Actions when matching}
%
-% \begin{macro}[int]{\@@_action_start_wildcard:}
+% \begin{macro}{\@@_action_start_wildcard:}
% For an unanchored match, state $0$ has a free transition to the next
% and a costly one to itself, to repeat at the next position. To catch
% repeated identical empty matches, we need to know if a successful
@@ -4774,8 +4772,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_action_free:n, \@@_action_free_group:n}
-% \begin{macro}[aux]{\@@_action_free_aux:nn}
+% \begin{macro}{\@@_action_free:n, \@@_action_free_group:n}
+% \begin{macro}{\@@_action_free_aux:nn}
% These functions copy a thread after checking that the \textsc{nfa}
% state has not already been used at this position. If not, store
% submatches in the new state, and insert the instructions for that
@@ -4816,7 +4814,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_action_cost:n}
+% \begin{macro}{\@@_action_cost:n}
% A transition which consumes the current character and shifts the
% state by |#1|. The resulting state is stored in the appropriate array
% for use at the next position, and we also store the current
@@ -4825,13 +4823,13 @@
\cs_new_protected:Npn \@@_action_cost:n #1
{
\exp_args:No \@@_store_state:n
- { \__int_value:w \__int_eval:w \l_@@_curr_state_int + #1 }
+ { \__int_value:w \__int_eval:n { \l_@@_curr_state_int + #1 } }
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_store_state:n}
-% \begin{macro}[aux]{\@@_store_submatches:}
+% \begin{macro}{\@@_store_state:n}
+% \begin{macro}{\@@_store_submatches:}
% Put the given state in \cs{g_@@_thread_state_intarray}, and increment
% the length of the array. Also store the current submatch in the
% appropriate \tn{toks}.
@@ -4852,7 +4850,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_disable_submatches:}
+% \begin{macro}{\@@_disable_submatches:}
% Some user functions don't require tracking submatches.
% We get a performance improvement by simply defining the
% relevant functions to remove their argument and do nothing
@@ -4866,7 +4864,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_action_submatch:n}
+% \begin{macro}{\@@_action_submatch:n}
% Update the current submatches with the information from the current
% position. Maybe a bottleneck.
% \begin{macrocode}
@@ -4878,7 +4876,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_action_success:}
+% \begin{macro}{\@@_action_success:}
% There is a successful match when an execution path reaches the last
% state in the \textsc{nfa}, unless this marks a second identical
% empty match. Then mark that there was a successful match; it is
@@ -4937,7 +4935,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[aux, rEXP]{\@@_replacement_balance_one_match:n}
+% \begin{macro}[rEXP]{\@@_replacement_balance_one_match:n}
% This expects as an argument the first index of a set of entries in
% \cs{g_@@_submatch_begin_intarray} (and related arrays) which hold the
% submatch information for a given match. It
@@ -4956,7 +4954,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_replacement_do_one_match:n}
+% \begin{macro}[rEXP]{\@@_replacement_do_one_match:n}
% The input is the same as \cs{@@_replacement_balance_one_match:n}.
% This function is redefined to expand to the part of the token list
% from the end of the previous match to a given match, followed by the
@@ -4975,7 +4973,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_exp_not:N}
+% \begin{macro}{\@@_replacement_exp_not:N}
% This function lets us navigate around the fact that the primitive
% \cs{exp_not:n} requires a braced argument. As far as I can tell, it
% is only needed if the user tries to include in the replacement text
@@ -4990,8 +4988,8 @@
%
% \subsubsection{Query and brace balance}
%
-% \begin{macro}[int, rEXP]{\@@_query_range:nn}
-% \begin{macro}[aux, rEXP]{\@@_query_range_loop:ww}
+% \begin{macro}[rEXP]{\@@_query_range:nn}
+% \begin{macro}[rEXP]{\@@_query_range_loop:ww}
% When it is time to extract submatches from the token list, the
% various tokens are stored in \tn{toks} registers numbered from
% \cs{l_@@_min_pos_int} inclusive to \cs{l_@@_max_pos_int}
@@ -5024,7 +5022,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_query_submatch:n}
+% \begin{macro}{\@@_query_submatch:n}
% Find the start and end positions for a given submatch (of a given match).
% \begin{macrocode}
\cs_new:Npn \@@_query_submatch:n #1
@@ -5047,7 +5045,8 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_submatch_balance:n #1
{
- \__int_eval:w
+ \__int_eval:n
+ {
\int_compare:nNnTF
{ \__intarray_item_fast:Nn \g_@@_submatch_end_intarray {#1} } = 0
{ 0 }
@@ -5063,15 +5062,15 @@
\__intarray_item_fast:Nn \g_@@_balance_intarray
{ \__intarray_item_fast:Nn \g_@@_submatch_begin_intarray {#1} }
}
- \__int_eval_end:
+ }
}
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Framework}
%
-% \begin{macro}[int]{\@@_replacement:n}
-% \begin{macro}[aux]{\@@_replacement_aux:n}
+% \begin{macro}{\@@_replacement:n}
+% \begin{macro}{\@@_replacement_aux:n}
% The replacement text is built incrementally by abusing \tn{toks}
% within a group (see \pkg{l3tl-build}). We keep track in
% \cs{l_@@_balance_int} of the balance of explicit begin- and
@@ -5139,7 +5138,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_normal:n}
+% \begin{macro}{\@@_replacement_normal:n}
% Most characters are simply sent to the output by
% \cs{__tl_build_one:n}, unless a particular category code has been
% requested: then \cs{@@_replacement_c_A:w} or a similar auxiliary is
@@ -5168,7 +5167,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_escaped:N}
+% \begin{macro}{\@@_replacement_escaped:N}
% As in parsing a regular expression, we use an auxiliary built from
% |#1| if defined. Otherwise, check for escaped digits (standing from
% submatches from $0$ to $9$): anything else is a raw character.
@@ -5191,7 +5190,7 @@
%
% \subsubsection{Submatches}
%
-% \begin{macro}[aux]{\@@_replacement_put_submatch:n}
+% \begin{macro}{\@@_replacement_put_submatch:n}
% Insert a submatch in the replacement text. This is dropped if the
% submatch number is larger than the number of capturing groups.
% Unless the submatch appears inside a |\c{...}| or |\u{...}|
@@ -5207,15 +5206,15 @@
\__tl_build_one:n { \@@_query_submatch:n { #1 + ##1 } }
\if_int_compare:w \l_@@_replacement_csnames_int = 0 \exp_stop_f:
\tl_put_right:Nn \l_@@_balance_tl
- { + \@@_submatch_balance:n { \__int_eval:w #1+##1 \__int_eval_end: } }
+ { + \@@_submatch_balance:n { \__int_eval:n { #1+##1 } } }
\fi:
\fi:
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_g:w}
-% \begin{macro}[aux,rEXP]{\@@_replacement_g_digits:NN}
+% \begin{macro}{\@@_replacement_g:w}
+% \begin{macro}[rEXP]{\@@_replacement_g_digits:NN}
% Grab digits for the |\g| escape sequence in a primitive assignment
% to the integer \cs{l_@@_internal_a_int}. At the end of the run of
% digits, check that it ends with a right brace.
@@ -5259,7 +5258,7 @@
%
% \subsubsection{Csnames in replacement}
%
-% \begin{macro}[aux]{\@@_replacement_c:w}
+% \begin{macro}{\@@_replacement_c:w}
% |\c| may only be followed by an unescaped character. If followed by
% a left brace, start a control sequence by calling an auxiliary
% common with |\u|. Otherwise test whether the category is known; if
@@ -5282,7 +5281,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_cu_aux:Nw}
+% \begin{macro}{\@@_replacement_cu_aux:Nw}
% Start a control sequence with \cs{cs:w}, protected
% from expansion by |#1| (either \cs{@@_replacement_exp_not:N} or
% \cs{exp_not:V}), or turned to a string by \cs{tl_to_str:V} if inside
@@ -5302,7 +5301,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_u:w}
+% \begin{macro}{\@@_replacement_u:w}
% Check that |\u| is followed by a left brace. If so, start a control
% sequence with \cs{cs:w}, which is then unpacked either with
% \cs{exp_not:V} or \cs{tl_to_str:V} depending on the current context.
@@ -5316,7 +5315,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_rbrace:N}
+% \begin{macro}{\@@_replacement_rbrace:N}
% Within a |\c{...}| or |\u{...}| construction, end the control
% sequence, and decrease the brace count. Otherwise, this is a raw
% right brace.
@@ -5335,7 +5334,7 @@
%
% \subsubsection{Characters in replacement}
%
-% \begin{macro}[aux]{\@@_replacement_cat:NNN}
+% \begin{macro}{\@@_replacement_cat:NNN}
% Here, |#1| is a letter among |BEMTPUDSLOA| and |#2#3| denote the
% next character. Complain if we reach the end of the replacement or
% if the construction appears inside |\c{|\ldots{}|}| or
@@ -5389,7 +5388,7 @@
\group_begin:
% \end{macrocode}
%
-% \begin{macro}[aux]{\@@_replacement_char:nNN}
+% \begin{macro}{\@@_replacement_char:nNN}
% The only way to produce an arbitrary character--catcode pair is to
% use the \tn{lowercase} or \tn{uppercase} primitives. This is a
% wrapper for our purposes. The first argument is the null character
@@ -5406,7 +5405,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_c_A:w}
+% \begin{macro}{\@@_replacement_c_A:w}
% For an active character, expansion must be avoided, twice because we
% later do two \texttt{x}-expansions, to unpack \tn{toks} for the
% query, and to expand their contents to tokens of the query.
@@ -5417,7 +5416,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_c_B:w}
+% \begin{macro}{\@@_replacement_c_B:w}
% An explicit begin-group token increases the balance, unless within a
% |\c{...}| or |\u{...}| construction. Add the desired begin-group
% character, using the standard \cs{if_false:} trick. We eventually
@@ -5438,7 +5437,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_c_C:w}
+% \begin{macro}{\@@_replacement_c_C:w}
% This is not quite catcode-related: when the user requests a
% character with category \enquote{control sequence}, the
% one-character control symbol is returned. As for the active
@@ -5449,7 +5448,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_c_D:w}
+% \begin{macro}{\@@_replacement_c_D:w}
% Subscripts fit the mould: \tn{lowercase} the null byte with the
% correct category.
% \begin{macrocode}
@@ -5459,7 +5458,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_c_E:w}
+% \begin{macro}{\@@_replacement_c_E:w}
% Similar to the begin-group case, the second \texttt{x}-expansion
% produces the bare end-group token.
% \begin{macrocode}
@@ -5475,7 +5474,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_c_L:w}
+% \begin{macro}{\@@_replacement_c_L:w}
% Simply \tn{lowercase} a letter null byte to produce an arbitrary letter.
% \begin{macrocode}
\char_set_catcode_letter:N \^^@
@@ -5484,7 +5483,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_c_M:w}
+% \begin{macro}{\@@_replacement_c_M:w}
% No surprise here, we lowercase the null math toggle.
% \begin{macrocode}
\char_set_catcode_math_toggle:N \^^@
@@ -5493,7 +5492,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_c_O:w}
+% \begin{macro}{\@@_replacement_c_O:w}
% Lowercase an other null byte.
% \begin{macrocode}
\char_set_catcode_other:N \^^@
@@ -5502,7 +5501,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_c_P:w}
+% \begin{macro}{\@@_replacement_c_P:w}
% For macro parameters, expansion is a tricky issue. We need to
% prepare for two \texttt{x}-expansions and passing through various
% macro definitions. Note that we cannot replace one \cs{exp_not:n} by
@@ -5519,7 +5518,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_c_S:w}
+% \begin{macro}{\@@_replacement_c_S:w}
% Spaces are normalized on input by \TeX{} to have character code
% $32$. It is in fact impossible to get a token with character code
% $0$ and category code $10$. Hence we use $32$ instead of $0$ as our
@@ -5536,7 +5535,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_c_T:w}
+% \begin{macro}{\@@_replacement_c_T:w}
% No surprise for alignment tabs here. Those are surrounded by the
% appropriate braces whenever necessary, hence they don't cause
% trouble in alignment settings.
@@ -5547,7 +5546,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replacement_c_U:w}
+% \begin{macro}{\@@_replacement_c_U:w}
% Simple call to \cs{@@_replacement_char:nNN} which lowercases the
% math superscript |^^@|.
% \begin{macrocode}
@@ -5564,7 +5563,7 @@
%
% \subsubsection{An error}
%
-% \begin{macro}[aux]{\@@_replacement_error:NNN}
+% \begin{macro}{\@@_replacement_error:NNN}
% Simple error reporting by calling one of the messages
% \texttt{replacement-c}, \texttt{replacement-g}, or
% \texttt{replacement-u}.
@@ -5613,16 +5612,26 @@
% \begin{macro}{\regex_show:N, \regex_show:n}
% User functions: the \texttt{n} variant requires compilation first.
% Then show the variable with some appropriate text. The auxiliary
-% \cs{@@_show:Nx} is defined in a different section.
+% is defined in a different section.
% \begin{macrocode}
\cs_new_protected:Npn \regex_show:n #1
{
\@@_compile:n {#1}
- \@@_show:Nn \l_@@_internal_regex
- { { \tl_to_str:n {#1} } }
+ \@@_show:N \l_@@_internal_regex
+ \msg_show:nnxxxx { LaTeX / kernel } { show-regex }
+ { \tl_to_str:n {#1} } { }
+ { \l_@@_internal_a_tl } { }
}
\cs_new_protected:Npn \regex_show:N #1
- { \@@_show:Nn #1 { variable~\token_to_str:N #1 } }
+ {
+ \__kernel_check_defined:NT #1
+ {
+ \@@_show:N #1
+ \msg_show:nnxxxx { LaTeX / kernel } { show-regex }
+ { } { \token_to_str:N #1 }
+ { \l_@@_internal_a_tl } { }
+ }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -5748,7 +5757,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[aux]{\@@_return:}
+% \begin{macro}{\@@_return:}
% This function triggers either \cs{prg_return_false:} or
% \cs{prg_return_true:} as appropriate to whether a match was found or
% not. It is used by all user conditionals.
@@ -5766,7 +5775,7 @@
%
% \subsubsection{Matching}
%
-% \begin{macro}[aux]{\@@_if_match:nn}
+% \begin{macro}{\@@_if_match:nn}
% We don't track submatches, and stop after a single match. Build the
% \textsc{nfa} with |#1|, and perform the match on the query |#2|.
% \begin{macrocode}
@@ -5782,7 +5791,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_count:nnN}
+% \begin{macro}{\@@_count:nnN}
% Again, we don't care about submatches. Instead of aborting after the
% first \enquote{longest match} is found, we search for multiple
% matches, incrementing \cs{l_@@_match_count_int} every time to
@@ -5806,7 +5815,7 @@
%
% \subsubsection{Extracting submatches}
%
-% \begin{macro}[aux]{\@@_extract_once:nnN, \@@_extract_all:nnN}
+% \begin{macro}{\@@_extract_once:nnN, \@@_extract_all:nnN}
% Match once or multiple times. After each match (or after the only
% match), extract the submatches using \cs{@@_extract:}. At the
% end, store the sequence containing all the submatches into the user
@@ -5832,7 +5841,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_split:nnN}
+% \begin{macro}{\@@_split:nnN}
% Splitting at submatches is a bit more tricky. For each match,
% extract all submatches, and replace the zeroth submatch by the part
% of the query between the start of the match attempt and the start of
@@ -5885,7 +5894,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_group_end_extract_seq:N}
+% \begin{macro}{\@@_group_end_extract_seq:N}
% The end-points of submatches are stored as entries of two arrays
% from \cs{l_@@_min_submatch_int} to
% \cs{l_@@_submatch_int} (exclusive). Extract the relevant ranges
@@ -5927,7 +5936,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_extract_seq_aux:n, \@@_extract_seq_aux:ww}
+% \begin{macro}[EXP]{\@@_extract_seq_aux:n, \@@_extract_seq_aux:ww}
% The \texttt{:n} auxiliary builds one item of the sequence of
% submatches. First compute the brace balance of the submatch, then
% extract the submatch from the query, adding the appropriate braces
@@ -5956,7 +5965,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_extract:, \@@_extract_b:wn, \@@_extract_e:wn}
% Our task here is to extract from the property list
% \cs{l_@@_success_submatches_prop} the list of end-points of
@@ -6005,7 +6014,7 @@
%
% \subsubsection{Replacement}
%
-% \begin{macro}[aux]{\@@_replace_once:nnN}
+% \begin{macro}{\@@_replace_once:nnN}
% Build the \textsc{nfa} and the replacement functions, then find a
% single match. If the match failed, simply exit the
% group. Otherwise, we do the replacement. Extract submatches. Compute
@@ -6051,7 +6060,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_replace_all:nnN}
+% \begin{macro}{\@@_replace_all:nnN}
% Match multiple times, and for every match, extract submatches and
% additionally store the position at which the match attempt started.
% The entries from \cs{l_@@_min_submatch_int} to
@@ -6094,7 +6103,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_group_end_replace:N}
+% \begin{macro}{\@@_group_end_replace:N}
% If the brace balance is not $0$, raise an error. Then set the user's
% variable |#1| to the \texttt{x}-expansion of
% \cs{l_@@_internal_a_tl}, adding the appropriate braces to produce
@@ -6436,7 +6445,17 @@
}
% \end{macrocode}
%
-% \begin{macro}[aux]{\@@_msg_repeated:nnN}
+% Used when showing a regex.
+% \begin{macrocode}
+\__msg_kernel_new:nnn { kernel } { show-regex }
+ {
+ >~Compiled~regex~
+ \tl_if_empty:nTF {#1} { variable~ #2 } { {#1} } :
+ #3
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\@@_msg_repeated:nnN}
% This is not technically a message, but seems related enough to go
% there. The arguments are: |#1| is the minimum number of repetitions;
% |#2| is the number of allowed extra repetitions ($-1$ for infinite
@@ -6467,7 +6486,7 @@
% package \pkg{l3trace}. Function names are a bit different but could
% be merged.
%
-% \begin{macro}[int]
+% \begin{macro}
% {\__debug_trace_push:nnN, \__debug_trace_pop:nnN, \__debug_trace:nnx}
% Here |#1| is the module name (\texttt{regex}) and |#2| is
% typically~1. If the module's current tracing level is less than
@@ -6497,7 +6516,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int]{\@@_trace_states:n}
+% \begin{macro}{\@@_trace_states:n}
% This function lists the contents of all states of the \textsc{nfa},
% stored in \tn{toks} from $0$ to \cs{l_@@_max_state_int}
% (excluded).
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
index 694f7d4c2ee..75f1273c32e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -303,10 +303,10 @@
% If the \meta{sequence} is empty, leaves the \meta{false code} in the
% input stream. The value of the \meta{token list variable} is
% not defined in this case and should not be relied upon. If the
-% \meta{sequence} is non-empty, stores the left-most item from a
+% \meta{sequence} is non-empty, stores the left-most item from the
% \meta{sequence}
-% in the \meta{token list variable} without removing it from a
-% \meta{sequence}.
+% in the \meta{token list variable} without removing it from the
+% \meta{sequence}, then leaves the \meta{true code} in the input stream.
% The \meta{token list variable} is assigned locally.
% \end{function}
%
@@ -318,10 +318,10 @@
% If the \meta{sequence} is empty, leaves the \meta{false code} in the
% input stream. The value of the \meta{token list variable} is
% not defined in this case and should not be relied upon. If the
-% \meta{sequence} is non-empty, stores the right-most item from a
+% \meta{sequence} is non-empty, stores the right-most item from the
% \meta{sequence}
-% in the \meta{token list variable} without removing it from a
-% \meta{sequence}.
+% in the \meta{token list variable} without removing it from the
+% \meta{sequence}, then leaves the \meta{true code} in the input stream.
% The \meta{token list variable} is assigned locally.
% \end{function}
%
@@ -333,10 +333,10 @@
% If the \meta{sequence} is empty, leaves the \meta{false code} in the
% input stream. The value of the \meta{token list variable} is
% not defined in this case and should not be relied upon. If the
-% \meta{sequence} is non-empty, pops the left-most item from a
+% \meta{sequence} is non-empty, pops the left-most item from the
% \meta{sequence}
-% in the \meta{token list variable}, \emph{i.e.}~removes the item from a
-% \meta{sequence}.
+% in the \meta{token list variable}, \emph{i.e.}~removes the item from the
+% \meta{sequence}, then leaves the \meta{true code} in the input stream.
% Both the \meta{sequence} and the \meta{token list variable} are assigned
% locally.
% \end{function}
@@ -349,9 +349,9 @@
% If the \meta{sequence} is empty, leaves the \meta{false code} in the
% input stream. The value of the \meta{token list variable} is
% not defined in this case and should not be relied upon. If the
-% \meta{sequence} is non-empty, pops the left-most item from a \meta{sequence}
-% in the \meta{token list variable}, \emph{i.e.}~removes the item from a
-% \meta{sequence}.
+% \meta{sequence} is non-empty, pops the left-most item from the \meta{sequence}
+% in the \meta{token list variable}, \emph{i.e.}~removes the item from the
+% \meta{sequence}, then leaves the \meta{true code} in the input stream.
% The \meta{sequence} is modified globally, while the \meta{token list variable}
% is assigned locally.
% \end{function}
@@ -364,9 +364,9 @@
% If the \meta{sequence} is empty, leaves the \meta{false code} in the
% input stream. The value of the \meta{token list variable} is
% not defined in this case and should not be relied upon. If the
-% \meta{sequence} is non-empty, pops the right-most item from a \meta{sequence}
-% in the \meta{token list variable}, \emph{i.e.}~removes the item from a
-% \meta{sequence}.
+% \meta{sequence} is non-empty, pops the right-most item from the \meta{sequence}
+% in the \meta{token list variable}, \emph{i.e.}~removes the item from the
+% \meta{sequence}, then leaves the \meta{true code} in the input stream.
% Both the \meta{sequence} and the \meta{token list variable} are assigned
% locally.
% \end{function}
@@ -379,9 +379,10 @@
% If the \meta{sequence} is empty, leaves the \meta{false code} in the
% input stream. The value of the \meta{token list variable} is
% not defined in this case and should not be relied upon. If the
-% \meta{sequence} is non-empty, pops the right-most item from a \meta{sequence}
-% in the \meta{token list variable}, \emph{i.e.}~removes the item from a
-% \meta{sequence}. The \meta{sequence} is modified globally, while the
+% \meta{sequence} is non-empty, pops the right-most item from the \meta{sequence}
+% in the \meta{token list variable}, \emph{i.e.}~removes the item from the
+% \meta{sequence}, then leaves the \meta{true code} in the input stream.
+% The \meta{sequence} is modified globally, while the
% \meta{token list variable} is assigned locally.
% \end{function}
%
@@ -479,7 +480,6 @@
% The function \cs{seq_map_inline:Nn} is faster than
% \cs{seq_map_function:NN} for sequences with more than about~$10$
% items.
-% One mapping may be nested inside another.
% \end{function}
%
% \begin{function}[updated = 2012-06-29]
@@ -490,8 +490,7 @@
% Applies \meta{inline function} to every \meta{item} stored
% within the \meta{sequence}. The \meta{inline function} should
% consist of code which will receive the \meta{item} as |#1|.
-% One in line mapping can be nested inside another. The \meta{items}
-% are returned from left to right.
+% The \meta{items} are returned from left to right.
% \end{function}
%
% \begin{function}[updated = 2012-06-29]
@@ -500,15 +499,13 @@
% \seq_map_variable:cNn, \seq_map_variable:ccn
% }
% \begin{syntax}
-% \cs{seq_map_variable:NNn} \meta{sequence} \meta{tl~var.} \Arg{function using tl~var.}
+% \cs{seq_map_variable:NNn} \meta{sequence} \meta{variable} \Arg{code}
% \end{syntax}
-% Stores each entry in the \meta{sequence} in turn in the
-% \meta{tl~var.}\ and applies the \meta{function using tl~var.}
-% The \meta{function} will usually consist of code making use of
-% the \meta{tl~var.}, but this is not enforced. The assignments to
-% \meta{tl~var.} are local, and one variable
-% mapping can be nested inside another. The \meta{items}
-% are returned from left to right.
+% Stores each \meta{item} of the \meta{sequence} in turn in the (token
+% list) \meta{variable} and applies the \meta{code}. The \meta{code}
+% will usually make use of the \meta{variable}, but this is not
+% enforced. The assignments to the \meta{variable} are local. The
+% \meta{items} are returned from left to right.
% \end{function}
%
% \begin{function}[rEXP, updated = 2012-06-29]{\seq_map_break:}
@@ -531,8 +528,8 @@
% Use outside of a \cs[no-index]{seq_map_\ldots} scenario leads to low
% level \TeX{} errors.
% \begin{texnote}
-% When the mapping is broken, additional tokens may be inserted by the
-% internal macro \cs{__prg_break_point:Nn} before further items are taken
+% When the mapping is broken, additional tokens may be inserted
+% before further items are taken
% from the input stream. This depends on the design of the mapping
% function.
% \end{texnote}
@@ -540,17 +537,17 @@
%
% \begin{function}[rEXP, updated = 2012-06-29]{\seq_map_break:n}
% \begin{syntax}
-% \cs{seq_map_break:n} \Arg{tokens}
+% \cs{seq_map_break:n} \Arg{code}
% \end{syntax}
% Used to terminate a \cs[no-index]{seq_map_\ldots} function before all
% entries in the \meta{sequence} have been processed, inserting
-% the \meta{tokens} after the mapping has ended. This
+% the \meta{code} after the mapping has ended. This
% normally takes place within a conditional statement, for example
% \begin{verbatim}
% \seq_map_inline:Nn \l_my_seq
% {
% \str_if_eq:nnTF { #1 } { bingo }
-% { \seq_map_break:n { <tokens> } }
+% { \seq_map_break:n { <code> } }
% {
% % Do something useful
% }
@@ -559,8 +556,8 @@
% Use outside of a \cs[no-index]{seq_map_\ldots} scenario leads to low
% level \TeX{} errors.
% \begin{texnote}
-% When the mapping is broken, additional tokens may be inserted by the
-% internal macro \cs{__prg_break_point:Nn} before the \meta{tokens} are
+% When the mapping is broken, additional tokens may be inserted
+% before the \meta{code} is
% inserted into the input stream.
% This depends on the design of the mapping function.
% \end{texnote}
@@ -922,7 +919,7 @@
% The variable is defined in the \pkg{l3quark} module, loaded later.
% \end{variable}
%
-% \begin{macro}[int]{\@@_item:n}
+% \begin{macro}{\@@_item:n}
% The delimiter is always defined, but when used incorrectly simply
% removes its argument and hits an undefined control sequence to
% raise an error.
@@ -943,7 +940,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[aux]{\@@_tmp:w}
+% \begin{macro}{\@@_tmp:w}
% Scratch function for internal use.
% \begin{macrocode}
\cs_new_eq:NN \@@_tmp:w ?
@@ -1073,8 +1070,8 @@
% \seq_set_split:Nnn , \seq_set_split:NnV ,
% \seq_gset_split:Nnn, \seq_gset_split:NnV
% }
-% \begin{macro}[aux]{\@@_set_split:NNnn}
-% \begin{macro}[aux]
+% \begin{macro}{\@@_set_split:NNnn}
+% \begin{macro}
% {
% \@@_set_split_auxi:w, \@@_set_split_auxii:w,
% \@@_set_split_end:
@@ -1185,7 +1182,7 @@
% \seq_gput_left:cn, \seq_gput_left:cV, \seq_gput_left:cv,
% \seq_gput_left:co, \seq_gput_left:cx
% }
-% \begin{macro}[aux,EXP]{\@@_put_left_aux:w}
+% \begin{macro}[EXP]{\@@_put_left_aux:w}
% When adding to the left of a sequence, remove \cs{s_@@}. This is
% done by \cs{@@_put_left_aux:w}, which also stops
% \texttt{f}-expansion.
@@ -1248,7 +1245,7 @@
%
% \subsection{Modifying sequences}
%
-% \begin{macro}[aux]{\@@_wrap_item:n}
+% \begin{macro}{\@@_wrap_item:n}
% This function converts its argument to a proper sequence item
% in an \texttt{x}-expansion context.
% \begin{macrocode}
@@ -1267,7 +1264,7 @@
% \UnitTested
% \begin{macro}{\seq_gremove_duplicates:N, \seq_gremove_duplicates:c}
% \UnitTested
-% \begin{macro}[aux]{\@@_remove_duplicates:NN}
+% \begin{macro}{\@@_remove_duplicates:NN}
% Removing duplicates means making a new list then copying it.
% \begin{macrocode}
\cs_new_protected:Npn \seq_remove_duplicates:N
@@ -1295,7 +1292,7 @@
% \UnitTested
% \begin{macro}{\seq_gremove_all:Nn, \seq_gremove_all:cn}
% \UnitTested
-% \begin{macro}[aux]{\@@_remove_all_aux:NNn}
+% \begin{macro}{\@@_remove_all_aux:NNn}
% The idea of the code here is to avoid a relatively expensive addition of
% items one at a time to an intermediate sequence.
% The approach taken is therefore similar to
@@ -1343,8 +1340,8 @@
%
% \begin{macro}
% {\seq_reverse:N, \seq_reverse:c, \seq_greverse:N, \seq_greverse:c}
-% \begin{macro}[aux]{\@@_reverse:NN}
-% \begin{macro}[aux, EXP]{\@@_reverse_item:nwn}
+% \begin{macro}{\@@_reverse:NN}
+% \begin{macro}[EXP]{\@@_reverse_item:nwn}
% Previously, \cs{seq_reverse:N} was coded by collecting the items
% in reverse order after an \cs{exp_stop_f:} marker.
% \begin{verbatim}
@@ -1431,7 +1428,7 @@
% \seq_if_in:cn, \seq_if_in:cV, \seq_if_in:cv, \seq_if_in:co, \seq_if_in:cx
% }
% \UnitTested
-% \begin{macro}[aux]{\@@_if_in:}
+% \begin{macro}{\@@_if_in:}
% The approach here is to define \cs{@@_item:n} to compare its
% argument with the test sequence. If the two items are equal, the
% mapping is terminated and \cs{group_end:} \cs{prg_return_true:}
@@ -1472,7 +1469,7 @@
%
% \subsection{Recovering data from sequences}
%
-% \begin{macro}[int]{\@@_pop:NNNN, \@@_pop_TF:NNNN}
+% \begin{macro}{\@@_pop:NNNN, \@@_pop_TF:NNNN}
% The two \texttt{pop} functions share their emptiness tests. We also
% use a common emptiness test for all branching \texttt{get} and
% \texttt{pop} functions.
@@ -1500,7 +1497,7 @@
%
% \begin{macro}{\seq_get_left:NN, \seq_get_left:cN}
% \UnitTested
-% \begin{macro}[aux]{\@@_get_left:wnw}
+% \begin{macro}{\@@_get_left:wnw}
% Getting an item from the left of a sequence is pretty easy: just
% trim off the first item after \cs{@@_item:n} at the start. We
% append a \cs{q_no_value} item to cover the case of an empty sequence
@@ -1524,7 +1521,7 @@
% \UnitTested
% \begin{macro}{\seq_gpop_left:NN, \seq_gpop_left:cN}
% \UnitTested
-% \begin{macro}[aux]{\@@_pop_left:NNN, \@@_pop_left:wnwNNN}
+% \begin{macro}{\@@_pop_left:NNN, \@@_pop_left:wnwNNN}
% The approach to popping an item is pretty similar to that to get
% an item, with the only difference being that the sequence itself has
% to be redefined. This makes it more sensible to use an auxiliary
@@ -1551,7 +1548,7 @@
%
% \begin{macro}{\seq_get_right:NN, \seq_get_right:cN}
% \UnitTested
-% \begin{macro}[aux]{\@@_get_right_loop:nn}
+% \begin{macro}{\@@_get_right_loop:nn}
% First remove \cs{s_@@} and prepend \cs{q_no_value}, then take two
% arguments at a time. Before the right-hand end of the sequence,
% this is a brace group followed by \cs{@@_item:n}, both removed by
@@ -1584,7 +1581,7 @@
% \UnitTested
% \begin{macro}{\seq_gpop_right:NN, \seq_gpop_right:cN}
% \UnitTested
-% \begin{macro}[aux]{\@@_pop_right:NNN, \@@_pop_right_loop:nn}
+% \begin{macro}{\@@_pop_right:NNN, \@@_pop_right_loop:nn}
% The approach to popping from the right is a bit more involved, but does
% use some of the same ideas as getting from the right. What is needed is a
% \enquote{flexible length} way to set a token list variable. This is
@@ -1684,7 +1681,7 @@
% \end{macro}
%
% \begin{macro}{\seq_item:Nn, \seq_item:cn}
-% \begin{macro}[aux]{\@@_item:wNn, \@@_item:nN, \@@_item:nnn}
+% \begin{macro}{\@@_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: } { }| is used by the auxiliary,
@@ -1738,7 +1735,7 @@
%
% \begin{macro}{\seq_map_function:NN, \seq_map_function:cN}
% \UnitTested
-% \begin{macro}[aux,rEXP]{\@@_map_function:NNn}
+% \begin{macro}[rEXP]{\@@_map_function:NNn}
% The idea here is to apply the code of |#2| to each item in the
% sequence without altering the definition of \cs{@@_item:n}. This
% is done as by noting that every odd token in the sequence must be
@@ -1766,9 +1763,9 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_push_item_def:n, \@@_push_item_def:x}
-% \begin{macro}[aux]{\@@_push_item_def:}
-% \begin{macro}[int]{\@@_pop_item_def:}
+% \begin{macro}{\@@_push_item_def:n, \@@_push_item_def:x}
+% \begin{macro}{\@@_push_item_def:}
+% \begin{macro}{\@@_pop_item_def:}
% The definition of \cs{@@_item:n} needs to be saved and restored at
% various points within the mapping and manipulation code. That is handled
% here: as always, this approach uses global assignments.
@@ -1842,7 +1839,7 @@
% \end{macro}
%
% \begin{macro}{\seq_count:N, \seq_count:c}
-% \begin{macro}[aux]{\@@_count:n}
+% \begin{macro}{\@@_count:n}
% Counting the items in a sequence is done using the same approach as for
% other count functions: turn each entry into a \texttt{+1} then use
% integer evaluation to actually do the mathematics.
@@ -1864,7 +1861,7 @@
% \subsection{Using sequences}
%
% \begin{macro}[EXP]{\seq_use:Nnnn, \seq_use:cnnn}
-% \begin{macro}[EXP, aux]
+% \begin{macro}[EXP]
% {\@@_use:NNnNnn, \@@_use_setup:w, \@@_use:nwwwwnwn, \@@_use:nwwn}
% \begin{macro}[EXP]{\seq_use:Nn, \seq_use:cn}
% See \cs{clist_use:Nnnn} for a general explanation. The main
@@ -1992,26 +1989,24 @@
%
% \subsection{Viewing sequences}
%
-% \begin{macro}{\seq_show:N, \seq_show:c}
+% \begin{macro}{\seq_show:N, \seq_show:c, \seq_log:N, \seq_log:c, \@@_show:NN}
% \UnitTested
-% Apply the general \cs{__msg_show_variable:NNNnn}.
+% Apply the general \cs{msg_show:nnnnnn}.
% \begin{macrocode}
-\cs_new_protected:Npn \seq_show:N #1
- {
- \__msg_show_variable:NNNnn #1
- \seq_if_exist:NTF \seq_if_empty:NTF { seq }
- { \seq_map_function:NN #1 \__msg_show_item:n }
- }
+\cs_new_protected:Npn \seq_show:N { \@@_show:NN \msg_show:nnxxxx }
\cs_generate_variant:Nn \seq_show:N { c }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\seq_log:N, \seq_log:c}
-% Redirect output of \cs{seq_show:N} to the log.
-% \begin{macrocode}
-\cs_new_protected:Npn \seq_log:N
- { \__msg_log_next: \seq_show:N }
+\cs_new_protected:Npn \seq_log:N { \@@_show:NN \msg_log:nnxxxx }
\cs_generate_variant:Nn \seq_log:N { c }
+\cs_new_protected:Npn \@@_show:NN #1#2
+ {
+ \__kernel_check_defined:NT #2
+ {
+ #1 { LaTeX/kernel } { show-seq }
+ { \token_to_str:N #2 }
+ { \seq_map_function:NN #2 \msg_show_item:n }
+ { } { }
+ }
+ }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
index bc7f26ed868..a20a48ccc66 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
@@ -8,7 +8,7 @@
% 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
+% https://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.
@@ -22,7 +22,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -1011,6 +1011,16 @@
% \end{texnote}
% \end{function}
%
+% \begin{function}[EXP]{\__dim_eval:n}
+% \begin{syntax}
+% \cs{__dim_eval:n} \Arg{dimexpr}
+% \end{syntax}
+% By default this expands to \cs{__dim_eval:w} \meta{dimexpr}
+% \cs{__dim_eval_end:} but when debugging is enabled this expands to a
+% more complicated construction that evaluates \meta{dimexpr} with
+% parentheses and within a brace group to detect early termination.
+% \end{function}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -1058,12 +1068,17 @@
%
% \begin{macro}{\dim_const:Nn, \dim_const:cn}
% Contrarily to integer constants, we cannot avoid using a register,
-% even for constants.
-% \begin{macrocode}
-\cs_new_protected:Npn \dim_const:Nn #1
+% even for constants. We cannot use \cs{dim_gset:Nn} because
+% debugging code would complain that the constant is not a global
+% variable. Since \cs{dim_const:Nn} does not need to be fast, use
+% \cs{dim_eval:n} to avoid needing a debugging patch that wraps the
+% expression in checking code.
+% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN c #1 } { }
+\cs_new_protected:Npn \dim_const:Nn #1#2
{
\dim_new:N #1
- \dim_gset:Nn #1
+ \tex_global:D #1 ~ \dim_eval:n {#2} \scan_stop:
}
\cs_generate_variant:Nn \dim_const:Nn { c }
% \end{macrocode}
@@ -1071,10 +1086,15 @@
%
% \begin{macro}{\dim_zero:N, \dim_zero:c}
% \begin{macro}{\dim_gzero:N, \dim_gzero:c}
-% Reset the register to zero.
-% \begin{macrocode}
-\cs_new_protected:Npn \dim_zero:N #1 { #1 \c_zero_dim }
-\cs_new_protected:Npn \dim_gzero:N { \tex_global:D \dim_zero:N }
+% Reset the register to zero. Using \cs{c_zero_skip} deals with the
+% case where the variable passed is incorrectly a skip (for example a
+% \LaTeXe{} length).
+% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
+\cs_new_protected:Npn \dim_zero:N #1 { #1 \c_zero_skip }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \dim_gzero:N #1
+ { \tex_global:D #1 \c_zero_skip }
\cs_generate_variant:Nn \dim_zero:N { c }
\cs_generate_variant:Nn \dim_gzero:N { c }
% \end{macrocode}
@@ -1106,15 +1126,36 @@
%
% \subsection{Setting \texttt{dim} variables}
%
+% Several functions here have a signature |:Nn| and are such that when
+% debugging, the first argument should be checked to be a local/global
+% variable and the second should be wrapped in code for an expression.
+% The temporary function \cs{@@_tmp:w} finds the name |#3| of the
+% function being redefined and writes the appropriate patch.
+% \begin{macrocode}
+\cs_set_protected:Npn \@@_tmp:w #1#2#3
+ {
+ \__debug_patch_args:nnnNNpn
+ { #1 ##1 }
+ { }
+ { {##1} { \__debug_chk_expr:nNnN {##2} \@@_eval:w { } #3 } }
+ #2 #3
+ }
+% \end{macrocode}
+%
% \begin{macro}{\dim_set:Nn, \dim_set:cn}
% \begin{macro}{\dim_gset:Nn, \dim_gset:cn}
-% Setting dimensions is easy enough.
+% Setting dimensions is easy enough but when debugging we want both to
+% check that the variable is correctly local/global and to wrap the
+% expression in some code. The \cs{scan_stop:} deals with the case
+% where the variable passed is a skip (for example a \LaTeXe{}
+% length).
% \begin{macrocode}
-\__debug_patch_args:nNNpn
- { {#1} { \__debug_chk_expr:nNnN {#2} \@@_eval:w { } \dim_set:Nn } }
+\@@_tmp:w \__debug_chk_var_local:N
\cs_new_protected:Npn \dim_set:Nn #1#2
- { #1 ~ \@@_eval:w #2 \@@_eval_end: }
-\cs_new_protected:Npn \dim_gset:Nn { \tex_global:D \dim_set:Nn }
+ { #1 ~ \@@_eval:w #2 \@@_eval_end: \scan_stop: }
+\@@_tmp:w \__debug_chk_var_global:N
+\cs_new_protected:Npn \dim_gset:Nn #1#2
+ { \tex_global:D #1 ~ \@@_eval:w #2 \@@_eval_end: \scan_stop: }
\cs_generate_variant:Nn \dim_set:Nn { c }
\cs_generate_variant:Nn \dim_gset:Nn { c }
% \end{macrocode}
@@ -1124,12 +1165,17 @@
% \begin{macro}{\dim_set_eq:NN, \dim_set_eq:cN, \dim_set_eq:Nc, \dim_set_eq:cc}
% \begin{macro}
% {\dim_gset_eq:NN, \dim_gset_eq:cN, \dim_gset_eq:Nc, \dim_gset_eq:cc}
-% All straightforward.
+% All straightforward, with a \cs{scan_stop:} to deal with the case
+% where |#1| is (incorrectly) a skip.
% \begin{macrocode}
-\cs_new_protected:Npn \dim_set_eq:NN #1#2 { #1 = #2 }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
+\cs_new_protected:Npn \dim_set_eq:NN #1#2
+ { #1 = #2 \scan_stop: }
\cs_generate_variant:Nn \dim_set_eq:NN { c }
\cs_generate_variant:Nn \dim_set_eq:NN { Nc , cc }
-\cs_new_protected:Npn \dim_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \dim_gset_eq:NN #1#2
+ { \tex_global:D #1 = #2 \scan_stop: }
\cs_generate_variant:Nn \dim_gset_eq:NN { c }
\cs_generate_variant:Nn \dim_gset_eq:NN { Nc , cc }
% \end{macrocode}
@@ -1141,19 +1187,26 @@
% \begin{macro}{\dim_sub:Nn, \dim_sub:cn}
% \begin{macro}{\dim_gsub:Nn, \dim_gsub:cn}
% Using |by| here deals with the (incorrect) case |\dimen123|.
+% Using \cs{scan_stop:} deals with skip variables. Since
+% debugging checks that the variable is correctly local/global, the
+% global versions cannot be defined as \cs{tex_global:D} followed by
+% the local versions. The debugging code is inserted by
+% \cs{@@_tmp:w}.
% \begin{macrocode}
-\__debug_patch_args:nNNpn
- { {#1} { \__debug_chk_expr:nNnN {#2} \@@_eval:w { } \dim_add:Nn } }
+\@@_tmp:w \__debug_chk_var_local:N
\cs_new_protected:Npn \dim_add:Nn #1#2
- { \tex_advance:D #1 by \@@_eval:w #2 \@@_eval_end: }
-\cs_new_protected:Npn \dim_gadd:Nn { \tex_global:D \dim_add:Nn }
+ { \tex_advance:D #1 by \@@_eval:w #2 \@@_eval_end: \scan_stop: }
+\@@_tmp:w \__debug_chk_var_global:N
+\cs_new_protected:Npn \dim_gadd:Nn #1#2
+ { \tex_global:D \tex_advance:D #1 by \@@_eval:w #2 \@@_eval_end: \scan_stop: }
\cs_generate_variant:Nn \dim_add:Nn { c }
\cs_generate_variant:Nn \dim_gadd:Nn { c }
-\__debug_patch_args:nNNpn
- { {#1} { \__debug_chk_expr:nNnN {#2} \@@_eval:w { } \dim_sub:Nn } }
+\@@_tmp:w \__debug_chk_var_local:N
\cs_new_protected:Npn \dim_sub:Nn #1#2
- { \tex_advance:D #1 by - \@@_eval:w #2 \@@_eval_end: }
-\cs_new_protected:Npn \dim_gsub:Nn { \tex_global:D \dim_sub:Nn }
+ { \tex_advance:D #1 by - \@@_eval:w #2 \@@_eval_end: \scan_stop: }
+\@@_tmp:w \__debug_chk_var_global:N
+\cs_new_protected:Npn \dim_gsub:Nn #1#2
+ { \tex_global:D \tex_advance:D #1 by - \@@_eval:w #2 \@@_eval_end: \scan_stop: }
\cs_generate_variant:Nn \dim_sub:Nn { c }
\cs_generate_variant:Nn \dim_gsub:Nn { c }
% \end{macrocode}
@@ -1165,11 +1218,11 @@
% \subsection{Utilities for dimension calculations}
%
% \begin{macro}[EXP]{\dim_abs:n}
-% \begin{macro}[aux, EXP]{\@@_abs:N}
+% \begin{macro}[EXP]{\@@_abs:N}
% \UnitTested
% \begin{macro}[EXP]{\dim_max:nn}
% \begin{macro}[EXP]{\dim_min:nn}
-% \begin{macro}[aux, EXP]{\@@_maxmin:wwN}
+% \begin{macro}[EXP]{\@@_maxmin:wwN}
% \UnitTested
% \UnitTested
% Functions for $\min$, $\max$, and absolute value with only one evaluation.
@@ -1226,7 +1279,7 @@
% \end{macro}
%
% \begin{macro}{\dim_ratio:nn}
-% \begin{macro}[aux]{\@@_ratio:n}
+% \begin{macro}{\@@_ratio:n}
% With dimension expressions, something like |10 pt * ( 5 pt / 10 pt )| does
% not work. Instead, the ratio part needs to be converted to an integer
% expression. Using \cs{__int_value:w} forces everything into |sp|, avoiding
@@ -1260,8 +1313,8 @@
% \end{macro}
%
% \begin{macro}[pTF, EXP]{\dim_compare:n}
-% \begin{macro}[aux, EXP]{\@@_compare:w, \@@_compare:wNN}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_compare:w, \@@_compare:wNN}
+% \begin{macro}[EXP]
% {
% \@@_compare_=:w,
% \@@_compare_!:w,
@@ -1290,9 +1343,7 @@
\@@_compare:wNN #1 ? { = \@@_compare_end:w \else: } \q_stop
}
\exp_args:Nno \use:nn
- { \cs_new:Npn \@@_compare:wNN #1 }
- { \tl_to_str:n {pt} }
- #2#3
+ { \cs_new:Npn \@@_compare:wNN #1 } { \tl_to_str:n {pt} #2#3 }
{
\if_meaning:w = #3
\use:c { @@_compare_#2:w }
@@ -1321,8 +1372,8 @@
% \end{macro}
%
% \begin{macro}[EXP, noTF]{\dim_case:nn}
-% \begin{macro}[aux]{\@@_case:nnTF}
-% \begin{macro}[aux]{\@@_case:nw, \@@_case_end:nw}
+% \begin{macro}{\@@_case:nnTF}
+% \begin{macro}{\@@_case:nw, \@@_case_end:nw}
% For dimension cases, the first task to fully expand the check
% condition. The over all idea is then much the same as for
% \cs[index=str_case:nnTF]{str_case:nn(TF)} as described in \pkg{l3basics}.
@@ -1457,6 +1508,18 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_eval:n}
+% Evaluating a dimension expression expandably. This is for use in
+% other modules, to avoid having to patch many commands. The only
+% difference with \cs{dim_eval:n} is the lack of \cs{dim_use:N}, to
+% produce an internal dimension rather than expand it into characters.
+% \begin{macrocode}
+\__debug_patch_args:nNNpn
+ { { \__debug_chk_expr:nNnN {#1} \@@_eval:w { } \@@_eval:n } }
+\cs_new:Npn \@@_eval:n #1 { \@@_eval:w #1 \@@_eval_end: }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\dim_use:N, \dim_use:c}
% Accessing a \meta{dim}.
% \begin{macrocode}
@@ -1470,7 +1533,7 @@
% \end{macro}
%
% \begin{macro}[EXP]{\dim_to_decimal:n}
-% \begin{macro}[EXP, aux]{\@@_to_decimal:w}
+% \begin{macro}[EXP]{\@@_to_decimal:w}
% A function which comes up often enough to deserve a place in the
% kernel. Evaluate the dimension expression~|#1| then remove the
% trailing \texttt{pt}. When debugging is enabled, the argument is
@@ -1556,7 +1619,7 @@
% dimension expressions: this gives a more unified output.
% \begin{macrocode}
\cs_new_protected:Npn \dim_show:n
- { \__msg_show_wrap:Nn \dim_eval:n }
+ { \msg_show_eval:Nn \dim_eval:n }
% \end{macrocode}
% \end{macro}
%
@@ -1566,7 +1629,7 @@
\cs_new_eq:NN \dim_log:N \__kernel_register_log:N
\cs_new_eq:NN \dim_log:c \__kernel_register_log:c
\cs_new_protected:Npn \dim_log:n
- { \__msg_log_next: \dim_show:n }
+ { \msg_log_eval:Nn \dim_eval:n }
% \end{macrocode}
% \end{macro}
%
@@ -1613,12 +1676,14 @@
%
% \begin{macro}{\skip_const:Nn, \skip_const:cn}
% Contrarily to integer constants, we cannot avoid using a register,
-% even for constants.
+% even for constants. See \cs{dim_const:Nn} for why we cannot use
+% \cs{skip_gset:Nn}.
% \begin{macrocode}
-\cs_new_protected:Npn \skip_const:Nn #1
+\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN c #1 } { }
+\cs_new_protected:Npn \skip_const:Nn #1#2
{
\skip_new:N #1
- \skip_gset:Nn #1
+ \tex_global:D #1 ~ \skip_eval:n {#2} \scan_stop:
}
\cs_generate_variant:Nn \skip_const:Nn { c }
% \end{macrocode}
@@ -1628,8 +1693,10 @@
% \begin{macro}{\skip_gzero:N, \skip_gzero:c}
% Reset the register to zero.
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \skip_zero:N #1 { #1 \c_zero_skip }
-\cs_new_protected:Npn \skip_gzero:N { \tex_global:D \skip_zero:N }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \skip_gzero:N #1 { \tex_global:D #1 \c_zero_skip }
\cs_generate_variant:Nn \skip_zero:N { c }
\cs_generate_variant:Nn \skip_gzero:N { c }
% \end{macrocode}
@@ -1661,15 +1728,31 @@
%
% \subsection{Setting \texttt{skip} variables}
%
+% Much as for \texttt{dim} variables, \cs{@@_tmp:w} prepares a patch
+% for |:Nn| function definitions in which the first argument should be
+% checked to be a local/global variable and the second should be wrapped
+% in code for an expression.
+% \begin{macrocode}
+\cs_set_protected:Npn \@@_tmp:w #1#2#3
+ {
+ \__debug_patch_args:nnnNNpn
+ { #1 ##1 }
+ { }
+ { {##1} { \__debug_chk_expr:nNnN {##2} \etex_glueexpr:D { } #3 } }
+ #2 #3
+ }
+% \end{macrocode}
+%
% \begin{macro}{\skip_set:Nn, \skip_set:cn}
% \begin{macro}{\skip_gset:Nn, \skip_gset:cn}
% Much the same as for dimensions.
% \begin{macrocode}
-\__debug_patch_args:nNNpn
- { {#1} { \__debug_chk_expr:nNnN {#2} \etex_glueexpr:D { } \skip_set:Nn } }
+\@@_tmp:w \__debug_chk_var_local:N
\cs_new_protected:Npn \skip_set:Nn #1#2
{ #1 ~ \etex_glueexpr:D #2 \scan_stop: }
-\cs_new_protected:Npn \skip_gset:Nn { \tex_global:D \skip_set:Nn }
+\@@_tmp:w \__debug_chk_var_global:N
+\cs_new_protected:Npn \skip_gset:Nn #1#2
+ { \tex_global:D #1 ~ \etex_glueexpr:D #2 \scan_stop: }
\cs_generate_variant:Nn \skip_set:Nn { c }
\cs_generate_variant:Nn \skip_gset:Nn { c }
% \end{macrocode}
@@ -1698,18 +1781,20 @@
% \begin{macro}{\skip_gsub:Nn, \skip_gsub:cn}
% Using |by| here deals with the (incorrect) case |\skip123|.
% \begin{macrocode}
-\__debug_patch_args:nNNpn
- { {#1} { \__debug_chk_expr:nNnN {#2} \etex_glueexpr:D { } \skip_add:Nn } }
+\@@_tmp:w \__debug_chk_var_local:N
\cs_new_protected:Npn \skip_add:Nn #1#2
{ \tex_advance:D #1 by \etex_glueexpr:D #2 \scan_stop: }
-\cs_new_protected:Npn \skip_gadd:Nn { \tex_global:D \skip_add:Nn }
+\@@_tmp:w \__debug_chk_var_global:N
+\cs_new_protected:Npn \skip_gadd:Nn #1#2
+ { \tex_global:D \tex_advance:D #1 by \etex_glueexpr:D #2 \scan_stop: }
\cs_generate_variant:Nn \skip_add:Nn { c }
\cs_generate_variant:Nn \skip_gadd:Nn { c }
-\__debug_patch_args:nNNpn
- { {#1} { \__debug_chk_expr:nNnN {#2} \etex_glueexpr:D { } \skip_sub:Nn } }
+\@@_tmp:w \__debug_chk_var_local:N
\cs_new_protected:Npn \skip_sub:Nn #1#2
{ \tex_advance:D #1 by - \etex_glueexpr:D #2 \scan_stop: }
-\cs_new_protected:Npn \skip_gsub:Nn { \tex_global:D \skip_sub:Nn }
+\@@_tmp:w \__debug_chk_var_global:N
+\cs_new_protected:Npn \skip_gsub:Nn #1#2
+ { \tex_global:D \tex_advance:D #1 by - \etex_glueexpr:D #2 \scan_stop: }
\cs_generate_variant:Nn \skip_sub:Nn { c }
\cs_generate_variant:Nn \skip_gsub:Nn { c }
% \end{macrocode}
@@ -1738,7 +1823,7 @@
% \end{macro}
%
% \begin{macro}[EXP,pTF]{\skip_if_finite:n}
-% \begin{macro}[EXP,aux]{\__skip_if_finite:wwNw}
+% \begin{macro}[EXP]{\__skip_if_finite:wwNw}
% With \eTeX{}, we have an easy access to the order of infinities of
% the stretch and shrink components of a skip. However, to access
% both, we either need to evaluate the expression twice, or evaluate
@@ -1747,7 +1832,7 @@
% it is quicker to make it search for the string \texttt{fil} which
% characterizes infinite glue.
% \begin{macrocode}
-\cs_set_protected:Npn \__cs_tmp:w #1
+\cs_set_protected:Npn \@@_tmp:w #1
{
\__debug_patch_conditional_args:nNNpnn
{
@@ -1764,7 +1849,7 @@
}
\cs_new:Npn \__skip_if_finite:wwNw ##1 #1 ##2 ; ##3 ##4 \q_stop {##3}
}
-\exp_args:No \__cs_tmp:w { \tl_to_str:n { fil } }
+\exp_args:No \@@_tmp:w { \tl_to_str:n { fil } }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1827,7 +1912,7 @@
% skip expressions: this gives a more unified output.
% \begin{macrocode}
\cs_new_protected:Npn \skip_show:n
- { \__msg_show_wrap:Nn \skip_eval:n }
+ { \msg_show_eval:Nn \skip_eval:n }
% \end{macrocode}
% \end{macro}
%
@@ -1837,7 +1922,7 @@
\cs_new_eq:NN \skip_log:N \__kernel_register_log:N
\cs_new_eq:NN \skip_log:c \__kernel_register_log:c
\cs_new_protected:Npn \skip_log:n
- { \__msg_log_next: \skip_show:n }
+ { \msg_log_eval:Nn \skip_eval:n }
% \end{macrocode}
% \end{macro}
%
@@ -1884,13 +1969,13 @@
% \end{macro}
%
% \begin{macro}{\muskip_const:Nn, \muskip_const:cn}
-% Contrarily to integer constants, we cannot avoid using a register,
-% even for constants.
+% See \cs{skip_const:Nn}.
% \begin{macrocode}
-\cs_new_protected:Npn \muskip_const:Nn #1
+\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN c #1 } { }
+\cs_new_protected:Npn \muskip_const:Nn #1#2
{
\muskip_new:N #1
- \muskip_gset:Nn #1
+ \tex_global:D #1 ~ \muskip_eval:n {#2} \scan_stop:
}
\cs_generate_variant:Nn \muskip_const:Nn { c }
% \end{macrocode}
@@ -1900,9 +1985,12 @@
% \begin{macro}{\muskip_gzero:N, \muskip_gzero:c}
% Reset the register to zero.
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \muskip_zero:N #1
{ #1 \c_zero_muskip }
-\cs_new_protected:Npn \muskip_gzero:N { \tex_global:D \muskip_zero:N }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
+\cs_new_protected:Npn \muskip_gzero:N #1
+ { \tex_global:D #1 \c_zero_muskip }
\cs_generate_variant:Nn \muskip_zero:N { c }
\cs_generate_variant:Nn \muskip_gzero:N { c }
% \end{macrocode}
@@ -1937,21 +2025,34 @@
%
% \subsection{Setting \texttt{muskip} variables}
%
+% See \texttt{skip} case.
+% \begin{macrocode}
+\cs_set_protected:Npn \@@_tmp:w #1#2#3
+ {
+ \__debug_patch_args:nnnNNpn
+ { #1 ##1 }
+ { }
+ {
+ {##1}
+ {
+ \__debug_chk_expr:nNnN {##2}
+ \etex_muexpr:D { \etex_mutoglue:D } #3
+ }
+ }
+ #2 #3
+ }
+% \end{macrocode}
+%
% \begin{macro}{\muskip_set:Nn, \muskip_set:cn}
% \begin{macro}{\muskip_gset:Nn, \muskip_gset:cn}
% This should be pretty familiar.
% \begin{macrocode}
-\__debug_patch_args:nNNpn
- {
- {#1}
- {
- \__debug_chk_expr:nNnN {#2} \etex_muexpr:D
- { \etex_mutoglue:D } \muskip_set:Nn
- }
- }
+\@@_tmp:w \__debug_chk_var_local:N
\cs_new_protected:Npn \muskip_set:Nn #1#2
{ #1 ~ \etex_muexpr:D #2 \scan_stop: }
-\cs_new_protected:Npn \muskip_gset:Nn { \tex_global:D \muskip_set:Nn }
+\@@_tmp:w \__debug_chk_var_global:N
+\cs_new_protected:Npn \muskip_gset:Nn #1#2
+ { \tex_global:D #1 ~ \etex_muexpr:D #2 \scan_stop: }
\cs_generate_variant:Nn \muskip_set:Nn { c }
\cs_generate_variant:Nn \muskip_gset:Nn { c }
% \end{macrocode}
@@ -1970,9 +2071,11 @@
% }
% All straightforward.
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \muskip_set_eq:NN #1#2 { #1 = #2 }
\cs_generate_variant:Nn \muskip_set_eq:NN { c }
\cs_generate_variant:Nn \muskip_set_eq:NN { Nc , cc }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \muskip_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
\cs_generate_variant:Nn \muskip_gset_eq:NN { c }
\cs_generate_variant:Nn \muskip_gset_eq:NN { Nc , cc }
@@ -1986,30 +2089,20 @@
% \begin{macro}{\muskip_gsub:Nn, \muskip_gsub:cn}
% Using |by| here deals with the (incorrect) case |\muskip123|.
% \begin{macrocode}
-\__debug_patch_args:nNNpn
- {
- {#1}
- {
- \__debug_chk_expr:nNnN {#2} \etex_muexpr:D
- { \etex_mutoglue:D } \muskip_add:Nn
- }
- }
+\@@_tmp:w \__debug_chk_var_local:N
\cs_new_protected:Npn \muskip_add:Nn #1#2
{ \tex_advance:D #1 by \etex_muexpr:D #2 \scan_stop: }
-\cs_new_protected:Npn \muskip_gadd:Nn { \tex_global:D \muskip_add:Nn }
+\@@_tmp:w \__debug_chk_var_global:N
+\cs_new_protected:Npn \muskip_gadd:Nn #1#2
+ { \tex_global:D \tex_advance:D #1 by \etex_muexpr:D #2 \scan_stop: }
\cs_generate_variant:Nn \muskip_add:Nn { c }
\cs_generate_variant:Nn \muskip_gadd:Nn { c }
-\__debug_patch_args:nNNpn
- {
- {#1}
- {
- \__debug_chk_expr:nNnN {#2} \etex_muexpr:D
- { \etex_mutoglue:D } \muskip_sub:Nn
- }
- }
+\@@_tmp:w \__debug_chk_var_local:N
\cs_new_protected:Npn \muskip_sub:Nn #1#2
{ \tex_advance:D #1 by - \etex_muexpr:D #2 \scan_stop: }
-\cs_new_protected:Npn \muskip_gsub:Nn { \tex_global:D \muskip_sub:Nn }
+\@@_tmp:w \__debug_chk_var_global:N
+\cs_new_protected:Npn \muskip_gsub:Nn #1#2
+ { \tex_global:D \tex_advance:D #1 by - \etex_muexpr:D #2 \scan_stop: }
\cs_generate_variant:Nn \muskip_sub:Nn { c }
\cs_generate_variant:Nn \muskip_gsub:Nn { c }
% \end{macrocode}
@@ -2058,7 +2151,7 @@
% muskip expressions: this gives a more unified output.
% \begin{macrocode}
\cs_new_protected:Npn \muskip_show:n
- { \__msg_show_wrap:Nn \muskip_eval:n }
+ { \msg_show_eval:Nn \muskip_eval:n }
% \end{macrocode}
% \end{macro}
%
@@ -2068,7 +2161,7 @@
\cs_new_eq:NN \muskip_log:N \__kernel_register_log:N
\cs_new_eq:NN \muskip_log:c \__kernel_register_log:c
\cs_new_protected:Npn \muskip_log:n
- { \__msg_log_next: \muskip_show:n }
+ { \msg_log_eval:Nn \muskip_eval:n }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
index 592046c0619..fdbf90b082a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
@@ -1,13 +1,13 @@
% \iffalse
%
-%% File l3sort.dtx (C) Copyright 2012,2014-2017 The LaTeX3 Project
+%% File l3sort.dtx (C) Copyright 2012-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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -173,8 +173,8 @@
%
% \subsection{Finding available \tn{toks} registers}
%
-% \begin{macro}[int]{\@@_shrink_range:}
-% \begin{macro}[aux]{\@@_shrink_range_loop:}
+% \begin{macro}{\@@_shrink_range:}
+% \begin{macro}{\@@_shrink_range_loop:}
% After \cs{@@_compute_range:} (defined below) determines that
% \tn{toks} registers between \cs{l_@@_min_int} (included) and
% \cs{l_@@_true_max_int} (excluded) have not yet been assigned,
@@ -218,7 +218,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_compute_range:, \@@_redefine_compute_range:}
+% \begin{macro}{\@@_compute_range:, \@@_redefine_compute_range:}
% \begin{variable}{\c_@@_max_length_int}
% First find out what \tn{toks} have not yet been assigned. There are
% many cases. In \LaTeXe{} with no package, available \tn{toks} range
@@ -303,7 +303,7 @@
%
% \subsection{Protected user commands}
%
-% \begin{macro}[int]{\@@_main:NNNnNn}
+% \begin{macro}{\@@_main:NNNnNn}
% Sorting happens in three steps. First store items in \tn{toks}
% registers ranging from \cs{l_@@_min_int} to $\cs{l_@@_top_int}-1$,
% while checking that the list is not too
@@ -398,7 +398,7 @@
%
% \begin{macro}
% {\clist_sort:Nn, \clist_sort:cn, \clist_gsort:Nn, \clist_gsort:cn}
-% \begin{macro}[aux]{\@@_clist:NNn}
+% \begin{macro}{\@@_clist:NNn}
% The case of empty comma-lists is a little bit special as usual,
% and filtered out: there is nothing to sort in that case.
% Otherwise, the input is done with \cs{clist_map_inline:Nn},
@@ -464,7 +464,7 @@
%
% \subsection{Merge sort}
%
-% \begin{macro}[int]{\@@_level:}
+% \begin{macro}{\@@_level:}
% This function is called once blocks of size \cs{l_@@_block_int}
% (initially $1$) are each sorted. If the whole list fits in one
% block, then we are done (this also takes care of the case of an
@@ -483,7 +483,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_merge_blocks:}
+% \begin{macro}{\@@_merge_blocks:}
% This function is called to merge a pair of blocks, starting at
% the last value of \cs{l_@@_end_int} (end-point of the previous
% pair of blocks). If shifting by one block to the right we reach
@@ -524,7 +524,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_copy_block:}
+% \begin{macro}{\@@_copy_block:}
% We wish to store a copy of the \enquote{upper} block of
% \tn{toks} registers, ranging between the initial value of
% \cs{l_@@_B_int} (included) and \cs{l_@@_end_int}
@@ -544,7 +544,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_merge_blocks_aux:}
+% \begin{macro}{\@@_merge_blocks_aux:}
% At this stage, the first block starts at \cs{l_@@_begin_int},
% and ends at \cs{l_@@_A_int}, and the second block starts at
% \cs{l_@@_top_int} and ends at \cs{l_@@_C_int}. The result
@@ -572,8 +572,8 @@
% \end{macro}
%
% \begin{macro}{\sort_return_same:, \sort_return_swapped:}
-% \begin{macro}[aux]{\@@_return_mark:N}
-% \begin{macro}[aux]{\@@_return_none_error:, \@@_return_two_error:w}
+% \begin{macro}{\@@_return_mark:N}
+% \begin{macro}{\@@_return_none_error:, \@@_return_two_error:w}
% The marker removes one token. Each comparison should call
% \cs{sort_return_same:} or \cs{sort_return_swapped:} exactly
% once. If neither is called, \cs{@@_return_none_error:} is called.
@@ -598,7 +598,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_return_same:}
+% \begin{macro}{\@@_return_same:}
% If the comparison function returns \texttt{same},
% then the second argument fed to \cs{@@_compare:nn}
% should remain to the right of the other one. Since
@@ -623,7 +623,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_return_swapped:}
+% \begin{macro}{\@@_return_swapped:}
% If the comparison function returns \texttt{swapped},
% then the next item to add to the merger is the first
% argument, contents of the \tn{toks} register $A$.
@@ -647,7 +647,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_merge_blocks_end:}
+% \begin{macro}{\@@_merge_blocks_end:}
% This function's task is to copy the \tn{toks} registers
% in the block indexed by $C$ to the merger indexed by $B$.
% The end can equally be detected by checking when $B$ reaches
@@ -813,7 +813,7 @@
% typical \TeX{}'s memory.
%
% \begin{macro}[EXP]{\tl_sort:nN}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]
% {
% \@@_quick_prepare:Nnnn,
% \@@_quick_prepare_end:NNNnw,
@@ -864,7 +864,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP, aux]
+% \begin{macro}[EXP]
% {
% \@@_quick_split:NnNn,
% \@@_quick_only_i:NnnnnNn,
@@ -926,7 +926,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP, aux]
+% \begin{macro}[EXP]
% {
% \@@_quick_end:nnTFNn,
% \@@_quick_single_end:nnnwnw,
@@ -986,7 +986,7 @@
%
% \subsection{Messages}
%
-% \begin{macro}[aux]{\@@_error:}
+% \begin{macro}{\@@_error:}
% Bailing out of the sorting code is a bit tricky. It may not be safe
% to use a delimited argument, so instead we redefine many
% \pkg{l3sort} commands to be trivial, with \cs{@@_level:} getting rid
@@ -1001,7 +1001,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_disable_toksdef:, \@@_disabled_toksdef:n}
+% \begin{macro}{\@@_disable_toksdef:, \@@_disabled_toksdef:n}
% While sorting, \tn{toksdef} is locally disabled to prevent users
% from using \tn{newtoks} or similar commands in their comparison
% code: the \tn{toks} registers that would be assigned are in use by
@@ -1029,7 +1029,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_too_long_error:NNw}
+% \begin{macro}{\@@_too_long_error:NNw}
% When there are too many items in a sequence, this is an error, and
% we clean up properly the mapping over items in the list: break using
% the type-specific breaking function |#1|.
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
index 5823e3c5c8e..2c1d4158c55 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -155,6 +155,8 @@
% Concatenates the content of \meta{str~var_2} and \meta{str~var_3}
% together and saves the result in \meta{str~var_1}. The \meta{str~var_2}
% is placed at the left side of the new string variable.
+% The \meta{str~var_2} and \meta{str~var_3} must indeed be strings, as
+% this function does not convert their contents to a string.
% \end{function}
%
% \section{Adding data to string variables}
@@ -406,71 +408,73 @@
%
% \section{Mapping to strings}
%
-% \begin{function}[added = 2017-10-08, rEXP]
+% \begin{function}[added = 2017-11-14, rEXP]
% {\str_map_function:NN, \str_map_function:cN}
% \begin{syntax}
% \cs{str_map_function:NN} \meta{str~var} \meta{function}
% \end{syntax}
-% Applies \meta{function} to every \meta{character} in the \meta{str~var}.
+% Applies \meta{function} to every \meta{character} in the
+% \meta{str~var} including spaces.
% See also \cs{str_map_function:nN}.
% \end{function}
%
-% \begin{function}[added = 2017-10-08, rEXP]
+% \begin{function}[added = 2017-11-14, rEXP]
% {\str_map_function:nN}
% \begin{syntax}
% \cs{str_map_function:nN} \Arg{token list} \meta{function}
% \end{syntax}
% Converts the \meta{token list} to a \meta{string} then
-% applies \meta{function} to every \meta{character} in the \meta{string}.
+% applies \meta{function} to every \meta{character} in the
+% \meta{string} including spaces.
% See also \cs{str_map_function:NN}.
% \end{function}
%
-% \begin{function}[added = 2017-10-08]
+% \begin{function}[added = 2017-11-14]
% {\str_map_inline:Nn, \str_map_inline:cn}
% \begin{syntax}
% \cs{str_map_inline:Nn} \meta{str~var} \Arg{inline function}
% \end{syntax}
% Applies the \meta{inline function} to every \meta{character} in the
-% \meta{str~var}. The \meta{inline function} should consist of code which
-% receives the \meta{character} as |#1|. One in line mapping can be nested
-% inside another. See also \cs{str_map_function:NN}.
+% \meta{str~var} including spaces.
+% The \meta{inline function} should consist of code which
+% receives the \meta{character} as |#1|. See also \cs{str_map_function:NN}.
% \end{function}
%
-% \begin{function}[added = 2017-10-08]
+% \begin{function}[added = 2017-11-14]
% {\str_map_inline:nn}
% \begin{syntax}
% \cs{str_map_inline:nn} \Arg{token list} \Arg{inline function}
% \end{syntax}
% Converts the \meta{token list} to a \meta{string} then
% applies the \meta{inline function} to every \meta{character} in the
-% \meta{string}. The \meta{inline function} should consist of code which
-% receives the \meta{character} as |#1|. One in line mapping can be nested
-% inside another. See also \cs{str_map_function:NN}.
+% \meta{string} including spaces.
+% The \meta{inline function} should consist of code which
+% receives the \meta{character} as |#1|. See also \cs{str_map_function:NN}.
% \end{function}
%
-% \begin{function}[added = 2017-10-08]
+% \begin{function}[added = 2017-11-14]
% {\str_map_variable:NNn, \str_map_variable:cNn}
% \begin{syntax}
-% \cs{str_map_variable:NNn} \meta{str~var} \meta{variable} \Arg{function}
+% \cs{str_map_variable:NNn} \meta{str~var} \meta{variable} \Arg{code}
% \end{syntax}
-% Applies the \meta{function} to every \meta{character} in
-% the \meta{str~var}. The \meta{function} should consist of code
-% which receives the \meta{character} stored in the \meta{variable}.
-% One variable mapping can be nested inside another. See also
-% \cs{str_map_inline:Nn}.
+% Stores each \meta{character} of the \meta{string} (including spaces)
+% in turn in the (string or token list) \meta{variable} and applies
+% the \meta{code}. The \meta{code} will usually make use of the
+% \meta{variable}, but this is not enforced. The assignments to the
+% \meta{variable} are local. See also \cs{str_map_inline:Nn}.
% \end{function}
%
-% \begin{function}[added = 2017-10-08]
+% \begin{function}[added = 2017-11-14]
% {\str_map_variable:nNn}
% \begin{syntax}
-% \cs{str_map_variable:nNn} \Arg{token list} \meta{variable} \Arg{function}
+% \cs{str_map_variable:nNn} \Arg{token list} \meta{variable} \Arg{code}
% \end{syntax}
-% Converts the \meta{token list} to a \meta{string} then
-% applies the \meta{function} to every \meta{character} in the \meta{string}.
-% The \meta{function} should consist of code
-% which receives the \meta{character} stored in the \meta{variable}.
-% One variable mapping can be nested inside another. See also
-% \cs{str_map_inline:Nn}.
+% Converts the \meta{token list} to a \meta{string} then stores each
+% \meta{character} in the \meta{string} (including spaces) in turn in
+% the (string or token list) \meta{variable} and applies the
+% \meta{code}. The \meta{code} will usually make use of the
+% \meta{variable}, but this is not enforced. The assignments to the
+% \meta{variable} are local. See also \cs{str_map_inline:Nn}.
% \end{function}
%
% \begin{function}[added = 2017-10-08, rEXP]{\str_map_break:}
@@ -491,8 +495,8 @@
% Use outside of a \cs[no-index]{str_map_\ldots} scenario leads to low
% level \TeX{} errors.
% \begin{texnote}
-% When the mapping is broken, additional tokens may be inserted by the
-% internal macro \cs{__prg_break_point:Nn} before continuing with the
+% When the mapping is broken, additional tokens may be inserted
+% before continuing with the
% code that follows the loop.
% This depends on the design of the mapping function.
% \end{texnote}
@@ -500,25 +504,25 @@
%
% \begin{function}[added = 2017-10-08, rEXP]{\str_map_break:n}
% \begin{syntax}
-% \cs{str_map_break:n} \Arg{tokens}
+% \cs{str_map_break:n} \Arg{code}
% \end{syntax}
% Used to terminate a \cs[no-index]{str_map_\ldots} function before all
% characters in the \meta{string} have been processed, inserting
-% the \meta{tokens} after the mapping has ended. This
+% the \meta{code} after the mapping has ended. This
% normally takes place within a conditional statement, for example
% \begin{verbatim}
% \str_map_inline:Nn \l_my_str
% {
% \str_if_eq:nnT { #1 } { bingo }
-% { \str_map_break:n { <tokens> } }
+% { \str_map_break:n { <code> } }
% % Do something useful
% }
% \end{verbatim}
% Use outside of a \cs[no-index]{str_map_\ldots} scenario leads to low
% level \TeX{} errors.
% \begin{texnote}
-% When the mapping is broken, additional tokens may be inserted by the
-% internal macro \cs{__prg_break_point:Nn} before the \meta{tokens} are
+% When the mapping is broken, additional tokens may be inserted
+% before the \meta{code} is
% inserted into the input stream.
% This depends on the design of the mapping function.
% \end{texnote}
@@ -978,9 +982,9 @@
% \str_replace_once:Nnn, \str_replace_once:cnn,
% \str_greplace_once:Nnn, \str_greplace_once:cnn
% }
-% \begin{macro}[aux]{\@@_replace:NNNnn}
-% \begin{macro}[aux]{\@@_replace_aux:NNNnnn}
-% \begin{macro}[aux]{\@@_replace_next:w}
+% \begin{macro}{\@@_replace:NNNnn}
+% \begin{macro}{\@@_replace_aux:NNNnnn}
+% \begin{macro}{\@@_replace_next:w}
% Start by applying \cs{tl_to_str:n} to convert the old and new token
% lists to strings, and also apply \cs{tl_to_str:N} to avoid any
% issues if we are fed a token list variable. Then the code is a much
@@ -1082,8 +1086,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_if_eq_x:nn}
-% \begin{macro}[aux, EXP]{\@@_escape_x:n}
+% \begin{macro}[EXP]{\@@_if_eq_x:nn}
+% \begin{macro}[EXP]{\@@_escape_x:n}
% String comparisons rely on the primitive \cs[index=pdfstrcmp]{(pdf)strcmp} if available:
% \LuaTeX{} does not have it, so emulation is required. As the net result
% is that we do not \emph{always} use the primitive, the correct approach
@@ -1123,7 +1127,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_if_eq_x_return:nn}
+% \begin{macro}[EXP]{\@@_if_eq_x_return:nn}
% It turns out that we often need to compare a token list
% with the result of applying some function to it, and
% return with \cs{prg_return_true/false:}. This test is
@@ -1218,8 +1222,8 @@
%
% \begin{macro}[EXP, noTF]
% {\str_case:nn, \str_case:on, \str_case:nV, \str_case:nv, \str_case_x:nn}
-% \begin{macro}[EXP, aux]{\@@_case:nnTF, \@@_case_x:nnTF}
-% \begin{macro}[aux, EXP]
+% \begin{macro}[EXP]{\@@_case:nnTF, \@@_case_x:nnTF}
+% \begin{macro}[EXP]
% {\@@_case:nw, \@@_case_x:nw, \@@_case_end:nw}
% Much the same as \cs[index=tl_case:nn]{tl_case:nn(TF)} here:
% just a change in the internal comparison.
@@ -1297,22 +1301,43 @@
% \begin{macro}{\str_map_variable:NNn, \str_map_variable:cNn}
% \begin{macro}{\str_map_break:}
% \begin{macro}{\str_map_break:n}
-% Slightly awkward as we need to ensure detokenization: beyond that
-% just the usual token list mappings.
+% \begin{macro}[rEXP]{\@@_map_function:w, \@@_map_function:Nn}
+% \begin{macro}{\@@_map_inline:NN, \@@_map_variable:NnN}
+% The inline and variable mappings are similar to the usual token list
+% mappings but start out by turning the argument to an ``other
+% string''. Doing the same for the expandable function mapping would
+% require \cs{@@_to_other:n}, quadratic in the string length. To deal
+% with spaces in that case, \cs{@@_map_function:w} replaces the
+% following space by a braced space and a further call to itself.
+% These are received by \cs{@@_map_function:Nn}, which passes
+% the space to |#1| and calls \cs{@@_map_function:w} to deal with the
+% next space. The space before the braced space allows to optimize
+% the \cs{q_recursion_tail} test. Of course we need to include a
+% trailing space (the question mark is needed to avoid losing the
+% space when \TeX{} tokenizes the line).
+% At the cost of about three more auxiliaries this code could get a $9$
+% times speed up by testing only every $9$-th character for whether it
+% is \cs{q_recursion_tail} (also by converting $9$ spaces at a time in
+% the \cs{str_map_function:nN} case).
% \begin{macrocode}
\cs_new:Npn \str_map_function:nN #1#2
{
+ \exp_after:wN \@@_map_function:w
\exp_after:wN \@@_map_function:Nn \exp_after:wN #2
- \etex_detokenize:n {#1}
- \q_recursion_tail
+ \etex_detokenize:D {#1}
+ \q_recursion_tail ? ~
\__prg_break_point:Nn \str_map_break: { }
}
\cs_new:Npn \str_map_function:NN
{ \exp_args:No \str_map_function:nN }
+\cs_new:Npn \@@_map_function:w #1 ~
+ { #1 { ~ { ~ } \@@_map_function:w } }
\cs_new:Npn \@@_map_function:Nn #1#2
{
- \__quark_if_recursion_tail_break:nN {#2} \str_map_break:
- #1 {#2} \@@_map_function:Nn #1
+ \if_meaning:w \q_recursion_tail #2
+ \exp_after:wN \str_map_break:
+ \fi:
+ #1 #2 \@@_map_function:Nn #1
}
\cs_generate_variant:Nn \str_map_function:NN { c }
\cs_new_protected:Npn \str_map_inline:nn #1#2
@@ -1320,28 +1345,42 @@
\int_gincr:N \g__prg_map_int
\cs_gset_protected:cpn
{ __prg_map_ \int_use:N \g__prg_map_int :w } ##1 {#2}
- \exp_args:Nc \@@_map_function:Nn
- { __prg_map_ \int_use:N \g__prg_map_int :w }
- #1 \q_recursion_tail
+ \use:x
+ {
+ \exp_not:N \@@_map_inline:NN
+ \exp_not:c { __prg_map_ \int_use:N \g__prg_map_int :w }
+ \@@_to_other_fast:n {#1}
+ }
+ \q_recursion_tail
\__prg_break_point:Nn \str_map_break: { \int_gdecr:N \g__prg_map_int }
}
\cs_new_protected:Npn \str_map_inline:Nn
{ \exp_args:No \str_map_inline:nn }
\cs_generate_variant:Nn \str_map_inline:Nn { c }
+\cs_new:Npn \@@_map_inline:NN #1#2
+ {
+ \__quark_if_recursion_tail_break:NN #2 \str_map_break:
+ \exp_args:No #1 { \token_to_str:N #2 }
+ \@@_map_inline:NN #1
+ }
\cs_new_protected:Npn \str_map_variable:nNn #1#2#3
{
- \@@_map_variable:Nnn #2 {#3} #1
+ \use:x
+ {
+ \exp_not:n { \@@_map_variable:NnN #2 {#3} }
+ \@@_to_other_fast:n {#1}
+ }
\q_recursion_tail
\__prg_break_point:Nn \str_map_break: { }
}
\cs_new_protected:Npn \str_map_variable:NNn
{ \exp_args:No \str_map_variable:nNn }
-\cs_new_protected:Npn \@@_map_variable:Nnn #1#2#3
+\cs_new_protected:Npn \@@_map_variable:NnN #1#2#3
{
+ \__quark_if_recursion_tail_break:NN #3 \str_map_break:
\str_set:Nn #1 {#3}
- \__quark_if_recursion_tail_break:NN #1 \str_map_break:
\use:n {#2}
- \@@_map_variable:Nnn #1 {#2}
+ \@@_map_variable:NnN #1 {#2}
}
\cs_generate_variant:Nn \str_map_variable:NNn { c }
\cs_new:Npn \str_map_break:
@@ -1354,11 +1393,13 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsection{Accessing specific characters in a string}
%
-% \begin{macro}[EXP, int]{\@@_to_other:n}
-% \begin{macro}[EXP, aux]{\@@_to_other_loop:w, \@@_to_other_end:w}
+% \begin{macro}[EXP]{\@@_to_other:n}
+% \begin{macro}[EXP]{\@@_to_other_loop:w, \@@_to_other_end:w}
% First apply \cs{tl_to_str:n}, then replace all spaces by
% \enquote{other} spaces, $8$ at a time, storing the converted part of
% the string between the \cs{q_mark} and \cs{q_stop} markers. The end
@@ -1395,8 +1436,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[rEXP, int]{\@@_to_other_fast:n}
-% \begin{macro}[rEXP, aux]{\@@_to_other_fast_loop:w, \@@_to_other_fast_end:w}
+% \begin{macro}[rEXP]{\@@_to_other_fast:n}
+% \begin{macro}[rEXP]{\@@_to_other_fast_loop:w, \@@_to_other_fast_end:w}
% The difference with \cs{@@_to_other:n} is that the converted part is
% left in the input stream, making these commands only
% restricted-expandable.
@@ -1429,7 +1470,7 @@
%
% \begin{macro}[EXP]
% {\str_item:Nn, \str_item:cn, \str_item:nn, \str_item_ignore_spaces:nn}
-% \begin{macro}[EXP, aux]{\@@_item:nn, \@@_item:w}
+% \begin{macro}[EXP]{\@@_item:nn, \@@_item:w}
% The \cs{str_item:nn} hands its argument with spaces escaped to
% \cs{@@_item:nn}, and makes sure to turn the result back into
% a proper string (with category code~$10$ spaces) eventually. The
@@ -1459,7 +1500,7 @@
}
\cs_new:Npn \str_item_ignore_spaces:nn #1
{ \exp_args:No \@@_item:nn { \tl_to_str:n {#1} } }
-\__debug_patch_args:nNNpn { {#1} { (#2) } }
+\__debug_patch_args:nNNpn { {#1} { \__int_eval:n {#2} } }
\cs_new:Npn \@@_item:nn #1#2
{
\exp_after:wN \@@_item:w
@@ -1492,8 +1533,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP, aux]{\@@_skip_exp_end:w}
-% \begin{macro}[EXP, aux]
+% \begin{macro}[EXP]{\@@_skip_exp_end:w}
+% \begin{macro}[EXP]
% {\@@_skip_loop:wNNNNNNNN, \@@_skip_end:w, \@@_skip_end:NNNNNNNN}
% Removes |max(#1,0)| characters from the input stream, and then
% leaves \cs{exp_end:}. This should be expanded using
@@ -1533,8 +1574,8 @@
%
% \begin{macro}[EXP]
% {\str_range:Nnn, \str_range:nnn, \str_range_ignore_spaces:nnn}
-% \begin{macro}[EXP, int]{\@@_range:nnn}
-% \begin{macro}[EXP, aux]{\@@_range:w, \@@_range:nnw}
+% \begin{macro}[EXP]{\@@_range:nnn}
+% \begin{macro}[EXP]{\@@_range:w, \@@_range:nnw}
% Sanitize the string. Then evaluate the arguments. At this stage we
% also decrement the \meta{start index}, since our goal is to know how
% many characters should be removed. Then limit the range to be
@@ -1556,7 +1597,8 @@
}
\cs_new:Npn \str_range_ignore_spaces:nnn #1
{ \exp_args:No \@@_range:nnn { \tl_to_str:n {#1} } }
-\__debug_patch_args:nNNpn { {#1} { (#2) } { (#3) } }
+\__debug_patch_args:nNNpn
+ { {#1} { \__int_eval:n {#2} } { \__int_eval:n {#3} } }
\cs_new:Npn \@@_range:nnn #1#2#3
{
\exp_after:wN \@@_range:w
@@ -1581,7 +1623,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \begin{macro}[EXP, aux]{\@@_range_normalize:nn}
+% \begin{macro}[EXP]{\@@_range_normalize:nn}
% This function converts an \meta{index} argument into an explicit
% position in the string (a result of $0$ denoting \enquote{out of
% bounds}). Expects two explicit integer arguments: the
@@ -1610,8 +1652,8 @@
}
% \end{macrocode}
% \end{macro}
-% \begin{macro}[EXP, aux]{\@@_collect_delimit_by_q_stop:w}
-% \begin{macro}[EXP, aux]
+% \begin{macro}[EXP]{\@@_collect_delimit_by_q_stop:w}
+% \begin{macro}[EXP]
% {
% \@@_collect_loop:wn, \@@_collect_loop:wnNNNNNNN,
% \@@_collect_end:wn, \@@_collect_end:nnnnnnnnw
@@ -1659,7 +1701,7 @@
%
% \begin{macro}[EXP]
% {\str_count_spaces:N, \str_count_spaces:c, \str_count_spaces:n}
-% \begin{macro}[EXP, aux]{\@@_count_spaces_loop:w}
+% \begin{macro}[EXP]{\@@_count_spaces_loop:w}
% To speed up this function, we grab and discard $9$ space-delimited
% arguments in each iteration of the loop. The loop stops when the
% last argument is one of the trailing |X|\meta{number}, and that
@@ -1692,8 +1734,8 @@
%
% \begin{macro}[EXP]
% {\str_count:N, \str_count:c, \str_count:n, \str_count_ignore_spaces:n}
-% \begin{macro}[EXP, int]{\@@_count:n}
-% \begin{macro}[EXP, aux]{\@@_count_aux:n, \@@_count_loop:NNNNNNNNN}
+% \begin{macro}[EXP]{\@@_count:n}
+% \begin{macro}[EXP]{\@@_count_aux:n, \@@_count_loop:NNNNNNNNN}
% To count characters in a string we could first escape all spaces
% using \cs{@@_to_other:n}, then pass the result to \cs{tl_count:n}.
% However, the escaping step would be quadratic in the number of
@@ -1755,7 +1797,7 @@
%
% \begin{macro}[EXP]
% {\str_head:N, \str_head:c, \str_head:n, \str_head_ignore_spaces:n}
-% \begin{macro}[EXP, aux]{\@@_head:w}
+% \begin{macro}[EXP]{\@@_head:w}
% The \texttt{_ignore_spaces} variant applies \cs{tl_to_str:n} then
% grabs the first item, thus skipping spaces.
% As usual, \cs{str_head:N} expands its argument and
@@ -1792,7 +1834,7 @@
%
% \begin{macro}[EXP]
% {\str_tail:N, \str_tail:c, \str_tail:n, \str_tail_ignore_spaces:n}
-% \begin{macro}[EXP, aux]{\@@_tail_auxi:w, \@@_tail_auxii:w}
+% \begin{macro}[EXP]{\@@_tail_auxi:w, \@@_tail_auxii:w}
% Getting the tail is a little bit more convoluted than the head of a
% string. We hit the front of the string with \cs{reverse_if:N}
% \cs{if_charcode:w} \cs{scan_stop:}. This removes the first
@@ -1835,15 +1877,15 @@
% \str_lower_case:n, \str_lower_case:f,
% \str_upper_case:n, \str_upper_case:f
% }
-% \begin{macro}[aux, EXP]{\@@_change_case:nn}
-% \begin{macro}[aux, EXP]{\@@_change_case_aux:nn}
-% \begin{macro}[aux, EXP]{\@@_change_case_result:n}
-% \begin{macro}[aux, EXP]{\@@_change_case_output:nw, \@@_change_case_output:fw}
-% \begin{macro}[aux, EXP]{\@@_change_case_end:nw}
-% \begin{macro}[aux, EXP]{\@@_change_case_loop:nw}
-% \begin{macro}[aux, EXP]{\@@_change_case_space:n}
-% \begin{macro}[aux, EXP]{\@@_change_case_char:nN}
-% \begin{macro}[aux]
+% \begin{macro}[EXP]{\@@_change_case:nn}
+% \begin{macro}[EXP]{\@@_change_case_aux:nn}
+% \begin{macro}[EXP]{\@@_change_case_result:n}
+% \begin{macro}[EXP]{\@@_change_case_output:nw, \@@_change_case_output:fw}
+% \begin{macro}[EXP]{\@@_change_case_end:nw}
+% \begin{macro}[EXP]{\@@_change_case_loop:nw}
+% \begin{macro}[EXP]{\@@_change_case_space:n}
+% \begin{macro}[EXP]{\@@_change_case_char:nN}
+% \begin{macro}
% {\@@_lookup_lower:N, \@@_lookup_upper:N, \@@_lookup_fold:N}
% Case changing for programmatic reasons is done by first detokenizing
% input then doing a simple loop that only has to worry about spaces
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
index 46ee4aabd32..ca66e140933 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
index 19c6466cb82..99b729d8ed5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
-%% File: l3tl-analysis.dtx Copyright (C) 2011-2012,2015-2017 The LaTeX3 Project%
+%% File: l3tl-analysis.dtx Copyright (C) 2011-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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -247,8 +247,8 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[int, EXP]{\@@_extract_charcode:}
-% \begin{macro}[aux, EXP]{\@@_extract_charcode_aux:w}
+% \begin{macro}[EXP]{\@@_extract_charcode:}
+% \begin{macro}[EXP]{\@@_extract_charcode_aux:w}
% Extracting the character code from the meaning of
% \cs{l_@@_token}. This has no error checking, and should
% only be assumed to work for begin-group and end-group character
@@ -264,9 +264,9 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_cs_space_count:NN}
-% \begin{macro}[aux, EXP]{\@@_cs_space_count:w}
-% \begin{macro}[aux, EXP]{\@@_cs_space_count_end:w}
+% \begin{macro}[EXP]{\@@_cs_space_count:NN}
+% \begin{macro}[EXP]{\@@_cs_space_count:w}
+% \begin{macro}[EXP]{\@@_cs_space_count_end:w}
% Counts the number of spaces in the string representation of its
% second argument, as well as the number of characters following the
% last space in that representation, and feeds the two numbers as
@@ -346,7 +346,7 @@
%
% The second pass is a simple exercise in expandable loops.
%
-% \begin{macro}[int]{\@@:n}
+% \begin{macro}{\@@:n}
% Everything is done within a group, and all definitions are
% local. We use \cs{group_align_safe_begin/end:} to avoid problems in
% case \cs{@@:n} is used within an alignment and its argument
@@ -366,7 +366,7 @@
%
% \subsection{Disabling active characters}
%
-% \begin{macro}[aux]{\@@_disable:n}
+% \begin{macro}{\@@_disable:n}
% Active characters can cause problems later on in the processing, so
% we provide a way to disable them, by setting them to
% \texttt{undefined}. Since Unicode contains too many characters to
@@ -431,7 +431,7 @@
% \cs{str_tail:n} \Arg{token} is non-empty, because the
% escape character is printable.
%
-% \begin{macro}[int]{\@@_a:n}
+% \begin{macro}{\@@_a:n}
% We read tokens one by one using \tn{futurelet}.
% While performing the loop, we keep track of the number of
% true begin-group characters minus the number of
@@ -451,7 +451,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_a_loop:w}
+% \begin{macro}{\@@_a_loop:w}
% Read one character and check its type.
% \begin{macrocode}
\cs_new_protected:Npn \@@_a_loop:w
@@ -459,7 +459,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_a_type:w}
+% \begin{macro}{\@@_a_type:w}
% At this point, \cs{l_@@_token} holds the meaning
% of the following token. We store in \cs{l_@@_type_int}
% information about the meaning of the token ahead:
@@ -503,8 +503,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_a_space:w}
-% \begin{macro}[aux]{\@@_a_space_test:w}
+% \begin{macro}{\@@_a_space:w}
+% \begin{macro}{\@@_a_space_test:w}
% In this branch, the following token's meaning is a blank space.
% Apply \tn{string} to that token: a true blank space gives a space, a
% control sequence gives a result starting with the escape character,
@@ -547,8 +547,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_a_bgroup:w, \@@_a_egroup:w}
-% \begin{macro}[aux]
+% \begin{macro}{\@@_a_bgroup:w, \@@_a_egroup:w}
+% \begin{macro}
% {\@@_a_group:nw, \@@_a_group_aux:w, \@@_a_group_auxii:w, \@@_a_group_test:w}
% The token is most likely a true character token with catcode $1$ or
% $2$, but it might be a control sequence, or an active character.
@@ -610,7 +610,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_a_store:}
+% \begin{macro}{\@@_a_store:}
% This function is called each time we meet a special token;
% at this point, the \tn{toks} register \cs{l_@@_index_int}
% holds a token list which expands to the given special token.
@@ -657,8 +657,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{\@@_a_safe:N}
-% \begin{macro}[aux]{\@@_a_cs:ww}
+% \begin{macro}{\@@_a_safe:N}
+% \begin{macro}{\@@_a_cs:ww}
% This should be the simplest case: since the upcoming token is safe,
% we can simply grab it in a second pass. If the token is a single
% character (including space), the \cs{if_charcode:w} test yields
@@ -715,8 +715,8 @@
% All the necessary information is stored in \tn{skip}
% and \tn{toks} registers.
%
-% \begin{macro}[int]{\@@_b:n}
-% \begin{macro}[int, EXP]{\@@_b_loop:w}
+% \begin{macro}{\@@_b:n}
+% \begin{macro}[EXP]{\@@_b_loop:w}
% Start the loop with the index $0$. No need for an end-marker:
% the loop stops by itself when the last index is read.
% We repeatedly oscillate between reading long stretches
@@ -739,8 +739,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_b_normals:ww}
-% \begin{macro}[aux, EXP]{\@@_b_normal:wwN}
+% \begin{macro}[EXP]{\@@_b_normals:ww}
+% \begin{macro}[EXP]{\@@_b_normal:wwN}
% The first argument is the number of normal tokens which remain
% to be read, and the second argument is the index in the array
% produced in the first step.
@@ -777,7 +777,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_b_char:Nww}
+% \begin{macro}[EXP]{\@@_b_char:Nww}
% If the normal token we grab is a character, leave
% \meta{catcode} \meta{charcode} followed by \cs{s__tl}
% in the input stream, and call \cs{@@_b_normals:ww}
@@ -806,8 +806,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_b_cs:Nww}
-% \begin{macro}[aux, EXP]{\@@_b_cs_test:ww}
+% \begin{macro}[EXP]{\@@_b_cs:Nww}
+% \begin{macro}[EXP]{\@@_b_cs_test:ww}
% If the token we grab is a control sequence, leave
% |0 -1| (as category code and character code) in the input stream,
% followed by \cs{s__tl},
@@ -835,9 +835,9 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int, EXP]{\@@_b_special:w}
-% \begin{macro}[aux, EXP]{\@@_b_special_char:wN}
-% \begin{macro}[aux, EXP]{\@@_b_special_space:w}
+% \begin{macro}[EXP]{\@@_b_special:w}
+% \begin{macro}[EXP]{\@@_b_special_char:wN}
+% \begin{macro}[EXP]{\@@_b_special_space:w}
% Here, |#1| is the current index in the array built in the first pass.
% Check now whether we reached the end (we shouldn't keep the trailing
% end-group character that marked the end of the token list in the
@@ -889,8 +889,8 @@
%
% \subsection{Mapping through the analysis}
%
-% \begin{macro}[int]{\@@_map_inline:nn}
-% \begin{macro}[aux]{\@@_map_inline_aux:Nn}
+% \begin{macro}{\@@_map_inline:nn}
+% \begin{macro}{\@@_map_inline_aux:Nn}
% First obtain the analysis of the token list into
% \cs{g_@@_result_tl}. To allow nested mappings, increase the
% nesting depth \cs{g__prg_map_int} (shared between all modules), then
@@ -929,7 +929,6 @@
% \subsection{Showing the results}
%
% \begin{macro}{\tl_show_analysis:N, \tl_show_analysis:n}
-% \begin{macro}[int]{\@@_show:}
% Add to \cs{@@:n} a third pass to display tokens to the terminal.
% If the token list variable is not defined, throw the same error
% as \cs{tl_show:N} by simply calling that function.
@@ -939,36 +938,21 @@
\tl_if_exist:NTF #1
{
\exp_args:No \@@:n {#1}
- \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-tl-analysis }
- { \token_to_str:N #1 } { \tl_if_empty:NTF #1 { } { ? } } { } { }
- \@@_show:
+ \msg_show:nnxxxx { LaTeX / kernel } { show-tl-analysis }
+ { \token_to_str:N #1 } { \@@_show: } { } { }
}
{ \tl_show:N #1 }
}
\cs_new_protected:Npn \tl_show_analysis:n #1
{
\@@:n {#1}
- \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-tl-analysis }
- { } { \tl_if_empty:nTF {#1} { } { ? } } { } { }
- \@@_show:
- }
-\cs_new_protected:Npn \@@_show:
- {
- \group_begin:
- \exp_args:NNx
- \group_end:
- \__msg_show_wrap:n
- {
- \exp_after:wN \@@_show_loop:wNw \g_@@_result_tl
- \s__tl { ? \__prg_break: } \s__tl
- \__prg_break_point:
- }
+ \msg_show:nnxxxx { LaTeX / kernel } { show-tl-analysis }
+ { } { \@@_show: } { } { }
}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_show_loop:wNw}
+% \begin{macro}[rEXP]{\@@_show:, \@@_show_loop:wNw}
% Here, |#1| \texttt{o}- and \texttt{x}-expands to the token;
% |#2| is the category code (one uppercase hexadecimal digit),
% $0$ for control sequences;
@@ -977,10 +961,16 @@
% the meaning may overflow one line, and we want to truncate
% it. Those cases are thus separated out.
% \begin{macrocode}
+\cs_new:Npn \@@_show:
+ {
+ \exp_after:wN \@@_show_loop:wNw \g_@@_result_tl
+ \s__tl { ? \__prg_break: } \s__tl
+ \__prg_break_point:
+ }
\cs_new:Npn \@@_show_loop:wNw #1 \s__tl #2 #3 \s__tl
{
\use_none:n #2
- \exp_not:n { \\ > \ \ }
+ \iow_newline: > \use:nn { ~ } { ~ }
\if_int_compare:w "#2 = 0 \exp_stop_f:
\exp_after:wN \@@_show_cs:n
\else:
@@ -998,7 +988,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_show_normal:n}
+% \begin{macro}[rEXP]{\@@_show_normal:n}
% Non-active characters are a simple matter of printing
% the character, and its meaning. Our test suite checks that
% begin-group and end-group characters do not mess up
@@ -1033,10 +1023,10 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, rEXP]{\@@_show_cs:n}
-% \begin{macro}[aux, rEXP]{\@@_show_active:n}
-% \begin{macro}[aux, rEXP]{\@@_show_long:nn}
-% \begin{macro}[aux, rEXP]{\@@_show_long_aux:nnnn}
+% \begin{macro}[rEXP]{\@@_show_cs:n}
+% \begin{macro}[rEXP]{\@@_show_active:n}
+% \begin{macro}[rEXP]{\@@_show_long:nn}
+% \begin{macro}[rEXP]{\@@_show_long_aux:nnnn}
% Control sequences and active characters are printed in the same way,
% making sure not to go beyond the \cs{l_iow_line_count_int}. In case
% of an overflow, we replace the last characters by
@@ -1093,7 +1083,7 @@
The~token~list~ \tl_if_empty:nF {#1} { #1 ~ }
\tl_if_empty:nTF {#2}
{ is~empty }
- { contains~the~tokens: }
+ { contains~the~tokens: #2 }
}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx
index 3a0ad3d7ad1..5c59209de34 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -156,7 +156,7 @@
% \end{variable}
%
% \begin{macro}{\@@_unpack:}
-% \begin{macro}[aux, EXP]{\@@_unpack_loop:w}
+% \begin{macro}[EXP]{\@@_unpack_loop:w}
% The various pieces of the token list are built in \tn{toks} from the
% \texttt{start_index} (inclusive) to the (current) \texttt{index}
% (excluded). Those \tn{toks} are unpacked and stored in order in the
@@ -194,7 +194,7 @@
% \@@:Nw , \@@_x:Nw ,
% \__tl_gbuild:Nw , \__tl_gbuild_x:Nw
% }
-% \begin{macro}[aux]{\@@_aux:NNw}
+% \begin{macro}{\@@_aux:NNw}
% Similar to what is done for coffins: redefine some command, here
% \cs{@@_end_aux:n} to hold the relevant assignment (see
% \cs{@@_end:} for details). Then initialize the start index and
@@ -222,7 +222,7 @@
% \end{macro}
%
% \begin{macro}{\@@_end:}
-% \begin{macro}[aux]{\@@_end_assignment:n}
+% \begin{macro}{\@@_end_assignment:n}
% When we are done building a token list, unpack all \tn{toks} into
% the \texttt{result} token list, and expand this list before closing
% the group. The \cs{@@_end_assignment:n} function is defined by
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index 5da866311bb..52ebf4eb95c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -439,7 +439,7 @@
% \cs{tl_if_novalue:nTF} \Arg{token list} \Arg{true code} \Arg{false code}
% \end{syntax}
% Tests if the \meta{token list} is exactly equal to the special
-% \cs{c_novalue_tl} marker. This function is indented to allow construction
+% \cs{c_novalue_tl} marker. This function is intended to allow construction
% of flexible document interface structures in which missing optional
% arguments are detected.
% \end{function}
@@ -525,8 +525,7 @@
% \end{syntax}
% Applies the \meta{inline function} to every \meta{item} stored within the
% \meta{tl~var}. The \meta{inline function} should consist of code which
-% receives the \meta{item} as |#1|. One in line mapping can be nested
-% inside another. See also \cs{tl_map_function:NN}.
+% receives the \meta{item} as |#1|. See also \cs{tl_map_function:NN}.
% \end{function}
%
% \begin{function}[updated = 2012-06-29]{\tl_map_inline:nn}
@@ -535,31 +534,30 @@
% \end{syntax}
% Applies the \meta{inline function} to every \meta{item} stored within the
% \meta{token list}. The \meta{inline function} should consist of code which
-% receives the \meta{item} as |#1|. One in line mapping can be nested
-% inside another. See also \cs{tl_map_function:nN}.
+% receives the \meta{item} as |#1|. See also \cs{tl_map_function:nN}.
% \end{function}
%
% \begin{function}[updated = 2012-06-29]
% {\tl_map_variable:NNn, \tl_map_variable:cNn}
% \begin{syntax}
-% \cs{tl_map_variable:NNn} \meta{tl~var} \meta{variable} \Arg{function}
+% \cs{tl_map_variable:NNn} \meta{tl~var} \meta{variable} \Arg{code}
% \end{syntax}
-% Applies the \meta{function} to every \meta{item} stored
-% within the \meta{tl~var}. The \meta{function} should consist of code
-% which receives the \meta{item} stored in the \meta{variable}.
-% One variable mapping can be nested inside another. See also
-% \cs{tl_map_inline:Nn}.
+% Stores each \meta{item} of the \meta{tl~var} in turn in the (token
+% list) \meta{variable} and applies the \meta{code}. The \meta{code}
+% will usually make use of the \meta{variable}, but this is not
+% enforced. The assignments to the \meta{variable} are local. See
+% also \cs{tl_map_inline:Nn}.
% \end{function}
%
% \begin{function}[updated = 2012-06-29]{\tl_map_variable:nNn}
% \begin{syntax}
-% \cs{tl_map_variable:nNn} \Arg{token list} \meta{variable} \Arg{function}
+% \cs{tl_map_variable:nNn} \Arg{token list} \meta{variable} \Arg{code}
% \end{syntax}
-% Applies the \meta{function} to every \meta{item} stored
-% within the \meta{token list}. The \meta{function} should consist of code
-% which receives the \meta{item} stored in the \meta{variable}.
-% One variable mapping can be nested inside another. See also
-% \cs{tl_map_inline:nn}.
+% Stores each \meta{item} of the \meta{token list} in turn in the
+% (token list) \meta{variable} and applies the \meta{code}. The
+% \meta{code} will usually make use of the \meta{variable}, but this
+% is not enforced. The assignments to the \meta{variable} are local.
+% See also \cs{tl_map_inline:nn}.
% \end{function}
%
% \begin{function}[updated = 2012-06-29, rEXP]{\tl_map_break:}
@@ -580,8 +578,8 @@
% Use outside of a \cs[no-index]{tl_map_\ldots} scenario leads to low
% level \TeX{} errors.
% \begin{texnote}
-% When the mapping is broken, additional tokens may be inserted by the
-% internal macro \cs{__prg_break_point:Nn} before the \meta{tokens} are
+% When the mapping is broken, additional tokens may be inserted
+% before the \meta{tokens} are
% inserted into the input stream.
% This depends on the design of the mapping function.
% \end{texnote}
@@ -589,25 +587,25 @@
%
% \begin{function}[updated = 2012-06-29, rEXP]{\tl_map_break:n}
% \begin{syntax}
-% \cs{tl_map_break:n} \Arg{tokens}
+% \cs{tl_map_break:n} \Arg{code}
% \end{syntax}
% Used to terminate a \cs[no-index]{tl_map_\ldots} function before all
% entries in the \meta{token list variable} have been processed, inserting
-% the \meta{tokens} after the mapping has ended. This
+% the \meta{code} after the mapping has ended. This
% normally takes place within a conditional statement, for example
% \begin{verbatim}
% \tl_map_inline:Nn \l_my_tl
% {
% \str_if_eq:nnT { #1 } { bingo }
-% { \tl_map_break:n { <tokens> } }
+% { \tl_map_break:n { <code> } }
% % Do something useful
% }
% \end{verbatim}
% Use outside of a \cs[no-index]{tl_map_\ldots} scenario leads to low
% level \TeX{} errors.
% \begin{texnote}
-% When the mapping is broken, additional tokens may be inserted by the
-% internal macro \cs{__prg_break_point:Nn} before the \meta{tokens} are
+% When the mapping is broken, additional tokens may be inserted
+% before the \meta{code} is
% inserted into the input stream.
% This depends on the design of the mapping function.
% \end{texnote}
@@ -1133,11 +1131,13 @@
% \begin{macro}{\tl_const:Nn, \tl_const:Nx, \tl_const:cn, \tl_const:cx}
% Constants are also easy to generate.
% \begin{macrocode}
+\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN c #1 } { }
\cs_new_protected:Npn \tl_const:Nn #1#2
{
\__chk_if_free_cs:N #1
\cs_gset_nopar:Npx #1 { \exp_not:n {#2} }
}
+\__debug_patch:nnNNpn { \__debug_chk_var_scope:NN c #1 } { }
\cs_new_protected:Npn \tl_const:Nx #1#2
{
\__chk_if_free_cs:N #1
@@ -1186,13 +1186,13 @@
\tex_ifodd:D \l@expl@enable@debug@bool
\cs_new_protected:Npn \tl_set_eq:NN #1#2
{
- \__debug_chk_var_exist:N #1
+ \__debug_chk_var_local:N #1
\__debug_chk_var_exist:N #2
\cs_set_eq:NN #1 #2
}
\cs_new_protected:Npn \tl_gset_eq:NN #1#2
{
- \__debug_chk_var_exist:N #1
+ \__debug_chk_var_global:N #1
\__debug_chk_var_exist:N #2
\cs_gset_eq:NN #1 #2
}
@@ -1214,7 +1214,6 @@
% \begin{macrocode}
\__debug_patch:nnNNpn
{
- \__debug_chk_var_exist:N #1
\__debug_chk_var_exist:N #2
\__debug_chk_var_exist:N #3
}
@@ -1223,7 +1222,6 @@
{ \tl_set:Nx #1 { \exp_not:o {#2} \exp_not:o {#3} } }
\__debug_patch:nnNNpn
{
- \__debug_chk_var_exist:N #1
\__debug_chk_var_exist:N #2
\__debug_chk_var_exist:N #3
}
@@ -1297,22 +1295,22 @@
% prefixed by a call to \cs{__debug_patch:nnNNpn} which adds an
% existence check to the definition.
% \begin{macrocode}
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \tl_set:Nn #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:n {#2} } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \tl_set:No #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:o {#2} } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \tl_set:Nx #1#2
{ \cs_set_nopar:Npx #1 {#2} }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \tl_gset:Nn #1#2
{ \cs_gset_nopar:Npx #1 { \exp_not:n {#2} } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \tl_gset:No #1#2
{ \cs_gset_nopar:Npx #1 { \exp_not:o {#2} } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \tl_gset:Nx #1#2
{ \cs_gset_nopar:Npx #1 {#2} }
\cs_generate_variant:Nn \tl_set:Nn { NV , Nv , Nf }
@@ -1337,28 +1335,28 @@
% }
% Adding to the left is done directly to gain a little performance.
% \begin{macrocode}
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \tl_put_left:Nn #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:n {#2} \exp_not:o #1 } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \tl_put_left:NV #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:V #2 \exp_not:o #1 } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \tl_put_left:No #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:o {#2} \exp_not:o #1 } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \tl_put_left:Nx #1#2
{ \cs_set_nopar:Npx #1 { #2 \exp_not:o #1 } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \tl_gput_left:Nn #1#2
{ \cs_gset_nopar:Npx #1 { \exp_not:n {#2} \exp_not:o #1 } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \tl_gput_left:NV #1#2
{ \cs_gset_nopar:Npx #1 { \exp_not:V #2 \exp_not:o #1 } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \tl_gput_left:No #1#2
{ \cs_gset_nopar:Npx #1 { \exp_not:o {#2} \exp_not:o #1 } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \tl_gput_left:Nx #1#2
{ \cs_gset_nopar:Npx #1 { #2 \exp_not:o {#1} } }
\cs_generate_variant:Nn \tl_put_left:Nn { c }
@@ -1387,28 +1385,28 @@
% }
% The same on the right.
% \begin{macrocode}
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \tl_put_right:Nn #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:o #1 \exp_not:n {#2} } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \tl_put_right:NV #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:o #1 \exp_not:V #2 } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \tl_put_right:No #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:o #1 \exp_not:o {#2} } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \tl_put_right:Nx #1#2
{ \cs_set_nopar:Npx #1 { \exp_not:o #1 #2 } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \tl_gput_right:Nn #1#2
{ \cs_gset_nopar:Npx #1 { \exp_not:o #1 \exp_not:n {#2} } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \tl_gput_right:NV #1#2
{ \cs_gset_nopar:Npx #1 { \exp_not:o #1 \exp_not:V #2 } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \tl_gput_right:No #1#2
{ \cs_gset_nopar:Npx #1 { \exp_not:o #1 \exp_not:o {#2} } }
-\__debug_patch:nnNNpn { \__debug_chk_var_exist:N #1 } { }
+\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \tl_gput_right:Nx #1#2
{ \cs_gset_nopar:Npx #1 { \exp_not:o {#1} #2 } }
\cs_generate_variant:Nn \tl_put_right:Nn { c }
@@ -1446,8 +1444,8 @@
% \tl_gset_rescan:cnn, \tl_gset_rescan:cno, \tl_gset_rescan:cnx
% }
% \begin{macro}{\tl_rescan:nn}
-% \begin{macro}[aux]{\@@_set_rescan:NNnn, \@@_set_rescan_multi:n}
-% \begin{macro}[aux, EXP]{\@@_rescan:w}
+% \begin{macro}{\@@_set_rescan:NNnn, \@@_set_rescan_multi:n}
+% \begin{macro}[EXP]{\@@_rescan:w}
% These functions use a common auxiliary. After some initial setup
% explained below, and the user setup |#3| (followed by
% \cs{scan_stop:} to be safe), the tokens are rescanned by
@@ -1527,8 +1525,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_set_rescan:n, \@@_set_rescan:NnTF}
-% \begin{macro}[aux]{\@@_set_rescan_single:nn, \@@_set_rescan_single_aux:nn}
+% \begin{macro}{\@@_set_rescan:n, \@@_set_rescan:NnTF}
+% \begin{macro}{\@@_set_rescan_single:nn, \@@_set_rescan_single_aux:nn}
% This function calls \cs{@@_set_rescan_multiple:n} or
% \cs{@@_set_rescan_single:nn} |{ ' }| depending on whether its
% argument is a single-line fragment of code/data or is made of
@@ -1686,7 +1684,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_replace:NnNNNnn,
% \@@_replace_auxi:NnnNNNnn,
@@ -1892,7 +1890,7 @@
% \subsection{Token list conditionals}
%
% \begin{macro}[pTF]{\tl_if_blank:n, \tl_if_blank:V, \tl_if_blank:o}
-% \begin{macro}[aux]{\@@_if_blank_p:NNw}
+% \begin{macro}{\@@_if_blank_p:NNw}
% \TeX{} skips spaces when reading a non-delimited arguments. Thus,
% a \meta{token list} is blank if and only if \cs{use_none:n}
% \meta{token list} |?| is empty after one expansion. The auxiliary
@@ -1964,7 +1962,7 @@
% \end{macro}
%
% \begin{macro}[pTF,documented-as=\tl_if_empty:nTF]{\tl_if_empty:o}
-% \begin{macro}[EXP,aux]{\@@_if_empty_return:o}
+% \begin{macro}[EXP]{\@@_if_empty_return:o}
% The auxiliary function \cs{@@_if_empty_return:o} is for use
% in various token list conditionals which reduce to testing
% if a given token list is empty after applying a simple function
@@ -2078,7 +2076,7 @@
% \end{macro}
%
% \begin{macro}[TF, EXP]{\tl_if_novalue:n}
-% \begin{macro}[EXP, aux]{\@@_if_novalue:w}
+% \begin{macro}[EXP]{\@@_if_novalue:w}
% Tests for |-NoValue-|: this is similar to \cs{tl_if_in:nn} but set
% up to be expandable and to check the value exactly. The question
% mark prevents the auxiliary from losing braces.
@@ -2115,7 +2113,7 @@
% \end{macro}
%
% \begin{macro}[EXP,pTF]{\tl_if_single:n}
-% \begin{macro}[EXP,pTF,aux]{\@@_if_single:n}
+% \begin{macro}[EXP,pTF]{\@@_if_single:n}
% This test is similar to \cs{tl_if_empty:nTF}. Expanding
% \cs{use_none:nn} |#1| |??| once yields an empty result if |#1| is
% blank, a single~|?| if |#1| has a single item, and otherwise yields
@@ -2148,10 +2146,10 @@
% \end{macro}
%
% \begin{macro}[EXP, noTF]{\tl_case:Nn, \tl_case:cn}
-% \begin{macro}[EXP, aux]{\@@_case:nnTF}
-% \begin{macro}[aux, EXP]{\@@_case:Nw}
-% \begin{macro}[int, EXP]{\__prg_case_end:nw}
-% \begin{macro}[aux, EXP]{\@@_case_end:nw}
+% \begin{macro}[EXP]{\@@_case:nnTF}
+% \begin{macro}[EXP]{\@@_case:Nw}
+% \begin{macro}[EXP]{\__prg_case_end:nw}
+% \begin{macro}[EXP]{\@@_case_end:nw}
% The aim here is to allow the case statement to be evaluated
% using a known number of expansion steps (two), and without
% needing to use an explicit \enquote{end of recursion} marker.
@@ -2218,7 +2216,7 @@
%
% \begin{macro}{\tl_map_function:nN}
% \begin{macro}{\tl_map_function:NN, \tl_map_function:cN}
-% \begin{macro}[aux]{\@@_map_function:Nn}
+% \begin{macro}{\@@_map_function:Nn}
% Expandable loop macro for token lists. These have the advantage of not
% needing to test if the argument is empty, because if it is, the stop
% marker is read immediately and the loop terminated.
@@ -2268,7 +2266,7 @@
%
% \begin{macro}{\tl_map_variable:nNn}
% \begin{macro}{\tl_map_variable:NNn, \tl_map_variable:cNn}
-% \begin{macro}[aux]{\@@_map_variable:Nnn}
+% \begin{macro}{\@@_map_variable:Nnn}
% \cs{tl_map_variable:nNn} \meta{token list} \meta{temp} \meta{action}
% assigns
% \meta{temp} to each element and executes \meta{action}.
@@ -2345,7 +2343,7 @@
%
% \begin{macro}{\tl_count:n, \tl_count:V, \tl_count:o}
% \begin{macro}{\tl_count:N, \tl_count:c}
-% \begin{macro}[aux]{\@@_count:n}
+% \begin{macro}{\@@_count:n}
% Count number of elements within a token list or token list
% variable. Brace groups within the list are read as a single
% element. Spaces are ignored.
@@ -2371,8 +2369,8 @@
% \end{macro}
%
% \begin{macro}{\tl_reverse_items:n}
-% \begin{macro}[aux]{\@@_reverse_items:nwNwn}
-% \begin{macro}[aux]{\@@_reverse_items:wn}
+% \begin{macro}{\@@_reverse_items:nwNwn}
+% \begin{macro}{\@@_reverse_items:wn}
% Reversal of a token list is done by taking one item at a time
% and putting it after \cs{q_stop}.
% \begin{macrocode}
@@ -2424,8 +2422,8 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[int]{\@@_trim_spaces:nn}
-% \begin{macro}[aux]
+% \begin{macro}{\@@_trim_spaces:nn}
+% \begin{macro}
% {
% \@@_trim_spaces_auxi:w, \@@_trim_spaces_auxii:w,
% \@@_trim_spaces_auxiii:w, \@@_trim_spaces_auxiv:w
@@ -2497,19 +2495,19 @@
% \begin{variable}{\q_@@_act_mark, \q_@@_act_stop}
% The \cs{tl_act} functions may be applied to any token list.
% Hence, we use two private quarks, to allow any token, even quarks,
-% in the token list.^^A in particular critical for future \::e.
+% in the token list.
% Only \cs{q_@@_act_mark} and \cs{q_@@_act_stop} may not appear
% in the token lists manipulated by \cs{@@_act:NNNnn} functions. The quarks
% are effectively defined in \pkg{l3quark}.
% \end{variable}
%
-% \begin{macro}[EXP,int]{\@@_act:NNNnn}
-% \begin{macro}[EXP,aux]{\@@_act_output:n, \@@_act_reverse_output:n}
-% \begin{macro}[EXP,aux]{\@@_act_loop:w}
-% \begin{macro}[EXP,aux]{\@@_act_normal:NwnNNN}
-% \begin{macro}[EXP,aux]{\@@_act_group:nwnNNN}
-% \begin{macro}[EXP,aux]{\@@_act_space:wwnNNN}
-% \begin{macro}[EXP,aux]{\@@_act_end:w}
+% \begin{macro}[EXP]{\@@_act:NNNnn}
+% \begin{macro}[EXP]{\@@_act_output:n, \@@_act_reverse_output:n}
+% \begin{macro}[EXP]{\@@_act_loop:w}
+% \begin{macro}[EXP]{\@@_act_normal:NwnNNN}
+% \begin{macro}[EXP]{\@@_act_group:nwnNNN}
+% \begin{macro}[EXP]{\@@_act_space:wwnNNN}
+% \begin{macro}[EXP]{\@@_act_end:w}
% To help control the expansion, \cs{@@_act:NNNnn} should always
% be proceeded by \cs{exp:w} and ends by producing \cs{exp_end:}
% once the result has been obtained. Then loop over tokens,
@@ -2592,9 +2590,9 @@
% \end{macro}
%
% \begin{macro}[EXP]{\tl_reverse:n, \tl_reverse:o, \tl_reverse:V}
-% \begin{macro}[EXP,aux]{\@@_reverse_normal:nN}
-% \begin{macro}[EXP,aux]{\@@_reverse_group_preserve:nn}
-% \begin{macro}[EXP,aux]{\@@_reverse_space:n}
+% \begin{macro}[EXP]{\@@_reverse_normal:nN}
+% \begin{macro}[EXP]{\@@_reverse_group_preserve:nn}
+% \begin{macro}[EXP]{\@@_reverse_space:n}
% The goal here is to reverse without losing spaces nor braces.
% This is done using the general internal function \cs{@@_act:NNNnn}.
% Spaces and \enquote{normal} tokens are output on the left of the current
@@ -2645,7 +2643,7 @@
% \subsection{The first token from a token list}
%
% \begin{macro}{\tl_head:N, \tl_head:n, \tl_head:V, \tl_head:v, \tl_head:f}
-% \begin{macro}[aux]{\@@_head_auxi:nw, \@@_head_auxii:n}
+% \begin{macro}{\@@_head_auxi:nw, \@@_head_auxii:n}
% \begin{macro}{\tl_head:w}
% \begin{macro}{\tl_tail:N, \tl_tail:n, \tl_tail:V, \tl_tail:v, \tl_tail:f}
% Finding the head of a token list expandably always strips braces, which
@@ -2845,7 +2843,7 @@
% \end{macro}
%
% \begin{macro}[pTF]{\tl_if_head_is_N_type:n}
-% \begin{macro}[EXP,aux]{\@@_if_head_is_N_type:w}
+% \begin{macro}[EXP]{\@@_if_head_is_N_type:w}
% A token list can be empty, can start with an explicit space
% character (catcode 10 and charcode 32), can start with a begin-group
% token (catcode 1), or start with an \texttt{N}-type argument. In
@@ -2904,7 +2902,7 @@
% \end{macro}
%
% \begin{macro}[EXP,pTF]{\tl_if_head_is_space:n}
-% \begin{macro}[EXP,aux]{\@@_if_head_is_space:w}
+% \begin{macro}[EXP]{\@@_if_head_is_space:w}
% The auxiliary's argument is all that is before the first explicit
% space in |?#1?~|. If that is a single~|?| the test yields
% \texttt{true}. Otherwise, that is more than one token, and the test
@@ -2935,7 +2933,7 @@
% \subsection{Using a single item}
%
% \begin{macro}{\tl_item:nn, \tl_item:Nn, \tl_item:cn}
-% \begin{macro}[aux]{\@@_item_aux:nn, \@@_item:nn}
+% \begin{macro}{\@@_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
@@ -2970,39 +2968,65 @@
%
% \subsection{Viewing token lists}
%
-% \begin{macro}{\tl_show:N, \tl_show:c}
+% \begin{macro}{\tl_show:N, \tl_show:c, \tl_log:N, \tl_log:c, \@@_show:NN}
% Showing token list variables is done after checking that the
% variable is defined (see \cs{__kernel_register_show:N}).
% \begin{macrocode}
-\cs_new_protected:Npn \tl_show:N #1
+\cs_new_protected:Npn \tl_show:N { \@@_show:NN \tl_show:n }
+\cs_generate_variant:Nn \tl_show:N { c }
+\cs_new_protected:Npn \tl_log:N { \@@_show:NN \tl_log:n }
+\cs_generate_variant:Nn \tl_log:N { c }
+\cs_new_protected:Npn \@@_show:NN #1#2
{
- \__msg_show_variable:NNNnn #1 \tl_if_exist:NTF ? { }
- { > ~ \token_to_str:N #1 = \tl_to_str:N #1 }
+ \__kernel_check_defined:NT #2
+ { \exp_args:Nx #1 { \token_to_str:N #2 = \exp_not:o {#2} } }
}
-\cs_generate_variant:Nn \tl_show:N { c }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\tl_show:n}
-% The \cs{__msg_show_wrap:n} internal function performs
-% line-wrapping and shows the result
-% using the \cs{etex_showtokens:D} primitive. Since \cs{tl_to_str:n}
-% is expanded within the line-wrapping code, the escape character is
-% always a backslash.
+% \begin{macro}{\tl_show:n, \@@_show:n}
+% \begin{macro}[EXP]{\@@_show:w}
+% Many |show| functions are based on \cs{tl_show:n}.
+% The argument of \cs{tl_show:n} is line-wrapped using
+% \cs{iow_wrap:nnnN} but with a leading |>~| and trailing period, both
+% removed before passing the wrapped text to the \tn{showtokens}
+% primitive. This primitive shows the result with a leading |>~| and
+% trailing period.
+%
+% The token list \cs{l_@@_internal_a_tl} containing the result
+% of all these manipulations is displayed to the terminal using
+% \cs{etex_showtokens:D} and an odd \cs{exp_after:wN} which expand the
+% closing brace to improve the output slightly. The calls to
+% \cs{__iow_with:Nnn} ensure that the \tn{newlinechar} is set to~$10$
+% so that the \cs{iow_newline:} inserted by the line-wrapping code
+% are correctly recognized by \TeX{}, and that \tn{errorcontextlines}
+% is $-1$ to avoid printing irrelevant context.
% \begin{macrocode}
\cs_new_protected:Npn \tl_show:n #1
- { \__msg_show_wrap:n { > ~ \tl_to_str:n {#1} } }
+ { \iow_wrap:nnnN { >~ \tl_to_str:n {#1} . } { } { } \@@_show:n }
+\cs_new_protected:Npn \@@_show:n #1
+ {
+ \tl_set:Nf \l_@@_internal_a_tl { \@@_show:w #1 \q_stop }
+ \__iow_with:Nnn \tex_newlinechar:D { 10 }
+ {
+ \__iow_with:Nnn \tex_errorcontextlines:D { -1 }
+ {
+ \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN
+ { \exp_after:wN \l_@@_internal_a_tl }
+ }
+ }
+ }
+\cs_new:Npn \@@_show:w #1 > #2 . \q_stop {#2}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\tl_log:N, \tl_log:c, \tl_log:n}
-% Redirect output of \cs{tl_show:N} and \cs{tl_show:n} to the log.
+% \begin{macro}{\tl_log:n}
+% Logging is much easier, simply line-wrap. The |>~| and trailing
+% period is there to match the output of \cs{tl_show:n}.
% \begin{macrocode}
-\cs_new_protected:Npn \tl_log:N
- { \__msg_log_next: \tl_show:N }
-\cs_generate_variant:Nn \tl_log:N { c }
-\cs_new_protected:Npn \tl_log:n
- { \__msg_log_next: \tl_show:n }
+\cs_new_protected:Npn \tl_log:n #1
+ { \iow_wrap:nnnN { > ~ \tl_to_str:n {#1} . } { } { } \iow_log:n }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index 34c03120b63..5c72190f6b8 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
@@ -7,7 +7,7 @@
% 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
+% https://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.
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver>
-\documentclass[full]{l3doc}
+\documentclass[full,kernel]{l3doc}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/11/14}
+% \date{Released 2017/12/05}
%
% \maketitle
%
@@ -396,14 +396,6 @@
%
% \section{Generic tokens}
%
-% \begin{function}{\token_new:Nn}
-% \begin{syntax}
-% \cs{token_new:Nn} \meta{token_1} \Arg{token_2}
-% \end{syntax}
-% Defines \meta{token_1} to globally be a snapshot of \meta{token_2}.
-% This is an implicit representation of \meta{token_2}.
-% \end{function}
-%
% \begin{variable}
% {
% \c_group_begin_token,
@@ -1136,17 +1128,12 @@
% \begin{macro}{\char_show_value_catcode:n}
% Simple wrappers around the primitives.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
\cs_new_protected:Npn \char_set_catcode:nn #1#2
- {
- \tex_catcode:D \__int_eval:w #1 \__int_eval_end:
- = \__int_eval:w #2 \__int_eval_end:
- }
-\__debug_patch_args:nNNpn { { (#1) } }
+ { \tex_catcode:D \__int_eval:n {#1} = \__int_eval:n {#2} }
\cs_new:Npn \char_value_catcode:n #1
- { \tex_the:D \tex_catcode:D \__int_eval:w #1 \__int_eval_end: }
+ { \tex_the:D \tex_catcode:D \__int_eval:n {#1} }
\cs_new_protected:Npn \char_show_value_catcode:n #1
- { \__msg_show_wrap:n { > ~ \char_value_catcode:n {#1} } }
+ { \exp_args:Nf \tl_show:n { \char_value_catcode:n {#1} } }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1276,50 +1263,30 @@
% \begin{macro}{\char_show_value_sfcode:n}
% Pretty repetitive, but necessary!
% \begin{macrocode}
-\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
\cs_new_protected:Npn \char_set_mathcode:nn #1#2
- {
- \tex_mathcode:D \__int_eval:w #1 \__int_eval_end:
- = \__int_eval:w #2 \__int_eval_end:
- }
-\__debug_patch_args:nNNpn { { (#1) } }
+ { \tex_mathcode:D \__int_eval:n {#1} = \__int_eval:n {#2} }
\cs_new:Npn \char_value_mathcode:n #1
- { \tex_the:D \tex_mathcode:D \__int_eval:w #1 \__int_eval_end: }
+ { \tex_the:D \tex_mathcode:D \__int_eval:n {#1} }
\cs_new_protected:Npn \char_show_value_mathcode:n #1
- { \__msg_show_wrap:n { > ~ \char_value_mathcode:n {#1} } }
-\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
+ { \exp_args:Nf \tl_show:n { \char_value_mathcode:n {#1} } }
\cs_new_protected:Npn \char_set_lccode:nn #1#2
- {
- \tex_lccode:D \__int_eval:w #1 \__int_eval_end:
- = \__int_eval:w #2 \__int_eval_end:
- }
-\__debug_patch_args:nNNpn { { (#1) } }
+ { \tex_lccode:D \__int_eval:n {#1} = \__int_eval:n {#2} }
\cs_new:Npn \char_value_lccode:n #1
- { \tex_the:D \tex_lccode:D \__int_eval:w #1 \__int_eval_end: }
+ { \tex_the:D \tex_lccode:D \__int_eval:n {#1} }
\cs_new_protected:Npn \char_show_value_lccode:n #1
- { \__msg_show_wrap:n { > ~ \char_value_lccode:n {#1} } }
-\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
+ { \exp_args:Nf \tl_show:n { \char_value_lccode:n {#1} } }
\cs_new_protected:Npn \char_set_uccode:nn #1#2
- {
- \tex_uccode:D \__int_eval:w #1 \__int_eval_end:
- = \__int_eval:w #2 \__int_eval_end:
- }
-\__debug_patch_args:nNNpn { { (#1) } }
+ { \tex_uccode:D \__int_eval:n {#1} = \__int_eval:n {#2} }
\cs_new:Npn \char_value_uccode:n #1
- { \tex_the:D \tex_uccode:D \__int_eval:w #1 \__int_eval_end: }
+ { \tex_the:D \tex_uccode:D \__int_eval:n {#1} }
\cs_new_protected:Npn \char_show_value_uccode:n #1
- { \__msg_show_wrap:n { > ~ \char_value_uccode:n {#1} } }
-\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
+ { \exp_args:Nf \tl_show:n { \char_value_uccode:n {#1} } }
\cs_new_protected:Npn \char_set_sfcode:nn #1#2
- {
- \tex_sfcode:D \__int_eval:w #1 \__int_eval_end:
- = \__int_eval:w #2 \__int_eval_end:
- }
-\__debug_patch_args:nNNpn { { (#1) } }
+ { \tex_sfcode:D \__int_eval:n {#1} = \__int_eval:n {#2} }
\cs_new:Npn \char_value_sfcode:n #1
- { \tex_the:D \tex_sfcode:D \__int_eval:w #1 \__int_eval_end: }
+ { \tex_the:D \tex_sfcode:D \__int_eval:n {#1} }
\cs_new_protected:Npn \char_show_value_sfcode:n #1
- { \__msg_show_wrap:n { > ~ \char_value_sfcode:n {#1} } }
+ { \exp_args:Nf \tl_show:n { \char_value_sfcode:n {#1} } }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1388,19 +1355,19 @@
% \end{macro}
%
% \begin{macro}[EXP]{\char_generate:nn}
-% \begin{macro}[EXP, int]{\__char_generate:nn}
-% \begin{macro}[EXP, aux]{\@@_generate_aux:nn}
-% \begin{macro}[EXP, aux]{\@@_generate_aux:nnw}
+% \begin{macro}[EXP]{\__char_generate:nn}
+% \begin{macro}[EXP]{\@@_generate_aux:nn}
+% \begin{macro}[EXP]{\@@_generate_aux:nnw}
% \begin{variable}{\l_@@_tmp_tl}
% \begin{variable}{\c_@@_max_int}
-% \begin{macro}[EXP, aux]{\@@_generate_invalid_catcode:}
+% \begin{macro}[EXP]{\@@_generate_invalid_catcode:}
% The aim here is to generate characters of (broadly) arbitrary category
% code. Where possible, that is done using engine support (\XeTeX{},
% \LuaTeX{}). There are though various issues which are covered below. At
% the interface layer, turn the two arguments into integers up-front so
% this is only done once.
% \begin{macrocode}
-\__debug_patch_args:nNNpn { { (#1) } { (#2) } }
+\__debug_patch_args:nNNpn { { \__int_eval:n {#1} } { \__int_eval:n {#2} } }
\cs_new:Npn \char_generate:nn #1#2
{
\exp:w \exp_after:wN \@@_generate_aux:w
@@ -1622,13 +1589,6 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\token_new:Nn}
-% Creates a new token.
-% \begin{macrocode}
-\cs_new_protected:Npn \token_new:Nn #1#2 { \cs_new_eq:NN #1 #2 }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}
% {
% \c_group_begin_token,
@@ -1859,7 +1819,7 @@
% \end{macro}
%
% \begin{macro}[pTF]{\token_if_macro:N}
-% \begin{macro}[aux]{\@@_if_macro_p:w}
+% \begin{macro}{\@@_if_macro_p:w}
% When a token is a macro, \cs{token_to_meaning:N} always outputs
% something like |\long macro:#1->#1| so we could naively check to
% see if the meaning contains |->|. However, this can fail the five
@@ -1945,7 +1905,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_delimit_by_char":w,
% \@@_delimit_by_count:w,
@@ -2084,7 +2044,7 @@
% \end{macro}
%
% \begin{macro}[pTF]{\token_if_primitive:N}
-% \begin{macro}[aux]{\@@_if_primitive:NNw,
+% \begin{macro}{\@@_if_primitive:NNw,
% \@@_if_primitive_space:w,
% \@@_if_primitive_nullfont:N,
% \@@_if_primitive_loop:N,
@@ -2243,7 +2203,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}[aux]
+% \begin{macro}
% {\@@_true:w, \@@_true_aux:w, \@@_false:w, \@@_tmp:w}
% Functions used by the branching and space-stripping code.
% \begin{macrocode}
@@ -2267,7 +2227,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_true_remove:w}
+% \begin{macro}{\@@_true_remove:w}
% A function to remove the next token and then regain control.
% \begin{macrocode}
\cs_new_protected:Npn \@@_true_remove:w
@@ -2341,7 +2301,7 @@
% \end{macro}
%
% \begin{macro}{\@@_execute_branches_catcode:, \@@_execute_branches_charcode:}
-% \begin{macro}[aux]
+% \begin{macro}
% {
% \@@_execute_branches_catcode_aux: ,
% \@@_execute_branches_catcode_auxii:N ,
@@ -2432,8 +2392,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux]{\@@_def:nnnn}
-% \begin{macro}[aux]{\@@_def:nnnnn}
+% \begin{macro}{\@@_def:nnnn}
+% \begin{macro}{\@@_def:nnnnn}
% The public functions themselves cannot be defined using
% \cs{prg_new_conditional:Npnn} and so a couple of auxiliary functions
% are used. As a result, everything is done inside a group. As a result
@@ -2543,7 +2503,7 @@
% \begin{macro}{\token_get_prefix_spec:N}
% \begin{macro}{\token_get_arg_spec:N}
% \begin{macro}{\token_get_replacement_spec:N}
-% \begin{macro}[aux]{\@@_get_prefix_arg_replacement:wN}
+% \begin{macro}{\@@_get_prefix_arg_replacement:wN}
% We sometimes want to test if a
% control sequence can be expanded to reveal a hidden
% value. However, we cannot just expand the macro blindly as it may
@@ -2591,6 +2551,16 @@
% \end{macro}
% \end{macro}
%
+% \subsection{Deprecated functions}
+%
+% \begin{macro}[deprecated=2018-12-31]{\token_new:Nn}
+% For removal after 2018-12-31.
+% \begin{macrocode}
+\__debug_deprecation:nnNNpn { 2018-12-31 } { \cs_new_eq:NN }
+\cs_new_protected:Npn \token_new:Nn #1#2 { \cs_new_eq:NN #1 #2 }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}