summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-04-12 03:04:20 +0000
committerNorbert Preining <norbert@preining.info>2022-04-12 03:04:20 +0000
commitf713ac513a897193c8b6ac8e34d55d8490fe270f (patch)
tree9d3e92c83b32b83f2c473fdab5c7b1c74ae6a2cc /macros/latex/contrib/l3kernel
parenta04c4e735928bbfb74963fc19ea3fe8b0e1b7031 (diff)
CTAN sync 202204120304
Diffstat (limited to 'macros/latex/contrib/l3kernel')
-rw-r--r--macros/latex/contrib/l3kernel/CHANGELOG.md23
-rw-r--r--macros/latex/contrib/l3kernel/README.md2
-rw-r--r--macros/latex/contrib/l3kernel/expl3.dtx4
-rw-r--r--macros/latex/contrib/l3kernel/expl3.pdfbin622328 -> 622447 bytes
-rw-r--r--macros/latex/contrib/l3kernel/interface3.pdfbin1766307 -> 1763985 bytes
-rw-r--r--macros/latex/contrib/l3kernel/interface3.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3basics.dtx9
-rw-r--r--macros/latex/contrib/l3kernel/l3bootstrap.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3box.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3candidates.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3cctab.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3clist.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3coffins.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3color.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3debug.dtx4
-rw-r--r--macros/latex/contrib/l3kernel/l3deprecation.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3doc.dtx64
-rw-r--r--macros/latex/contrib/l3kernel/l3doc.pdfbin551310 -> 554414 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3docstrip.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3docstrip.pdfbin151420 -> 151536 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3expan.dtx30
-rw-r--r--macros/latex/contrib/l3kernel/l3file.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3flag.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-assign.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-aux.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-basics.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-convert.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-expo.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-extended.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-logic.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-parse.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-random.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-round.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-traps.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-trig.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fparray.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3int.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3intarray.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3kernel-functions.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3keys.dtx125
-rw-r--r--macros/latex/contrib/l3kernel/l3legacy.dtx16
-rw-r--r--macros/latex/contrib/l3kernel/l3luatex.dtx3
-rw-r--r--macros/latex/contrib/l3kernel/l3msg.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3names.dtx25
-rw-r--r--macros/latex/contrib/l3kernel/l3news.pdfbin395879 -> 395879 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news01.pdfbin122710 -> 122710 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news02.pdfbin150676 -> 150676 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news03.pdfbin148702 -> 148702 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news04.pdfbin114588 -> 114588 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news05.pdfbin112487 -> 112487 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news06.pdfbin151573 -> 151573 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news07.pdfbin128309 -> 128309 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news08.pdfbin163454 -> 163454 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news09.pdfbin250139 -> 250139 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news10.pdfbin150279 -> 150279 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news11.pdfbin170063 -> 170063 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news12.pdfbin204990 -> 204990 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3pdf.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3prefixes.csv5
-rw-r--r--macros/latex/contrib/l3kernel/l3prefixes.pdfbin80970 -> 81407 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3prg.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3prop.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3quark.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3regex.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3seq.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3skip.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3sort.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3str-convert.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3str.dtx148
-rw-r--r--macros/latex/contrib/l3kernel/l3styleguide.pdfbin295811 -> 295942 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3styleguide.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3syntax-changes.pdfbin242479 -> 242612 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3syntax-changes.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3sys.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3term-glossary.pdfbin230878 -> 230994 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3term-glossary.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3text-case.dtx33
-rw-r--r--macros/latex/contrib/l3kernel/l3text-purify.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3text.dtx68
-rw-r--r--macros/latex/contrib/l3kernel/l3tl-analysis.dtx55
-rw-r--r--macros/latex/contrib/l3kernel/l3tl.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3token.dtx34
-rw-r--r--macros/latex/contrib/l3kernel/l3unicode.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/source3.pdfbin6939209 -> 6952124 bytes
-rw-r--r--macros/latex/contrib/l3kernel/source3.tex2
-rw-r--r--macros/latex/contrib/l3kernel/source3body.tex4
87 files changed, 502 insertions, 252 deletions
diff --git a/macros/latex/contrib/l3kernel/CHANGELOG.md b/macros/latex/contrib/l3kernel/CHANGELOG.md
index ba245c3c95..81af951ced 100644
--- a/macros/latex/contrib/l3kernel/CHANGELOG.md
+++ b/macros/latex/contrib/l3kernel/CHANGELOG.md
@@ -7,6 +7,26 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2022-04-10]
+
+### Added
+- `\keys_precompile:nnN` for conversion of keyvals to fast-to-apply token
+ lists
+- Missing `\str_if_empty:n(TF)` (see issue \#1071)
+- Missing `\str_case:Nn(TF)` (see issue \#1071)
+- `\tex_...:D` names for primitives added in TeX Live 2022
+
+### Changed
+- Definition of `\legacy_if:n(TF)` to support primitive conditionals
+- `\str_<type>case:n` now case changes codepoints above 127 with all engines
+- `\char_generate:nn` now also allows to generate category 10 tokens (spaces)
+ except for char code 0
+
+### Fixed
+- Handling of 'misplaced' `\protect` by `\text_expand:n`
+- Nesting of `\tl_analysis_map_inline:nn`
+- Naming of an error message
+
## [2022-02-24]
### Changed
@@ -1053,7 +1073,8 @@ this project uses date-based 'snapshot' version identifiers.
- Step functions have been added for dim variables,
e.g. `\dim_step_inline:nnnn`
-[Unreleased]: https://github.com/latex3/latex3/compare/2022-02-24...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2022-04-10...HEAD
+[2022-04-10]: https://github.com/latex3/latex3/compare/2022-02-24...2022-04-10
[2022-02-24]: https://github.com/latex3/latex3/compare/2022-02-21...2022-02-24
[2022-02-21]: https://github.com/latex3/latex3/compare/2022-02-05...2022-02-21
[2022-02-05]: https://github.com/latex3/latex3/compare/2022-01-21...2022-02-05
diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md
index cc869f47ab..c3054ed481 100644
--- a/macros/latex/contrib/l3kernel/README.md
+++ b/macros/latex/contrib/l3kernel/README.md
@@ -1,7 +1,7 @@
LaTeX3 Programming Conventions
==============================
-Release 2022-02-24
+Release 2022-04-10
Overview
--------
diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx
index 51fb5f5e02..34e12e7d55 100644
--- a/macros/latex/contrib/l3kernel/expl3.dtx
+++ b/macros/latex/contrib/l3kernel/expl3.dtx
@@ -24,7 +24,7 @@
%
%<*driver|generic|package|2ekernel>
%</driver|generic|package|2ekernel>
-\def\ExplFileDate{2022-02-24}%
+\def\ExplFileDate{2022-04-10}%
%<*driver>
\documentclass[full]{l3doc}
\usepackage{graphicx}
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf
index 250532d701..17f1287430 100644
--- a/macros/latex/contrib/l3kernel/expl3.pdf
+++ b/macros/latex/contrib/l3kernel/expl3.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/interface3.pdf b/macros/latex/contrib/l3kernel/interface3.pdf
index 0fbf0fe246..fa6f123061 100644
--- a/macros/latex/contrib/l3kernel/interface3.pdf
+++ b/macros/latex/contrib/l3kernel/interface3.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/interface3.tex b/macros/latex/contrib/l3kernel/interface3.tex
index 24a3861ab8..9274fe46c3 100644
--- a/macros/latex/contrib/l3kernel/interface3.tex
+++ b/macros/latex/contrib/l3kernel/interface3.tex
@@ -54,7 +54,7 @@ for those people who are interested.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2022-02-24}
+\date{Released 2022-04-10}
\pagenumbering{roman}
\maketitle
diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx
index 8f94eefe1f..c945620ece 100644
--- a/macros/latex/contrib/l3kernel/l3basics.dtx
+++ b/macros/latex/contrib/l3kernel/l3basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -727,13 +727,6 @@
% \meta{control sequence name} must, when fully expanded, consist of
% character tokens, typically a mixture of category code $10$ (space),
% $11$ (letter) and $12$ (other).
-% \begin{texnote}
-% Protected macros that appear in a \texttt{c}-type argument are
-% expanded despite being protected; \cs{exp_not:n} also has no
-% effect. An internal error occurs if non-characters or active
-% characters remain after full expansion, as the conversion to a
-% control sequence is not possible.
-% \end{texnote}
% \end{function}
%
% As an example of the \cs{use:c} function, both
diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx
index 7afadf6f4b..5b137477ca 100644
--- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx
+++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx
index 5a0f8bd807..7c19e49bfd 100644
--- a/macros/latex/contrib/l3kernel/l3box.dtx
+++ b/macros/latex/contrib/l3kernel/l3box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx
index 664f4a5306..d8e01d0d0b 100644
--- a/macros/latex/contrib/l3kernel/l3candidates.dtx
+++ b/macros/latex/contrib/l3kernel/l3candidates.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -596,7 +596,7 @@
%
% \begin{function}[added = 2018-04-01]{\tl_build_get:NN}
% \begin{syntax}
-% \cs{tl_build_get:N} \meta{tl~var_1} \meta{tl~var_2}
+% \cs{tl_build_get:NN} \meta{tl~var_1} \meta{tl~var_2}
% \end{syntax}
% Stores the contents of the \meta{tl~var_1} in the \meta{tl~var_2}.
% The \meta{tl~var_1} must have been set up with \cs{tl_build_begin:N}
@@ -1415,7 +1415,7 @@
\tl_if_in:nnTF {#1} { " }
{
\msg_error:nnx
- { ior } { quote-in-shell } {#1}
+ { kernel } { quote-in-shell } {#1}
}
{ \__kernel_ior_open:Nn #2 { |#1 } }
}
diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx
index e10527fedd..69409085fe 100644
--- a/macros/latex/contrib/l3kernel/l3cctab.dtx
+++ b/macros/latex/contrib/l3kernel/l3cctab.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx
index 0e3d0de492..a2e5dd0ec0 100644
--- a/macros/latex/contrib/l3kernel/l3clist.dtx
+++ b/macros/latex/contrib/l3kernel/l3clist.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx
index 3b9bff45e0..d00fe3918d 100644
--- a/macros/latex/contrib/l3kernel/l3coffins.dtx
+++ b/macros/latex/contrib/l3kernel/l3coffins.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3color.dtx b/macros/latex/contrib/l3kernel/l3color.dtx
index 1a16326219..93f42374ef 100644
--- a/macros/latex/contrib/l3kernel/l3color.dtx
+++ b/macros/latex/contrib/l3kernel/l3color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx
index 81d3d81c47..65457cbdea 100644
--- a/macros/latex/contrib/l3kernel/l3debug.dtx
+++ b/macros/latex/contrib/l3kernel/l3debug.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -1015,7 +1015,7 @@
{ \__kernel_debug_log:x { Defining~key~#1~\msg_line_context: } }
}
{ }
- { \@@_cmd_set:nn }
+ { \@@_cmd_set_direct:nn }
%<@@=msg>
\__kernel_patch:nnn
{ }
diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx
index b5c495de2b..4d48f2a007 100644
--- a/macros/latex/contrib/l3kernel/l3deprecation.dtx
+++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx
index e3251058b3..0db227edf9 100644
--- a/macros/latex/contrib/l3kernel/l3doc.dtx
+++ b/macros/latex/contrib/l3kernel/l3doc.dtx
@@ -85,7 +85,7 @@ and all files in that bundle must be distributed together.
% require you to do updates, if the class changes.}}
%
% \author{\Team}
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
% \maketitle
% \tableofcontents
%
@@ -361,69 +361,81 @@ and all files in that bundle must be distributed together.
% \subsection{Describing functions in the documentation}
%
% \DescribeEnv{function}
+% \DescribeEnv{variable}
+% Two heavily-used environments are defined to describe \pkg{expl3} functions
+% and variables. If describing a variable, use the latter environment; it
+% behaves identically to the \env{function} environment.
% \DescribeEnv{syntax}
-% Two heavily-used environments are defined to describe the syntax of
-% \pkg{expl3} functions and variables.
+% Both of the above environments are typically combined with the \env{syntax}
+% environment, to describe their syntax.
% \begin{framed}
% \vspace{-\baselineskip}
% \begin{verbatim}
-% \begin{function}{\function_one:, \function_two:}
+% \begin{function}{\package_function_one:N, \package_function_two:n}
% \begin{syntax}
-% |\foo_bar:| \Arg{meta} \meta{test_1}
+% \cs{package_function_one:N} \meta{cs}
+% \cs{package_function_two:n} \marg{Argument}
% \end{syntax}
-% \meta{description}
+% Descriptive text here ...
% \end{function}
% \end{verbatim}
% \hrulefill
% \par
% \hspace*{0.25\textwidth}
% \begin{minipage}{0.5\textwidth}
-% \begin{function}{\function_one:, \function_two:}
+% \begin{function}{\package_function_one:N, \package_function_two:n}
% \begin{syntax}
-% |\foo_bar:| \Arg{meta} \meta{test_1}
+% \cs[no-index]{package_function_one:N} \meta{cs}
+% \cs[no-index]{package_function_two:n} \marg{Argument}
% \end{syntax}
-% \meta{description}
+% \emph{Descriptive text here …}
% \end{function}
% \end{minipage}
% \end{framed}
%
% Function environments take an optional argument to indicate whether
-% the function(s) it describes are expandable or restricted-expandable
-% or defined in conditional forms. Use |EXP|, |rEXP|, |TF|, |pTF|, or |noTF| for
-% this; note that |pTF| implies |EXP| since predicates must always be
-% expandable, and that |noTF| means that the function without |TF|
-% should be documented in addition to |TF|. As an example:
+% the function(s) it describes are expandable (use |EXP|) or
+% restricted-expandable (use |rEXP|) or defined in conditional forms
+% (use |TF|, |pTF|, or |noTF|). Note that |pTF| implies |EXP| since
+% predicates must always be expandable, and that |noTF| means that the
+% function without |TF| should be documented in addition to |TF|. For
+% the conditional forms |TF| and |pTF|, the argument of the
+% \env{function} environment is \emph{not} in fact a command that
+% exists: in the example below, \cs[no-index]{tl_if_empty:N} does not
+% exist, but its conditional forms \cs{tl_if_empty:NT},
+% \cs{tl_if_empty:NF}, \cs{tl_if_empty:NTF} and predicate form
+% \cs{tl_if_empty_p:N} exist:
% \begin{framed}
% \vspace{-\baselineskip}
% \begin{verbatim}
-% \begin{function}[pTF]{\cs_if_exist:N}
+% \begin{function}[pTF]{\tl_if_empty:N, \tl_if_empty:c}
% \begin{syntax}
-% \cs{cs_if_exist_p:N} \meta{cs}
+% \cs{tl_if_empty_p:N} \meta{tl~var}
+% \cs{tl_if_empty:NTF} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
-% \meta{description}
+% Tests if the \meta{token list variable} is entirely empty
+% (\emph{i.e.}~contains no tokens at all).
% \end{function}
% \end{verbatim}
% \hrulefill
% \par
% \hspace*{0.25\textwidth}
% \begin{minipage}{0.5\textwidth}
-% \begin{function}[pTF]{\cs_if_exist:N}
+% \begin{function}[pTF]{\tl_if_empty:N, \tl_if_empty:c}
% \begin{syntax}
-% \cs{cs_if_exist_p:N} \meta{cs}
+% \cs{tl_if_empty_p:N} \meta{tl~var}
+% \cs{tl_if_empty:NTF} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
-% \meta{description}
+% Tests if the \meta{token list variable} is entirely empty
+% (\emph{i.e.}~contains no tokens at all).
% \end{function}
% \end{minipage}
% \end{framed}
%
-% \DescribeEnv{variable}
-% If you are documenting a variable instead of a function, use the
-% \env{variable} environment instead; it behaves identically to the
-% \env{function} environment above.
-%
% \DescribeEnv{texnote}
% This environment is used to call out sections within \env{function}
-% and similar that are only of interest to seasoned \TeX{} developers.
+% and similar environments that are only of interest to seasoned
+% \TeX{} developers.
%
% \subsection{Describing functions in the implementation}
%
diff --git a/macros/latex/contrib/l3kernel/l3doc.pdf b/macros/latex/contrib/l3kernel/l3doc.pdf
index 57f82896e7..1577ec2375 100644
--- a/macros/latex/contrib/l3kernel/l3doc.pdf
+++ b/macros/latex/contrib/l3kernel/l3doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3docstrip.dtx b/macros/latex/contrib/l3kernel/l3docstrip.dtx
index 6dbb029c6d..9319cd39e5 100644
--- a/macros/latex/contrib/l3kernel/l3docstrip.dtx
+++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf
index a2b49464e9..c4ccf58249 100644
--- a/macros/latex/contrib/l3kernel/l3docstrip.pdf
+++ b/macros/latex/contrib/l3kernel/l3docstrip.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3expan.dtx b/macros/latex/contrib/l3kernel/l3expan.dtx
index f84a0928dc..614a73d29e 100644
--- a/macros/latex/contrib/l3kernel/l3expan.dtx
+++ b/macros/latex/contrib/l3kernel/l3expan.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -331,13 +331,6 @@
%
% The |:cc| variant constructs the \meta{function} name in the same
% manner as described for the \meta{tokens}.
-% \begin{texnote}
-% Protected macros that appear in a \texttt{c}-type argument are
-% expanded despite being protected; \cs{exp_not:n} also has no
-% effect. An internal error occurs if non-characters or active
-% characters remain after full expansion, as the conversion to a
-% control sequence is not possible.
-% \end{texnote}
% \end{function}
%
% \begin{function}[EXP]{\exp_args:No}
@@ -374,13 +367,6 @@
% recovered and placed inside 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.
-% \begin{texnote}
-% Protected macros that appear in a \texttt{v}-type argument are
-% expanded despite being protected; \cs{exp_not:n} also has no
-% effect. An internal error occurs if non-characters or active
-% characters remain after full expansion, as the conversion to a
-% control sequence is not possible.
-% \end{texnote}
% \end{function}
%
% \begin{function}[EXP, added = 2018-05-15]{\exp_args:Ne}
@@ -683,13 +669,6 @@
% converts this into a control sequence.
% Further expansion of this control sequence is then inhibited using
% \cs{exp_not:N}.
-% \begin{texnote}
-% Protected macros that appear in a \texttt{c}-type argument are
-% expanded despite being protected; \cs{exp_not:n} also has no
-% effect. An internal error occurs if non-characters or active
-% characters remain after full expansion, as the conversion to a
-% control sequence is not possible.
-% \end{texnote}
% \end{function}
%
% \begin{function}[EXP]{\exp_not:n}
@@ -736,13 +715,6 @@
% name.
% The content of the \meta{variable} is recovered, and further
% expansion in |x|-type or \texttt{e}-type arguments is prevented using \cs{exp_not:n}.
-% \begin{texnote}
-% Protected macros that appear in a \texttt{v}-type argument are
-% expanded despite being protected; \cs{exp_not:n} also has no
-% effect. An internal error occurs if non-characters or active
-% characters remain after full expansion, as the conversion to a
-% control sequence is not possible.
-% \end{texnote}
% \end{function}
%
% \begin{function}[EXP]{\exp_not:e}
diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx
index 296680046c..adf73279bc 100644
--- a/macros/latex/contrib/l3kernel/l3file.dtx
+++ b/macros/latex/contrib/l3kernel/l3file.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx
index 5e35f1920d..22fae08ae6 100644
--- a/macros/latex/contrib/l3kernel/l3flag.dtx
+++ b/macros/latex/contrib/l3kernel/l3flag.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx
index 1558d3015a..38f6d3ff6a 100644
--- a/macros/latex/contrib/l3kernel/l3fp-assign.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-assign.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
% \maketitle
%
% \begin{documentation}
diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx
index 7a441e4161..9ae275ac22 100644
--- a/macros/latex/contrib/l3kernel/l3fp-aux.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-aux.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx
index 1bd233dbbb..8cd126989a 100644
--- a/macros/latex/contrib/l3kernel/l3fp-basics.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-basics.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx
index d3f2ea5613..6fc2681f56 100644
--- a/macros/latex/contrib/l3kernel/l3fp-convert.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-convert.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx
index aa6b45f1f3..fdaece8932 100644
--- a/macros/latex/contrib/l3kernel/l3fp-expo.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-expo.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx
index f452cf3abb..d116ce9221 100644
--- a/macros/latex/contrib/l3kernel/l3fp-extended.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-extended.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx
index dd4c419968..7c24b0822c 100644
--- a/macros/latex/contrib/l3kernel/l3fp-logic.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-logic.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx
index 3b1bd6f1b8..307a848a08 100644
--- a/macros/latex/contrib/l3kernel/l3fp-parse.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-parse.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx
index 65802f5fbf..8ad1b84880 100644
--- a/macros/latex/contrib/l3kernel/l3fp-random.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-random.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx
index 2a55019509..8cb45a097b 100644
--- a/macros/latex/contrib/l3kernel/l3fp-round.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-round.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx
index 3cb310052a..6cd2dd1b9b 100644
--- a/macros/latex/contrib/l3kernel/l3fp-traps.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-traps.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
% \maketitle
%
% \begin{documentation}
diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx
index 0d10240c4e..993db8a0b6 100644
--- a/macros/latex/contrib/l3kernel/l3fp-trig.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-trig.dtx
@@ -40,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx
index ed69fe5fc6..c0f2daa482 100644
--- a/macros/latex/contrib/l3kernel/l3fp.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx
index 0060743cbb..2b279e18d7 100644
--- a/macros/latex/contrib/l3kernel/l3fparray.dtx
+++ b/macros/latex/contrib/l3kernel/l3fparray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx
index 9d459317a7..e8dc857816 100644
--- a/macros/latex/contrib/l3kernel/l3int.dtx
+++ b/macros/latex/contrib/l3kernel/l3int.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx
index 8a7434f170..916cef5db2 100644
--- a/macros/latex/contrib/l3kernel/l3intarray.dtx
+++ b/macros/latex/contrib/l3kernel/l3intarray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
index 5f810a6bd1..bd62a0dbca 100644
--- a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
+++ b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx
index 360a008995..81eb124edd 100644
--- a/macros/latex/contrib/l3kernel/l3keys.dtx
+++ b/macros/latex/contrib/l3kernel/l3keys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -882,6 +882,18 @@
% group and are thus never set.
% \end{function}
%
+% \section{Digesting keys}
+%
+% \begin{function}[added = 2022-03-09]{\keys_precompile:nnN}
+% \begin{syntax}
+% \cs{keys_precompile:nnN} \Arg{module} \Arg{keyval list} \meta{tl}
+% \end{syntax}
+% Parses the \meta{keyval list} as for \cs{keys_set:nn}, placing the
+% resulting code for those which set variables or functions into the
+% \meta{tl}. Thus this function \enquote{precompiles} the keyval list into
+% a set of results which can be applied rapidly.
+% \end{function}
+%
% \section{Utility functions for keys}
%
% \begin{function}[EXP, pTF, updated = 2022-01-10]
@@ -1661,6 +1673,14 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\l_@@_precompile_bool, \l_@@_precompile_tl}
+% For digesting keys.
+% \begin{macrocode}
+\bool_new:N \l_@@_precompile_bool
+\tl_new:N \l_@@_precompile_tl
+% \end{macrocode}
+% \end{variable}
+%
% \begin{variable}{\l_keys_usage_load_prop, \l_keys_usage_preamble_prop}
% Global data for document-level information.
% \begin{macrocode}
@@ -1694,6 +1714,19 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_precompile:n}
+% An auxiliary to allow cleaner showing of code.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_precompile:n #1
+ {
+ \bool_if:NTF \l_@@_precompile_bool
+ { \tl_put_right:Nn \l_@@_precompile_tl }
+ { \use:n }
+ {#1}
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{The key defining mechanism}
%
% \begin{macro}{\keys_define:nn}
@@ -1866,7 +1899,7 @@
{ \exp_not:c { bool_ #2 set_ #3 :N } \exp_not:N #1 }
\@@_cmd_set:nx { \l_keys_path_str / false }
{ \exp_not:c { bool_ #2 set_ #4 :N } \exp_not:N #1 }
- \@@_cmd_set:nn { \l_keys_path_str / unknown }
+ \@@_cmd_set_direct:nn { \l_keys_path_str / unknown }
{
\msg_error:nnx { keys } { boolean-values-only }
\l_keys_key_str
@@ -1909,8 +1942,8 @@
{
\cs_set_nopar:cpn { \c_@@_type_root_str \l_keys_path_str }
{ choice }
- \@@_cmd_set:nn \l_keys_path_str { #1 {##1} }
- \@@_cmd_set:nn { \l_keys_path_str / unknown }
+ \@@_cmd_set_direct:nn \l_keys_path_str { #1 {##1} }
+ \@@_cmd_set_direct:nn { \l_keys_path_str / unknown }
{
\msg_error:nnxx { keys } { choice-unknown }
\l_keys_path_str {##1}
@@ -1952,13 +1985,18 @@
% \end{macro}
%
% \begin{macro}
-% {\@@_cmd_set:nn, \@@_cmd_set:nx, \@@_cmd_set:Vn, \@@_cmd_set:Vo}
+% {
+% \@@_cmd_set:nn, \@@_cmd_set:nx, \@@_cmd_set:Vn, \@@_cmd_set:Vo,
+% \@@_cmd_set_direct:nn
+% }
% Setting the code for a key first logs if appropriate that we are
% defining a new key, then saves the code.
% \begin{macrocode}
\cs_new_protected:Npn \@@_cmd_set:nn #1#2
- { \cs_set_protected:cpn { \c_@@_code_root_str #1 } ##1 {#2} }
+ { \@@_cmd_set_direct:nn {#1} { \@@_precompile:n {#2} } }
\cs_generate_variant:Nn \@@_cmd_set:nn { nx , Vn , Vo }
+\cs_new_protected:Npn \@@_cmd_set_direct:nn #1#2
+ { \cs_set_protected:cpn { \c_@@_code_root_str #1 } ##1 {#2} }
% \end{macrocode}
% \end{macro}
%
@@ -1970,7 +2008,10 @@
\cs_new_protected:Npn \@@_cs_set:NNpn #1#2#3#
{
\cs_set_protected:cpx { \c_@@_code_root_str \l_keys_path_str } ##1
- { #1 \exp_not:N #2 \exp_not:n {#3} {##1} }
+ {
+ \@@_precompile:n
+ { #1 \exp_not:N #2 \exp_not:n {#3} {##1} }
+ }
\use_none:n
}
\cs_generate_variant:Nn \@@_cs_set:NNpn { Nc }
@@ -2089,13 +2130,17 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_meta_make:n #1
{
- \@@_cmd_set:Vo \l_keys_path_str
+ \exp_args:NVo \@@_cmd_set_direct:nn \l_keys_path_str
{
- \exp_after:wN \keys_set:nn \exp_after:wN { \l_@@_module_str } {#1}
+ \exp_after:wN \keys_set:nn \exp_after:wN
+ { \l_@@_module_str } {#1}
}
}
\cs_new_protected:Npn \@@_meta_make:nn #1#2
- { \@@_cmd_set:Vn \l_keys_path_str { \keys_set:nn {#1} {#2} } }
+ {
+ \exp_args:NV \@@_cmd_set_direct:nn
+ \l_keys_path_str { \keys_set:nn {#1} {#2} }
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2895,6 +2940,20 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\keys_precompile:nnN}
+% A simple wrapper.
+% \begin{macrocode}
+\cs_new_protected:Npn \keys_precompile:nnN #1#2#3
+ {
+ \bool_set_true:N \l_@@_precompile_bool
+ \tl_clear:N \l_@@_precompile_tl
+ \keys_set:nn {#1} {#2}
+ \bool_set_false:N \l_@@_precompile_bool
+ \tl_set_eq:NN #3 \l_@@_precompile_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_set_keyval:n, \@@_set_keyval:nn}
% \begin{macro}{\@@_set_keyval:nnn, \@@_set_keyval:onn}
% \begin{macro}{\@@_find_key_module:wNN}
@@ -3379,7 +3438,11 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\keys_show:nn, \keys_log:nn, \@@_show:Nnn}
+% \begin{macro}{\keys_show:nn, \keys_log:nn}
+% \begin{macro}{\@@_show:Nnn}
+% \begin{macro}{\@@_show:n}
+% \begin{macro}{\@@_show:w}
+% \begin{macro}{\@@_show:Nw}
% To show a key, show its code using a message.
% \begin{macrocode}
\cs_new_protected:Npn \keys_show:nn
@@ -3395,18 +3458,52 @@
{
\exp_args:Nnf \msg_show_item_unbraced:nn { code }
{
- \exp_args:Nc \cs_replacement_spec:N
+ \exp_args:Ne \@@_show:n
{
- \c_@@_code_root_str
- \@@_trim_spaces:n { #2 / #3 }
+ \exp_args:Nc \cs_replacement_spec:N
+ {
+ \c_@@_code_root_str
+ \@@_trim_spaces:n { #2 / #3 }
+ }
}
}
}
}
{ } { }
}
+\cs_new:Npx \@@_show:n #1
+ {
+ \exp_not:N \@@_show:w
+ #1
+ \tl_to_str:n { \@@_precompile:n }
+ #1
+ \tl_to_str:n { \@@_precompile:n }
+ \exp_not:N \s_@@_stop
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \@@_show:w
+ ##1 \tl_to_str:n { \@@_precompile:n }
+ ##2 \tl_to_str:n { \@@_precompile:n }
+ ##3 \exp_not:N \s_@@_stop
+ }
+ {
+ \tl_if_blank:nTF {#2}
+ {#1}
+ { \@@_show:Nw #2 \s_@@_stop }
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \@@_show:Nw ##1##2
+ \c_right_brace_str \exp_not:N \s_@@_stop
+ }
+ {#2}
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsection{Messages}
%
diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx
index fb04de0adf..534d37be27 100644
--- a/macros/latex/contrib/l3kernel/l3legacy.dtx
+++ b/macros/latex/contrib/l3kernel/l3legacy.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -100,15 +100,19 @@
% \end{macrocode}
%
% \begin{macro}[EXP,pTF]{\legacy_if:n}
-% A friendly wrapper.
+% A friendly wrapper. We need to use the \cs{if:w} approach here, rather than
+% testing against \tn{iftrue}/\tn{iffalse} as the latter approach fails for
+% primitive conditionals such as \tn{ifmmode}. The \cs{reverse_if:N} here
+% means that we get a slightly more useful error if the name is undefined.
% \begin{macrocode}
\prg_new_conditional:Npnn \legacy_if:n #1 { p , T , F , TF }
{
- \exp_args:Nc \if_meaning:w { if#1 } \iftrue
- \prg_return_true:
- \else:
+ \exp_after:wN \reverse_if:N
+ \cs:w if#1 \cs_end:
\prg_return_false:
- \fi:
+ \else:
+ \prg_return_true:
+ \fi:
}
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx
index 456a02293d..04786d3c1f 100644
--- a/macros/latex/contrib/l3kernel/l3luatex.dtx
+++ b/macros/latex/contrib/l3kernel/l3luatex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -317,6 +317,7 @@ local scan_string = token.scan_string
local scan_keyword = token.scan_keyword
local put_next = token.put_next
local token_create = token.create
+local token_new = token.new
% \end{macrocode}
%
% Since token.create only returns useful values after the tokens
diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx
index 23add4a7c6..ef95cabf99 100644
--- a/macros/latex/contrib/l3kernel/l3msg.dtx
+++ b/macros/latex/contrib/l3kernel/l3msg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -1854,9 +1854,7 @@
{ Cannot~generate~null~char~as~a~space. }
\msg_new:nnn { char } { out-of-range }
{ Charcode~requested~out~of~engine~range. }
-\msg_new:nnn { char } { space }
- { Cannot~generate~space~chars. }
-\msg_new:nnnn { ior } { quote-in-shell }
+\msg_new:nnnn { kernel } { quote-in-shell }
{ Quotes~in~shell~command~'#1'. }
{ Shell~commands~cannot~contain~quotes~("). }
\msg_new:nnnn { keys } { no-property }
diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx
index f330647e3f..50512593c3 100644
--- a/macros/latex/contrib/l3kernel/l3names.dtx
+++ b/macros/latex/contrib/l3kernel/l3names.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -1140,12 +1140,14 @@
\@@_primitive:NN \kcatcode \tex_kcatcode:D
\@@_primitive:NN \kuten \tex_kuten:D
\@@_primitive:NN \lastnodechar \tex_lastnodechar:D
+ \@@_primitive:NN \lastnodefont \tex_lastnodefont:D
\@@_primitive:NN \lastnodesubtype \tex_lastnodesubtype:D
\@@_primitive:NN \noautospacing \tex_noautospacing:D
\@@_primitive:NN \noautoxspacing \tex_noautoxspacing:D
\@@_primitive:NN \pagefistretch \tex_pagefistretch:D
\@@_primitive:NN \postbreakpenalty \tex_postbreakpenalty:D
\@@_primitive:NN \prebreakpenalty \tex_prebreakpenalty:D
+ \@@_primitive:NN \ptexlineendmode \tex_lineendmode:D
\@@_primitive:NN \ptexminorversion \tex_ptexminorversion:D
\@@_primitive:NN \ptexrevision \tex_ptexrevision:D
\@@_primitive:NN \ptexversion \tex_ptexversion:D
@@ -1161,6 +1163,8 @@
\@@_primitive:NN \textbaselineshiftfactor
\tex_textbaselineshiftfactor:D
\@@_primitive:NN \tfont \tex_tfont:D
+ \@@_primitive:NN \toucs \tex_toucs:D
+ \@@_primitive:NN \ucs \tex_ucs:D
\@@_primitive:NN \xkanjiskip \tex_xkanjiskip:D
\@@_primitive:NN \xspcode \tex_xspcode:D
\@@_primitive:NN \ybaselineshift \tex_ybaselineshift:D
@@ -1176,7 +1180,6 @@
\@@_primitive:NN \kchar \tex_kchar:D
\@@_primitive:NN \kchardef \tex_kchardef:D
\@@_primitive:NN \kuten \tex_kuten:D
- \@@_primitive:NN \ucs \tex_ucs:D
\@@_primitive:NN \uptexrevision \tex_uptexrevision:D
\@@_primitive:NN \uptexversion \tex_uptexversion:D
% \end{macrocode}
@@ -1195,6 +1198,7 @@
% \begin{macrocode}
\@@_primitive:NN \partokencontext \tex_partokencontext:D
\@@_primitive:NN \partokenname \tex_partokenname:D
+ \@@_primitive:NN \showstream \tex_showstream:D
\@@_primitive:NN \tracingstacklevels \tex_tracingstacklevels:D
% \end{macrocode}
% End of the \enquote{just the names} part of the source.
@@ -1470,9 +1474,9 @@
% Here \enquote{smaller} refers to codepoint order which does not correspond to
% the user expected order for most non-ASCII strings.
% \begin{macrocode}
-local minus_tok = token.new(string.byte'-', 12)
-local zero_tok = token.new(string.byte'0', 12)
-local one_tok = token.new(string.byte'1', 12)
+local minus_tok = token_new(string.byte'-', 12)
+local zero_tok = token_new(string.byte'0', 12)
+local one_tok = token_new(string.byte'1', 12)
luacmd('tex_strcmp:D', function()
local first = scan_string()
local second = scan_string()
@@ -1487,14 +1491,19 @@ end, 'global')
%
% \begin{macro}{\tex_Ucharcat:D}
% Creating arbitrary chars using |tex.cprint|.
-% The alternative approach using |token.put_next(token.create(...))|
-% would be about 10\% slower.
+% The alternative approach using |token.new(...)| is about 10\% slower
+% but needed to create arbitrary space tokens.
% \begin{macrocode}
+local sprint = tex.sprint
local cprint = tex.cprint
luacmd('tex_Ucharcat:D', function()
local charcode = scan_int()
local catcode = scan_int()
- cprint(catcode, utf8_char(charcode))
+ if catcode == 10 then
+ sprint(token_new(charcode, 10))
+ else
+ cprint(catcode, utf8_char(charcode))
+ end
end, 'global')
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf
index 41629c69b0..9ca06a0a68 100644
--- a/macros/latex/contrib/l3kernel/l3news.pdf
+++ b/macros/latex/contrib/l3kernel/l3news.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news01.pdf b/macros/latex/contrib/l3kernel/l3news01.pdf
index db35f561cc..1976dbbfc5 100644
--- a/macros/latex/contrib/l3kernel/l3news01.pdf
+++ b/macros/latex/contrib/l3kernel/l3news01.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news02.pdf b/macros/latex/contrib/l3kernel/l3news02.pdf
index 9a55490e56..96c2a09157 100644
--- a/macros/latex/contrib/l3kernel/l3news02.pdf
+++ b/macros/latex/contrib/l3kernel/l3news02.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news03.pdf b/macros/latex/contrib/l3kernel/l3news03.pdf
index 8af2efbdcd..68b424976f 100644
--- a/macros/latex/contrib/l3kernel/l3news03.pdf
+++ b/macros/latex/contrib/l3kernel/l3news03.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news04.pdf b/macros/latex/contrib/l3kernel/l3news04.pdf
index 3732cec9c7..4337d21355 100644
--- a/macros/latex/contrib/l3kernel/l3news04.pdf
+++ b/macros/latex/contrib/l3kernel/l3news04.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news05.pdf b/macros/latex/contrib/l3kernel/l3news05.pdf
index 79a1463cf8..6a23c7d8bb 100644
--- a/macros/latex/contrib/l3kernel/l3news05.pdf
+++ b/macros/latex/contrib/l3kernel/l3news05.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news06.pdf b/macros/latex/contrib/l3kernel/l3news06.pdf
index 40f1de1db6..07b0787506 100644
--- a/macros/latex/contrib/l3kernel/l3news06.pdf
+++ b/macros/latex/contrib/l3kernel/l3news06.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news07.pdf b/macros/latex/contrib/l3kernel/l3news07.pdf
index 7ae558a916..221fdc815a 100644
--- a/macros/latex/contrib/l3kernel/l3news07.pdf
+++ b/macros/latex/contrib/l3kernel/l3news07.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news08.pdf b/macros/latex/contrib/l3kernel/l3news08.pdf
index b9b64ff4a2..88dce29221 100644
--- a/macros/latex/contrib/l3kernel/l3news08.pdf
+++ b/macros/latex/contrib/l3kernel/l3news08.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news09.pdf b/macros/latex/contrib/l3kernel/l3news09.pdf
index 2029fe30fb..0e81abd093 100644
--- a/macros/latex/contrib/l3kernel/l3news09.pdf
+++ b/macros/latex/contrib/l3kernel/l3news09.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news10.pdf b/macros/latex/contrib/l3kernel/l3news10.pdf
index aaad79b8ab..96bbed2245 100644
--- a/macros/latex/contrib/l3kernel/l3news10.pdf
+++ b/macros/latex/contrib/l3kernel/l3news10.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news11.pdf b/macros/latex/contrib/l3kernel/l3news11.pdf
index 127719deb2..39754d32c5 100644
--- a/macros/latex/contrib/l3kernel/l3news11.pdf
+++ b/macros/latex/contrib/l3kernel/l3news11.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news12.pdf b/macros/latex/contrib/l3kernel/l3news12.pdf
index 3fce91c694..9035265fc7 100644
--- a/macros/latex/contrib/l3kernel/l3news12.pdf
+++ b/macros/latex/contrib/l3kernel/l3news12.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3pdf.dtx b/macros/latex/contrib/l3kernel/l3pdf.dtx
index c6841148de..b2ed19cb08 100644
--- a/macros/latex/contrib/l3kernel/l3pdf.dtx
+++ b/macros/latex/contrib/l3kernel/l3pdf.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3prefixes.csv b/macros/latex/contrib/l3kernel/l3prefixes.csv
index d9786a1a1e..2648b9b874 100644
--- a/macros/latex/contrib/l3kernel/l3prefixes.csv
+++ b/macros/latex/contrib/l3kernel/l3prefixes.csv
@@ -40,6 +40,7 @@ clist,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https
cmd,latex2e,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex2e.git,https://github.com/latex3/latex2e/issues,2021-01-20,2021-03-03,
code,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2021-04-23,2021-04-23,
codedoc,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,Somewhat experimental: may change
+codehigh,codehigh,Jianrui Lyu,https://github.com/lvjr/codehigh,https://github.com/lvjr/codehigh.git,https://github.com/lvjr/codehigh/issues,2022-04-02,2022-04-02,
coffin,"l3kernel,xcoffins",The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
colon,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
color,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
@@ -89,6 +90,7 @@ fnpct,fnpct,Clemens Niederberger,https://github.com/cgnieder/fnpct/,https://gith
fontsizes,fontsizes,Julien Rivaud,,,,,2018-06-13,
fontspec,fontspec,Will Robertson,https://github.com/wspr/fontspec,https://github.com/wspr/fontspec.git,https://github.com/wspr/fontspec/issues,2013-03-16,2013-03-16,
fp,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+fun,functional,Jianrui Lyu,https://github.com/lvjr/functional,https://github.com/lvjr/functional.git,https://github.com/lvjr/functional/issues,2022-04-02,2022-04-02,
galley,l3galley,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
gatherenum,gatherenum,Julien Rivaud,,,,2018-06-13,2018-06-14,
getree,genealogytree,Thomas F. Sturm,https://github.com/T-F-S/genealogytree,https://github.com/T-F-S/genealogytree.git,https://github.com/T-F-S/genealogytree/issues,2020-02-19,2020-02-19,
@@ -125,6 +127,7 @@ lltxmath,lualatex-math,Philipp Stephani,https://github.com/phst/lualatex-math,ht
log,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
lua,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
luatex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+lwc,lua-widow-control,Max Chernoff,https://github.com/gucci-on-fleek/lua-widow-control,https://github.com/gucci-on-fleek/lua-widow-control.git,https://github.com/gucci-on-fleek/lua-widow-control/issues,2022-02-24,2022-02-24,
mark,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
markdown,markdown,Vít Novotný,https://ctan.org/pkg/markdown,https://github.com/witiko/markdown.git,https://github.com/witiko/markdown/issues,2021-09-08,2021-09-08,
marks,l3kernel/xmarks,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2020-02-17,2020-02-17,
@@ -149,6 +152,7 @@ namedef,namedef,Phelype Oleinik,https://github.com/PhelypeOleinik/namedef,https:
nan,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
nicematrix,nicematrix,François Pantigny,,,,2019-12-19,2019-12-19,
nil,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+ninecolors,ninecolors,Jianrui Lyu,https://github.com/lvjr/ninecolors,https://github.com/lvjr/ninecolors.git,https://github.com/lvjr/ninecolors/issues,2022-04-02,2022-04-02,
nmc,numerica,Andrew Parsloe,,,,2021-06-30,2021-06-30,
no,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
notestobib,notes2bib,Joseph Wright,https://github.com/josephwright/notes2bib,https://github.com/josephwright/notes2bib.git,https://github.com/josephwright/notes2bib/issues,2012-11-07,2012-11-07,
@@ -218,6 +222,7 @@ substances,substances,Clemens Niederberger,https://github.com/cgnieder/substance
sys,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2015-09-07,2015-09-08,
tag,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2019-06-02,2019-06-02,
tasks,tasks,Clemens Niederberger,https://github.com/cgnieder/tasks/,https://github.com/cgnieder/tasks.git,https://github.com/cgnieder/cgnieder/tasks/issues,2013-03-16,2020-04-14,
+tblr,tabularray,Jianrui Lyu,https://github.com/lvjr/tabularray,https://github.com/lvjr/tabularray.git,https://github.com/lvjr/tabularray/issues,2022-04-02,2022-04-02
tcobox,tcolorbox,Thomas F. Sturm,https://github.com/T-F-S/tcolorbox,https://github.com/T-F-S/tcolorbox.git,https://github.com/T-F-S/tcolorbox/issues,2020-02-19,2020-02-19,
term,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
tex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
diff --git a/macros/latex/contrib/l3kernel/l3prefixes.pdf b/macros/latex/contrib/l3kernel/l3prefixes.pdf
index 7724db3c3b..433569b9b2 100644
--- a/macros/latex/contrib/l3kernel/l3prefixes.pdf
+++ b/macros/latex/contrib/l3kernel/l3prefixes.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3prg.dtx b/macros/latex/contrib/l3kernel/l3prg.dtx
index 1742e7c0a5..98f6211187 100644
--- a/macros/latex/contrib/l3kernel/l3prg.dtx
+++ b/macros/latex/contrib/l3kernel/l3prg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx
index de14307b84..1d0694fe6a 100644
--- a/macros/latex/contrib/l3kernel/l3prop.dtx
+++ b/macros/latex/contrib/l3kernel/l3prop.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx
index a31d883016..53ea8dfc18 100644
--- a/macros/latex/contrib/l3kernel/l3quark.dtx
+++ b/macros/latex/contrib/l3kernel/l3quark.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx
index 4eb2dacf10..e9c254bb02 100644
--- a/macros/latex/contrib/l3kernel/l3regex.dtx
+++ b/macros/latex/contrib/l3kernel/l3regex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx
index c6300a8447..bf285df964 100644
--- a/macros/latex/contrib/l3kernel/l3seq.dtx
+++ b/macros/latex/contrib/l3kernel/l3seq.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx
index d6ba0a90c1..75e80b0c54 100644
--- a/macros/latex/contrib/l3kernel/l3skip.dtx
+++ b/macros/latex/contrib/l3kernel/l3skip.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx
index 75509e1e54..11604bbf81 100644
--- a/macros/latex/contrib/l3kernel/l3sort.dtx
+++ b/macros/latex/contrib/l3kernel/l3sort.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx
index f854e3ea2e..8646c378e5 100644
--- a/macros/latex/contrib/l3kernel/l3str-convert.dtx
+++ b/macros/latex/contrib/l3kernel/l3str-convert.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx
index 897f4b962b..ddfdd10279 100644
--- a/macros/latex/contrib/l3kernel/l3str.dtx
+++ b/macros/latex/contrib/l3kernel/l3str.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -222,8 +222,8 @@
%
% \section{String conditionals}
%
-% \begin{function}[EXP,pTF, added = 2015-09-18]
-% {\str_if_empty:N, \str_if_empty:c}
+% \begin{function}[EXP,pTF, added = 2015-09-18, updated = 2022-03-21]
+% {\str_if_empty:N, \str_if_empty:c, \str_if_empty:n}
% \begin{syntax}
% \cs{str_if_empty_p:N} \meta{str~var}
% \cs{str_if_empty:NTF} \meta{str~var} \Arg{true code} \Arg{false code}
@@ -282,8 +282,8 @@
% tests whether \meta{string_2} is found inside \meta{string_1}.
% \end{function}
%
-% \begin{function}[added = 2013-07-24, updated = 2015-02-28, EXP, noTF]
-% {\str_case:nn, \str_case:Vn, \str_case:on, \str_case:nV, \str_case:nv}
+% \begin{function}[added = 2013-07-24, updated = 2022-03-21, EXP, noTF]
+% {\str_case:nn, \str_case:Vn, \str_case:Nn, \str_case:on, \str_case:nV, \str_case:nv}
% \begin{syntax}
% \cs{str_case:nnTF} \Arg{test string} \\
% ~~|{| \\
@@ -747,16 +747,6 @@
% correctly deal with context-dependence and other factors appropriate
% to text case changing.
% \end{itemize}
-%
-% \begin{texnote}
-% As with all \pkg{expl3} functions, the input supported by
-% \cs{str_foldcase:n} is \emph{engine-native} characters which are or
-% interoperate with \textsc{utf-8}. As such, when used with \pdfTeX{}
-% \emph{only} the Latin alphabet characters A--Z are case-folded
-% (\emph{i.e.}~the \textsc{ascii} range which coincides with
-% \textsc{utf-8}). Full \textsc{utf-8} support is available with both
-% \XeTeX{} and \LuaTeX{}.
-% \end{texnote}
% \end{function}
%
% \begin{function}[EXP, added = 2019-11-26]
@@ -789,18 +779,6 @@
% a language-insensitive process, there is no special treatment of
% Turkic input (\emph{i.e.}~\texttt{I} always folds to \texttt{i} and
% not to \texttt{\i}).
-%
-% \begin{texnote}
-% As with all \pkg{expl3} functions, the input supported by
-% \cs{str_foldcase:n} is \emph{engine-native} characters which are or
-% interoperate with \textsc{utf-8}. As such, when used with \pdfTeX{}
-% \emph{only} the Latin alphabet characters A--Z are case-folded
-% (\emph{i.e.}~the \textsc{ascii} range which coincides with
-% \textsc{utf-8}). Full \textsc{utf-8} support is available with both
-% \XeTeX{} and \LuaTeX{}, subject only to the fact that \XeTeX{} in
-% particular has issues with characters of code above hexadecimal
-% $0\mathrm{xFFFF}$ when interacting with \cs{tl_to_str:n}.
-% \end{texnote}
% \end{function}
%
% \section{Viewing strings}
@@ -1113,7 +1091,7 @@
%
% \begin{macro}[pTF, EXP]
% {
-% \str_if_empty:N, \str_if_empty:c,
+% \str_if_empty:N, \str_if_empty:c, \str_if_empty:n,
% \str_if_exist:N, \str_if_exist:c
% }
% More copy-paste!
@@ -1126,6 +1104,8 @@
{ p , T , F , TF }
\prg_new_eq_conditional:NNn \str_if_empty:c \tl_if_empty:c
{ p , T , F , TF }
+\prg_new_eq_conditional:NNn \str_if_empty:n \tl_if_empty:n
+ { p , T , F , TF }
% \end{macrocode}
% \end{macro}
%
@@ -1224,7 +1204,7 @@
% \end{macro}
%
% \begin{macro}[EXP, noTF]
-% {\str_case:nn, \str_case:Vn, \str_case:on, \str_case:nV, \str_case:nv, \str_case_e:nn}
+% {\str_case:nn, \str_case:Vn, \str_case:Nn, \str_case:on, \str_case:nV, \str_case:nv, \str_case_e:nn}
% \begin{macro}[EXP]{\@@_case:nnTF, \@@_case_e:nnTF}
% \begin{macro}[EXP]
% {\@@_case:nw, \@@_case_e:nw, \@@_case_end:nw}
@@ -1254,6 +1234,10 @@
\cs_new:Npn \@@_case:nnTF #1#2#3#4
{ \@@_case:nw {#1} #2 {#1} { } \s_@@_mark {#3} \s_@@_mark {#4} \s_@@_stop }
\cs_generate_variant:Nn \str_case:nn { V , o , nV , nv }
+\cs_new_eq:NN \str_case:Nn \str_case:Vn
+\cs_new_eq:NN \str_case:NnT \str_case:VnT
+\cs_new_eq:NN \str_case:NnF \str_case:VnF
+\cs_new_eq:NN \str_case:NnTF \str_case:VnTF
\prg_generate_conditional_variant:Nnn \str_case:nn
{ V , o , nV , nv } { T , F , TF }
\cs_new:Npn \@@_case:nw #1#2#3
@@ -1918,10 +1902,21 @@
% \begin{macro}[EXP]{\@@_change_case_loop:nw}
% \begin{macro}[EXP]{\@@_change_case_space:n}
% \begin{macro}[EXP]{\@@_change_case_char:nN}
+% \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 ,
+% \@@_change_case_char_UTFviii_lower:nn ,
+% \@@_change_case_char_UTFviii_upper:nn ,
+% \@@_change_case_char_UTFviii_fold:nn
+% }
% Case changing for programmatic reasons is done by first detokenizing
% input then doing a simple loop that only has to worry about spaces
% and everything else. The output is detokenized to allow data sharing
-% with text-based case changing.
+% with text-based case changing. Similarly, for $8$-bit engines the
+% multi-byte information is shared.
% \begin{macrocode}
\cs_new:Npn \str_foldcase:n #1 { \@@_change_case:nn {#1} { fold } }
\cs_new:Npn \str_lowercase:n #1 { \@@_change_case:nn {#1} { lower } }
@@ -1965,7 +1960,100 @@
{ \use:c { char_str_ #1 case:N } #2 }
\@@_change_case_loop:nw {#1}
}
+\if_int_compare:w 0
+ \cs_if_exist:NT \tex_XeTeXversion:D { 1 }
+ \cs_if_exist:NT \tex_luatexversion:D { 1 }
+ > 0 \exp_stop_f:
+\else:
+ \cs_gset:Npn \@@_change_case_char:nN #1#2
+ {
+ \@@_if_recursion_tail_stop_do:Nn #2
+ { \@@_change_case_end:wn }
+ \int_compare:nNnTF { `#2 } > { "80 }
+ {
+ \int_compare:nNnTF { `#2 } < { "E0 }
+ { \@@_change_case_char_UTFviii:nNN }
+ {
+ \int_compare:nNnTF { `#2 } < { "F0 }
+ { \@@_change_case_char_UTFviii:nNNN }
+ { \@@_change_case_char_UTFviii:nNNNN }
+ }
+ {#1} #2
+ }
+ {
+ \@@_change_case_output:fw
+ { \use:c { char_str_ #1 case:N } #2 }
+ \@@_change_case_loop:nw {#1}
+ }
+ }
+ \cs_new:Npn \@@_change_case_char_UTFviii:nNN #1#2#3
+ { \@@_change_case_char_UTFviii:nn {#1} {#2#3} }
+ \cs_new:Npn \@@_change_case_char_UTFviii:nNNN #1#2#3#4
+ { \@@_change_case_char_UTFviii:nn {#1} {#2#3#4} }
+ \cs_new:Npn \@@_change_case_char_UTFviii:nNNNN #1#2#3#4#5
+ { \@@_change_case_char_UTFviii:nn {#1} {#2#3#4#5} }
% \end{macrocode}
+% Skip high chars for the Japanese engines.
+% \begin{macrocode}
+ \cs_if_exist:NF \tex_pdftexversion:D
+ {
+ \cs_gset:Npn \@@_change_case_char_UTFviii:nNNN #1#2#3#4
+ {
+ \@@_change_case_output:nw {#2#3#4}
+ \@@_change_case_loop:nw {#1}
+ }
+ \cs_gset:Npn \@@_change_case_char_UTFviii:nNNNN #1#2#3#4#5
+ {
+ \@@_change_case_output:nw {#2#3#4#5}
+ \@@_change_case_loop:nw {#1}
+ }
+ }
+ \cs_new:Npn \@@_change_case_char_UTFviii:nn #1#2
+ {
+ \use:c { @@_change_case_char_UTFviii_ #1 :nn } {#1} {#2}
+ }
+ \cs_new:Npn \@@_change_case_char_UTFviii_upper:nn #1#2
+ {
+ \@@_change_case_output:fw
+ {
+ \cs_if_exist:cTF { c__kernel_ #1 case_ #2 _tl }
+ {
+ \__kernel_tl_to_str:w \exp_after:wN \exp_after:wN \exp_after:wN
+ { \cs:w c__kernel_ #1 case_ #2 _tl \cs_end: }
+ }
+ {#2}
+ }
+ \@@_change_case_loop:nw {#1}
+ }
+ \cs_new_eq:NN \@@_change_case_char_UTFviii_lower:nn
+ \@@_change_case_char_UTFviii_upper:nn
+ \cs_new:Npn \@@_change_case_char_UTFviii_fold:nn #1#2
+ {
+ \@@_change_case_output:fw
+ {
+ \cs_if_exist:cTF { c__kernel_ #1 case_ #2 _tl }
+ {
+ \__kernel_tl_to_str:w \exp_after:wN \exp_after:wN \exp_after:wN
+ { \cs:w c__kernel_ #1 case_ #2 _tl \cs_end: }
+ }
+ {
+ \cs_if_exist:cTF { c__kernel_lowercase_ #2 _tl }
+ {
+ \__kernel_tl_to_str:w
+ \exp_after:wN \exp_after:wN \exp_after:wN
+ { \cs:w c__kernel_lowercase_ #2 _tl \cs_end: }
+ }
+ {#2}
+ }
+ }
+ \@@_change_case_loop:nw {#1}
+ }
+\fi:
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf
index 63989dbdbf..21449e7b02 100644
--- a/macros/latex/contrib/l3kernel/l3styleguide.pdf
+++ b/macros/latex/contrib/l3kernel/l3styleguide.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3styleguide.tex b/macros/latex/contrib/l3kernel/l3styleguide.tex
index 86f5230696..6fd43ce801 100644
--- a/macros/latex/contrib/l3kernel/l3styleguide.tex
+++ b/macros/latex/contrib/l3kernel/l3styleguide.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2022-02-24}
+\date{Released 2022-04-10}
\begin{document}
diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
index 3d449d0537..587c0c8b36 100644
--- a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
+++ b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.tex b/macros/latex/contrib/l3kernel/l3syntax-changes.tex
index 430b3cb056..722a90977a 100644
--- a/macros/latex/contrib/l3kernel/l3syntax-changes.tex
+++ b/macros/latex/contrib/l3kernel/l3syntax-changes.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2022-02-24}
+\date{Released 2022-04-10}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx
index 4134831b8b..a211af619b 100644
--- a/macros/latex/contrib/l3kernel/l3sys.dtx
+++ b/macros/latex/contrib/l3kernel/l3sys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf
index 4cf56475bb..d200cd3e0c 100644
--- a/macros/latex/contrib/l3kernel/l3term-glossary.pdf
+++ b/macros/latex/contrib/l3kernel/l3term-glossary.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.tex b/macros/latex/contrib/l3kernel/l3term-glossary.tex
index bd10abf6f2..90b3a71af2 100644
--- a/macros/latex/contrib/l3kernel/l3term-glossary.tex
+++ b/macros/latex/contrib/l3kernel/l3term-glossary.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2022-02-24}
+\date{Released 2022-04-10}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx
index 61681108e2..faa9960f79 100644
--- a/macros/latex/contrib/l3kernel/l3text-case.dtx
+++ b/macros/latex/contrib/l3kernel/l3text-case.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -670,10 +670,10 @@
{ \@@_change_case_char_UTFviii:nnnn {#1} {#2} {#3} {#4#5#6#7} }
\cs_new:Npn \@@_change_case_char_UTFviii:nnnn #1#2#3#4
{
- \cs_if_exist:cTF { c_@@_ #1 case_ \tl_to_str:n {#4} _tl }
+ \cs_if_exist:cTF { c__kernel_ #1 case_ \tl_to_str:n {#4} _tl }
{
\@@_change_case_store:v
- { c_@@_ #1 case_ \tl_to_str:n {#4} _tl }
+ { c__kernel_ #1 case_ \tl_to_str:n {#4} _tl }
}
{ \@@_change_case_store:n {#4} }
\use:c { @@_change_case_char_next_ #2 :nn } {#2} {#3}
@@ -1536,11 +1536,11 @@
%
% For $8$-bit engines we now need to define the case-change data for
% the multi-octet mappings. This data is here not in the \pkg{char} module
-% as the multi-byte nature means they are never |N|-type.
-% These need a list of what code points are
-% doable in |T1| so the list is hard coded (there's no saving in loading
-% the mappings dynamically). All of the straight-forward ones have two
-% octets, so that is taken as read.
+% as the multi-byte nature means they are never |N|-type. As this data is
+% needed both for text and string work, it is stored as |kernel|: it remains
+% internal as it is not really suitable for wider exposure.
+%
+% The first set of codepoints are those in |T1|: all of these are two bytes.
% \begin{macrocode}
\group_begin:
\bool_lazy_or:nnF
@@ -1562,7 +1562,7 @@
{
\tl_const:cx
{
- c_@@_ #1 case_
+ c__kernel_ #1 case_
\char_generate:nn {#2} { 12 }
\char_generate:nn {#3} { 12 }
_tl
@@ -1578,7 +1578,7 @@
{
\tl_const:cx
{
- c_@@_lowercase_
+ c__kernel_lowercase_
\char_generate:nn {#1} { 12 }
\char_generate:nn {#2} { 12 }
_tl
@@ -1694,8 +1694,7 @@
{ 0218 } { 0219 }
{ 021A } { 021B }
% \end{macrocode}
-% Add |T2| (Cyrillic) as this is doable using a classical \tn{MakeUppercase}
-% approach.
+% Add |T2| (Cyrillic) : again two bytes.
% \begin{macrocode}
{ 0400 } { 0450 }
{ 0401 } { 0451 }
@@ -1818,7 +1817,7 @@
{
\tl_const:cx
{
- c_@@_ #3 case_
+ c__kernel_ #3 case_
\char_generate:nn {##1} { 12 }
\char_generate:nn {##2} { 12 }
_tl
@@ -1859,7 +1858,7 @@
{
\tl_const:cn
{
- c_@@_ #3 case_
+ c__kernel_ #3 case_
\char_generate:nn {##1} { 12 }
\char_generate:nn {##2} { 12 }
_tl
@@ -1880,7 +1879,7 @@
{
\tl_const:cx
{
- c_@@_ #1 case_
+ c__kernel_ #1 case_
\char_generate:nn {#2} { 12 }
\char_generate:nn {#3} { 12 }
\char_generate:nn {#4} { 12 }
@@ -1899,7 +1898,7 @@
{
\tl_const:cx
{
- c_@@_lowercase_
+ c__kernel_lowercase_
\char_generate:nn {#1} { 12 }
\char_generate:nn {#2} { 12 }
\char_generate:nn {#3} { 12 }
@@ -2025,7 +2024,7 @@
{
\tl_const:cx
{
- c_@@_ #3 case_
+ c__kernel_ #3 case_
\char_generate:nn {##1} { 12 }
\char_generate:nn {##2} { 12 }
\char_generate:nn {##3} { 12 }
diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx
index 922a371d33..a055aec838 100644
--- a/macros/latex/contrib/l3kernel/l3text-purify.dtx
+++ b/macros/latex/contrib/l3kernel/l3text-purify.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx
index 0d1365c8d2..3cb5795a5d 100644
--- a/macros/latex/contrib/l3kernel/l3text.dtx
+++ b/macros/latex/contrib/l3kernel/l3text.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -562,11 +562,45 @@
% \end{variable}
%
% \begin{variable}{\l_text_expand_exclude_tl}
-% Commands which need not to expand.
+% Commands which need not to expand. We start with a somewhat historical
+% list, and tidy up if possible.
% \begin{macrocode}
\tl_new:N \l_text_expand_exclude_tl
\tl_set:Nn \l_text_expand_exclude_tl
{ \begin \cite \end \label \ref }
+\bool_lazy_and:nnT
+ { \str_if_eq_p:Vn \fmtname { LaTeX2e } }
+ { \tl_if_exist_p:N \@expl@finalise@setup@@@@ }
+ {
+ \tl_gput_right:Nn \@expl@finalise@setup@@@@
+ {
+ \tl_gput_right:Nn \@kernel@after@begindocument
+ {
+ \group_begin:
+ \cs_set_protected:Npn \@@_tmp:w #1
+ {
+ \tl_clear:N \l_text_expand_exclude_tl
+ \tl_map_inline:nn {#1}
+ {
+ \bool_lazy_any:nF
+ {
+ { \token_if_protected_macro_p:N ##1 }
+ { \token_if_protected_long_macro_p:N ##1 }
+ {
+ \str_if_eq_p:ee
+ { \cs_replacement_spec:N ##1 }
+ { \exp_not:n { \protect ##1 } \c_space_tl }
+ }
+ }
+ { \tl_put_right:Nn \l_text_expand_exclude_tl {##1} }
+ }
+ }
+ \exp_args:NV \@@_tmp:w \l_text_expand_exclude_tl
+ \exp_args:NNNV \group_end:
+ \tl_set:Nn \l_text_expand_exclude_tl \l_text_expand_exclude_tl
+ }
+ }
+ }
% \end{macrocode}
% \end{variable}
%
@@ -632,13 +666,14 @@
% \begin{macro}[EXP]{\@@_expand_accent:NN}
% \begin{macro}[EXP]{\@@_expand_letterlike:N}
% \begin{macro}[EXP]{\@@_expand_letterlike:NN}
-% \begin{macro}[EXP]{\@@_expand_cs:N, \@@_expand_encoding:N}
-% \begin{macro}[EXP]{\@@_expand_encoding_escape:N}
+% \begin{macro}[EXP]{\@@_expand_cs:N}
+% \begin{macro}[EXP]{\@@_expand_protect:w}
% \begin{macro}[EXP]{\@@_expand_protect:N}
% \begin{macro}[EXP]{\@@_expand_protect:nN}
% \begin{macro}[EXP]{\@@_expand_protect:Nw}
% \begin{macro}[EXP]{\@@_expand_testopt:N}
% \begin{macro}[EXP]{\@@_expand_testopt:NNn}
+% \begin{macro}[EXP]{\@@_expand_encoding:N, \@@_expand_encoding_escape:N}
% \begin{macro}[EXP]{\@@_expand_replace:N}
% \begin{macro}[EXP]{\@@_expand_replace:n}
% \begin{macro}[EXP]{\@@_expand_cs_expand:N}
@@ -947,14 +982,15 @@
% \end{macrocode}
% \LaTeXe{}'s \cs{protect} makes life interesting. Where possible, we
% simply remove it and replace with the \enquote{parent} command; of course,
-% the \cs{protect} might be explicit, in which case we need to leave it alone
-% if it's required. There is also the case of a straight \tn{@protected@testopt}
-% to cover.
+% the \cs{protect} might be explicit, in which case we need to leave it alone.
+% That includes the case where it's not even followed by an \texttt{N}-type
+% token. There is also the case of a straight \tn{@protected@testopt} to
+% cover.
% \begin{macrocode}
\cs_new:Npx \@@_expand_cs:N #1
{
\exp_not:N \str_if_eq:nnTF {#1} { \exp_not:N \protect }
- { \exp_not:N \@@_expand_protect:N }
+ { \exp_not:N \@@_expand_protect:w }
{
\bool_lazy_and:nnTF
{ \cs_if_exist_p:N \fmtname }
@@ -963,8 +999,23 @@
{ \exp_not:N \@@_expand_replace:N #1 }
}
}
+\cs_new:Npn \@@_expand_protect:w #1 \q_@@_recursion_stop
+ {
+ \tl_if_head_is_N_type:nTF {#1}
+ { \@@_expand_protect:N }
+ {
+ \@@_expand_store:n { \protect }
+ \@@_expand_loop:w
+ }
+ #1 \q_@@_recursion_stop
+ }
\cs_new:Npn \@@_expand_protect:N #1
{
+ \@@_if_recursion_tail_stop_do:Nn #1
+ {
+ \@@_expand_store:n { \protect }
+ \@@_expand_end:w
+ }
\exp_args:Ne \@@_expand_protect:nN
{ \cs_to_str:N #1 } #1
}
@@ -1122,6 +1173,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}
% {
diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
index 9f6527b505..0db5f15d7a 100644
--- a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -90,7 +90,7 @@
% characters, and the value of registers.
% \end{function}
%
-% \begin{function}[added = 2018-04-09]
+% \begin{function}[added = 2018-04-09, updated = 2022-03-26]
% {\tl_analysis_map_inline:nn, \tl_analysis_map_inline:Nn}
% \begin{syntax}
% \cs{tl_analysis_map_inline:nn} \Arg{token list} \Arg{inline function}
@@ -935,47 +935,46 @@
%
% \subsection{Mapping through the analysis}
%
-% \begin{macro}{\tl_analysis_map_inline:nn, \tl_analysis_map_inline:Nn}
-% \begin{macro}{\@@_analysis_map_inline_aux:Nn}
-% \begin{macro}{\@@_analysis_map_inline_aux:nnn}
+% \begin{macro}{\tl_analysis_map_inline:Nn, \tl_analysis_map_inline:nn}
+% \begin{macro}{\@@_analysis_map:Nn}
+% \begin{macro}{\@@_analysis_map:NwNw}
% First obtain the analysis of the token list into
% \cs{g_@@_analysis_result_tl}. To allow nested mappings, increase the
-% nesting depth \cs{g__kernel_prg_map_int} (shared between all modules), then
-% define the looping macro, which has a name specific to that nesting
-% depth. That looping grabs the \meta{tokens}, \meta{catcode} and
-% \meta{char code}; it checks for the end of the loop with
-% \cs{use_none:n} |##2|, normally empty, but which becomes
-% \cs{tl_map_break:} at the end; it then performs the user's code
-% |#2|, and loops by calling itself. When the loop ends, remember to
-% decrease the nesting depth.
+% nesting depth \cs{g__kernel_prg_map_int} (shared between all
+% modules), then define the payload macro, which runs the user code
+% and has a name specific to that nesting depth. The looping macro
+% grabs the \meta{tokens}, \meta{catcode} and \meta{char code}; it
+% checks for the end of the loop with \cs{use_none:n} |##2|, normally
+% empty, but which becomes \cs{tl_map_break:} at the end; it then
+% calls the payload macro with the arguments in the correct order
+% (this is the reason why we cannot directly use the same macro for
+% looping and payload), and loops by calling itself. When the loop
+% ends, remember to decrease the nesting depth.
% \begin{macrocode}
+\cs_new_protected:Npn \tl_analysis_map_inline:Nn #1
+ { \exp_args:No \tl_analysis_map_inline:nn #1 }
\cs_new_protected:Npn \tl_analysis_map_inline:nn #1
{
\@@_analysis:n {#1}
\int_gincr:N \g__kernel_prg_map_int
- \exp_args:Nc \@@_analysis_map_inline_aux:Nn
+ \exp_args:Nc \@@_analysis_map:Nn
{ @@_analysis_map_inline_ \int_use:N \g__kernel_prg_map_int :wNw }
}
-\cs_new_protected:Npn \tl_analysis_map_inline:Nn #1
- { \exp_args:No \tl_analysis_map_inline:nn #1 }
-\cs_new_protected:Npn \@@_analysis_map_inline_aux:Nn #1#2
+\cs_new_protected:Npn \@@_analysis_map:Nn #1#2
{
- \cs_gset_protected:Npn #1 ##1 \s_@@ ##2 ##3 \s_@@
- {
- \use_none:n ##2
- \@@_analysis_map_inline_aux:nnn {##1} {##3} {##2}
- }
- \cs_gset_protected:Npn \@@_analysis_map_inline_aux:nnn ##1##2##3
- {
- #2
- #1
- }
- \exp_after:wN #1
+ \cs_gset_protected:Npn #1 ##1##2##3 {#2}
+ \exp_after:wN \@@_analysis_map:NwNw \exp_after:wN #1
\g_@@_analysis_result_tl
\s_@@ { ? \tl_map_break: } \s_@@
\prg_break_point:Nn \tl_map_break:
{ \int_gdecr:N \g__kernel_prg_map_int }
}
+\cs_new_protected:Npn \@@_analysis_map:NwNw #1 #2 \s_@@ #3 #4 \s_@@
+ {
+ \use_none:n #3
+ #1 {#2} {#4} {#3}
+ \@@_analysis_map:NwNw #1
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx
index bd78c69bde..68d2cdaf8a 100644
--- a/macros/latex/contrib/l3kernel/l3tl.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx
index 909dff2b7e..3d5858a37a 100644
--- a/macros/latex/contrib/l3kernel/l3token.dtx
+++ b/macros/latex/contrib/l3kernel/l3token.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
@@ -139,12 +139,14 @@
% \item $6$ (parameter)
% \item $7$ (math superscript)
% \item $8$ (math subscript)
+% \item $10$ (space)
% \item $11$ (letter)
% \item $12$ (other)
% \item $13$ (active)
% \end{itemize}
% and other values raise an error. The \meta{charcode} may be any one valid
-% for the engine in use.
+% for the engine in use, except that for \meta{catcode} $10$, \meta{charcode}
+% $0$ is not allowed.
% Active characters cannot be generated in older versions of \XeTeX{}.
% Another way to build token lists with unusual category codes is
% \cs{regex_replace:nnN} |{.*}| \Arg{replacement} \meta{tl~var}.
@@ -1527,26 +1529,22 @@
% \begin{macrocode}
\cs_new:Npn \@@_generate_aux:w #1 ; #2 ;
{
- \if_int_compare:w #2 = 10 \exp_stop_f:
- \if_int_compare:w #1 = \c_zero_int
- \msg_expandable_error:nn { char } { null-space }
- \else:
- \msg_expandable_error:nn { char } { space }
- \fi:
+ \if_int_odd:w 0
+ \if_int_compare:w #2 < 1 \exp_stop_f: 1 \fi:
+ \if_int_compare:w #2 = 5 \exp_stop_f: 1 \fi:
+ \if_int_compare:w #2 = 9 \exp_stop_f: 1 \fi:
+ \if_int_compare:w #2 > 13 \exp_stop_f: 1 \fi: \exp_stop_f:
+ \msg_expandable_error:nn { char }
+ { invalid-catcode }
\else:
\if_int_odd:w 0
- \if_int_compare:w #2 < 1 \exp_stop_f: 1 \fi:
- \if_int_compare:w #2 = 5 \exp_stop_f: 1 \fi:
- \if_int_compare:w #2 = 9 \exp_stop_f: 1 \fi:
- \if_int_compare:w #2 > 13 \exp_stop_f: 1 \fi: \exp_stop_f:
+ \if_int_compare:w #1 < \c_zero_int 1 \fi:
+ \if_int_compare:w #1 > \c_max_char_int 1 \fi: \exp_stop_f:
\msg_expandable_error:nn { char }
- { invalid-catcode }
+ { out-of-range }
\else:
- \if_int_odd:w 0
- \if_int_compare:w #1 < \c_zero_int 1 \fi:
- \if_int_compare:w #1 > \c_max_char_int 1 \fi: \exp_stop_f:
- \msg_expandable_error:nn { char }
- { out-of-range }
+ \if_int_compare:w #2#1 = 100 \exp_stop_f:
+ \msg_expandable_error:nn { char } { null-space }
\else:
\@@_generate_aux:nnw {#1} {#2}
\fi:
diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx
index 317630568d..db57bd0f38 100644
--- a/macros/latex/contrib/l3kernel/l3unicode.dtx
+++ b/macros/latex/contrib/l3kernel/l3unicode.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2022-02-24}
+% \date{Released 2022-04-10}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf
index abe5195e41..c00c8648b5 100644
--- a/macros/latex/contrib/l3kernel/source3.pdf
+++ b/macros/latex/contrib/l3kernel/source3.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/source3.tex b/macros/latex/contrib/l3kernel/source3.tex
index 774083a4a8..3defa4b47a 100644
--- a/macros/latex/contrib/l3kernel/source3.tex
+++ b/macros/latex/contrib/l3kernel/source3.tex
@@ -53,7 +53,7 @@ for those people who are interested.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2022-02-24}
+\date{Released 2022-04-10}
\pagenumbering{roman}
\maketitle
diff --git a/macros/latex/contrib/l3kernel/source3body.tex b/macros/latex/contrib/l3kernel/source3body.tex
index a2e87856bd..20e1875361 100644
--- a/macros/latex/contrib/l3kernel/source3body.tex
+++ b/macros/latex/contrib/l3kernel/source3body.tex
@@ -207,7 +207,9 @@ following argument specifiers:
\item[\texttt{c}] This means \emph{csname}, and indicates that the
argument will be turned into a csname before being used. So
|\foo:c| |{ArgumentOne}| will act in the same way as |\foo:N|
- |\ArgumentOne|.
+ |\ArgumentOne|. All macros that appear in the argument are expanded.
+ An internal error will occur if the result of expansion inside
+ a \texttt{c}-type argument is not a series of character tokens.
\item[\texttt{V} and \texttt{v}] These mean \emph{value
of variable}. The \texttt{V} and \texttt{v} specifiers are used to
get the content of a variable without needing to worry about the