diff options
author | Karl Berry <karl@freefriends.org> | 2020-06-18 21:08:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-06-18 21:08:59 +0000 |
commit | 700211024849d94938004ff91e0a3928b1578e98 (patch) | |
tree | a577e99bdf389f5e3a443561cb0162e4a13cd8ad /Master/texmf-dist/source/latex/l3kernel | |
parent | 0e574a322aeab7e91f801eec35e961965f597e7a (diff) |
l3 (18jun20)
git-svn-id: svn://tug.org/texlive/trunk@55586 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel')
56 files changed, 385 insertions, 269 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx index e1502692225..0710d88c5d0 100644 --- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx @@ -24,7 +24,7 @@ % %<*driver|generic|package|2ekernel> %</driver|generic|package|2ekernel> -\def\ExplFileDate{2020-06-03}% +\def\ExplFileDate{2020-06-18}% %<*driver> \documentclass[full]{l3doc} \usepackage{graphicx} @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % @@ -1156,23 +1156,40 @@ % % \begin{macro}{\ProvidesExplPackage, \ProvidesExplClass, \ProvidesExplFile} % For other packages and classes building on this one it is convenient -% not to need \cs{ExplSyntaxOn} each time. +% not to need \cs{ExplSyntaxOn} each time. All macros use the same +% internal one with the proper \LaTeXe{} command. % \begin{macrocode} -\protected\def\ProvidesExplPackage#1#2#3#4% - {% - \ProvidesPackage{#1}[#2 \ifx\relax#3\relax\else v#3\space\fi #4]% - \ExplSyntaxOn - }% -\protected\def\ProvidesExplClass#1#2#3#4% +\protected\def\ProvidesExplPackage + {\@expl@provides@file@@Nnnnnn\ProvidesPackage{Package}} +\protected\def\ProvidesExplClass + {\@expl@provides@file@@Nnnnnn\ProvidesClass{Document Class}} +\protected\def\ProvidesExplFile + {\@expl@provides@file@@Nnnnnn\ProvidesFile{File}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@expl@provides@file@@Nnnnnn, \@expl@provides@generic@@wnnw} +% We need to check the existence of the +% \cs[no-index]{Provides\meta{thing}}, since we need to load this very +% early in the \LaTeXe{} kernel. +% \begin{macrocode} +\protected\long\def\@expl@provides@file@@Nnnnnn#1#2#3#4#5#6% {% - \ProvidesClass{#1}[#2 \ifx\relax#3\relax\else v#3\space\fi #4]% + \ifnum0% + \ifdefined#11\fi + \ifx\relax#1\else1\fi + =11 + \expandafter#1% + \else + \@expl@provides@generic@@wnnw{#2}% + \fi + {#3}[{#4 \ifx\relax#5\relax\else v#5\space\fi #6}]% \ExplSyntaxOn - }% -\protected\def\ProvidesExplFile#1#2#3#4% + } +\protected\long\def\@expl@provides@generic@@wnnw#1\fi#2[#3]% {% - \ProvidesFile{#1}[#2 \ifx\relax#3\relax\else v#3\space\fi #4]% - \ExplSyntaxOn - }% + \immediate\write-1{#1: #2 #3}% + } % \end{macrocode} % \end{macro} % @@ -1198,24 +1215,35 @@ \fi % \end{macrocode} % -% If \pkg{expl3} was pre-loaded, we now have to deal with the fact that -% the syntax will not be activated for the package mode version: -% simply turn it on. We use \tn{@pushfilenameaux} as a marker: it's defined -% a little later. % \begin{macrocode} -\ifdefined\@pushfilenameaux - \ExplSyntaxOn -\fi +%<@@=expl> % \end{macrocode} % +% Here we can also detect whether we're reloading. This code goes into +% \texttt{expl3.ltx} and \texttt{expl3.sty}, the former loaded into the +% \LaTeXe{} format. When this code is loaded for the first time, the +% \cs{g_@@_reload_bool} boolean doesn't exist (\cs{else} branch of the +% \cs{ifcsname} below), so we create it. If the \cs{ifcsname} is true, +% then we do \cs{ExplSyntaxOn} (because when reloading, +% \texttt{expl3-code.tex} isn't read again), and set +% \cs{g_@@_reload_bool} to true. % \begin{macrocode} -%<@@=expl> +\ifcsname\detokenize{g_@@_reload_bool}\endcsname + \ExplSyntaxOn + \bool_gset_true:N \g_@@_reload_bool +\else + \bool_new:N \g_@@_reload_bool +\fi % \end{macrocode} % % \begin{variable}{\c_@@_def_ext_tl} -% Needed by \LaTeXe{}, and avoiding a re-load issue. +% Needed by \LaTeXe{}, and avoiding a re-load issue. Variables are +% best checked explicitly, rather than with \cs{g_@@_reload_bool} +% because some appear only in one of the code files, so +% \cs{g_@@_reload_bool} doesn't necessarily mean that the variable +% is already declared. % \begin{macrocode} -\cs_if_exist:NF \c_@@_def_ext_tl +\tl_if_exist:NF \c_@@_def_ext_tl { \tl_const:Nn \c_@@_def_ext_tl { def } } % \end{macrocode} % \end{variable} @@ -1255,7 +1283,7 @@ % \begin{variable}{\l_@@_options_clist} % \begin{macrocode} %<*!2ekernel> -\cs_if_exist:NF \l_@@_options_clist +\clist_if_exist:NF \l_@@_options_clist { \clist_new:N \l_@@_options_clist } \DeclareOption* { \clist_put_right:NV \l_@@_options_clist \CurrentOption } @@ -1295,19 +1323,74 @@ } % \end{macrocode} % -% A backend has to be in place by the start of the document: this has to be -% before global options are checked for use. The odd group stuff avoids -% needing to actually patch \tn{document}. +% \begin{macro}{\@expl@sys@load@backend@@@@} +% A backend has to be in place by the start of the document: this has +% to be before global options are checked for use. +% +% The \cs[no-index]{@expl@...@@@@} macros defined in this package are +% interfaces for \LaTeXe{}. There are currently (this will change +% with the next release of \LaTeXe{}) two possible cases, at this +% point of the code: either \cs{@expl@sys@load@backend@@@@} (and the +% others) already exist because they were defined in +% \texttt{ltexpl.ltx} (in \texttt{2ekernel} mode) or in +% \texttt{expl3.ltx} (in \texttt{package} mode). +% +% In \texttt{2ekernel} mode, if they exist we are using a future +% (2020-10-01) release of \LaTeXe{} and we don't need (and can't) +% patch \LaTeXe's internals because these commands are already there. +% Though if they don't exist in \texttt{2ekernel} mode, we're using +% an older version of the kernel, so we \emph{must} patch. +% +% In \texttt{package} mode, if these commands exist, then we are using +% a version of \LaTeXe{} with \textsf{expl3} preloaded (any version) +% and in any case patching is already done or the macros are in the +% format itself, so nothing to do. +% But if in \texttt{package} mode these macros don't exist, we have an +% even older version of \LaTeXe{} which doesn't even have +% \textsf{expl3} preloaded, so patching is necessary. +% +% All this means that in both \texttt{2ekernel} and \texttt{package} +% mode we have to check whether \cs{@expl@sys@load@backend@@@@} +% exists, and patch some \LaTeXe{} internals if it doesn't. +% +% In newer \LaTeXe{}, these macros have an empty definition in +% \texttt{ltexpl.dtx} in case something wrong happens while loading +% this file (\texttt{expl3.ltx}), so they can safely be used in the +% \LaTeXe{} kernel. +% +% \cs{@expl@sys@load@backend@@@@} is inserted right at the beginning +% of \cs{document}, but after closing the group started by \cs{begin}. +% When using \cs{tl_put_left:Nn} to patch the backend loading in +% \cs{document}, we need to make sure that it happens at group level +% zero, thus the strange |\endgroup...\begingroup| thing. +% +% This chunk of code should only be executed when loading +% \texttt{expl3.sty} in a \LaTeXe{} without \pkg{expl3} preloaded, so +% we check if \cs{@expl@sys@load@backend@@@@} exists. % \begin{macrocode} -%<*2ekernel> -\tl_put_left:Nn \document +\cs_if_exist:NF \@expl@sys@load@backend@@@@ + { + \tl_put_left:Nn \document + { + \endgroup + \@expl@sys@load@backend@@@@ + \begingroup + } + } +% \end{macrocode} +% +% Now we define it anyhow. +% \begin{macrocode} +\cs_gset_protected:Npn \@expl@sys@load@backend@@@@ { - \endgroup \str_if_exist:NF \c_sys_backend_str { \sys_load_backend:n { } } - \begingroup } -%</2ekernel> +% \end{macrocode} +% \end{macro} +% +% Process package options. +% \begin{macrocode} %<*!2ekernel> \keys_set:nV { sys } \l_@@_options_clist \str_if_exist:NF \c_sys_backend_str @@ -1315,15 +1398,14 @@ %</!2ekernel> % \end{macrocode} % -% A test for pre-loading: does \tn{@pushfilenameaux} already exist. -% The alrady-loaded mechanism will handle everything now. % \begin{macrocode} %<*!2ekernel> -\cs_if_exist:NT \@pushfilenameaux +\bool_if:NT \g_@@_reload_bool { \cs_gset_eq:NN \__kernel_sys_configuration_load:n \__kernel_sys_configuration_load_std:n - \endinput + \ExplSyntaxOff + \file_input_stop: } %</!2ekernel> % \end{macrocode} @@ -1354,17 +1436,28 @@ % % \begin{macro}{\@pushfilename, \@popfilename} % \begin{macro}{\@@_status_pop:w} +% \begin{macro}{\@expl@push@filename@@@@} +% \begin{macro}{\@expl@push@filename@aux@@@@} +% \begin{macro}{\@expl@pop@filename@@@@} % 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, % then recovering it at the pop stage and checking if the code % environment should still be active. +% +% Here the code follows the same patching logic than above for +% \cs{@expl@sys@load@backend@@@@}. % \begin{macrocode} -\tl_put_left:Nn \@pushfilename +\cs_if_exist:NF \@expl@push@filename@@@@ + { + \tl_put_left:Nn \@pushfilename { \@expl@push@filename@@@@ } + \tl_put_right:Nn \@pushfilename { \@expl@push@filename@aux@@@@ } + } +\cs_gset_protected:Npn \@expl@push@filename@@@@ { \exp_args:Nx \__kernel_file_input_push:n { - \tl_to_str:N \@currname + \tl_to_str:N \@currname . \tl_to_str:N \@currext } \tl_put_left:Nx \l_@@_status_stack_tl @@ -1375,17 +1468,24 @@ } \ExplSyntaxOff } -\tl_put_right:Nn \@pushfilename { \@pushfilenameaux } % \end{macrocode} % This bit of trickery is needed to grab the name of the file being loaded % so we can record it. % \begin{macrocode} -\cs_set_protected:Npn \@pushfilenameaux #1#2#3 +\cs_gset_protected:Npn \@expl@push@filename@aux@@@@ #1#2#3 { \str_gset:Nn \g_file_curr_name_str {#3} #1 #2 {#3} } -\tl_put_right:Nn \@popfilename +% \end{macrocode} +% +% \begin{macrocode} +\cs_if_exist:NF \@expl@pop@filename@@@@ + { + \tl_put_right:Nn \@popfilename + { \@expl@pop@filename@@@@ } + } +\cs_gset_protected:Npn \@expl@pop@filename@@@@ { \__kernel_file_input_pop: \tl_if_empty:NTF \l_@@_status_stack_tl @@ -1407,6 +1507,9 @@ % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % % \begin{variable}{\l_@@_status_stack_tl} % As \pkg{expl3} itself cannot be loaded with the code environment diff --git a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx index 9784c0abc80..4fdce60bdc6 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx index 3e56c6d86ff..c871aeb7594 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx index fe25ffaf7fe..8ff412298c0 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx index 90c12659420..a30bed22c79 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx index 5b9533868c9..a307cb02df5 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % @@ -268,44 +268,6 @@ % % \section{Additions to \pkg{l3msg}} % -% In very rare cases it may be necessary to produce errors in an -% expansion-only context. The functions in this section should only be -% used if there is no alternative approach using \cs{msg_error:nnnnnn} -% or other non-expandable commands from the previous section. Despite -% having a similar interface as non-expandable messages, expandable -% errors must be handled internally very differently from normal error -% messages, as none of the tools to print to the terminal or the log -% file are expandable. As a result, short-hands such as |\{| or |\\| do -% not work, and messages must be very short (with default settings, -% they are truncated after approximately 50 characters). It is -% advisable to ensure that the message is understandable even when -% truncated, by putting the most important information up front. -% Another particularity of expandable messages is that they -% cannot be redirected or turned off by the user. -% -% \begin{function}[EXP, added = 2015-08-06, updated = 2019-02-28] -% { -% \msg_expandable_error:nnnnnn , -% \msg_expandable_error:nnnnn , -% \msg_expandable_error:nnnn , -% \msg_expandable_error:nnn , -% \msg_expandable_error:nn , -% \msg_expandable_error:nnffff , -% \msg_expandable_error:nnfff , -% \msg_expandable_error:nnff , -% \msg_expandable_error:nnf , -% } -% \begin{syntax} -% \cs{msg_expandable_error:nnnnnn} \Arg{module} \Arg{message} \Arg{arg one} \Arg{arg two} \Arg{arg three} \Arg{arg four} -% \end{syntax} -% Issues an \enquote{Undefined error} message from \TeX{} itself -% using the undefined control sequence \cs{::error} then prints -% \enquote{! \meta{module}: }\meta{error message}, which should be -% short. With default settings, anything beyond approximately $60$ -% characters long (or bytes in some engines) is cropped. A leading -% 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} @@ -520,26 +482,6 @@ % mappings. % \end{function} % -% \begin{function}[rEXP,added = 2018-05-03]{\seq_indexed_map_function:NN} -% \begin{syntax} -% \cs{seq_indexed_map_function:NN} \meta{seq~var} \meta{function} -% \end{syntax} -% Applies \meta{function} to every entry in the \meta{sequence -% variable}. The \meta{function} should have signature |:nn|. It -% receives two arguments for each iteration: the \meta{index} (namely -% |1| for the first entry, then |2| and so on) and the \meta{item}. -% \end{function} -% -% \begin{function}[added = 2018-05-03]{\seq_indexed_map_inline:Nn} -% \begin{syntax} -% \cs{seq_indexed_map_inline:Nn} \meta{seq~var} \Arg{inline function} -% \end{syntax} -% Applies \meta{inline function} to every entry in the \meta{sequence -% variable}. The \meta{inline function} should consist of code which -% receives the \meta{index} (namely |1| for the first entry, then |2| -% and so on) as~|#1| and the \meta{item} as~|#2|. -% \end{function} -% % \section{Additions to \pkg{l3sys}} % % \begin{variable}[added = 2018-05-02]{\c_sys_engine_version_str} @@ -958,56 +900,6 @@ %<@@=msg> % \end{macrocode} % -% \begin{macro}[EXP] -% { -% \msg_expandable_error:nnnnnn , -% \msg_expandable_error:nnnnn , -% \msg_expandable_error:nnnn , -% \msg_expandable_error:nnn , -% \msg_expandable_error:nn , -% \msg_expandable_error:nnffff , -% \msg_expandable_error:nnfff , -% \msg_expandable_error:nnff , -% \msg_expandable_error:nnf -% } -% \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 - { - \exp_args:Ne \@@_expandable_error_module:nn - { - \exp_args:Nc \exp_args:Noooo - { \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} } - } - {#1} - } -\cs_new:Npn \msg_expandable_error:nnnnn #1#2#3#4#5 - { \msg_expandable_error:nnnnnn {#1} {#2} {#3} {#4} {#5} { } } -\cs_new:Npn \msg_expandable_error:nnnn #1#2#3#4 - { \msg_expandable_error:nnnnnn {#1} {#2} {#3} {#4} { } { } } -\cs_new:Npn \msg_expandable_error:nnn #1#2#3 - { \msg_expandable_error:nnnnnn {#1} {#2} {#3} { } { } { } } -\cs_new:Npn \msg_expandable_error:nn #1#2 - { \msg_expandable_error:nnnnnn {#1} {#2} { } { } { } { } } -\cs_generate_variant:Nn \msg_expandable_error:nnnnnn { nnffff } -\cs_generate_variant:Nn \msg_expandable_error:nnnnn { nnfff } -\cs_generate_variant:Nn \msg_expandable_error:nnnn { nnff } -\cs_generate_variant:Nn \msg_expandable_error:nnn { nnf } -\cs_new:Npn \@@_expandable_error_module:nn #1#2 - { - \exp_after:wN \exp_after:wN - \exp_after:wN \@@_use_none_delimit_by_s_stop:w - \use:n { \::error ! ~ #2 : ~ #1 } \s_@@_stop - } -% \end{macrocode} -% \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 @@ -1301,50 +1193,6 @@ % \end{macrocode} % \end{macro} % -% \begin{macro} -% { -% \seq_indexed_map_function:NN, \seq_indexed_map_inline:Nn, -% \@@_indexed_map:nNN, \@@_indexed_map:Nw -% } -% Similar to \cs{seq_map_function:NN} but we keep track of the item -% index as a |;|-delimited argument of \cs{@@_indexed_map:Nw}. -% \begin{macrocode} -\cs_new:Npn \seq_indexed_map_function:NN #1#2 - { - \@@_indexed_map:NN #1#2 - \prg_break_point:Nn \seq_map_break: { } - } -\cs_new_protected:Npn \seq_indexed_map_inline:Nn #1#2 - { - \int_gincr:N \g__kernel_prg_map_int - \cs_gset_protected:cpn - { @@_map_ \int_use:N \g__kernel_prg_map_int :w } ##1##2 {#2} - \exp_args:NNc \@@_indexed_map:NN #1 - { @@_map_ \int_use:N \g__kernel_prg_map_int :w } - \prg_break_point:Nn \seq_map_break: - { \int_gdecr:N \g__kernel_prg_map_int } - } -\cs_new:Npn \@@_indexed_map:NN #1#2 - { - \exp_after:wN \@@_indexed_map:Nw - \exp_after:wN #2 - \int_value:w 1 - \exp_after:wN \use_i:nn - \exp_after:wN ; - #1 - \prg_break: \@@_item:n { } \prg_break_point: - } -\cs_new:Npn \@@_indexed_map:Nw #1#2 ; #3 \@@_item:n #4 - { - #3 - #1 {#2} {#4} - \exp_after:wN \@@_indexed_map:Nw - \exp_after:wN #1 - \int_value:w \int_eval:w 1 + #2 ; - } -% \end{macrocode} -% \end{macro} -% % \subsection{Additions to \pkg{l3sys}} % % \begin{macrocode} @@ -1449,6 +1297,8 @@ % \end{macro} % \end{macro} % +% \subsection{Additions to \pkg{l3tl}} +% % \subsubsection{Building a token list} % % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx index 1a71aaf93fe..a05860e2868 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx index 5051cd7fd34..b19b71f3f99 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx b/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx index a042985a33a..178cd98b19e 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % @@ -116,10 +116,9 @@ % number of data entries these require will depend on the number of % colors to be mixed. % \begin{texnote} -% The content of \cs{l_@@_current_tl} is space-separated as -% this allows it to be used directly in specials in many common cases. -% This internal representation is close to that used by the \texttt{dvips} -% program. +% The content of \cs{l_@@_current_tl} comprises two brace groups, the +% first containing the color model and the second containing the value(s) +% applicable in that model. % \end{texnote} % \end{variable} % @@ -142,7 +141,7 @@ %<*package> \@@_backend_pickup:N \l_@@_current_tl %</package> - \@@_select:V \l_@@_current_tl + \@@_select:N \l_@@_current_tl } % \end{macrocode} % \end{macro} @@ -154,28 +153,25 @@ % \end{macrocode} % \end{variable} % -% \begin{macro}{\@@_select:n, \@@_select:V} -% \begin{macro}{\@@_select:w} +% \begin{macro}{\@@_select:N} +% \begin{macro}{\@@_select:nn} % Take an internal color specification and pass it to the driver. This code % is needed to ensure the current color but will also be used by the % higher-level experimental material. % \begin{macrocode} -\cs_new_protected:Npn \@@_select:n #1 - { \@@_select:w #1 \s_@@_stop } -\cs_generate_variant:Nn \@@_select:n { V } -\cs_new_protected:Npn \@@_select:w #1 ~ #2 \s_@@_stop - { \use:c { @@_backend_ #1 :w } #2 \s_@@_stop } +\cs_new_protected:Npn \@@_select:N #1 + { \exp_after:wN \@@_select:nn #1 } +\cs_new_protected:Npn \@@_select:nn #1#2 + { \use:c { @@_backend_ #1 :n } {#2} } % \end{macrocode} % \end{macro} % \end{macro} % % \begin{variable}{\l_@@_current_tl} -% As the setting data is used only -% for specials, and those are always space-separated, it makes most sense to -% hold the internal information in that form. +% The current color, with the model and % \begin{macrocode} \tl_new:N \l_@@_current_tl -\tl_set:Nn \l_@@_current_tl { gray~0 } +\tl_set:Nn \l_@@_current_tl { { gray } { 0 } } % \end{macrocode} % \end{variable} % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3debug.dtx b/Master/texmf-dist/source/latex/l3kernel/l3debug.dtx index f52b59a86ef..3aa7eb3998a 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3debug.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3debug.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx index 647c6ac1f79..012e0d32088 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % @@ -930,6 +930,20 @@ % \end{macro} % \end{macro} % +% \subsection{Deprecated \pkg{l3seq} functions} +% +% \begin{macro}[EXP, deprecated = 2023-01-01] +% { +% \seq_indexed_map_inline:Nn, \seq_indexed_map_function:NN +% } +% \begin{macrocode} +\__kernel_patch_deprecation:nnNNpn { 2022-07-01 } { \seq_map_indexed_inline:Nn } +\cs_gset:Npn \seq_indexed_map_inline:Nn { \seq_map_indexed_inline:Nn } +\__kernel_patch_deprecation:nnNNpn { 2022-07-01 } { \seq_map_indexed_function:NN } +\cs_gset:Npn \seq_indexed_map_function:NN { \seq_map_indexed_function:NN } +% \end{macrocode} +% \end{macro} +% % \subsubsection{Deprecated \pkg{l3tl} functions} % % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx index 5a5a8714a96..ffb7269f492 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx @@ -79,7 +79,7 @@ and all files in that bundle must be distributed together. % % \title{The \cls{l3doc} class} % \author{\Team} -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % \maketitle % \tableofcontents % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx index 1651afd3e22..a334b443d02 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx index bb8218281b7..df60bcd3ab8 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx index e93d117612b..c189e4bdd95 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx index 85926053240..5f3a74fb0d0 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx index 281ef1a9b7f..de8f7b5046f 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx index c0dff407321..3ef09ee2c7b 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % \maketitle % % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx index 46d089b2c66..adce22a4265 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx index 7d01b20929c..fd1cffd4948 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx index 15150ba29d2..8c8d4749181 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx index 42597305e65..93835e8c71c 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx index 445f206b511..67960e47fe6 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx index 9f08120f3b0..26c7ed784a3 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx index 442d10c798d..28257218e7e 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx index 2815ad46706..25e1d1cb9dc 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx index 15cdb3b3cd2..281e5339d0a 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx index 123c376a679..6c68c6181e1 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % \maketitle % % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx index 28d41e3d065..dcf57a15f99 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx index ff90a196264..81b652565ae 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx index 0338cc9e764..da04ae867c2 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx index 9e05786b9ae..a3d0ca4a8f8 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx index 3e4f8659c32..6ab5647a82a 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx b/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx index c15b4c7b9e6..e63035f68e8 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx index 4032b445815..c9dd6209f66 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx b/Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx index 0ff70d14655..0a71938f2b2 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3legacy.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx index 6fe7da633c0..56181c77b80 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx index af1e78d3ed2..f7182ea0920 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % @@ -423,6 +423,46 @@ % all (see the discussion of message redirection). % \end{function} % +% \subsection{Expandable error messages} +% +% In very rare cases it may be necessary to produce errors in an +% expansion-only context. The functions in this section should only be +% used if there is no alternative approach using \cs{msg_error:nnnnnn} +% or other non-expandable commands from the previous section. Despite +% having a similar interface as non-expandable messages, expandable +% errors must be handled internally very differently from normal error +% messages, as none of the tools to print to the terminal or the log +% file are expandable. As a result, short-hands such as |\{| or |\\| do +% not work, and messages must be very short (with default settings, +% they are truncated after approximately 50 characters). It is +% advisable to ensure that the message is understandable even when +% truncated, by putting the most important information up front. +% Another particularity of expandable messages is that they +% cannot be redirected or turned off by the user. +% +% \begin{function}[EXP, added = 2015-08-06, updated = 2019-02-28] +% { +% \msg_expandable_error:nnnnnn , +% \msg_expandable_error:nnnnn , +% \msg_expandable_error:nnnn , +% \msg_expandable_error:nnn , +% \msg_expandable_error:nn , +% \msg_expandable_error:nnffff , +% \msg_expandable_error:nnfff , +% \msg_expandable_error:nnff , +% \msg_expandable_error:nnf , +% } +% \begin{syntax} +% \cs{msg_expandable_error:nnnnnn} \Arg{module} \Arg{message} \Arg{arg one} \Arg{arg two} \Arg{arg three} \Arg{arg four} +% \end{syntax} +% Issues an \enquote{Undefined error} message from \TeX{} itself +% using the undefined control sequence \cs{::error} then prints +% \enquote{! \meta{module}: }\meta{error message}, which should be +% short. With default settings, anything beyond approximately $60$ +% characters long (or bytes in some engines) is cropped. A leading +% space might be removed as well. +% \end{function} +% % \section{Redirecting messages} % % Each message has a \enquote{name}, which can be used to alter the behaviour @@ -2098,6 +2138,56 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}[EXP] +% { +% \msg_expandable_error:nnnnnn , +% \msg_expandable_error:nnnnn , +% \msg_expandable_error:nnnn , +% \msg_expandable_error:nnn , +% \msg_expandable_error:nn , +% \msg_expandable_error:nnffff , +% \msg_expandable_error:nnfff , +% \msg_expandable_error:nnff , +% \msg_expandable_error:nnf +% } +% \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 + { + \exp_args:Ne \@@_expandable_error_module:nn + { + \exp_args:Nc \exp_args:Noooo + { \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} } + } + {#1} + } +\cs_new:Npn \msg_expandable_error:nnnnn #1#2#3#4#5 + { \msg_expandable_error:nnnnnn {#1} {#2} {#3} {#4} {#5} { } } +\cs_new:Npn \msg_expandable_error:nnnn #1#2#3#4 + { \msg_expandable_error:nnnnnn {#1} {#2} {#3} {#4} { } { } } +\cs_new:Npn \msg_expandable_error:nnn #1#2#3 + { \msg_expandable_error:nnnnnn {#1} {#2} {#3} { } { } { } } +\cs_new:Npn \msg_expandable_error:nn #1#2 + { \msg_expandable_error:nnnnnn {#1} {#2} { } { } { } { } } +\cs_generate_variant:Nn \msg_expandable_error:nnnnnn { nnffff } +\cs_generate_variant:Nn \msg_expandable_error:nnnnn { nnfff } +\cs_generate_variant:Nn \msg_expandable_error:nnnn { nnff } +\cs_generate_variant:Nn \msg_expandable_error:nnn { nnf } +\cs_new:Npn \@@_expandable_error_module:nn #1#2 + { + \exp_after:wN \exp_after:wN + \exp_after:wN \@@_use_none_delimit_by_s_stop:w + \use:n { \::error ! ~ #2 : ~ #1 } \s_@@_stop + } +% \end{macrocode} +% \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 23472c21411..3a49253af67 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx index e699596a5bf..52d6794833d 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx index 7158f5e8480..a85becf5e34 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx index c8e466b3cb4..3368fa159bc 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx index e20a6ca6ec0..30e355eada4 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % @@ -914,13 +914,12 @@ % % \subsection{Helpers} % -% \begin{macro} -% {\@@_int_eval:w} +% \begin{macro}{\@@_int_eval:w} % Access the primitive: performance is key here, so we do not use % the slower route \emph{via} \cs{int_eval:n}. % \begin{macrocode} \cs_new_eq:NN \@@_int_eval:w \tex_numexpr:D -% \end{macrocode} +% \end{macrocode} % \end{macro} % % \begin{macro}{\@@_standard_escapechar:} diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx index 7b2121719de..40d829f96cb 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % @@ -578,6 +578,26 @@ % \meta{items} are returned from left to right. % \end{function} % +% \begin{function}[rEXP,added = 2018-05-03]{\seq_map_indexed_function:NN} +% \begin{syntax} +% \cs{seq_map_indexed_function:NN} \meta{seq~var} \meta{function} +% \end{syntax} +% Applies \meta{function} to every entry in the \meta{sequence +% variable}. The \meta{function} should have signature |:nn|. It +% receives two arguments for each iteration: the \meta{index} (namely +% |1| for the first entry, then |2| and so on) and the \meta{item}. +% \end{function} +% +% \begin{function}[added = 2018-05-03]{\seq_map_indexed_inline:Nn} +% \begin{syntax} +% \cs{seq_map_indexed_inline:Nn} \meta{seq~var} \Arg{inline function} +% \end{syntax} +% Applies \meta{inline function} to every entry in the \meta{sequence +% variable}. The \meta{inline function} should consist of code which +% receives the \meta{index} (namely |1| for the first entry, then |2| +% and so on) as~|#1| and the \meta{item} as~|#2|. +% \end{function} +% % \begin{function}[rEXP, updated = 2012-06-29]{\seq_map_break:} % \begin{syntax} % \cs{seq_map_break:} @@ -2018,6 +2038,50 @@ % \end{macrocode} % \end{macro} % +% \begin{macro} +% { +% \seq_map_indexed_function:NN, \seq_map_indexed_inline:Nn, +% \@@_map_indexed:nNN, \@@_map_indexed:Nw +% } +% Similar to \cs{seq_map_function:NN} but we keep track of the item +% index as a |;|-delimited argument of \cs{@@_map_indexed:Nw}. +% \begin{macrocode} +\cs_new:Npn \seq_map_indexed_function:NN #1#2 + { + \@@_map_indexed:NN #1#2 + \prg_break_point:Nn \seq_map_break: { } + } +\cs_new_protected:Npn \seq_map_indexed_inline:Nn #1#2 + { + \int_gincr:N \g__kernel_prg_map_int + \cs_gset_protected:cpn + { @@_map_ \int_use:N \g__kernel_prg_map_int :w } ##1##2 {#2} + \exp_args:NNc \@@_map_indexed:NN #1 + { @@_map_ \int_use:N \g__kernel_prg_map_int :w } + \prg_break_point:Nn \seq_map_break: + { \int_gdecr:N \g__kernel_prg_map_int } + } +\cs_new:Npn \@@_map_indexed:NN #1#2 + { + \exp_after:wN \@@_map_indexed:Nw + \exp_after:wN #2 + \int_value:w 1 + \exp_after:wN \use_i:nn + \exp_after:wN ; + #1 + \prg_break: \@@_item:n { } \prg_break_point: + } +\cs_new:Npn \@@_map_indexed:Nw #1#2 ; #3 \@@_item:n #4 + { + #3 + #1 {#2} {#4} + \exp_after:wN \@@_map_indexed:Nw + \exp_after:wN #1 + \int_value:w \int_eval:w 1 + #2 ; + } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\seq_count:N, \seq_count:c} % \begin{macro}{\@@_count:w, \@@_count_end:w} % Since counting the items in a sequence is quite common, we optimize diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx index d8a1466c2fb..7b534be25c8 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx index f614da1a7ef..9163b494d0e 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx index 4000a2d1f70..6a910b80400 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3str-convert.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx index 97d8fa5b436..a6fad22d022 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx index 911986e5d8c..8a27d4b78e8 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx b/Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx index d2b228bb80d..b8e534b4b6e 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx b/Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx index 9509997cfde..2543dbebae7 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3text-purify.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3text.dtx b/Master/texmf-dist/source/latex/l3kernel/l3text.dtx index 65032dbe3b9..00648a4b842 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3text.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3text.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx index 23bac066573..a5662491e16 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx index d265802b0f4..b10167ca25d 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx index b3780ba69ed..d12c5deeed7 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx b/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx index 109d860637b..28452d5a2c8 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-03} +% \date{Released 2020-06-18} % % \maketitle % |