From b11ef0810f2b6a651ce97d7e639f9c85efeedbd5 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 28 Aug 2021 03:00:47 +0000 Subject: CTAN sync 202108280300 --- macros/latex/contrib/etl/README.md | 34 + macros/latex/contrib/etl/etl.dtx | 1699 ++++++++++++++++++++ macros/latex/contrib/etl/etl.pdf | Bin 0 -> 341109 bytes macros/latex/contrib/l3experimental/CHANGELOG.md | 8 +- macros/latex/contrib/l3experimental/README.md | 2 +- .../latex/contrib/l3experimental/l3benchmark.dtx | 4 +- .../latex/contrib/l3experimental/l3benchmark.pdf | Bin 308452 -> 308429 bytes macros/latex/contrib/l3experimental/l3bitset.dtx | 21 +- macros/latex/contrib/l3experimental/l3bitset.pdf | Bin 404269 -> 404250 bytes .../latex/contrib/l3experimental/l3draw-boxes.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-code.pdf | Bin 660545 -> 660543 bytes .../latex/contrib/l3experimental/l3draw-layers.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-paths.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-points.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-scopes.dtx | 2 +- .../contrib/l3experimental/l3draw-softpath.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-state.dtx | 2 +- .../contrib/l3experimental/l3draw-transforms.dtx | 2 +- macros/latex/contrib/l3experimental/l3draw.dtx | 4 +- macros/latex/contrib/l3experimental/l3draw.pdf | Bin 516783 -> 516768 bytes macros/latex/contrib/l3experimental/l3galley.dtx | 12 +- macros/latex/contrib/l3experimental/l3galley.pdf | Bin 408815 -> 408797 bytes macros/latex/contrib/l3experimental/l3graphics.dtx | 26 +- macros/latex/contrib/l3experimental/l3graphics.pdf | Bin 383917 -> 383906 bytes macros/latex/contrib/l3experimental/l3opacity.dtx | 4 +- macros/latex/contrib/l3experimental/l3opacity.pdf | Bin 334968 -> 334953 bytes .../latex/contrib/l3experimental/l3str-format.dtx | 30 +- .../latex/contrib/l3experimental/l3str-format.pdf | Bin 367908 -> 367902 bytes .../latex/contrib/l3experimental/l3sys-shell.dtx | 4 +- .../latex/contrib/l3experimental/l3sys-shell.pdf | Bin 347938 -> 347910 bytes macros/latex/contrib/l3experimental/xcoffins.dtx | 4 +- macros/latex/contrib/l3experimental/xcoffins.pdf | Bin 394273 -> 394258 bytes macros/latex/contrib/l3experimental/xgalley.dtx | 4 +- macros/latex/contrib/l3experimental/xgalley.pdf | Bin 299605 -> 299574 bytes macros/latex/contrib/l3kernel/CHANGELOG.md | 9 +- macros/latex/contrib/l3kernel/README.md | 2 +- macros/latex/contrib/l3kernel/expl3.dtx | 4 +- macros/latex/contrib/l3kernel/expl3.pdf | Bin 623220 -> 623498 bytes macros/latex/contrib/l3kernel/interface3.pdf | Bin 1720994 -> 1741266 bytes macros/latex/contrib/l3kernel/interface3.tex | 2 +- macros/latex/contrib/l3kernel/l3basics.dtx | 42 +- macros/latex/contrib/l3kernel/l3bootstrap.dtx | 2 +- macros/latex/contrib/l3kernel/l3box.dtx | 8 +- macros/latex/contrib/l3kernel/l3candidates.dtx | 12 +- macros/latex/contrib/l3kernel/l3cctab.dtx | 24 +- macros/latex/contrib/l3kernel/l3clist.dtx | 14 +- macros/latex/contrib/l3kernel/l3coffins.dtx | 28 +- macros/latex/contrib/l3kernel/l3color.dtx | 74 +- macros/latex/contrib/l3kernel/l3debug.dtx | 28 +- macros/latex/contrib/l3kernel/l3deprecation.dtx | 14 +- macros/latex/contrib/l3kernel/l3doc.dtx | 2 +- macros/latex/contrib/l3kernel/l3docstrip.dtx | 2 +- macros/latex/contrib/l3kernel/l3docstrip.pdf | Bin 151531 -> 151769 bytes macros/latex/contrib/l3kernel/l3expan.dtx | 26 +- macros/latex/contrib/l3kernel/l3file.dtx | 56 +- macros/latex/contrib/l3kernel/l3flag.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-assign.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-aux.dtx | 8 +- macros/latex/contrib/l3kernel/l3fp-basics.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-convert.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-expo.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-extended.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-logic.dtx | 16 +- macros/latex/contrib/l3kernel/l3fp-parse.dtx | 68 +- macros/latex/contrib/l3kernel/l3fp-random.dtx | 16 +- macros/latex/contrib/l3kernel/l3fp-round.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-traps.dtx | 26 +- macros/latex/contrib/l3kernel/l3fp-trig.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp.dtx | 2 +- macros/latex/contrib/l3kernel/l3fparray.dtx | 8 +- macros/latex/contrib/l3kernel/l3int.dtx | 6 +- macros/latex/contrib/l3kernel/l3intarray.dtx | 20 +- .../latex/contrib/l3kernel/l3kernel-functions.dtx | 153 +- macros/latex/contrib/l3kernel/l3keys.dtx | 62 +- macros/latex/contrib/l3kernel/l3legacy.dtx | 2 +- macros/latex/contrib/l3kernel/l3luatex.dtx | 8 +- macros/latex/contrib/l3kernel/l3msg.dtx | 558 +++---- macros/latex/contrib/l3kernel/l3names.dtx | 4 +- macros/latex/contrib/l3kernel/l3news.pdf | Bin 395907 -> 401835 bytes macros/latex/contrib/l3kernel/l3news01.pdf | Bin 122713 -> 122732 bytes macros/latex/contrib/l3kernel/l3news02.pdf | Bin 150672 -> 150693 bytes macros/latex/contrib/l3kernel/l3news03.pdf | Bin 148707 -> 154662 bytes macros/latex/contrib/l3kernel/l3news04.pdf | Bin 114588 -> 114607 bytes macros/latex/contrib/l3kernel/l3news05.pdf | Bin 112485 -> 112505 bytes macros/latex/contrib/l3kernel/l3news06.pdf | Bin 151572 -> 151593 bytes macros/latex/contrib/l3kernel/l3news07.pdf | Bin 128312 -> 128332 bytes macros/latex/contrib/l3kernel/l3news08.pdf | Bin 163455 -> 163476 bytes macros/latex/contrib/l3kernel/l3news09.pdf | Bin 250134 -> 256092 bytes macros/latex/contrib/l3kernel/l3news10.pdf | Bin 150289 -> 156264 bytes macros/latex/contrib/l3kernel/l3news11.pdf | Bin 170069 -> 176059 bytes macros/latex/contrib/l3kernel/l3news12.pdf | Bin 204992 -> 210951 bytes macros/latex/contrib/l3kernel/l3pdf.dtx | 2 +- macros/latex/contrib/l3kernel/l3prefixes.csv | 7 + macros/latex/contrib/l3kernel/l3prefixes.pdf | Bin 80515 -> 80722 bytes macros/latex/contrib/l3kernel/l3prg.dtx | 6 +- macros/latex/contrib/l3kernel/l3prop.dtx | 19 +- macros/latex/contrib/l3kernel/l3quark.dtx | 12 +- macros/latex/contrib/l3kernel/l3regex.dtx | 170 +- macros/latex/contrib/l3kernel/l3seq.dtx | 14 +- macros/latex/contrib/l3kernel/l3skip.dtx | 4 +- macros/latex/contrib/l3kernel/l3sort.dtx | 20 +- macros/latex/contrib/l3kernel/l3str-convert.dtx | 40 +- macros/latex/contrib/l3kernel/l3str.dtx | 6 +- macros/latex/contrib/l3kernel/l3styleguide.pdf | Bin 295936 -> 296224 bytes macros/latex/contrib/l3kernel/l3styleguide.tex | 2 +- macros/latex/contrib/l3kernel/l3syntax-changes.pdf | Bin 242611 -> 242890 bytes macros/latex/contrib/l3kernel/l3syntax-changes.tex | 2 +- macros/latex/contrib/l3kernel/l3sys.dtx | 22 +- macros/latex/contrib/l3kernel/l3term-glossary.pdf | Bin 230998 -> 231280 bytes macros/latex/contrib/l3kernel/l3term-glossary.tex | 2 +- macros/latex/contrib/l3kernel/l3text-case.dtx | 2 +- macros/latex/contrib/l3kernel/l3text-purify.dtx | 2 +- macros/latex/contrib/l3kernel/l3text.dtx | 2 +- macros/latex/contrib/l3kernel/l3tl-analysis.dtx | 12 +- macros/latex/contrib/l3kernel/l3tl.dtx | 14 +- macros/latex/contrib/l3kernel/l3token.dtx | 12 +- macros/latex/contrib/l3kernel/l3unicode.dtx | 2 +- macros/latex/contrib/l3kernel/source3.pdf | Bin 6831125 -> 6837536 bytes macros/latex/contrib/l3kernel/source3.tex | 2 +- macros/latex/contrib/l3kernel/source3body.tex | 9 + macros/latex/contrib/l3packages/CHANGELOG.md | 8 +- macros/latex/contrib/l3packages/README.md | 2 +- macros/latex/contrib/l3packages/l3keys2e.dtx | 4 +- macros/latex/contrib/l3packages/l3keys2e.pdf | Bin 369379 -> 369368 bytes macros/latex/contrib/l3packages/xfp.dtx | 4 +- macros/latex/contrib/l3packages/xfp.pdf | Bin 331773 -> 331750 bytes macros/latex/contrib/l3packages/xfrac.dtx | 4 +- macros/latex/contrib/l3packages/xfrac.pdf | Bin 514633 -> 514610 bytes macros/latex/contrib/l3packages/xparse.dtx | 8 +- macros/latex/contrib/l3packages/xparse.pdf | Bin 534329 -> 534316 bytes macros/latex/contrib/l3packages/xtemplate.dtx | 4 +- macros/latex/contrib/l3packages/xtemplate.pdf | Bin 440130 -> 440108 bytes macros/latex/contrib/siunitx/CHANGELOG.md | 9 +- macros/latex/contrib/siunitx/siunitx-code.pdf | Bin 1511257 -> 1512131 bytes macros/latex/contrib/siunitx/siunitx-command.dtx | 7 +- macros/latex/contrib/siunitx/siunitx.dtx | 2 +- macros/latex/contrib/siunitx/siunitx.pdf | Bin 636202 -> 636196 bytes 137 files changed, 2539 insertions(+), 1092 deletions(-) create mode 100644 macros/latex/contrib/etl/README.md create mode 100644 macros/latex/contrib/etl/etl.dtx create mode 100644 macros/latex/contrib/etl/etl.pdf (limited to 'macros') diff --git a/macros/latex/contrib/etl/README.md b/macros/latex/contrib/etl/README.md new file mode 100644 index 0000000000..8279d34fb0 --- /dev/null +++ b/macros/latex/contrib/etl/README.md @@ -0,0 +1,34 @@ +------------------------------------------------------------------------------- +# etl -- expandable token list operations + +Version 2021-08-20 v0.1 + +Released under the LaTeX Project Public License v1.3c or later +See http://www.latex-project.org/lppl.txt + +Hosted at https://github.com/Skillmon/ltx_etl + +------------------------------------------------------------------------------- + +Copyright (C) 2020-2021 Jonathan P. Spratte + +This work may be distributed and/or modified under the conditions of the +LaTeX Project Public License (LPPL), either version 1.3c of this license or +(at your option) any later version. The latest version of this license is in +the file: + + http://www.latex-project.org/lppl.txt + +This work is "maintained" (as per LPPL maintenance status) by + Jonathan P. Spratte. + +------------------------------------------------------------------------------- + +This provides expandable token list operations which are only implemented +unexpandably inside of `expl3`'s `l3tl` module. While being expandable these +operations are typically slower than the unexpandable alternatives. Also there +are tokens which are not expandably distinguishable in TeX (those are active +characters which are let to the same character with a different category code). + +Additionally a general map to token lists is provided modelled after +`\__tl_act:NNNn` with additional features. diff --git a/macros/latex/contrib/etl/etl.dtx b/macros/latex/contrib/etl/etl.dtx new file mode 100644 index 0000000000..93b90ca9d0 --- /dev/null +++ b/macros/latex/contrib/etl/etl.dtx @@ -0,0 +1,1699 @@ +% \iffalse meta-comment +% +% File: etl.dtx Copyright (C) 2020-2021 Jonathan P. Spratte +% +% This work may be distributed and/or modified under the conditions of the +% LaTeX Project Public License (LPPL), either version 1.3c of this license or +% (at your option) any later version. The latest version of this license is in +% the file: +% +% http://www.latex-project.org/lppl.txt +% +% ------------------------------------------------------------------------------ +% +%<*driver>^^A>>= +\def\nameofplainTeX{plain} +\ifx\fmtname\nameofplainTeX\else + \expandafter\begingroup +\fi +\input l3docstrip.tex +\askforoverwritefalse +\preamble + +-------------------------------------------------------------- +etl -- expandable token list operations +E-mail: jspratte@yahoo.de +Released under the LaTeX Project Public License v1.3c or later +See http://www.latex-project.org/lppl.txt +-------------------------------------------------------------- + +Copyright (C) 2020-2021 Jonathan P. Spratte + +This work may be distributed and/or modified under the conditions of the +LaTeX Project Public License (LPPL), either version 1.3c of this license or +(at your option) any later version. The latest version of this license is in +the file: + + http://www.latex-project.org/lppl.txt + +This work is "maintained" (as per LPPL maintenance status) by + Jonathan P. Spratte. + +This work consists of the file etl.dtx +and the derived files etl.pdf + etl.sty + +\endpreamble +% stop docstrip adding \endinput +\postamble +\endpostamble +\generate{\file{etl.sty}{\from{etl.dtx}{pkg}}} +\ifx\fmtname\nameofplainTeX + \expandafter\endbatchfile +\else + \expandafter\endgroup +\fi +% +\IfFileExists{etl.sty}{\RequirePackage{etl}}{} +\PassOptionsToPackage{full}{textcomp} +\documentclass{l3doc} +\RequirePackage[oldstylenums,nott]{kpfonts} +\RequirePackage{randtext,xcolor} +\input{glyphtounicode} +\usepackage{xistercian} +\pdfgentounicode=1 +\let\metaORIG\meta +\protected\def\meta #1{\texttt{\metaORIG{#1}}} +\renewcommand*\thefootnote{\cistercian{footnote}} +\hypersetup{linkcolor=red!80!black,urlcolor=purple!80!black} +\makeatletter +\@ifdefinable\gobbledocstriptag{\def\gobbledocstriptag#1>{}} +\protected\def\savefootnotestuff + {% + \let\mysavethefootnote\thefootnote + \let\mysave@makefnmark\@makefnmark + \let\mysave@makefntext\@makefntext + } +\def\restorefootnotestuff{\texorpdfstring\restorefootnotestuff@{}} +\def\restorefootnotestuff@ + {% + \global\let\thefootnote\mysavethefootnote + \global\let\@makefnmark\mysave@makefnmark + \global\let\@makefntext\mysave@makefntext + } +\makeatother +\begin{document} + \savefootnotestuff + \title + {^^A + \restorefootnotestuff + The \pkg{etl} package\\ expandable token list operations^^A + } + \GetFileInfo{etl.sty} + \date{\filedate\space\fileversion} + \author{Jonathan P. Spratte\thanks{\protect\randomize{jspratte@yahoo.de}}} + \DocInput{etl.dtx} +\end{document} +%^^A=<< +% \fi +% +% \maketitle +% \setcounter{footnote}{1} +% +% \tableofcontents +% +% \begin{documentation}^^A>>= +% +% \section{Documentation} +% +% The \pkg{etl} package provides a few \emph{slow but expandable} alternatives +% to unexpandable functions found inside the \pkg{l3tl} module of \pkg{expl3}. +% All user functions must not contain the tokens \cs{s__etl_stop}\footnote{At +% any nesting level of groups} or \cs{__etl_act_result:n}\footnote{Outside of +% some local brace groups} in any argument (but there might be other forbidden +% tokens, all of which are internals to this package, and usually shouldn't +% somehow end up inside the input stream by accident). +% +% There is another limitation of this package: There are tokens which cannot +% expandably be differentiated from each other, those are active characters let +% to the same character with a different category code, something like the +% following: +% +% \begin{verbatim} +% \char_set_catcode_letter:N a +% \char_set_active_eq:NN a a +% \char_set_catcode_active:N a +% \end{verbatim} +% +% After this the active `|a|'s couldn't be told apart from non-active `|a|'s of +% category letter by the parsers in this package.\footnote{Thanks to Bruno Le +% Floch for pointing that out.} In general two tokens are considered equal if +% \cs{etl_token_if_eq:NNTF} yields true (see there). Another limitation is that +% the parser doesn't consider the character code of tokens with category 1 or 2 +% (group begin and group end, typically |{}|), instead all tokens found with +% these two category codes are normalised to \texttt{\{\textsubscript{1}} and +% \texttt{\}\textsubscript{2}}. +% +% The core macro \cs{etl_act:nnnnnnn} is modelled after an internal of +% \pkg{l3tl} called \cs{__tl_act:NNNn} but with some more possibilities added. +% +% +% \subsection{A general loop} +% +% \begin{function}[EXP]{\etl_act:nnnnnnn, \etl_act:nnnnnn, \etl_act:nnnnn} +% \begin{syntax} +% \cs{etl_act:nnnnnnn} \Arg{normal} \Arg{space} \Arg{group} \Arg{final} \Arg{status} \Arg{output} \Arg{token list} +% \cs{etl_act:nnnnnn} \Arg{normal} \Arg{space} \Arg{group} \Arg{final} \Arg{status} \Arg{token list} +% \cs{etl_act:nnnnn} \Arg{normal} \Arg{space} \Arg{group} \Arg{status} \Arg{token list} +% \end{syntax} +% This function will act on the \meta{token list} (somewhat a +% |map_tokens|-function). Both \meta{normal} and \meta{group} should be code +% that expects two following arguments (the first being the \meta{status}, the +% second the next |N|-type token or the contents of the next group in the +% \meta{token list}), and \meta{space} should expect only the \meta{status} as +% a following argument. +% +% You can also specify \meta{final} code which will receive the \meta{status} +% followed by the output (which you can assign with \cs{etl_act_output:n} and +% \cs{etl_act_output_pre:n}), and will be used inside an |e|-expansion context +% (so you'll want to protect anything you want to output from further +% expansion using \cs{exp_not:n}). Also you can specify some \meta{output} +% which should be there from the beginning. +% +% Functions without the argument \meta{output} will start with an empty +% output, and those without \meta{final} will just output the results at the +% end. +% +% \begin{texnote} +% The result is returned within \cs{exp_not:n}, which means that the token +% list does not expand further when appearing in an \hbox{|x|- or} |e|-type +% argument expansion. The result will be returned after exactly two steps of +% expansion. If you don't need the \meta{final} argument processor and don't +% have to reorder some of the output you can also use \cs{exp_not:n} to +% directly output tokens where you currently are, this might be faster. +% \end{texnote} +% \end{function} +% +% \begin{function}[EXP]{\etl_act_output:n, \etl_act_output_pre:n} +% \begin{syntax} +% \cs{etl_act_output:n} \Arg{token list} +% \end{syntax} +% This will add \meta{token list} to the output of \cs{etl_act:nnnnnnn}. The +% normal version will add \meta{token list} after the current output, the +% |pre| variant will put it before the current output. +% Might be used inside of the \meta{normal}, \meta{space}, or \meta{group} +% code of \cs{etl_act:nnnnnnn}. +% \end{function} +% +% \begin{function}[EXP]{\etl_act_output_rest:, \etl_act_output_rest_pre:} +% \begin{syntax} +% \cs{etl_act_output_rest:} +% \end{syntax} +% After this macro was used all remaining things inside the \meta{token list} +% argument of \cs{etl_act:nnnnnnn} will be added to the output. The normal +% version will add it to the end of the output, the |pre| variant will put the +% remainder before the current output in reversed order. +% Might be used inside of the \meta{normal}, \meta{space}, or \meta{group} +% code of \cs{etl_act:nnnnnnn}. +% \end{function} +% +% \begin{function}[EXP]{\etl_act_status:n} +% \begin{syntax} +% \cs{etl_act_status:n} \Arg{status} +% \end{syntax} +% This will change the current status of \cs{etl_act:nnnnnnn} to +% \meta{status}. +% Might be used inside of the \meta{normal}, \meta{space}, or \meta{group} +% code of \cs{etl_act:nnnnnnn}. +% \end{function} +% +% \begin{function}[EXP]{\etl_act_put_back:n} +% \begin{syntax} +% \cs{etl_act_put_back:n} \Arg{token list} +% \end{syntax} +% You can put \meta{token list} back into the input stream to be reconsidered +% by the current \cs{etl_act:nnnnnnn} loop (of course this doesn't have to be +% literally put back, you might add completely new contents with this). +% Might be used inside of the \meta{normal}, \meta{space}, or \meta{group} +% code of \cs{etl_act:nnnnnnn}. +% \end{function} +% +% \begin{function}[EXP] +% { +% \etl_act_switch:nnn, +% \etl_act_switch_normal:n, \etl_act_switch_space:n, \etl_act_switch_group:n +% } +% \begin{syntax} +% \cs{etl_act_switch:nnn} \Arg{normal} \Arg{space} \Arg{group} +% \cs{etl_act_switch_normal:n} \Arg{normal} +% \cs{etl_act_switch_space:n} \Arg{space} +% \cs{etl_act_switch_group:n} \Arg{group} +% \end{syntax} +% With these functions you can change the provided code to act on +% \meta{normal} (so |N|-type) tokens, \meta{space}s, and \meta{group}s. +% Might be used inside of the \meta{normal}, \meta{space}, or \meta{group} +% code of \cs{etl_act:nnnnnnn}. +% \end{function} +% +% \begin{function}[EXP]{\etl_act_do_final:} +% \begin{syntax} +% \cs{etl_act_do_final:} +% \end{syntax} +% This will immediately stop the current \cs{etl_act:nnnnnnn} invocation and +% execute the provided \meta{final} code (or if a variant without the +% \meta{final} code was used, the output). The \meta{final} code will receive +% the current status followed by the current output as two arguments (just +% like it would when the end of the \meta{token list} was reached). +% Might be used inside of the \meta{normal}, \meta{space}, or \meta{group} +% code of \cs{etl_act:nnnnnnn}. +% \end{function} +% +% \begin{function}[EXP]{\etl_act_break:, \etl_act_break_discard:} +% \begin{syntax} +% \cs{etl_act_break:} +% \end{syntax} +% This will immediately stop the current \cs{etl_act:nnnnnnn} invocation and +% leave the current output in the input stream. The |discard| variant will +% gobble the current output and leave nothing in the input stream. +% Might be used inside of the \meta{normal}, \meta{space}, or \meta{group} +% code of \cs{etl_act:nnnnnnn}. +% \end{function} +% +% \begin{function}[EXP]{\etl_act_break:n} +% \begin{syntax} +% \cs{etl_act_break:n} \Arg{token list} +% \end{syntax} +% This will immediately stop the current \cs{etl_act:nnnnnnn} invocation, +% gobble the current output and leave \meta{token list} in the input stream. +% Might be used inside of the \meta{normal}, \meta{space}, or \meta{group} +% code of \cs{etl_act:nnnnnnn}. +% \end{function} +% +% \begin{function}[EXP]{\etl_act_break_pre:n, \etl_act_break_post:n} +% \begin{syntax} +% \cs{etl_act_break_pre:n} \Arg{token list} +% \end{syntax} +% This will immediately stop the current \cs{etl_act:nnnnnnn} invocation and +% leave the current output in the input stream, and in the case of the normal +% variant followed by \meta{token list}, in the |pre|-case preceded by +% \meta{token list}. +% \end{function} +% +% +% \subsection{Conditionals}\label{sec:conditionals} +% +% \begin{function}[pTF]{\etl_token_if_eq:NN} +% \begin{syntax} +% \cs{etl_token_if_eq_p:NN} \meta{token_1} \meta{token_2} +% \cs{etl_token_if_eq:NNTF} \meta{token_1} \meta{token_2} \Arg{true code} \Arg{false code} +% \end{syntax} +% Compares \meta{token_1} and \meta{token_2} and yields |true| if the two are +% equal. Two tokens are considered equal if they have the same meaning (so if +% \cs{if_meaning:w} is true) and the same string representation (so if +% \cs{str_if_eq:nnTF} is true). +% \end{function} +% +% \begin{function}[pTF]{\etl_if_eq:nn} +% \begin{syntax} +% \cs{etl_if_eq_p:nn} \Arg{token list_1} \Arg{token list_2} +% \cs{etl_if_eq:nnTF} \Arg{token list_1} \Arg{token list_2} \Arg{true code} \Arg{false code} +% \end{syntax} +% Compares \meta{token list_1} and \meta{token list_2} with each other on a +% token-by-token basis. Keep in mind that there are tokens which can't be told +% apart from each other, and that groups are normalised. If both token lists +% match (modulo the mentioned limitations) the \meta{true code} is left in the +% input stream, else the \meta{false code}. +% \end{function} +% +% \begin{function}[pTF]{\etl_token_if_in:nN} +% \begin{syntax} +% \cs{etl_token_if_in_p:nN} \Arg{token list} \meta{token} +% \cs{etl_token_if_in:nNTF} \Arg{token list} \meta{token} \Arg{true code} \Arg{false code} +% \end{syntax} +% Searches for \meta{token} inside the \meta{token list}. If it is found +% returns true. Brace groups inside the \meta{token list} are ignored. +% \end{function} +% +% \begin{function}[pTF]{\etl_token_if_in_deep:nN} +% \begin{syntax} +% \cs{etl_token_if_in_deep_p:nN} \Arg{token list} \meta{token} +% \cs{etl_token_if_in_deep:nNTF} \Arg{token list} \meta{token} \Arg{true code} \Arg{false code} +% \end{syntax} +% Searches for \meta{token} inside the \meta{token list}. If it is found +% returns true. Brace groups inside the \meta{token list} are recursively +% searched as well. +% \end{function} +% +% \begin{function}[pTF]{\etl_if_in:nn} +% \begin{syntax} +% \cs{etl_if_in_p:nn} \Arg{token list} \Arg{search text} +% \cs{etl_if_in:nnTF} \Arg{token list} \Arg{search text} \Arg{true code} \Arg{false code} +% \end{syntax} +% Searches for \meta{search text} inside of \meta{token list}. If it is +% found the \meta{true code} is left in the input stream, else the \meta{false +% code}. Both macro parameter tokens as well as tokens with category code~1 +% and 2 (normally |{}|) can be part of \meta{search text} (unlike for the +% similar function \cs{tl_if_in:nnTF}). Material inside of groups in +% \meta{token list} is ignored (except for the groups contained in +% \meta{search text}). So the following would first yield |true| and then +% |false|: +% \end{function} +% \begin{verbatim} +% \etl_if_in:nnTF { a{b{c}} } { {b{c}} } { true } { false } +% \etl_if_in:nnTF { a{b{c}} } { b{c} } { true } { false } +% \end{verbatim} +% +% \begin{function}[pTF]{\etl_if_in_deep:nn} +% \begin{syntax} +% \cs{etl_if_in_deep_p:nn} \Arg{token list} \Arg{search text} +% \cs{etl_if_in_deep:nnTF} \Arg{token list} \Arg{search text} \Arg{true code} \Arg{false code} +% \end{syntax} +% Does the same as \cs{etl_if_in:nnTF} but also recursively searches inside of +% groups in \meta{token list}. So this would yield |true| in both of the +% cases in above example. +% \end{function} +% +% +% \subsection{Modifying token lists} +% +% \begin{function}[EXP]{\etl_token_replace_once:nNn} +% \begin{syntax} +% \cs{etl_token_replace_once:nNn} \Arg{token list} \meta{token} \Arg{replacement} +% \end{syntax} +% This function will replace the first occurrence of \meta{token} inside of +% \meta{token list} that is not hidden inside a group with \meta{replacement}. +% The \meta{token} has to be a valid |N|-type argument. +% +% \begin{texnote} +% The result is returned within \cs{exp_not:n}, which means that the token +% list does not expand further when appearing in an \hbox{|x|- or} |e|-type +% argument expansion. The result will be returned after exactly two steps of +% expansion. +% \end{texnote} +% \end{function} +% +% \begin{function}[EXP]{\etl_token_replace_all:nNn} +% \begin{syntax} +% \cs{etl_token_replace_all:nNn} \Arg{token list} \meta{token} \Arg{replacement} +% \end{syntax} +% This function will replace each occurrence of \meta{token} inside of +% \meta{token list} that is not hidden inside a group with \meta{replacement}. +% The \meta{token} has to be a valid |N|-type argument. +% +% \begin{texnote} +% The result is returned within \cs{exp_not:n}, which means that the token +% list does not expand further when appearing in an \hbox{|x|- or} |e|-type +% argument expansion. The result will be returned after exactly two steps of +% expansion. +% \end{texnote} +% \end{function} +% +% \begin{function}[EXP]{\etl_token_replace_all_deep:nNn} +% \begin{syntax} +% \cs{etl_token_replace_all_deep:nNn} \Arg{token list} \meta{token} \Arg{replacement} +% \end{syntax} +% This function will replace each occurrence of \meta{token} inside of +% \meta{token list} with \meta{replacement}. +% The \meta{token} has to be a valid |N|-type argument. +% +% \begin{texnote} +% The result is returned within \cs{exp_not:n}, which means that the token +% list does not expand further when appearing in an \hbox{|x|- or} |e|-type +% argument expansion. The result will be returned after exactly two steps of +% expansion. +% \end{texnote} +% \end{function} +% +% \begin{function}[EXP]{\etl_replace_once:nnn} +% \begin{syntax} +% \cs{etl_replace_once:nnn} \meta{token list} \meta{search text} \meta{replacement} +% \end{syntax} +% This function will replace the first occurrence of \meta{search text} +% inside of \meta{token list} that is not hidden inside a group with +% \meta{replacement}. +% +% \begin{texnote} +% The result is returned within \cs{exp_not:n}, which means that the token +% list does not expand further when appearing in an \hbox{|x|- or} |e|-type +% argument expansion. The result will be returned after exactly two steps of +% expansion. +% \end{texnote} +% \end{function} +% +% \begin{function}[EXP]{\etl_replace_all:nnn} +% \begin{syntax} +% \cs{etl_replace_all:nnn} \meta{token list} \meta{search text} \meta{replacement} +% \end{syntax} +% This function will replace all occurrences of \meta{search text} +% inside of \meta{token list} that are not hidden inside a group with +% \meta{replacement}. +% +% \begin{texnote} +% The result is returned within \cs{exp_not:n}, which means that the token +% list does not expand further when appearing in an \hbox{|x|- or} |e|-type +% argument expansion. The result will be returned after exactly two steps of +% expansion. +% \end{texnote} +% \end{function} +% +% \begin{function}[EXP]{\etl_replace_all_deep:nnn} +% \begin{syntax} +% \cs{etl_replace_all_deep:nnn} \meta{token list} \meta{search text} \meta{replacement} +% \end{syntax} +% This function will replace all occurrences of \meta{search text} +% inside of \meta{token list} with \meta{replacement}. +% +% \begin{texnote} +% The result is returned within \cs{exp_not:n}, which means that the token +% list does not expand further when appearing in an \hbox{|x|- or} |e|-type +% argument expansion. The result will be returned after exactly two steps of +% expansion. +% \end{texnote} +% \end{function} +% +% +% \subsection{New expandable fast tests} +% +% Functions generated with the means in this section are as fast as the +% \pkg{l3tl} variants of them, but have at least one fixed argument. +% +% \begin{function}{\etl_new_if_in:Nnn} +% \begin{syntax} +% \cs{etl_new_if_in:Nnn} \meta{function} \meta{search text} \meta{conditions} +% \end{syntax} +% This will define a new \meta{function} which will act as a conditional and +% search for \meta{search text} inside of an |n|-type argument completely +% expandable. The \meta{conditions} should be a comma-separated list +% containing one or more of |p|, |T|, |F| and |TF| (just like for +% \cs{prg_new_conditional:Npnn}). The \meta{search text} must not contain +% tokens with category code~1 or 2 (normally |{}|) and can't contain macro +% parameter tokens (normally |#|). +% Unlike for the conditionals in \autoref{sec:conditionals}, the \meta{search +% text} of functions created with \cs{etl_new_if_in:Nnn} might contain +% \cs{s__etl_stop} tokens. +% +% So the following would yield |true| followed by |false|: +% \end{function} +% \begin{verbatim} +% \etl_new_if_in:Nnn \my_if_a_in:n { a } { TF } +% \my_if_a_in:nTF { a text } { true } { false } +% \my_if_a_in:nTF { text } { true } { false } +% \end{verbatim} +% +% +% \subsection{Bugs and Feature Requests} +% +% If you find bugs or want to request features you can do so either via email +% (see the first page) or via Github at +% \url{https://github.com/Skillmon/ltx_etl/issues}. +% +% \end{documentation}^^A=<< +% +% \clearpage +% +% \begin{implementation}^^A>>= +% +% \section{Implementation} +% +% \begin{macrocode} +%<*pkg> +% \end{macrocode} +% +% \begin{macrocode} +%<@@=etl> +% \end{macrocode} +% +% Tell who we are: +% \begin{macrocode} +\ProvidesExplPackage{etl} + {2021-08-20} {0.1} + {expandable token list manipulation} +% \end{macrocode} +% +% Ensure dependencies are met: +% \begin{macrocode} +\cs_if_exist:NF \tex_expanded:D + { + \msg_new:nnn { etl } { expanded-missing } + { The expanded primitive is required. } + \msg_fatal:nn { etl } { expanded-missing } + } +% \end{macrocode} +% +% +% \subsection{Primitives} +% +% \begin{macro}[EXP]{\@@_expanded:w,\@@_unexpanded:w,\@@_detokenize:w} +% Private copies of a few primitives (evil code for \pkg{expl3}). +% \begin{macrocode} +\cs_new_eq:NN \@@_expanded:w \tex_expanded:D +\cs_new_eq:NN \@@_unexpanded:w \tex_unexpanded:D +\cs_new_eq:NN \@@_detokenize:w \tex_detokenize:D +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Variables} +% +% \begin{variable}{\s_@@_stop,\s_@@_mark} +% Scan marks. +% \begin{macrocode} +\scan_new:N \s_@@_stop +\scan_new:N \s_@@_mark +% \end{macrocode} +% \end{variable} +% +% \subsection{Small auxiliaries} +% +% \begin{macro}[EXP]{\@@_if_mark:nTF,\@@_if_mark:w,\@@_if_mark_true:w} +% A small check whether some argument contains the scan mark \cs{s_@@_mark}, +% the mark should always be the last token of the argument (and only a single +% such mark should be contained) to ensure correct behaviour. +% \begin{macrocode} +\cs_new:Npn \@@_if_mark:nTF #1 + { \@@_if_mark:w #1 \@@_if_mark_true:w \s_@@_mark \use_ii:nn } +\cs_new:Npn \@@_if_mark:w #1 \s_@@_mark {} +\cs_new:Npn \@@_if_mark_true:w \s_@@_mark \use_ii:nn #1#2 {#1} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[EXP]{\@@_split_first:w} +% Can be used to extract the first element from a token list, it should always +% be used like this: +% |\exp_after:wN |\meta{function}^^A +% | \@@_expanded:w { \@@_split_first:w |\meta{arg}| }|. +% \begin{macrocode} +\cs_new:Npn \@@_split_first:w #1 + { + { \@@_unexpanded:w {#1} } + \if_false: { \fi: \exp_after:wN } \exp_after:wN { \if_false: } \fi: + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[EXP]{\@@_turn_true:w,\@@_fi_turn_false:w} +% Fast ways to change the outcome of a test. +% \begin{macrocode} +\cs_new:Npn \@@_turn_true:w \if_false: { \if_true: } +\cs_new:Npn \@@_fi_turn_false:w \fi: \if_true: { \fi: \if_false: } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[EXP]{\@@_rm_space:w} +% Fast macro to gobble an immediately following single space. +% \begin{macrocode} +\use:n { \cs_new:Npn \@@_rm_space:w } ~ {} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[EXP] +% { +% \@@_if_empty:nTF, \@@_if_empty:nT, \@@_if_empty:w, +% \@@_if_empty_true:w, \@@_if_empty_true_TF:w +% } +% This is a fast test whether something is empty or not. The argument must not +% contain \cs{s_@@_stop} for this to work (but since that limitation is true +% for most if not all user facing functions of this module, this is fine to +% gain a bit of speed). +% \begin{macrocode} +\cs_new:Npn \@@_if_empty:nT #1 + { + \@@_if_empty:w + \s_@@_stop #1 \s_@@_stop \@@_if_empty_true:w + \s_@@_stop \s_@@_stop \use_none:n + } +\cs_new:Npn \@@_if_empty:nTF #1 + { + \@@_if_empty:w + \s_@@_stop #1 \s_@@_stop \@@_if_empty_true_TF:w + \s_@@_stop \s_@@_stop \use_ii:nn + } +\cs_new:Npn \@@_if_empty:w #1 \s_@@_stop \s_@@_stop {} +\cs_new:Npn \@@_if_empty_true:w \s_@@_stop \s_@@_stop \use_none:n #1 + {#1} +\cs_new:Npn \@@_if_empty_true_TF:w \s_@@_stop \s_@@_stop \use_ii:nn #1#2 + {#1} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[EXP]{\@@_if_head_is_group:nTF,\@@_if_head_is_group:nT} +% This test works pretty much the same way \cs{tl_if_head_is_group:nTF} works, +% but it is faster because it gets rid of the unnecessary \cs{if:w} and +% instead only works by argument gobbling. Drawback is that if you only expand +% the macro twice you could end up with unbalanced braces. +% \begin{macrocode} +\cs_new:Npn \@@_if_head_is_group:nTF #1 + { + \exp_after:wN \use_none:n \exp_after:wN + { + \exp_after:wN { \token_to_str:N #1 ? } + \exp_after:wN \use_iii:nnnn \token_to_str:N + } + \use_ii:nn + } +\cs_new:Npn \@@_if_head_is_group:nT #1 + { + \exp_after:wN \use_none:n \exp_after:wN + { + \exp_after:wN { \token_to_str:N #1 ? } + \exp_after:wN \use_iii:nnn \token_to_str:N + } + \use_none:n + } +% \end{macrocode} +% \end{macro} +% +% +% \subsection{The \texttt{act} loop} +% +% \begin{macro}[EXP]{\etl_act:nnnnnnn,\etl_act:nnnnnn,\etl_act:nnnnn} +% \begin{macro}[EXP]{\@@_act:nnnnnnn} +% \begin{macro}[EXP]{\@@_act_just_result:nn} +% The act loop is modelled after the \pkg{expl3} internal \cs{__tl_act:NNNn} +% but with a few more features making it more general. Those are (argument +% to \cs{etl_act:nnnnnnn} in parentheses): a status (|#5|), +% |n|-type mapping instead of just |N|-type functions, a final result +% processing (|#4|), and the possibility to preset some output (|#6|). The +% other arguments are: |#7| the token list on which we should act, |#1| +% function to use for |N|-type elements in that list, |#2| function to use for +% spaces in that list, and |#3| function to use on groups in that list. +% +% Just like the \cs{__tl_act:NNNn} function, this has a token which must not +% occur in the arguments, in this case that token is \cs{s_@@_stop}. The +% result is stored as an argument to the (undefined) function +% \cs{@@_act_result:n}. +% \begin{macrocode} +\cs_new:Npn \etl_act:nnnnnnn #1#2#3#4#5#6#7 + { + \@@_unexpanded:w \@@_expanded:w + { + { + \@@_act:w #7 {\s_@@_stop} . \s_@@_stop {#5} {#1} {#2} {#3} + \@@_act_result:n {#6} {#4} + } + } + } +% \end{macrocode} +% We also provide a version without the \cs{@@_unexpanded:w} around it for +% internal purposes, in which we'd otherwise have to remove it for correct +% behaviour. +% \begin{macrocode} +\cs_new:Npn \@@_act:nnnnnnn #1#2#3#4#5#6#7 + { + \@@_expanded:w + { + \@@_act:w #7 {\s_@@_stop} . \s_@@_stop {#5} {#1} {#2} {#3} + \@@_act_result:n {#6} {#4} + } + } +% \end{macrocode} +% We also provide two reduced function variants, the first without presetting +% some output, the second also without the final processor. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \etl_act:nnnnnn #1#2#3#4#5#6 } + { \etl_act:nnnnnnn {#1} {#2} {#3} {#4} {#5} {} {#6} } +\exp_args:Nno \use:n { \cs_new:Npn \etl_act:nnnnn #1#2#3#4#5 } + { \etl_act:nnnnnnn {#1} {#2} {#3} \@@_act_just_result:nn {#4} {} {#5} } +% \end{macrocode} +% The final processor is provided with two |n|-type arguments (both in braces) +% the first being the status, the second the output. To just get the output we +% gobble the status and put \cs{@@_unexpanded:w} there to protect the final +% output from further expanding. +% \begin{macrocode} +\cs_new:Npn \@@_act_just_result:nn #1 { \@@_unexpanded:w } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}[EXP]{\@@_if_head_is_space:nTF,\@@_if_head_is_space_true:w} +% \begin{macro}[EXP]{\@@_if_head_is_N_type:nTF,\@@_if_head_is_N_type_false:w} +% \begin{macro}[EXP]{\@@_act:w,\@@_act_if_space:w,\@@_act_space:w} +% We need a few macros with spaces at weird places so define them here. Since +% we got the limitation of not allowing \cs{s_@@_stop} we can use that token +% to get some fast tests. The first tests for a space at the front, and since +% that one is pretty fast we can use it to build a faster alternative to check +% for a starting |N|-type as well (with the drawback that this would yield +% |true| for an empty argument, something we have to keep in mind). +% \begin{macrocode} +\group_begin: + \cs_set:Npn \@@_tmp:n #1 + { + \cs_new:Npn \@@_if_head_is_space:nTF ##1 + { + \@@_act_if_space:w + \s_@@_stop ##1 \s_@@_stop \@@_if_head_is_space_true:w + \s_@@_stop #1 \s_@@_stop \use_ii:nn + } + \cs_new:Npn \@@_if_head_is_space_true:w + \s_@@_stop #1 \s_@@_stop \use_ii:nn ##1##2 + {##1} + \cs_new:Npn \@@_if_head_is_N_type:nTF ##1 + { + \@@_act_if_space:w + \s_@@_stop ##1 \s_@@_stop \@@_if_head_is_N_type_false:w + \s_@@_stop #1 \s_@@_stop + \@@_if_head_is_group:nT {##1} \use_iii:nnn + \use_i:nn + } + \cs_new:Npn \@@_if_head_is_N_type_false:w + \s_@@_stop #1 \s_@@_stop + \@@_if_head_is_group:nT ##1 \use_iii:nnn + \use_i:nn + ##2##3 + {##3} +% \end{macrocode} +% The act loop \cs{@@_act:w} grabs the remainder of the list, delimited by +% \cs{s_@@_stop}, picks up the status (|##2|), and the user provided functions +% for |N|-types (|##3|), spaces (|##4|), and groups (|##5|). We need to check +% which type is at the head of the token list (the space test is a bit +% stripped down, and very fast this way). +% \begin{macrocode} + \cs_new:Npn \@@_act:w ##1 \s_@@_stop ##2##3##4##5 + { + \@@_act_if_space:w + \s_@@_stop ##1 \s_@@_stop \@@_act_space:w {##4} + \s_@@_stop #1 \s_@@_stop + \@@_if_head_is_group:nT {##1} \@@_act_group:w + \@@_act_normal:w {##3} {##5} + {##2} ##1 \s_@@_stop {##2} {##3} {##4} {##5} + } +% \end{macrocode} +% The check for spaces just gobbles everything up to the first +% \cs{s_@@_stop}\verb*| |. If we found a space at the head we remove that +% space and leave in the input the space function, the status, and +% \cs{@@_act:w} for the next iteration. +% \begin{macrocode} + \cs_new:Npn \@@_act_if_space:w ##1 \s_@@_stop #1 ##2 \s_@@_stop {} + \cs_new:Npn \@@_act_space:w + ##1 \s_@@_stop #1 \s_@@_stop + \@@_if_head_is_group:nT ##2 \@@_act_group:w \@@_act_normal:w ##3 ##4 + ##5 #1 + { ##1 {##5} \@@_act:w } + } + \@@_tmp:n { ~ } +\group_end: +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}[EXP]{\@@_act_normal:w} +% For a normal token we can act quite easy, just pick up that token and leave +% the next iteration in the input stream (|#2| is the group code, which is +% gobbled). +% \begin{macrocode} +\cs_new:Npn \@@_act_normal:w #1#2#3#4 { #1 {#3} #4 \@@_act:w } +% \end{macrocode} +% \end{macro} +% \begin{macro}[EXP]{\@@_act_group:w,\@@_act_if_end:w} +% Since the end marker is a single \cs{s_@@_stop} in a group, we have to test +% whether that end marker is found. The test here leads to undefined behaviour +% if the user supplied token list contains such a marker at an any point. If +% the end marker is found we call the final handler (for which we have to +% remove the \cs{s_@@_stop} to correctly grab its arguments), else we provide +% the user supplied function the next group and input the next iteration. |#1| +% is the normal function, which is gobbled. +% \begin{macrocode} +\cs_new:Npn \@@_act_group:w \@@_act_normal:w #1#2#3#4 + { + \@@_act_if_end:w #4 \use_i:nn \etl_act_do_final: \s_@@_stop + #2 {#3} {#4} \@@_act:w + } +\cs_new:Npn \@@_act_if_end:w #1 \s_@@_stop {} +% \end{macrocode} +% \end{macro} +% \begin{macro}[EXP] +% { +% \etl_act_output:n, \etl_act_output_pre:n, +% \etl_act_output_rest:, \etl_act_output_rest_pre: +% } +% \begin{macro}[EXP] +% { +% \@@_act_output_normal:nN, \@@_act_output_space:n, \@@_act_output_group:nn, +% \@@_act_output_normal_pre:nN, \@@_act_output_space_pre:n, +% \@@_act_output_group_pre:nn +% } +% \begin{macro}[EXP] +% { +% \@@_act_unexpanded_normal:nN, \@@_act_unexpanded_space:n, +% \@@_act_unexpanded_group:nn +% } +% To allow reordering the output we unfortunately can't just use +% \cs{@@_unexpanded:w} and be done, so we have to shift a few tokens around +% instead. All the output macros work by the same idea, except for +% \cs{etl_act_output_rest:} and \cs{etl_act_output_rest_pre:}, since it's a +% non-trivial task to get the remainder of the argument. Instead these two +% swap out the user provided functions for some that only pass through the +% input as output, for which we need six internal output macros. +% +% In those cases in which we don't need reordering, we can internally shortcut +% using \cs{@@_unexpanded:w}. +% \begin{macrocode} +\cs_new:Npn \etl_act_output:n #1 #2 \@@_act_result:n #3 + { #2 \@@_act_result:n { #3 #1 } } +\cs_new:Npn \etl_act_output_pre:n #1 #2 \@@_act_result:n #3 + { #2 \@@_act_result:n { #1 #3 } } +\cs_new:Npn \etl_act_output_rest: #1 \s_@@_stop #2#3#4#5 + { + #1 \s_@@_stop {#2} + \@@_act_output_normal:nN \@@_act_output_space:n \@@_act_output_group:nn + } +\cs_new:Npn \etl_act_output_rest_pre: #1 \s_@@_stop #2#3#4#5 + { + #1 \s_@@_stop {#2} + \@@_act_output_normal_pre:nN + \@@_act_output_space_pre:n + \@@_act_output_group_pre:nn + } +\cs_new:Npn \@@_act_output_normal:nN #1#2 #3 \@@_act_result:n #4 + { #3 \@@_act_result:n { #4 #2 } } +\cs_new:Npn \@@_act_output_space:n #1 #2 \@@_act_result:n #3 + { #2 \@@_act_result:n { #3 ~ } } +\cs_new:Npn \@@_act_output_group:nn #1#2 #3 \@@_act_result:n #4 + { #3 \@@_act_result:n { #4 {#2} } } +\cs_new:Npn \@@_act_output_normal_pre:nN #1#2 #3 \@@_act_result:n #4 + { #3 \@@_act_result:n { #2 #4 } } +\cs_new:Npn \@@_act_output_space_pre:n #1 #2 \@@_act_result:n #3 + { #2 \@@_act_result:n { ~ #3 } } +\cs_new:Npn \@@_act_output_group_pre:nn #1#2 #3 \@@_act_result:n #4 + { #3 \@@_act_result:n { {#2} #4 } } +\cs_new:Npn \@@_act_unexpanded_normal:nN #1 { \exp_not:N } +\cs_new:Npn \@@_act_unexpanded_space:n #1 { ~ } +\cs_new:Npn \@@_act_unexpanded_group:nn #1#2 { { \@@_unexpanded:w {#2} } } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}[EXP]{\etl_act_status:n} +% Just switch out the status which is stored immediately after \cs{s_@@_stop}. +% \begin{macrocode} +\cs_new:Npn \etl_act_status:n #1 #2 \s_@@_stop #3 + { #2 \s_@@_stop {#1} } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[EXP]{\etl_act_put_back:n} +% Place the first argument after the next iteration of the loop. This macro +% might strip a set of braces around |#2|, because it could happen that the +% user provided code only leaves one group between this functions argument +% and \cs{@@_act:w}, but that would arguably be wrong input anyway, an easy +% fix would be to use +% \begin{verbatim} +% \cs_new:Npn \etl_act_put_back:n #1 +% { \@@_act_put_back:nw {#1} \prg_do_nothing: } +% \cs_new:Npn \@@_act_put_back:nw #1 #2 \@@_act:w { #2 \@@_act:w #1 } +% \end{verbatim} +% instead of: +% \begin{macrocode} +\cs_new:Npn \etl_act_put_back:n #1 #2 \@@_act:w { #2 \@@_act:w #1 } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[EXP] +% { +% \etl_act_switch:nnn, \etl_act_switch_normal:n, +% \etl_act_switch_space:n, \etl_act_switch_group:n +% } +% Pretty straight forward, just switch out the user provided functions for the +% new argument. +% \begin{macrocode} +\cs_new:Npn \etl_act_switch:nnn #1#2#3 #4 \s_@@_stop #5#6#7#8 + { #4 \s_@@_stop {#5} {#1} {#2} {#3} } +\cs_new:Npn \etl_act_switch_normal:n #1 #2 \s_@@_stop #3#4 + { #2 \s_@@_stop {#3} {#1} } +\cs_new:Npn \etl_act_switch_space:n #1 #2 \s_@@_stop #3#4#5 + { #2 \s_@@_stop {#3} {#4} {#1} } +\cs_new:Npn \etl_act_switch_group:n #1 #2 \s_@@_stop #3#4#5#6 + { #2 \s_@@_stop {#3} {#4} {#5} {#1} } +% \end{macrocode} +% \end{macro} +% \begin{macro}[EXP] +% { +% \etl_act_do_final:, +% \etl_act_break:,\etl_act_break_discard:, +% \etl_act_break:n, \etl_act_break_pre:n, \etl_act_break_post:n +% } +% These are different forms to end the loop. The first will gobble the +% remainder and apply the final action on the token list currently stored for +% output. +% +% The |break| variants will gobble the final action and output what's +% currently there (except for the |discard| variant). +% \begin{macrocode} +\cs_new:Npn \etl_act_do_final: #1 \s_@@_stop #2#3 \@@_act_result:n #4#5 + { #5 {#2} {#4} } +\cs_new:Npn \etl_act_break: #1 \@@_act_result:n #2#3 { \@@_unexpanded:w {#2} } +\cs_new:Npn \etl_act_break_discard: #1 \@@_act_result:n #2#3 {} +\cs_new:Npn \etl_act_break:n #1 #2 \@@_act_result:n #3#4 + { \@@_unexpanded:w {#1} } +\cs_new:Npn \etl_act_break_pre:n #1 #2 \@@_act_result:n #3#4 + { \@@_unexpanded:w { #1 #3 } } +\cs_new:Npn \etl_act_break_post:n #1 #2 \@@_act_result:n #3#4 + { \@@_unexpanded:w { #3 #1 } } +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Expandable tests} +% +% \begin{macro}[pTF]{\etl_token_if_eq:NN} +% We consider two tokens equal when they have the same meaning and the same +% string representation. This isn't always correct. If an active character is +% let to the same character with a different category code those two tokens +% aren't distinguishable by expansion, \emph{afaik}. To get the optimisation +% of \cs{prg_new_conditional:Npnn} we use \cs{if_false:} and turn it true if +% both tests are true (this is easier than coding all four variants by hand, +% even though that could give slightly better performance). The exception +% being the |TF| variant, since that is used in the inner loop of many +% functions. The braces around the arguments of \cs{token_if_eq_meaning:NNT} +% are necessary because of the first step of expansion applied to that +% function. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \etl_token_if_eq:NNTF #1#2 } + { + \token_if_eq_meaning:NNT {#1} {#2} { \str_if_eq:nnT #1#2 \use_ii:nnn } + \use_ii:nn + } +\exp_args:Nno +\use:n { \prg_new_conditional:Npnn \etl_token_if_eq:NN #1#2 { T , F , p } } + { + \token_if_eq_meaning:NNT {#1} {#2} { \str_if_eq:nnT #1#2 \@@_turn_true:w } + \if_false: + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[pTF]{\etl_token_if_in:nN} +% \begin{macro}[EXP]{\@@_token_if_in:NnN} +% Searching for just a single token is rather easy, we just loop over the list +% and compare the |N|-type tokens to the one token provided. If we find a +% match we break and return |true|, else we'll return |false| eventually. +% \begin{macrocode} +\exp_args:Nno +\use:n { \prg_new_conditional:Npnn \etl_token_if_in:nN #1#2 { TF , T , F , p } } + { + \@@_act:nnnnnnn + \@@_token_if_in:NN \use_none:n \use_none:nn + \@@_act_just_result:nn + {#2} + \if_false: + {#1} + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\exp_args:Nno \use:n { \cs_new:Npn \@@_token_if_in:NN #1#2 } + { + \etl_token_if_eq:NNTF {#1} {#2} { \etl_act_break:n \if_true: } {} + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}[pTF]{\etl_token_if_in_deep:nN} +% \begin{macro}[EXP]{\@@_token_if_in_deep:Nn} +% The deep variant just has to recursively call itself on groups to also +% search those. +% \begin{macrocode} +\exp_args:Nno \use:n + { \prg_new_conditional:Npnn \etl_token_if_in_deep:nN #1#2 { TF , T , F , p } } + { + \@@_act:nnnnnnn + \@@_token_if_in:NN \use_none:n \@@_token_if_in_deep:Nn + \@@_act_just_result:nn + {#2} + \if_false: + {#1} + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\exp_args:Nno \use:n { \cs_new:Npn \@@_token_if_in_deep:Nn #1#2 } + { \etl_token_if_in_deep:nNT {#2} {#1} { \etl_act_break:n \if_true: } } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}[pTF]{\etl_if_eq:nn} +% \begin{macro}[EXP]{\@@_if_eq_normal:nN,\@@_if_eq_normal:NnN} +% \begin{macro}[EXP]{\@@_if_eq_space:n} +% \begin{macro}[EXP]{\@@_if_eq_group:nn,\@@_if_eq_group:nnn} +% \begin{macro}[EXP]{\@@_if_eq_final:nn} +% The test needs to compare the full lists on a token-by-token basis. One of +% the two lists is stored inside the status the other is processed. The |act| +% code will then leave either \cs{if_false:} or \cs{if_true:} in the input +% stream. +% \begin{macrocode} +\exp_args:Nno +\use:n { \prg_new_conditional:Npnn \etl_if_eq:nn #1#2 { TF , T , F , p } } + { + \@@_act:nnnnnnn + \@@_if_eq_normal:nN + \@@_if_eq_space:n + \@@_if_eq_group:nn + \@@_if_eq_final:nn + {#2} + {} + {#1} + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +% \end{macrocode} +% To compare the next token we need to check whether the status is already +% empty (which would mean that token list is longer, hence not equal), if it's +% not empty and the head is |N|-type we compare these two (the test here for +% |N|-type fails for empty arguments, hence we have to test this separately). +% If they are equal we store the rest of the second token list in the status +% and go on with the loop, else we break out and return false. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_eq_normal:nN #1#2 } + { + \@@_if_empty:nT {#1} { \etl_act_break:n \if_false: } + \@@_if_head_is_N_type:nTF {#1} + { + \exp_after:wN \@@_if_eq_normal:NnN + \@@_expanded:w { \@@_split_first:w #1 } + #2 + } + { \etl_act_break:n \if_false: } + } +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_eq_normal:NnN #1#2#3 } + { + \etl_token_if_eq:NNTF {#1} {#3} + { \etl_act_status:n {#2} } + { \etl_act_break:n \if_false: } + } +% \end{macrocode} +% Spaces are pretty similar, but easier, we don't need to split of the first +% token in a complicated manner, instead we just gobble a leading space. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_eq_space:n #1 } + { + \@@_if_head_is_space:nTF {#1} + { \exp_after:wN \etl_act_status:n \exp_after:wN { \@@_rm_space:w #1 } } + { \etl_act_break:n \if_false: } + } +% \end{macrocode} +% Groups are similarly handled to normal arguments, but instead of comparing +% only two tokens we have to compare by recursion. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_eq_group:nn #1 } + { + \@@_if_head_is_group:nTF {#1} + { + \exp_after:wN \@@_if_eq_group:nnn + \@@_expanded:w { \@@_split_first:w #1 } + } + { \etl_act_break:n \if_false: } + } +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_eq_group:nnn #1#2#3 } + { + \etl_if_eq:nnTF {#1} {#3} + { \etl_act_status:n {#2} } + { \etl_act_break:n \if_false: } + } +% \end{macrocode} +% Finally, if the loop didn't break until the first token list is empty we +% just have to make sure that the second list is also empty by now. If that's +% the case the two are equal, else not. We need to leave either true or false +% (protected against the \cs{@@_expanded:w} expansion) in the input. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_eq_final:nn #1#2 } + { + \exp_after:wN + \@@_unexpanded:w + \@@_if_empty:nT {#1} { { \if_true: } \use_none:n } { \if_false: } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}[pTF]{\etl_if_in:nn} +% \begin{macro}[EXP] +% {\@@_if_in_normal:nN,\@@_if_in_normal:nnnN,\@@_if_in_normal:NnnnN} +% \begin{macro}[EXP]{\@@_if_in_space:n,\@@_if_in_space:nnn} +% \begin{macro}[EXP] +% {\@@_if_in_group:nn,\@@_if_in_group:nnnn,\@@_if_in_group:nnnnn} +% \begin{macro}[EXP]{\@@_if_in_put_back:n} +% \cs{etl_if_in:nn} has to reevaluate every token but the very first in order +% to compare them, else something like |aab| wouldn't contain |ab| according +% to the test, because the second |a| would've been gobbled. For this we need +% \cs{@@_if_in_put_back:n} which will remove the first token (we need to +% watch out for spaces) and puts the rest back using \cs{etl_act_put_back:n}. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_in_put_back:n #1 } + { + \@@_if_head_is_space:nTF {#1} + { \exp_after:wN \etl_act_put_back:n \exp_after:wN { \@@_rm_space:w #1 } } + { \exp_after:wN \etl_act_put_back:n \exp_after:wN { \use_none:n #1 } } + } +% \end{macrocode} +% As already said, we'll need to reinsert some tokens, and we'll might have to +% revert what was already matched, so inside of the status we store the +% remainder of the pattern which needs to be matched, followed by the entire +% pattern, followed by the tokens which were already matched (and might need +% to be put back). As soon as the pattern is matched the remainder will be +% empty and we'll leave \cs{if_true:} in the input, at the end of the entire +% list we'll leave \cs{if_false:}, which we store in the prefilled output. The +% emptiness of the pattern will be checked before the next token is evaluated, +% so the trailing space after |#1| does no harm but allows the token list to +% end in the pattern. +% +% All of the macros used as arguments to \cs{@@_act:nnnnnnn} will need to +% unbrace the status which will then lead to three arguments. Else this is +% pretty much the same idea as \cs{etl_if_eq:nnTF}. +% \begin{macrocode} +\exp_args:Nno +\use:n { \prg_new_conditional:Npnn \etl_if_in:nn #1#2 { TF , T , F , p } } + { + \@@_act:nnnnnnn + \@@_if_in_normal:nN \@@_if_in_space:n \@@_if_in_group:nn + \@@_act_just_result:nn + { { #2 } { #2 } {} } + \if_false: + { #1 ~ } + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +% \end{macrocode} +% Just like \cs{@@_if_in_group:nn}, \cs{@@_if_in_normal:nN} needs to split off +% the first token of the pattern, for which \cs{@@_split_first:w} is used, +% and \cs{@@_if_in_space:n} needs to trim off a leading space. +% \begin{macrocode} +\cs_new:Npn \@@_if_in_normal:nN #1 { \@@_if_in_normal:nnnN #1 } +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_in_normal:nnnN #1#2#3#4 } + { + \@@_if_empty:nT {#1} { \etl_act_break:n \if_true: } + \@@_if_head_is_N_type:nTF {#1} + { + \exp_after:wN \@@_if_in_normal:NnnnN + \@@_expanded:w { \@@_split_first:w #1 } {#2} {#3} #4 + } + { + \etl_act_status:n { {#2} {#2} {} } + \@@_if_in_put_back:n { #3 #4 } + } + } +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_in_normal:NnnnN #1#2#3#4#5 } + { + \etl_token_if_eq:NNTF {#1} {#5} + { \etl_act_status:n { {#2} {#3} {#4#5} } } + { + \@@_if_in_put_back:n { #4 #5 } + \etl_act_status:n { {#3} {#3} {} } + } + } +\cs_new:Npn \@@_if_in_space:n #1 { \@@_if_in_space:nnn #1 } +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_in_space:nnn #1#2#3 } + { + \@@_if_empty:nT {#1} { \etl_act_break:n \if_true: } + \@@_if_head_is_space:nTF {#1} + { + \exp_after:wN \etl_act_status:n \exp_after:wN + { \exp_after:wN { \@@_rm_space:w #1 } {#2} { #3 ~ } } + } + { + \@@_if_in_put_back:n { #3 ~ } + \etl_act_status:n { {#2} {#2} {} } + } + } +\cs_new:Npn \@@_if_in_group:nn #1 { \@@_if_in_group:nnnn #1 } +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_in_group:nnnn #1 } + { + \@@_if_empty:nT {#1} { \etl_act_break:n \if_true: } + \@@_if_head_is_group:nTF {#1} + { + \exp_after:wN \@@_if_in_group:nnnnn + \@@_expanded:w { \@@_split_first:w #1 } + } + { \@@_if_in_group_false:nnn } + } +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_in_group:nnnnn #1#2#3#4#5 } + { + \etl_if_eq:nnTF {#1} {#5} + { \etl_act_status:n { {#2} {#3} { #4 {#5} } } } + { + \@@_if_in_put_back:n { #4 {#5} } + \etl_act_status:n { {#3} {#3} {} } + } + } +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_in_group_false:nnn #1#2#3 } + { + \@@_if_in_put_back:n { #2 {#3} } + \etl_act_status:n { {#1} {#1} {} } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}[pTF]{\etl_if_in_deep:nn} +% \begin{macro}[EXP] +% { +% \@@_if_in_group_deep:nn, \@@_if_in_group_deep:nnnn, +% \@@_if_in_group_deep:nnnnn, \@@_if_in_group_deep_false:nnn +% } +% In essence this is the same as \cs{etl_if_in:nnTF}, but additionally +% every time a group is encountered we need to search that group by recursion +% as well after directly comparing it to the pattern. +% \begin{macrocode} +\exp_args:Nno +\use:n { \prg_new_conditional:Npnn \etl_if_in_deep:nn #1#2 { TF , T , F , p } } + { + \@@_act:nnnnnnn + \@@_if_in_normal:nN \@@_if_in_space:n \@@_if_in_group_deep:nn + \@@_act_just_result:nn + { { #2 } { #2 } {} } + \if_false: + { #1 ~ } + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\cs_new:Npn \@@_if_in_group_deep:nn #1 { \@@_if_in_group_deep:nnnn #1 } +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_in_group_deep:nnnn #1 } + { + \@@_if_empty:nT {#1} { \etl_act_break:n \if_true: } + \@@_if_head_is_group:nTF {#1} + { + \exp_after:wN \@@_if_in_group_deep:nnnnn + \@@_expanded:w { \@@_split_first:w #1 } + } + { \@@_if_in_group_deep_false:nnn } + } +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_in_group_deep:nnnnn #1#2#3#4#5 } + { + \etl_if_eq:nnTF {#1} {#5} + { \etl_act_status:n { {#2} {#3} { #4 {#5} } } } + { + \etl_if_in_deep:nnT {#5} {#3} { \etl_act_break:n \if_true: } + \@@_if_in_put_back:n { #4 {#5} } + \etl_act_status:n { {#3} {#3} {} } + } + } +\exp_args:Nno \use:n { \cs_new:Npn \@@_if_in_group_deep_false:nnn #1#2#3 } + { + \etl_if_in_deep:nnT {#3} {#1} { \etl_act_break:n \if_true: } + \@@_if_in_put_back:n { #2 {#3} } + \etl_act_status:n { {#1} {#1} {} } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}[EXP]{\etl_token_replace_all:nNn} +% \begin{macro}[EXP]{\@@_token_replace:NnnN} +% Replaceing a single token (and in fact the same is true for all the +% replacement actions in this package) doesn't need reordering and no post +% processing, so we can use in place output using \cs{@@_unexpanded:w}. We +% store the token we want to replace inside the act function, as well as an +% additional argument which will be executed once a replacement was done +% (this is used for the \cs{etl_token_replace_once:nNn} function). +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \etl_token_replace_all:nNn #1#2#3 } + { + \etl_act:nnnnnn + { \@@_token_replace:NnnN #2 {} } + \@@_act_unexpanded_space:n + \@@_act_unexpanded_group:nn + \use_none:nn + {#3} + {#1} + } +\exp_args:Nno \use:n { \cs_new:Npn \@@_token_replace:NnnN #1#2#3#4 } + { + \etl_token_if_eq:NNTF {#1} {#4} + { \@@_unexpanded:w {#3} #2 } + { \@@_unexpanded:w {#4} } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}[EXP]{\etl_token_replace_all_deep:nNn} +% \begin{macro}[EXP]{\@@_token_replace_deep:Nnn} +% Deep replacement is done by recursion. Since the deep variant will not +% execute any additional code we omit such an additional argument for it. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \etl_token_replace_all_deep:nNn #1#2#3 } + { + \etl_act:nnnnnn + { \@@_token_replace:NnnN #2 {} } + \@@_act_unexpanded_space:n + { \@@_token_replace_deep:Nnn #2 } + \use_none:nn + {#3} + {#1} + } +% \end{macrocode} +% Here |{#1}| is used to get correct results from the first step of expansion +% done directly. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \@@_token_replace_deep:Nnn #1#2#3 } + { \exp_after:wN { \etl_token_replace_all_deep:nNn {#3} {#1} {#2} } } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}[EXP]{\etl_token_replace_once:nNn} +% To only handle the first matching token we just let the replacement internal +% exchange the function to directly output any token. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \etl_token_replace_once:nNn #1#2#3 } + { + \etl_act:nnnnnn + { + \@@_token_replace:NnnN #2 + { \etl_act_switch_normal:n \@@_act_unexpanded_normal:nN } + } + \@@_act_unexpanded_space:n + \@@_act_unexpanded_group:nn + \use_none:nn + {#3} + {#1} + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[EXP]{\etl_replace_all:nnn} +% \begin{macro}[EXP] +% { +% \@@_replace_put_back:nnnN, +% \@@_replace_put_back_normal:Nn, \@@_replace_put_back_group:nn +% } +% \begin{macro}[EXP] +% { +% \@@_replace_normal:nN, \@@_replace_normal:nnnnNN, +% \@@_replace_normal:NnnnnNN, \@@_replace_normal_false:nnnNN +% } +% \begin{macro}[EXP] +% { +% \@@_replace_space:n, \@@_replace_space:nnnnN, \@@_replace_space_aux:nnnnN, +% \@@_replace_space_false:nnnN +% } +% \begin{macro}[EXP] +% { +% \@@_replace_group:nn, \@@_replace_group:nnnnNn, \@@_replace_group:nnnnnNn, +% \@@_replace_group_false:nnnNn +% } +% \begin{macro}[EXP]{\@@_replace_final:nn, \@@_replace_final:nnnnNn} +% Replacing an arbitrary number of tokens (which might include braces and +% spaces) is quite a bit harder than a single |N|-type. We place in the status +% the remainder of the pattern, the full pattern, delayed tokens (those +% which matched the pattern), the replacement, and a marker which should tell +% us whether we want to only replace the first match (if so use +% \cs{s_@@_mark}, else any other single token). +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \etl_replace_all:nnn #1#2#3 } + { + \etl_act:nnnnnn + \@@_replace_normal:nN + \@@_replace_space:n + \@@_replace_group:nn + \@@_replace_final:nn + { {#2} {#2} {} {#3} \scan_stop: } + {#1} + } +% \end{macrocode} +% We again need to be able to put back a few tokens, but this time we also +% need to know whether the first token is an |N|-type or group, because we +% can't just gobble the first element but need to output it unchanged. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \@@_replace_put_back:nnnN #1#2#3#4 } + { + \@@_if_head_is_space:nTF {#1} + { + \exp_after:wN \etl_act_put_back:n \exp_after:wN { \@@_rm_space:w #1 } ~ + } + { + \@@_if_head_is_group:nTF {#1} + { \exp_after:wN \@@_replace_put_back_group:nn } + { \exp_after:wN \@@_replace_put_back_normal:Nn } + \@@_expanded:w { \@@_split_first:w #1 } + } + \etl_act_status:n { {#2} {#2} {} {#3} #4 } + } +\cs_new:Npn \@@_replace_put_back_group:nn #1 + { + \@@_unexpanded:w { {#1} } + \etl_act_put_back:n + } +\cs_new:Npn \@@_replace_put_back_normal:Nn #1 + { + \@@_unexpanded:w {#1} + \etl_act_put_back:n + } +\cs_new:Npn \@@_replace_normal:nN #1 { \@@_replace_normal:nnnnNN #1 } +\exp_args:Nno \use:n { \cs_new:Npn \@@_replace_normal:nnnnNN #1 } + { + \@@_if_head_is_N_type:nTF {#1} + { + \exp_after:wN \@@_replace_normal:NnnnnNN + \@@_expanded:w { \@@_split_first:w #1 } + } + { \@@_replace_normal_false:nnnNN } + } +% \end{macrocode} +% Just to keep track of the different arguments here: |#1| is the next token +% in the pattern, |#2| is the remainder of the pattern, |#3| is the full +% pattern stored for reuse, |#4| are the delayed tokens, which might need to +% be put back, |#5| is the replacement text, |#6| is the marker which might +% indicate the |once| function, and |#7| is the next token of the input. +% \begin{macrocode} +\exp_args:Nno +\use:n { \cs_new:Npn \@@_replace_normal:NnnnnNN #1#2#3#4#5#6#7 } + { + \etl_token_if_eq:NNTF {#1} {#7} + { + \@@_if_empty:nTF {#2} + { + \@@_unexpanded:w {#5} + \@@_if_mark:nTF {#6} + { + \etl_act_switch:nnn + \@@_act_unexpanded_normal:nN + \@@_act_unexpanded_space:n + \@@_act_unexpanded_group:nn + \etl_act_status:n { {} {} {} {} #6 } + } + { \etl_act_status:n { {#3} {#3} {} {#5} #6 } } + } + { \etl_act_status:n { {#2} {#3} { #4 #7 } {#5} #6 } } + } + { \@@_replace_put_back:nnnN { #4 #7 } {#3} {#5} #6 } + } +\exp_args:Nno +\use:n { \cs_new:Npn \@@_replace_normal_false:nnnNN #1#2#3#4#5 } + { \@@_replace_put_back:nnnN { #2 #5 } {#1} {#3} {#4} } +\cs_new:Npn \@@_replace_space:n #1 { \@@_replace_space:nnnnN #1 } +\exp_args:Nno \use:n { \cs_new:Npn \@@_replace_space:nnnnN #1 } + { + \@@_if_head_is_space:nTF {#1} + { + \exp_after:wN \@@_replace_space_aux:nnnnN \exp_after:wN + { \@@_rm_space:w #1 } + } + { \@@_replace_space_false:nnnN } + } +% \end{macrocode} +% Again, to keep track, |#1| is the remainder of the pattern, |#2| is the full +% pattern, |#3| the delayed tokens, |#4| the replacement text, |#5| the marker +% for the |once| function. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \@@_replace_space_aux:nnnnN #1#2#3#4#5 } + { + \@@_if_empty:nTF {#1} + { + \@@_unexpanded:w {#4} + \@@_if_mark:nTF {#5} + { + \etl_act_switch:nnn + \@@_act_unexpanded_normal:nN + \@@_act_unexpanded_space:n + \@@_act_unexpanded_group:nn + \etl_act_status:n { {} {} {} {} #5 } + } + { \etl_act_status:n { {#2} {#2} {} {#4} #5 } } + } + { \etl_act_status:n { {#1} {#2} { #3 ~ } {#4} #5 } } + } +\exp_args:Nno \use:n { \cs_new:Npn \@@_replace_space_false:nnnN #1#2#3#4 } + { \@@_replace_put_back:nnnN { #2 ~ } {#1} {#3} {#4} } +\cs_new:Npn \@@_replace_group:nn #1 { \@@_replace_group:nnnnNn #1 } +\exp_args:Nno \use:n { \cs_new:Npn \@@_replace_group:nnnnNn #1 } + { + \@@_if_head_is_group:nTF {#1} + { + \exp_after:wN \@@_replace_group:nnnnnNn + \@@_expanded:w { \@@_split_first:w #1 } + } + { \@@_replace_group_false:nnnNn } + } +% \end{macrocode} +% And again, |#1| the next group of the pattern, |#2| the remainder of the +% pattern, |#3| the full pattern, |#4| the delayed stuff, |#5| the replacement +% text, |#6| the marker for the |once| function, |#7| the next group in the +% input. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \@@_replace_group:nnnnnNn #1#2#3#4#5#6#7 } + { + \etl_if_eq:nnTF {#1} {#7} + { + \@@_if_empty:nTF {#2} + { + \@@_unexpanded:w {#5} + \@@_if_mark:nTF {#6} + { + \etl_act_switch:nnn + \@@_act_unexpanded_normal:nN + \@@_act_unexpanded_space:n + \@@_act_unexpanded_group:nn + \etl_act_status:n { {} {} {} {} #6 } + } + { \etl_act_status:n { {#3} {#3} {} {#5} #6 } } + } + { \etl_act_status:n { {#2} {#3} { #4 {#7} } {#5} #6 } } + } + { \@@_replace_put_back:nnnN { #4 {#7} } {#3} {#5} #6 } + } +\exp_args:Nno \use:n { \cs_new:Npn \@@_replace_group_false:nnnNn #1#2#3#4#5 } + { \@@_replace_put_back:nnnN { #2 {#5} } {#1} {#3} {#4} } +\cs_new:Npn \@@_replace_final:nn #1 { \@@_replace_final:nnnnNn #1 } +\cs_new:Npn \@@_replace_final:nnnnNn #1#2#3#4#5#6 { \@@_unexpanded:w { #6#3 } } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}[EXP]{\etl_replace_all_deep:nnn} +% \begin{macro}[EXP] +% { +% \@@_replace_group_deep:nn, \@@_replace_group_deep:nnnnNn, +% \@@_replace_group_deep:nnnnnNn, \@@_replace_group_deep_false:nnnNn +% } +% The |deep| variant works again pretty much the same as the |all| variant, +% except that it searches groups recursively. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \etl_replace_all_deep:nnn #1#2#3 } + { + \etl_act:nnnnnn + \@@_replace_normal:nN + \@@_replace_space:n + \@@_replace_group_deep:nn + \@@_replace_final:nn + { {#2} {#2} {} {#3} \scan_stop: } + {#1} + } +\cs_new:Npn \@@_replace_group_deep:nn #1 + { \@@_replace_group_deep:nnnnNn #1 } +\exp_args:Nno \use:n { \cs_new:Npn \@@_replace_group_deep:nnnnNn #1 } + { + \@@_if_head_is_group:nTF {#1} + { + \exp_after:wN \@@_replace_group_deep:nnnnnNn + \@@_expanded:w { \@@_split_first:w #1 } + } + { \@@_replace_group_deep_false:nnnNn } + } +\exp_args:Nno +\use:n { \cs_new:Npn \@@_replace_group_deep:nnnnnNn #1#2#3#4#5#6#7 } + { + \etl_if_eq:nnTF {#1} {#7} + { + \@@_if_empty:nTF {#2} + { + \@@_unexpanded:w {#5} + \etl_act_status:n { {#3} {#3} {} {#5} #6 } + } + { \etl_act_status:n { {#2} {#3} { #4 {#7} } {#5} #6 } } + } + { + \@@_if_empty:nTF {#4} + { + { \etl_replace_all_deep:nnn {#7} {#3} {#5} } + \etl_act_status:n { {#3} {#3} {} {#5} #6 } + } + { \@@_replace_put_back:nnnN { #4 {#7} } {#3} {#5} #6 } + } + } +\exp_args:Nno +\use:n { \cs_new:Npn \@@_replace_group_deep_false:nnnNn #1#2#3#4#5 } + { + \@@_if_empty:nTF {#2} + { + { \etl_replace_all_deep:nnn {#5} {#1} {#3} } + \etl_act_status:n { {#1} {#1} {} {#3} #4 } + } + { \@@_replace_put_back:nnnN { #2 {#5} } {#1} {#3} #4 } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}[EXP]{\etl_replace_once:nnn} +% And this is the same as the |all| variant except that we now use the +% \cs{s_@@_mark} marker inside the status. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new:Npn \etl_replace_once:nnn #1#2#3 } + { + \etl_act:nnnnnn + \@@_replace_normal:nN + \@@_replace_space:n + \@@_replace_group:nn + \@@_replace_final:nn + { {#2} {#2} {} {#3} \s_@@_mark } + {#1} + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\etl_new_if_in:Nnn} +% \begin{macro}{\@@_new_if_in:NNnn} +% These tests work essentially in the same way as \cs{tl_if_in:nnTF}, but +% instead they use a predefined internal macro so that no definition at use +% time is necessary. +% \begin{macrocode} +\exp_args:Nno \use:n { \cs_new_protected:Npn \etl_new_if_in:Nnn #1#2 } + { + \exp_args:Nc \@@_new_if_in:NNnn + { @@_user_function ~ \cs_to_str:N #1 ~ \tl_to_str:n {#2} :w } + #1 {#2} + } +\cs_new_protected:Npn \@@_new_if_in:NNnn #1#2#3#4 + { + \scan_stop: + \if_false: { \fi: + \cs_new:Npn #1 ##1 #3 {} + \prg_new_conditional:Npnn #2 ##1 {#4} + { + \if:w + \scan_stop: + \@@_detokenize:w \exp_after:wN { #1 ##1 {}{} #3 } + \scan_stop: + \@@_fi_turn_false:w + \fi: + \if_true: + \prg_return_true: + \else: + \prg_return_false: + \fi: + } + \if_false: } \fi: + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \end{implementation}^^A=<< +% +% \clearpage +% \PrintIndex +% +% \Finale +\endinput +% +^^A vim: ft=tex fdm=marker fmr=>>=,=<< diff --git a/macros/latex/contrib/etl/etl.pdf b/macros/latex/contrib/etl/etl.pdf new file mode 100644 index 0000000000..36590e4a54 Binary files /dev/null and b/macros/latex/contrib/etl/etl.pdf differ diff --git a/macros/latex/contrib/l3experimental/CHANGELOG.md b/macros/latex/contrib/l3experimental/CHANGELOG.md index f9604428a3..4e557273ea 100644 --- a/macros/latex/contrib/l3experimental/CHANGELOG.md +++ b/macros/latex/contrib/l3experimental/CHANGELOG.md @@ -7,6 +7,11 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2021-08-27] + +### Changed +- Track message changes in `l3kernel` + ## [2021-08-04] ### Added @@ -221,7 +226,8 @@ this project uses date-based 'snapshot' version identifiers. - New `l3color` module using `xcolor`-like expression syntax - New `l3draw` module, based on `pgf` layer of the TikZ system -[Unreleased]: https://github.com/latex3/latex3/compare/2021-08-04...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2021-08-27...HEAD +[2021-08-27]: https://github.com/latex3/latex3/compare/2021-08-04...2021-08-27 [2021-08-04]: https://github.com/latex3/latex3/compare/2021-07-12...2021-08-04 [2021-07-12]: https://github.com/latex3/latex3/compare/2021-05-27...2021-07-12 [2021-05-27]: https://github.com/latex3/latex3/compare/2021-02-18...2021-05-27 diff --git a/macros/latex/contrib/l3experimental/README.md b/macros/latex/contrib/l3experimental/README.md index d08213bef5..38eff7cf66 100644 --- a/macros/latex/contrib/l3experimental/README.md +++ b/macros/latex/contrib/l3experimental/README.md @@ -1,7 +1,7 @@ Experimental LaTeX3 Concepts ============================ -Release 2021-08-04 +Release 2021-08-27 Overview -------- diff --git a/macros/latex/contrib/l3experimental/l3benchmark.dtx b/macros/latex/contrib/l3experimental/l3benchmark.dtx index d3c3fce57c..d5ba6349ab 100644 --- a/macros/latex/contrib/l3experimental/l3benchmark.dtx +++ b/macros/latex/contrib/l3experimental/l3benchmark.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -122,7 +122,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3benchmark}{2021-08-04}{} +\ProvidesExplPackage{l3benchmark}{2021-08-27}{} {L3 Experimental benchmarking} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3benchmark.pdf b/macros/latex/contrib/l3experimental/l3benchmark.pdf index e7f7c794fa..157e2cf3a7 100644 Binary files a/macros/latex/contrib/l3experimental/l3benchmark.pdf and b/macros/latex/contrib/l3experimental/l3benchmark.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3bitset.dtx b/macros/latex/contrib/l3experimental/l3bitset.dtx index 4a6fba442e..517cab5815 100644 --- a/macros/latex/contrib/l3experimental/l3bitset.dtx +++ b/macros/latex/contrib/l3experimental/l3bitset.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % \begin{documentation} @@ -264,7 +264,7 @@ %<@@=bitset> % \end{macrocode} % \begin{macrocode} -\ProvidesExplPackage{l3bitset}{2021-08-04}{} +\ProvidesExplPackage{l3bitset}{2021-08-27}{} {L3 Experimental bitset support} % \end{macrocode} % A bitset is a string variable. @@ -401,7 +401,7 @@ % \end{macro} % \end{macro} % \end{macro} -% +% % \begin{macro} % { % \bitset_set_true:Nn, \bitset_set_true:cn, @@ -434,7 +434,7 @@ \prop_gput:cnn { g_@@_ \cs_to_str:N #2 _name_prop } {#3} {#3} } { - \__kernel_msg_warning:nnxx { bitset } { bitset-unknown-name } + \msg_warning:nnxx { bitset } { unknown-name } { \token_to_str:N #2 } { \tl_to_str:n {#3} } } @@ -541,7 +541,7 @@ { \__kernel_chk_defined:NT #2 { - #1 { LaTeX/bitset } { show-bitset } + #1 { bitset } { show } { \token_to_str:N #2 } { \bitset_to_bin:N #2 } { \bitset_to_arabic:N #2 } @@ -552,7 +552,7 @@ { \__kernel_chk_defined:NT #2 { - #1 { LaTeX/bitset } { show-names } + #1 { bitset } { show-names } { \token_to_str:N #2 } { \prop_map_function:cN { g_@@_ \cs_to_str:N #2 _name_prop } \msg_show_item:nn } { } @@ -564,22 +564,23 @@ % % \subsection{Messages} % \begin{macrocode} - \__kernel_msg_new:nnn { bitset } { show-bitset } + \msg_new:nnn { bitset } { show } { The~bitset~#1~has~the~representation: \\ >~binary:~#2 \\ >~arabic:~#3 . } -\__kernel_msg_new:nnn { bitset } { show-names } +\msg_new:nnn { bitset } { show-names } { The~bitset~#1~ \tl_if_empty:nTF {#2} { knows~no~names~yet \\>~ . } { knows~the~name/index~pairs~(without~outer~braces): #2 . } } -\__kernel_msg_new:nnn { bitset } { bitset-unknown-name } +\msg_new:nnn { bitset } { unknown-name } { The~name~'#2'~is~unknown~for~bitset~\tl_to_str:n {#1} } - +\prop_gput:Nnn \g_msg_module_name_prop { bitset } { LaTeX3 } +\prop_gput:Nnn \g_msg_module_type_prop { bitset } { } % \end{macrocode} % \begin{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3bitset.pdf b/macros/latex/contrib/l3experimental/l3bitset.pdf index 6fe6ea444a..9b4fadc6ca 100644 Binary files a/macros/latex/contrib/l3experimental/l3bitset.pdf and b/macros/latex/contrib/l3experimental/l3bitset.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx index fc1b607400..817db2e90f 100644 --- a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-code.pdf b/macros/latex/contrib/l3experimental/l3draw-code.pdf index aabbe3ed24..ac7276ee1e 100644 Binary files a/macros/latex/contrib/l3experimental/l3draw-code.pdf and b/macros/latex/contrib/l3experimental/l3draw-code.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3draw-layers.dtx b/macros/latex/contrib/l3experimental/l3draw-layers.dtx index e31961dab9..bab6d5d014 100644 --- a/macros/latex/contrib/l3experimental/l3draw-layers.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-layers.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-paths.dtx b/macros/latex/contrib/l3experimental/l3draw-paths.dtx index 77fba0c5bb..9f49558bc2 100644 --- a/macros/latex/contrib/l3experimental/l3draw-paths.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-paths.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-points.dtx b/macros/latex/contrib/l3experimental/l3draw-points.dtx index 8672d77a78..2e17871c40 100644 --- a/macros/latex/contrib/l3experimental/l3draw-points.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-points.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx index baa2239e9f..174764e29d 100644 --- a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx index 4674d56aad..c0e748f262 100644 --- a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-state.dtx b/macros/latex/contrib/l3experimental/l3draw-state.dtx index 2637907381..6158be04a3 100644 --- a/macros/latex/contrib/l3experimental/l3draw-state.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-state.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx index a47fd3184d..5c25b61c35 100644 --- a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw.dtx b/macros/latex/contrib/l3experimental/l3draw.dtx index cccade7044..bda53293c7 100644 --- a/macros/latex/contrib/l3experimental/l3draw.dtx +++ b/macros/latex/contrib/l3experimental/l3draw.dtx @@ -110,7 +110,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -1162,7 +1162,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3draw}{2021-08-04}{} +\ProvidesExplPackage{l3draw}{2021-08-27}{} {L3 Experimental core drawing support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3draw.pdf b/macros/latex/contrib/l3experimental/l3draw.pdf index ce3f4c31f8..42e86d08cc 100644 Binary files a/macros/latex/contrib/l3experimental/l3draw.pdf and b/macros/latex/contrib/l3experimental/l3draw.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3galley.dtx b/macros/latex/contrib/l3experimental/l3galley.dtx index d1da19f384..877e39b3da 100644 --- a/macros/latex/contrib/l3experimental/l3galley.dtx +++ b/macros/latex/contrib/l3experimental/l3galley.dtx @@ -61,7 +61,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -686,7 +686,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3galley}{2021-08-04}{} +\ProvidesExplPackage{l3galley}{2021-08-27}{} {L3 Experimental galley code} % \end{macrocode} % @@ -1983,14 +1983,14 @@ { \galley_vspace_set_single:n {#1} } { \dim_compare:nNnT - { \tex_glueexpr:D \g_@@_interpar_vspace_user_tl } + { \tex_glueexpr:D \g_@@_interpar_vspace_user_tl } < { \tex_glueexpr:D (#1) \scan_stop: } { \galley_vspace_set_single:n {#1} } } } % \end{macrocode} % \end{macro} -% +% % % \begin{macro}{\parskip} % For the package, the \cs{parskip} primitive is moved out of the @@ -2126,7 +2126,7 @@ \cs_new_protected:Npn \galley_break_line:Nn #1#2 { \mode_if_vertical:TF - { \__kernel_msg_error:nn { galley } { no-line-to-end } } + { \msg_error:nn { galley } { no-line-to-end } } { \tex_unskip:D \bool_if:NF #1 @@ -2458,7 +2458,7 @@ % \subsection{Messages} % % \begin{macrocode} -\__kernel_msg_new:nnn { galley } { no-line-to-end } +\msg_new:nnn { galley } { no-line-to-end } { There's~no~line~here~to~end. } % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3galley.pdf b/macros/latex/contrib/l3experimental/l3galley.pdf index 3d80c5565d..61a9667c91 100644 Binary files a/macros/latex/contrib/l3experimental/l3galley.pdf and b/macros/latex/contrib/l3experimental/l3galley.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3graphics.dtx b/macros/latex/contrib/l3experimental/l3graphics.dtx index 85cc3f556b..a3691ae327 100644 --- a/macros/latex/contrib/l3experimental/l3graphics.dtx +++ b/macros/latex/contrib/l3experimental/l3graphics.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -125,7 +125,7 @@ % \end{verbatim} % \emph{i.e.}~every use of a bounding box will attempt to restore saved data, % and saving will only take place where that is not possible. -% +% % Note that the \meta{graphic} may not be a simple file name: a multi-page PDF, % for example, will need to have the bounding box cached for each page used. % \end{function} @@ -240,7 +240,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3graphics}{2021-08-04}{} +\ProvidesExplPackage{l3graphics}{2021-08-27}{} {L3 Experimental graphics inclusion support} % \end{macrocode} % @@ -272,7 +272,7 @@ % set up here should match the default for the drivers themselves: in % the absence of any other setting the |cropbox| should be used. % \begin{macrocode} -\tl_new:N \l_graphics_decodearray_tl +\tl_new:N \l_graphics_decodearray_tl \tl_new:N \l_graphics_pagebox_tl \bool_new:N \l_graphics_interpolate_bool \tl_set:Nn \l_graphics_pagebox_tl { cropbox } @@ -286,7 +286,7 @@ % { % \l_graphics_llx_dim , \l_graphics_lly_dim, % \l_graphics_urx_dim , \l_graphics_ury_dim -% } +% } % Storage for the return of bounding box. % \begin{macrocode} \dim_new:N \l_graphics_llx_dim @@ -306,7 +306,7 @@ \cs_new_protected:Npn \graphics_bb_save:n #1 { \dim_if_exist:cTF { c_@@_ #1 _urx_dim } - { \__kernel_msg_error:nnn { graphic } { bb-already-cached } {#1} } + { \msg_error:nnn { graphic } { bb-already-cached } {#1} } { \dim_compare:nNnF \l_graphics_llx_dim = { 0pt } { \dim_const:cn { c_@@_ #1 _llx_dim } { \l_graphics_llx_dim } } @@ -408,7 +408,7 @@ { #1 \exp_not:N \ior_if_eof:NTF \exp_not:N \l_@@_tmp_ior - { \__kernel_msg_error:nnn { graphics } {#2} {#3} } + { \msg_error:nnn { graphics } {#2} {#3} } { \ior_str_map_inline:Nn \exp_not:N \l_@@_tmp_ior { @@ -573,7 +573,7 @@ { \seq_map_break:n { \use_i:nnn \@@_include: } } } \use:n - { \__kernel_msg_error:nnn { graphics } { graphic-not-found } {#1} } + { \msg_error:nnn { graphics } { graphic-not-found } {#1} } } \cs_new_protected:Npn \@@_include: { @@ -594,7 +594,7 @@ \exp_args:Ne \@@_include_auxi:n { \str_foldcase:n {#1} } } - { \__kernel_msg_error:nnn { graphics } { graphic-not-found } {#1} } + { \msg_error:nnn { graphics } { graphic-not-found } {#1} } \group_end: } \cs_new_protected:Npn \@@_include_auxi:n #1 @@ -621,7 +621,7 @@ { \@@_include_auxiv:n } {#1} } - { \__kernel_msg_error:nnn { graphics } { unsupported-graphic-type } {#1} } + { \msg_error:nnn { graphics } { unsupported-graphic-type } {#1} } } \cs_new_protected:Npn \@@_include_auxiii:n #1 { @@ -692,19 +692,19 @@ % \subsection{Messages} % % \begin{macrocode} -\__kernel_msg_new:nnnn { graphics } { graphic-not-found } +\msg_new:nnnn { graphics } { graphic-not-found } { Image~file~'#1'~not~found. } { LaTeX~tried~to~open~graphic~file~'#1', ~but~the~file~could~not~be~read. } -\__kernel_msg_new:nnnn { graphics } { pipe-failed } +\msg_new:nnnn { graphics } { pipe-failed } { Cannot~run~piped~system~commands. } { LaTeX~tried~to~call~a~system~process~but~this~was~not~possible.\\ Try~the~"--shell-escape"~(or~"--enable-pipes")~option. } -\__kernel_msg_new:nnnn { graphics } { unsupported-graphic-type } +\msg_new:nnnn { graphics } { unsupported-graphic-type } { Image~type~'#1'~not~supported~by~current~driver. } { LaTeX~was~asked~to~include~an~graphic~of~type~'#1',~ diff --git a/macros/latex/contrib/l3experimental/l3graphics.pdf b/macros/latex/contrib/l3experimental/l3graphics.pdf index 6f50943ec4..a920bded0a 100644 Binary files a/macros/latex/contrib/l3experimental/l3graphics.pdf and b/macros/latex/contrib/l3experimental/l3graphics.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3opacity.dtx b/macros/latex/contrib/l3experimental/l3opacity.dtx index 8c419c7a4c..e2e518fffe 100644 --- a/macros/latex/contrib/l3experimental/l3opacity.dtx +++ b/macros/latex/contrib/l3experimental/l3opacity.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -97,7 +97,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3opacity}{2021-08-04}{} +\ProvidesExplPackage{l3opacity}{2021-08-27}{} {L3 Experimental opacity support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3opacity.pdf b/macros/latex/contrib/l3experimental/l3opacity.pdf index 74fa174c31..cc30509499 100644 Binary files a/macros/latex/contrib/l3experimental/l3opacity.pdf and b/macros/latex/contrib/l3experimental/l3opacity.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3str-format.dtx b/macros/latex/contrib/l3experimental/l3str-format.dtx index 2f11898e85..5da80c3a74 100644 --- a/macros/latex/contrib/l3experimental/l3str-format.dtx +++ b/macros/latex/contrib/l3experimental/l3str-format.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -166,7 +166,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3str-format}{2021-08-04}{} +\ProvidesExplPackage{l3str-format}{2021-08-27}{} {L3 Experimental string formatting} % \end{macrocode} % @@ -306,7 +306,7 @@ \cs_new:Npn \@@_format_parse_end:nwn #1 #2 \s_@@_stop \s_@@_stop #3 { \tl_if_empty:nF {#2} - { \__kernel_msg_expandable_error:nnn { str } { invalid-format } {#3} } + { \msg_expandable_error:nnn { str } { invalid-format } {#3} } #1 } % \end{macrocode} @@ -466,7 +466,7 @@ { \token_if_eq_charcode:NNTF #2 = { - \__kernel_msg_expandable_error:nnnn + \msg_expandable_error:nnnn { str } { invalid-align-format } {#2} {tl} \@@_format_put:nw { #1 < } } @@ -477,7 +477,7 @@ } \token_if_eq_charcode:NNF #3 ? { - \__kernel_msg_expandable_error:nnnn + \msg_expandable_error:nnnn { str } { invalid-sign-format } {#3} {tl} } \@@_format_put:nw { {#4} } @@ -488,7 +488,7 @@ { \token_if_eq_charcode:NNF #6 ? { - \__kernel_msg_expandable_error:nnnn + \msg_expandable_error:nnnn { str } { invalid-style-format } {#6} {tl} } } @@ -642,7 +642,7 @@ \@@_format_put:nw { {#4} } \tl_if_empty:nF {#5} { - \__kernel_msg_expandable_error:nnnn + \msg_expandable_error:nnnn { str } { invalid-precision-format } {#5} {int} } \str_case:nnF {#6} @@ -654,7 +654,7 @@ { X } { \@@_format_int:NwnnNNn \int_to_Hex:n } } { - \__kernel_msg_expandable_error:nnnn + \msg_expandable_error:nnnn { str } { invalid-style-format } {#6} { int } \@@_format_int:NwnnNNn \use:n } @@ -770,7 +770,7 @@ { ? } { \@@_format_fp:wnnnNNn \@@_format_fp_g:nn } } { - \__kernel_msg_expandable_error:nnnn + \msg_expandable_error:nnnn { str } { invalid-style-format } {#6} { fp } \@@_format_fp:wnnnNNn \@@_format_fp_g:nn } @@ -959,16 +959,18 @@ % All of the messages are produced expandably, so there is no need for % an extra-text. % \begin{macrocode} -\__kernel_msg_new:nnn { str } { invalid-format } +\msg_new:nnn { str } { invalid-format } { Invalid~format~'#1'. } -\__kernel_msg_new:nnn { str } { invalid-align-format } +\msg_new:nnn { str } { invalid-align-format } { Invalid~alignment~'#1'~for~type~'#2'. } -\__kernel_msg_new:nnn { str } { invalid-sign-format } +\msg_new:nnn { str } { invalid-sign-format } { Invalid~sign~'#1'~for~type~'#2'. } -\__kernel_msg_new:nnn { str } { invalid-precision-format } +\msg_new:nnn { str } { invalid-precision-format } { Invalid~precision~'#1'~for~type~'#2'. } -\__kernel_msg_new:nnn { str } { invalid-style-format } +\msg_new:nnn { str } { invalid-style-format } { Invalid~style~'#1'~for~type~'#2'. } +\prop_gput:Nnn \g_msg_module_name_prop { str } { LaTeX3 } +\prop_gput:Nnn \g_msg_module_type_prop { str } { } % \end{macrocode} % % \begin{macrocode} diff --git a/macros/latex/contrib/l3experimental/l3str-format.pdf b/macros/latex/contrib/l3experimental/l3str-format.pdf index 991475502b..07dc9eea04 100644 Binary files a/macros/latex/contrib/l3experimental/l3str-format.pdf and b/macros/latex/contrib/l3experimental/l3str-format.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.dtx b/macros/latex/contrib/l3experimental/l3sys-shell.dtx index c3198c0ee2..3ba357ee7c 100644 --- a/macros/latex/contrib/l3experimental/l3sys-shell.dtx +++ b/macros/latex/contrib/l3experimental/l3sys-shell.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -151,7 +151,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3sys-shell}{2021-08-04}{} +\ProvidesExplPackage{l3sys-shell}{2021-08-27}{} {L3 Experimental system shell functions} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.pdf b/macros/latex/contrib/l3experimental/l3sys-shell.pdf index cc1493963c..41b79767a8 100644 Binary files a/macros/latex/contrib/l3experimental/l3sys-shell.pdf and b/macros/latex/contrib/l3experimental/l3sys-shell.pdf differ diff --git a/macros/latex/contrib/l3experimental/xcoffins.dtx b/macros/latex/contrib/l3experimental/xcoffins.dtx index 3fec592ee4..61a6009c9e 100644 --- a/macros/latex/contrib/l3experimental/xcoffins.dtx +++ b/macros/latex/contrib/l3experimental/xcoffins.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -672,7 +672,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xcoffins}{2021-08-04}{} +\ProvidesExplPackage{xcoffins}{2021-08-27}{} {L3 Experimental design level coffins} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/xcoffins.pdf b/macros/latex/contrib/l3experimental/xcoffins.pdf index f4d7fa4ea6..ae301c7c8b 100644 Binary files a/macros/latex/contrib/l3experimental/xcoffins.pdf and b/macros/latex/contrib/l3experimental/xcoffins.pdf differ diff --git a/macros/latex/contrib/l3experimental/xgalley.dtx b/macros/latex/contrib/l3experimental/xgalley.dtx index bdbe9478a2..64fafabdcb 100644 --- a/macros/latex/contrib/l3experimental/xgalley.dtx +++ b/macros/latex/contrib/l3experimental/xgalley.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -731,7 +731,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xgalley}{2021-08-04}{} +\ProvidesExplPackage{xgalley}{2021-08-27}{} {L3 Experimental galley} \RequirePackage{xtemplate,l3galley} % \end{macrocode} diff --git a/macros/latex/contrib/l3experimental/xgalley.pdf b/macros/latex/contrib/l3experimental/xgalley.pdf index 49a84225b1..2d685ddcca 100644 Binary files a/macros/latex/contrib/l3experimental/xgalley.pdf and b/macros/latex/contrib/l3experimental/xgalley.pdf differ diff --git a/macros/latex/contrib/l3kernel/CHANGELOG.md b/macros/latex/contrib/l3kernel/CHANGELOG.md index 903d491f24..7a2a94c9e1 100644 --- a/macros/latex/contrib/l3kernel/CHANGELOG.md +++ b/macros/latex/contrib/l3kernel/CHANGELOG.md @@ -7,6 +7,12 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2021-08-27] + +### Changed +- Formatting of expandable errors (issue #931) +- Internal code for kernel messages + ## [2021-07-12] ### Fixed @@ -947,7 +953,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/2021-07-12...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2021-08-27...HEAD +[2021-08-27]: https://github.com/latex3/latex3/compare/2021-07-12...2021-08-27 [2021-07-12]: https://github.com/latex3/latex3/compare/2021-06-18...2021-07-12 [2021-06-18]: https://github.com/latex3/latex3/compare/2021-06-01...2021-06-18 [2021-06-01]: https://github.com/latex3/latex3/compare/2021-05-27...2021-06-01 diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md index b674bc603f..ce844e4de6 100644 --- a/macros/latex/contrib/l3kernel/README.md +++ b/macros/latex/contrib/l3kernel/README.md @@ -1,7 +1,7 @@ LaTeX3 Programming Conventions ============================== -Release 2021-07-12 +Release 2021-08-27 Overview -------- diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx index 5bc448a208..18804184d3 100644 --- a/macros/latex/contrib/l3kernel/expl3.dtx +++ b/macros/latex/contrib/l3kernel/expl3.dtx @@ -24,7 +24,7 @@ % %<*driver|generic|package|2ekernel> % -\def\ExplFileDate{2021-07-12}% +\def\ExplFileDate{2021-08-27}% %<*driver> \documentclass[full]{l3doc} \usepackage{graphicx} @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf index 8f944b1fd2..49fa91c3db 100644 Binary files a/macros/latex/contrib/l3kernel/expl3.pdf and b/macros/latex/contrib/l3kernel/expl3.pdf differ diff --git a/macros/latex/contrib/l3kernel/interface3.pdf b/macros/latex/contrib/l3kernel/interface3.pdf index 75613a8cb1..1ecc908212 100644 Binary files a/macros/latex/contrib/l3kernel/interface3.pdf and b/macros/latex/contrib/l3kernel/interface3.pdf differ diff --git a/macros/latex/contrib/l3kernel/interface3.tex b/macros/latex/contrib/l3kernel/interface3.tex index 20d24e0d91..7a23b0ef47 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 2021-07-12} +\date{Released 2021-08-27} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx index 46401b132e..b3da7c9bb3 100644 --- a/macros/latex/contrib/l3kernel/l3basics.dtx +++ b/macros/latex/contrib/l3kernel/l3basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1777,12 +1777,12 @@ % \begin{macrocode} \cs_set_protected:Npn \debug_on:n #1 { - \__kernel_msg_error:nnx { debug } { enable-debug } + \msg_error:nnx { debug } { enable-debug } { \tl_to_str:n { \debug_on:n {#1} } } } \cs_set_protected:Npn \debug_off:n #1 { - \__kernel_msg_error:nnx { debug } { enable-debug } + \msg_error:nnx { debug } { enable-debug } { \tl_to_str:n { \debug_off:n {#1} } } } % \end{macrocode} @@ -1955,7 +1955,7 @@ { \@@_generate_conditional:nnNNNnnn {#1} {#2} #3 #4 #5 } { \tl_count:n {#2} } { - \__kernel_msg_error:nnxx { kernel } { bad-number-of-arguments } + \msg_error:nnxx { kernel } { bad-number-of-arguments } { \token_to_str:c { #1 : #2 } } { \tl_count:n {#2} } \use_none:nn @@ -1993,7 +1993,7 @@ \cs_set_protected:Npn \@@_generate_conditional:nnNNNnnn #1#2#3#4#5#6#7#8 { \if_meaning:w \c_false_bool #3 - \__kernel_msg_error:nnx { kernel } { missing-colon } + \msg_error:nnx { kernel } { missing-colon } { \token_to_str:c {#1} } \exp_after:wN \use_none:nn \fi: @@ -2033,7 +2033,7 @@ \use:c { @@_generate_ #8 _form:wNNnnnnN } \tl_if_empty:nF {#8} { - \__kernel_msg_error:nnxx + \msg_error:nnxx { kernel } { conditional-form-unknown } {#8} { \token_to_str:c { #3 : #4 } } } @@ -2087,7 +2087,7 @@ { #7 \@@_p_true:w \fi: \c_false_bool } } { - \__kernel_msg_error:nnx { kernel } { protected-predicate } + \msg_error:nnx { kernel } { protected-predicate } { \token_to_str:c { #4 _p: #5 } } } } @@ -2178,12 +2178,12 @@ \cs_set_protected:Npn \@@_set_eq_conditional:nnNnnNNw #1#2#3#4#5#6 { \if_meaning:w \c_false_bool #3 - \__kernel_msg_error:nnx { kernel } { missing-colon } + \msg_error:nnx { kernel } { missing-colon } { \token_to_str:c {#1} } \exp_after:wN \@@_use_none_delimit_by_q_recursion_stop:w \fi: \if_meaning:w \c_false_bool #6 - \__kernel_msg_error:nnx { kernel } { missing-colon } + \msg_error:nnx { kernel } { missing-colon } { \token_to_str:c {#4} } \exp_after:wN \@@_use_none_delimit_by_q_recursion_stop:w \fi: @@ -2197,7 +2197,7 @@ \use:c { @@_set_eq_conditional_ #6 _form:wNnnnn } \tl_if_empty:nF {#6} { - \__kernel_msg_error:nnxx + \msg_error:nnxx { kernel } { conditional-form-unknown } {#6} { \token_to_str:c { #1 : #2 } } } @@ -2516,14 +2516,14 @@ % only temporary, they will be redefined later on. % % \begin{macro} -% {\__kernel_msg_error:nnxx, \__kernel_msg_error:nnx, \__kernel_msg_error:nn} +% {\msg_error:nnxx, \msg_error:nnx, \msg_error:nn} % If an internal error occurs before \LaTeX3 has loaded \pkg{l3msg} then % the code should issue a usable if terse error message and halt. This % can only happen if a coding error is made by the team, so this is % a reasonable response. Setting the \tn{newlinechar} is needed, to % turn |^^J| into a proper line break in plain \TeX{}. % \begin{macrocode} -\cs_set_protected:Npn \__kernel_msg_error:nnxx #1#2#3#4 +\cs_set_protected:Npn \msg_error:nnxx #1#2#3#4 { \tex_newlinechar:D = `\^^J \scan_stop: \tex_errmessage:D @@ -2536,10 +2536,10 @@ } \tex_end:D } -\cs_set_protected:Npn \__kernel_msg_error:nnx #1#2#3 - { \__kernel_msg_error:nnxx {#1} {#2} {#3} { } } -\cs_set_protected:Npn \__kernel_msg_error:nn #1#2 - { \__kernel_msg_error:nnxx {#1} {#2} { } { } } +\cs_set_protected:Npn \msg_error:nnx #1#2#3 + { \msg_error:nnxx {#1} {#2} {#3} { } } +\cs_set_protected:Npn \msg_error:nn #1#2 + { \msg_error:nnxx {#1} {#2} { } { } } % \end{macrocode} % \end{macro} % @@ -2576,7 +2576,7 @@ { \cs_if_free:NF #1 { - \__kernel_msg_error:nnxx { kernel } { command-already-defined } + \msg_error:nnxx { kernel } { command-already-defined } { \token_to_str:N #1 } { \token_to_meaning:N #1 } } } @@ -2876,7 +2876,7 @@ { \__kernel_cs_parm_from_arg_count:nnF { \use:nnn #2 #1 } {#3} { - \__kernel_msg_error:nnxx { kernel } { bad-number-of-arguments } + \msg_error:nnxx { kernel } { bad-number-of-arguments } { \token_to_str:N #1 } { \int_eval:n {#3} } \use_none:n } @@ -2957,14 +2957,14 @@ { \tl_map_function:nN {#2} \@@_generate_from_signature:n } \tl_if_empty:oF \@@_tmp:w { - \__kernel_msg_error:nnxxx { kernel } { non-base-function } + \msg_error:nnxxx { kernel } { non-base-function } { \token_to_str:N #5 } {#2} { \@@_tmp:w } } \cs_generate_from_arg_count:NNnn #5 #4 { \tl_count:n {#2} } {#6} } { - \__kernel_msg_error:nnx { kernel } { missing-colon } + \msg_error:nnx { kernel } { missing-colon } { \token_to_str:N #5 } } } @@ -3095,7 +3095,7 @@ \cs_if_exist:NTF #1 {#2} { - \__kernel_msg_error:nnx { kernel } { variable-not-defined } + \msg_error:nnx { kernel } { variable-not-defined } { \token_to_str:N #1 } } } diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx index 8bfa4f1c20..d3fe24dd95 100644 --- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx +++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx index d0142d1aab..8d73f9bb20 100644 --- a/macros/latex/contrib/l3kernel/l3box.dtx +++ b/macros/latex/contrib/l3kernel/l3box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1308,7 +1308,7 @@ \group_end: } { - \__kernel_msg_error:nnx { kernel } { variable-not-defined } + \msg_error:nnx { kernel } { variable-not-defined } { \token_to_str:N #2 } } } @@ -2218,13 +2218,13 @@ \cs_generate_variant:Nn \box_autosize_to_wd_and_ht:Nnn { c } \cs_new_protected:Npn \box_autosize_to_wd_and_ht_plus_dp:Nnn #1#2#3 { - \@@_autosize:NnnnN #1 {#2} {#3} { \box_ht:N #1 + \box_dp:N #1 } + \@@_autosize:NnnnN #1 {#2} {#3} { \box_ht:N #1 + \box_dp:N #1 } \hbox_set:Nn } \cs_generate_variant:Nn \box_autosize_to_wd_and_ht_plus_dp:Nnn { c } \cs_new_protected:Npn \box_gautosize_to_wd_and_ht_plus_dp:Nnn #1#2#3 { - \@@_autosize:NnnnN #1 {#2} {#3} { \box_ht:N #1 + \box_dp:N #1 } + \@@_autosize:NnnnN #1 {#2} {#3} { \box_ht:N #1 + \box_dp:N #1 } \hbox_gset:Nn } \cs_generate_variant:Nn \box_gautosize_to_wd_and_ht_plus_dp:Nnn { c } diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx index 639d7e5a8e..e80d90fabb 100644 --- a/macros/latex/contrib/l3kernel/l3candidates.dtx +++ b/macros/latex/contrib/l3kernel/l3candidates.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1221,12 +1221,12 @@ { #6 { - \__kernel_msg_error:nnxxx { seq } { item-too-large } + \msg_error:nnxxx { seq } { item-too-large } { \token_to_str:N #3 } {#2} {#1} } { \prg_return_false: } } -\__kernel_msg_new:nnnn { seq } { item-too-large } +\msg_new:nnnn { seq } { item-too-large } { Sequence~'#1'~does~not~have~an~item~#3 } { An~attempt~was~made~to~push~or~pop~the~item~at~position~#3~ @@ -1416,18 +1416,18 @@ { \sys_if_shell:TF { \exp_args:No \@@_shell_open:nN { \tl_to_str:n {#2} } #1 } - { \__kernel_msg_error:nn { ior } { pipe-failed } } + { \msg_error:nn { ior } { pipe-failed } } } \cs_new_protected:Npn \@@_shell_open:nN #1#2 { \tl_if_in:nnTF {#1} { " } { - \__kernel_msg_error:nnx + \msg_error:nnx { ior } { quote-in-shell } {#1} } { \__kernel_ior_open:Nn #2 { |#1 } } } -\__kernel_msg_new:nnnn { ior } { pipe-failed } +\msg_new:nnnn { ior } { pipe-failed } { Cannot~run~piped~system~commands. } { LaTeX~tried~to~call~a~system~process~but~this~was~not~possible.\\ diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx index 33b11e5060..6a74319c3f 100644 --- a/macros/latex/contrib/l3kernel/l3cctab.dtx +++ b/macros/latex/contrib/l3kernel/l3cctab.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -542,7 +542,7 @@ { \@@_nesting_number:N \l_@@_internal_a_tl } \@@_select:N \l_@@_internal_a_tl } - { \__kernel_msg_error:nn { cctab } { extra-end } } + { \msg_error:nn { cctab } { extra-end } } } % \end{macrocode} % \end{macro} @@ -622,7 +622,7 @@ } { \cs_if_exist_p:c { @@_group_ #1 _chk: } } { - \__kernel_msg_error:nnx { cctab } { group-mismatch } + \msg_error:nnx { cctab } { group-mismatch } { \int_sign:n { \tex_currentgrouplevel:D - \l_@@_internal_b_tl } @@ -664,7 +664,7 @@ \hook_gput_code:nnn { enddocument/end } { cctab } { \seq_if_empty:NF \g_@@_stack_seq - { \__kernel_msg_error:nn { cctab } { missing-end } } + { \msg_error:nn { cctab } { missing-end } } } } % \end{macrocode} @@ -726,13 +726,13 @@ \@@_chk_if_valid_aux:NTF #1 { \prg_return_true: } { - \__kernel_msg_error:nnx { cctab } { invalid-cctab } + \msg_error:nnx { cctab } { invalid-cctab } { \token_to_str:N #1 } \prg_return_false: } } { - \__kernel_msg_error:nnx { kernel } { command-not-defined } + \msg_error:nnx { kernel } { command-not-defined } { \token_to_str:N #1 } \prg_return_false: } @@ -867,32 +867,32 @@ % \subsection{Messages} % % \begin{macrocode} -\__kernel_msg_new:nnnn { cctab } { stack-full } +\msg_new:nnnn { cctab } { stack-full } { The~category~code~table~stack~is~exhausted. } { LaTeX~has~been~asked~to~switch~to~a~new~category~code~table,~ but~there~is~no~more~space~to~do~this! } -\__kernel_msg_new:nnnn { cctab } { extra-end } +\msg_new:nnnn { cctab } { extra-end } { Extra~\iow_char:N\\cctab_end:~ignored~\msg_line_context:. } { LaTeX~came~across~a~\iow_char:N\\cctab_end:~without~a~matching~ \iow_char:N\\cctab_begin:N.~This~command~will~be~ignored. } -\__kernel_msg_new:nnnn { cctab } { missing-end } +\msg_new:nnnn { cctab } { missing-end } { Missing~\iow_char:N\\cctab_end:~before~end~of~TeX~run. } { LaTeX~came~across~more~\iow_char:N\\cctab_begin:N~than~ \iow_char:N\\cctab_end:. } -\__kernel_msg_new:nnnn { cctab } { invalid-cctab } +\msg_new:nnnn { cctab } { invalid-cctab } { Invalid~\iow_char:N\\catcode~table. } { You~can~only~switch~to~a~\iow_char:N\\catcode~table~that~is~ initialized~using~\iow_char:N\\cctab_new:N~or~ \iow_char:N\\cctab_const:Nn. } -\__kernel_msg_new:nnnn { cctab } { group-mismatch } +\msg_new:nnnn { cctab } { group-mismatch } { \iow_char:N\\cctab_end:~occurred~in~a~ \int_case:nn {#1} @@ -908,6 +908,8 @@ you~tried~to~interleave~them.~LaTeX~will~try~to~proceed,~ but~results~may~be~unexpected. } +\prop_gput:Nnn \g_msg_module_name_prop { cctab } { LaTeX3 } +\prop_gput:Nnn \g_msg_module_type_prop { cctab } { } % \end{macrocode} % % \begin{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx index 84bf84e518..0eb1c4399a 100644 --- a/macros/latex/contrib/l3kernel/l3clist.dtx +++ b/macros/latex/contrib/l3kernel/l3clist.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1954,7 +1954,7 @@ } } { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { kernel } { bad-variable } {#1} } } @@ -2156,9 +2156,9 @@ % |#2| serving as a dummy code to prevent a check performed by this % auxiliary. % \begin{macrocode} -\cs_new_protected:Npn \clist_show:N { \@@_show:NN \__kernel_msg_show:nnxxxx } +\cs_new_protected:Npn \clist_show:N { \@@_show:NN \msg_show:nnxxxx } \cs_generate_variant:Nn \clist_show:N { c } -\cs_new_protected:Npn \clist_log:N { \@@_show:NN \__kernel_msg_log:nnxxxx } +\cs_new_protected:Npn \clist_log:N { \@@_show:NN \msg_log:nnxxxx } \cs_generate_variant:Nn \clist_log:N { c } \cs_new_protected:Npn \@@_show:NN #1#2 { @@ -2173,7 +2173,7 @@ { } { } } { - \__kernel_msg_error:nnxx { kernel } { non-clist } + \msg_error:nnxx { clist } { non-clist } { \token_to_str:N #2 } { \tl_to_str:N #2 } } } @@ -2185,8 +2185,8 @@ % A variant of the above: no existence check, empty first argument for % the message. % \begin{macrocode} -\cs_new_protected:Npn \clist_show:n { \@@_show:Nn \__kernel_msg_show:nnxxxx } -\cs_new_protected:Npn \clist_log:n { \@@_show:Nn \__kernel_msg_log:nnxxxx } +\cs_new_protected:Npn \clist_show:n { \@@_show:Nn \msg_show:nnxxxx } +\cs_new_protected:Npn \clist_log:n { \@@_show:Nn \msg_log:nnxxxx } \cs_new_protected:Npn \@@_show:Nn #1#2 { #1 { clist } { show } diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx index 7be4e07ddb..10803f7f6c 100644 --- a/macros/latex/contrib/l3kernel/l3coffins.dtx +++ b/macros/latex/contrib/l3kernel/l3coffins.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -591,7 +591,7 @@ \coffin_if_exist:NTF #1 { #2 } { - \__kernel_msg_error:nnx { coffin } { unknown } + \msg_error:nnx { coffin } { unknown } { \token_to_str:N #1 } } } @@ -938,7 +938,7 @@ \prop_get:cnNF { coffin ~ \@@_to_value:N #1 ~ poles } {#2} #3 { - \__kernel_msg_error:nnxx { coffin } { unknown-pole } + \msg_error:nnxx { coffin } { unknown-pole } { \exp_not:n {#2} } { \token_to_str:N #1 } \tl_set:Nn #3 { { 0pt } { 0pt } { 0pt } { 0pt } } } @@ -1172,7 +1172,7 @@ \l_@@_pole_a_tl \l_@@_pole_b_tl \bool_if:NT \l_@@_error_bool { - \__kernel_msg_error:nn { coffin } { no-pole-intersection } + \msg_error:nn { coffin } { no-pole-intersection } \dim_zero:N \l_@@_x_dim \dim_zero:N \l_@@_y_dim } @@ -2479,10 +2479,10 @@ % structure then the code complains. % \begin{macrocode} \cs_new_protected:Npn \coffin_show_structure:N - { \@@_show_structure:NN \__kernel_msg_show:nnxxxx } + { \@@_show_structure:NN \msg_show:nnxxxx } \cs_generate_variant:Nn \coffin_show_structure:N { c } \cs_new_protected:Npn \coffin_log_structure:N - { \@@_show_structure:NN \__kernel_msg_log:nnxxxx } + { \@@_show_structure:NN \msg_log:nnxxxx } \cs_generate_variant:Nn \coffin_log_structure:N { c } \cs_new_protected:Npn \@@_show_structure:NN #1#2 { @@ -2514,8 +2514,8 @@ % } % Essentially a combination of \cs{coffin_show_structure:N} and % \cs{box_show:Nnn}, but we need to avoid having two prompts, so we -% use \cs{__kernel_msg_term:nnxxxx} instead of -% \cs{__kernel_msg_show:nnxxxx} in the |show| case. +% use \cs{msg_term:nnxxxx} instead of +% \cs{msg_show:nnxxxx} in the |show| case. % \begin{macrocode} \cs_new_protected:Npn \coffin_show:N #1 { \coffin_show:Nnn #1 \c_max_int \c_max_int } @@ -2524,10 +2524,10 @@ { \coffin_log:Nnn #1 \c_max_int \c_max_int } \cs_generate_variant:Nn \coffin_log:N { c } \cs_new_protected:Npn \coffin_show:Nnn - { \@@_show:NNNnn \__kernel_msg_term:nnxxxx \box_show:Nnn } + { \@@_show:NNNnn \msg_term:nnxxxx \box_show:Nnn } \cs_generate_variant:Nn \coffin_show:Nnn { c } \cs_new_protected:Npn \coffin_log:Nnn - { \@@_show:NNNnn \__kernel_msg_log:nnxxxx \box_show:Nnn } + { \@@_show:NNNnn \msg_log:nnxxxx \box_show:Nnn } \cs_generate_variant:Nn \coffin_log:Nnn { c } \cs_new_protected:Npn \@@_show:NNNnn #1#2#3#4#5 { @@ -2543,23 +2543,23 @@ % \subsection{Messages} % % \begin{macrocode} -\__kernel_msg_new:nnnn { coffin } { no-pole-intersection } +\msg_new:nnnn { coffin } { no-pole-intersection } { No~intersection~between~coffin~poles. } { LaTeX~was~asked~to~find~the~intersection~between~two~poles,~ but~they~do~not~have~a~unique~meeting~point:~ the~value~(0pt,~0pt)~will~be~used. } -\__kernel_msg_new:nnnn { coffin } { unknown } +\msg_new:nnnn { coffin } { unknown } { Unknown~coffin~'#1'. } { The~coffin~'#1'~was~never~defined. } -\__kernel_msg_new:nnnn { coffin } { unknown-pole } +\msg_new:nnnn { coffin } { unknown-pole } { Pole~'#1'~unknown~for~coffin~'#2'. } { LaTeX~was~asked~to~find~a~typesetting~pole~for~a~coffin,~ but~either~the~coffin~does~not~exist~or~the~pole~name~is~wrong. } -\__kernel_msg_new:nnn { coffin } { show } +\msg_new:nnn { coffin } { show } { Size~of~coffin~#1 : #2 \\ Poles~of~coffin~#1 : #3 . diff --git a/macros/latex/contrib/l3kernel/l3color.dtx b/macros/latex/contrib/l3kernel/l3color.dtx index 3a8efd6ea3..81fbb36bc3 100644 --- a/macros/latex/contrib/l3kernel/l3color.dtx +++ b/macros/latex/contrib/l3kernel/l3color.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -780,7 +780,7 @@ { \@@_parse_loop_init:Nnn #1 {#2} {#3} } } { - \__kernel_msg_error:nnn { color } { unknown-color } {#2} + \msg_error:nnn { color } { unknown-color } {#2} \tl_set:Nn \l_@@_current_tl { { gray } { 0 } } } } @@ -862,7 +862,7 @@ } } { - \__kernel_msg_error:nnn { color } { unknown-color } {#2} + \msg_error:nnn { color } { unknown-color } {#2} \@@_extract:nNN { black } \l_@@_model_tl \l_@@_value_tl \@@_parse_break:w } @@ -1276,7 +1276,7 @@ \tl_set:Nx #3 { \use:c { @@_parse_model_ #1 :w } #2 , 0 , 0 , 0 , 0 \s_@@_stop } } - { \__kernel_msg_error:nnn { color } { unknown-model } {#1} } + { \msg_error:nnn { color } { unknown-model } {#1} } } \cs_new_protected:Npn \@@_select_swap:Nnn #1#2#3 { @@ -1463,7 +1463,7 @@ } } { - \__kernel_msg_error:nnn { color } { unknown-color } {#2} + \msg_error:nnn { color } { unknown-color } {#2} } } % \end{macrocode} @@ -1527,7 +1527,7 @@ { \cs_if_exist_use:cF { @@_export_format_ #3 :nnN } { - \__kernel_msg_error:nnn { color } { unknown-export-format } {#3} + \msg_error:nnn { color } { unknown-export-format } {#3} \use_none:nnn } {#1} {#2} #4 @@ -1761,7 +1761,7 @@ { \cs_if_exist:cTF { @@_parse_model_ #1 :w } { - \__kernel_msg_error:nnn { color } { model-already-defined } {#1} + \msg_error:nnn { color } { model-already-defined } {#1} } { \cs_if_exist:cTF { @@_model_ #2 :n } @@ -1770,7 +1770,7 @@ \use:c { @@_model_ #2 :n } {#1} } { - \__kernel_msg_error:nnn { color } { unknown-model-type } {#2} + \msg_error:nnn { color } { unknown-model-type } {#2} } } } @@ -1830,7 +1830,7 @@ \l_@@_internal_tl {#1} } { - \__kernel_msg_error:nnn { color } + \msg_error:nnn { color } { separation-requires-name } {#1} } } @@ -1847,7 +1847,7 @@ \l_@@_internal_tl {#2} {#1} } { - \__kernel_msg_error:nnn { color } + \msg_error:nnn { color } { separation-alternative-model } {#2} } } @@ -1862,12 +1862,12 @@ , 0 , 0 , 0 , 0 \s_@@_stop {#2} {#3} {#1} } { - \__kernel_msg_error:nnn { color } + \msg_error:nnn { color } { separation-alternative-values } {#2} } } { - \__kernel_msg_error:nnn { color } + \msg_error:nnn { color } { unknown-alternative-model } {#1} } } @@ -1966,7 +1966,7 @@ \prop_get:NnNF \l_@@_internal_prop { illuminant } \l_@@_internal_tl { - \__kernel_msg_error:nnn { color } + \msg_error:nnn { color } { CIELAB-requires-illuminant } {#1} \tl_set:Nn \l_@@_internal_tl { d50 } } @@ -1993,7 +1993,7 @@ { 1 } } { - \__kernel_msg_error:nnn { color } + \msg_error:nnn { color } { unknown-CIELAB-illuminant } {#1} } } @@ -2064,7 +2064,7 @@ \l_@@_internal_tl {#1} } { - \__kernel_msg_error:nnn { color } + \msg_error:nnn { color } { DeviceN-requires-names } {#1} } } @@ -2085,7 +2085,7 @@ { \str_if_eq:VVF \l_@@_model_tl \l_@@_internal_tl { - \__kernel_msg_error:nnn { color } + \msg_error:nnn { color } { DeviceN-inconsistent-alternative } {#2} \clist_map_break:n { \use_none:nnnn } @@ -2095,7 +2095,7 @@ { \str_if_eq:nnF {##1} { none } { - \__kernel_msg_error:nnn { color } + \msg_error:nnn { color } { DeviceN-no-alternative } {#2} } @@ -2103,7 +2103,7 @@ } \tl_if_empty:NTF \l_@@_model_tl { - \__kernel_msg_error:nnn { color } + \msg_error:nnn { color } { DeviceN-no-alternative } {#2} } { \exp_args:NV \@@_model_devicen:nnn \l_@@_model_tl {#1} {#2} } @@ -2520,9 +2520,9 @@ % is similar to the keys module here. % \begin{macrocode} \cs_new_protected:Npn \color_show:n - { \@@_show:Nn \__kernel_msg_show:nnxxxx } + { \@@_show:Nn \msg_show:nnxxxx } \cs_new_protected:Npn \color_log:n - { \@@_show:Nn \__kernel_msg_log:nnxxxx } + { \@@_show:Nn \msg_log:nnxxxx } \cs_new_protected:Npn \@@_show:Nn #1#2 { #1 { color } { show } @@ -2550,7 +2550,7 @@ % \subsection{Messages} % % \begin{macrocode} -\__kernel_msg_new:nnnn { color } { CIELAB-requires-illuminant } +\msg_new:nnnn { color } { CIELAB-requires-illuminant } { CIELAB~color~space~'#1'~require~an~illuminant. } { LaTeX~has~been~asked~to~create~a~separation~color~space~using~ @@ -2560,26 +2560,26 @@ key~was~given~with~the~correct~information.~LaTeX~will~use~illuminant~ 'd50'~for~recovery. } -\__kernel_msg_new:nnnn { color } { conversion-not-available } +\msg_new:nnnn { color } { conversion-not-available } { No~model~conversion~available~from~'#1'~to~'#2'. } { LaTeX~has~been~asked~to~convert~a~color~from~model~'#1'~ to~model'#2',~but~there~is~no~method~available~to~do~that. } -\__kernel_msg_new:nnnn { color } { DeviceN-inconsistent-alternative } +\msg_new:nnnn { color } { DeviceN-inconsistent-alternative } { DeviceN~color~spaces~require~a~single~alternative~space. } { LaTeX~has~been~asked~to~create~a~DeviceN~color~space~'#1',~ but~the~constituent~colors~do~not~have~a~common~alternative~ color. } -\__kernel_msg_new:nnnn { color } { DeviceN-no-alternative } +\msg_new:nnnn { color } { DeviceN-no-alternative } { DeviceN~color~spaces~require~an~alternative~space. } { LaTeX~has~been~asked~to~create~a~DeviceN~color~space~'#1',~ but~the~constituent~colors~do~not~all~have~a~device-based~alternative. } -\__kernel_msg_new:nnnn { color } { DeviceN-requires-names } +\msg_new:nnnn { color } { DeviceN-requires-names } { DeviceN~color~space~'#1'~require~a~list~of~names. } { LaTeX~has~been~asked~to~create~a~DeviceN~color~space,~ @@ -2588,13 +2588,13 @@ \\ \\ key~was~given~with~the~correct~information. } -\__kernel_msg_new:nnnn { color } { model-already-defined } +\msg_new:nnnn { color } { model-already-defined } { Color~model~'#1'~already~defined. } { LaTeX~was~asked~to~define~a~new~color~model~called~'#1',~but~ this~color~model~already~exists. } -\__kernel_msg_new:nnnn { color } { separation-alternative-model } +\msg_new:nnnn { color } { separation-alternative-model } { Separation~color~space~'#1'~require~an~alternative~model. } { LaTeX~has~been~asked~to~create~a~separation~color~space,~ @@ -2603,7 +2603,7 @@ \\ \\ key~was~given~with~the~correct~information. } -\__kernel_msg_new:nnnn { color } { separation-alternative-values } +\msg_new:nnnn { color } { separation-alternative-values } { Separation~color~space~'#1'~require~values~for~the~alternative~space. } { LaTeX~has~been~asked~to~create~a~separation~color~space,~ @@ -2612,7 +2612,7 @@ \\ \\ key~was~given~with~the~correct~information. } -\__kernel_msg_new:nnnn { color } { separation-requires-name } +\msg_new:nnnn { color } { separation-requires-name } { Separation~color~space~'#1'~require~a~formal~name. } { LaTeX~has~been~asked~to~create~a~separation~color~space,~ @@ -2621,13 +2621,13 @@ \\ \\ key~was~given~with~the~correct~information. } -\__kernel_msg_new:nnnn { color } { unknown-color } +\msg_new:nnnn { color } { unknown-color } { Unknown~color~'#1'. } { LaTeX~has~been~asked~to~use~a~color~named~'#1',~ but~this~has~never~been~defined. } -\__kernel_msg_new:nnnn { color } { unknown-alternative-model } +\msg_new:nnnn { color } { unknown-alternative-model } { Separation~color~space~'#1'~require~an~valid~alternative~space. } { LaTeX~has~been~asked~to~create~a~separation~color~space,~ @@ -2636,34 +2636,36 @@ \\ \\ is~unknown. } -\__kernel_msg_new:nnnn { color } { unknown-export-format } +\msg_new:nnnn { color } { unknown-export-format } { Unknown~export~format~'#1'. } { LaTeX~has~been~asked~to~export~a~color~in~format~'#1',~ but~this~has~never~been~defined. } -\__kernel_msg_new:nnnn { color } { unknown-CIELAB-illuminant } +\msg_new:nnnn { color } { unknown-CIELAB-illuminant } { Unknown~illuminant~model~'#1'. } { LaTeX~has~been~asked~to~use~create~a~color~space~using~CIELAB~ illuminant~'#1',~but~this~does~not~exist. } -\__kernel_msg_new:nnnn { color } { unknown-model } +\msg_new:nnnn { color } { unknown-model } { Unknown~color~model~'#1'. } { LaTeX~has~been~asked~to~use~a~color~model~called~'#1',~ but~this~model~is~not~set~up. } -\__kernel_msg_new:nnnn { color } { unknown-model-type } +\msg_new:nnnn { color } { unknown-model-type } { Unknown~color~model~type~'#1'. } { LaTeX~has~been~asked~to~create~a~new~color~model~called~'#1',~ but~this~type~of~model~was~never~set~up. } +\prop_gput:Nnn \g_msg_module_name_prop { color } { LaTeX3 } +\prop_gput:Nnn \g_msg_module_type_prop { color } { } % \end{macrocode} % % \begin{macrocode} -\__kernel_msg_new:nnn { color } { show } +\msg_new:nnn { color } { show } { The~color~#1~ \tl_if_empty:nTF {#2} diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx index d654974767..5b91c7cd3d 100644 --- a/macros/latex/contrib/l3kernel/l3debug.dtx +++ b/macros/latex/contrib/l3kernel/l3debug.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -169,7 +169,7 @@ \exp_args:No \clist_map_inline:nn { \tl_to_str:n {#1} } { \cs_if_exist_use:cF { @@_ ##1 _on: } - { \__kernel_msg_error:nnn { debug } { debug } {##1} } + { \msg_error:nnn { debug } { debug } {##1} } } } \cs_set_protected:Npn \debug_off:n #1 @@ -177,7 +177,7 @@ \exp_args:No \clist_map_inline:nn { \tl_to_str:n {#1} } { \cs_if_exist_use:cF { @@_ ##1 _off: } - { \__kernel_msg_error:nnn { debug } { debug } {##1} } + { \msg_error:nnn { debug } { debug } {##1} } } } \cs_new_protected:Npn \@@_all_on: @@ -269,7 +269,7 @@ \@@_suspended:T \use_none:nnn \cs_if_exist:NF ##1 { - \__kernel_msg_error:nnx { debug } { non-declared-variable } + \msg_error:nnx { debug } { non-declared-variable } { \token_to_str:N ##1 } } } @@ -278,7 +278,7 @@ \@@_suspended:T \use_none:nnn \cs_if_exist:NF ##1 { - \__kernel_msg_error:nnx { kernel } { command-not-defined } + \msg_error:nnx { kernel } { command-not-defined } { \token_to_str:N ##1 } } } @@ -287,7 +287,7 @@ \@@_suspended:T \use_none:nnn \flag_if_exist:nF {##1} { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { kernel } { bad-variable } { flag~##1~ } } } @@ -362,7 +362,7 @@ \if:w #1 \scan_stop: \cs_gset_nopar:Npn #1 {#2} \else: - \__kernel_msg_error:nnxxx { debug } { local-global } + \msg_error:nnxxx { debug } { local-global } {#1} {#2} { \iow_char:N \\ #3 } \fi: \fi: @@ -436,7 +436,7 @@ \int_value:w #3 #2 #1 \scan_stop: } { - \__kernel_msg_expandable_error:nnnn + \msg_expandable_error:nnnn { debug } { expr } {#4} {#1} } #1 @@ -561,12 +561,12 @@ { \if:w n #1 \prg_return_true: \else: \if:w N #1 \prg_return_false: \else: - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { debug } { bad-arg-type } {#1} \fi: \fi: } -\__kernel_msg_new:nnn { debug } { bad-arg-type } +\msg_new:nnn { debug } { bad-arg-type } { Wrong~argument~type~#1. } % \end{macrocode} % The macro below gets the base form of an @@ -1434,7 +1434,7 @@ % % Messages. % \begin{macrocode} -\__kernel_msg_new:nnnn { debug } { debug } +\msg_new:nnnn { debug } { debug } { The~debugging~option~'#1'~does~not~exist~\msg_line_context:. } { The~functions~'\iow_char:N\\debug_on:n'~and~ @@ -1442,8 +1442,8 @@ 'all',~'check-declarations',~'check-expressions',~ 'deprecation',~'log-functions',~not~'#1'. } -\__kernel_msg_new:nnn { debug } { expr } { '#2'~in~#1 } -\__kernel_msg_new:nnnn { debug } { local-global } +\msg_new:nnn { debug } { expr } { '#2'~in~#1 } +\msg_new:nnnn { debug } { local-global } { Inconsistent~local/global~assignment } { \c_@@_coding_error_text_tl @@ -1460,7 +1460,7 @@ \ % variable~'#3'. } -\__kernel_msg_new:nnnn { debug } { non-declared-variable } +\msg_new:nnnn { debug } { non-declared-variable } { The~variable~#1~has~not~been~declared~\msg_line_context:. } { \c_@@_coding_error_text_tl diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx index 276c4d08fd..c9dd5647b6 100644 --- a/macros/latex/contrib/l3kernel/l3deprecation.dtx +++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -285,7 +285,7 @@ { \__kernel_if_debug:TF { - \exp_not:N \__kernel_msg_warning:nnxxx + \exp_not:N \msg_warning:nnxxx { deprecation } { deprecated-command } {#1} { \token_to_str:N #3 } @@ -330,8 +330,8 @@ \exp_not:N #4 { \cs_if_eq:NNTF #3 \cs_gset_protected:Npn - { \exp_not:N \__kernel_msg_error:nnnnnn } - { \exp_not:N \__kernel_msg_expandable_error:nnnnnn } + { \exp_not:N \msg_error:nnnnnn } + { \exp_not:N \msg_expandable_error:nnnnnn } { deprecation } { deprecated-command } {#1} { \token_to_str:N #4 } @@ -352,10 +352,10 @@ { \tex_protected:D \tex_outer:D \tex_edef:D #1 { - \exp_not:N \__kernel_msg_expandable_error:nnnnn + \exp_not:N \msg_expandable_error:nnnnn { deprecation } { deprecated-command } { \tl_to_str:n {#3} } { \token_to_str:N #1 } { \tl_to_str:n {#2} } - \exp_not:N \__kernel_msg_error:nnxxx + \exp_not:N \msg_error:nnxxx { deprecation } { deprecated-command } { \tl_to_str:n {#3} } { \token_to_str:N #1 } { \tl_to_str:n {#2} } } @@ -364,7 +364,7 @@ % \end{macro} % % \begin{macrocode} -\__kernel_msg_new:nnn { deprecation } { deprecated-command } +\msg_new:nnn { deprecation } { deprecated-command } { \tl_if_blank:nF {#3} { Use~ \tl_trim_spaces:n {#3} ~not~ } #2~deprecated~on~#1. diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx index 5f98e21825..7ba8dfdfe1 100644 --- a/macros/latex/contrib/l3kernel/l3doc.dtx +++ b/macros/latex/contrib/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 2021-07-12} +% \date{Released 2021-08-27} % \maketitle % \tableofcontents % diff --git a/macros/latex/contrib/l3kernel/l3docstrip.dtx b/macros/latex/contrib/l3kernel/l3docstrip.dtx index 39aa374428..562794727d 100644 --- a/macros/latex/contrib/l3kernel/l3docstrip.dtx +++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf index e1d85cc04d..32db07a464 100644 Binary files a/macros/latex/contrib/l3kernel/l3docstrip.pdf and b/macros/latex/contrib/l3kernel/l3docstrip.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3expan.dtx b/macros/latex/contrib/l3kernel/l3expan.dtx index ab9c7df678..e03398cf75 100644 --- a/macros/latex/contrib/l3kernel/l3expan.dtx +++ b/macros/latex/contrib/l3kernel/l3expan.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1205,7 +1205,7 @@ { \fi: \fi: - \__kernel_msg_expandable_error:nnn { kernel } { bad-variable } {#2} + \msg_expandable_error:nnn { kernel } { bad-variable } {#2} \exp_end: } % \end{macrocode} @@ -1686,7 +1686,7 @@ \if_cs_exist:N ^^@ \else: \cs_new:Npn ^^@ - { \__kernel_msg_expandable_error:nn { kernel } { bad-exp-end-f } } + { \msg_expandable_error:nn { kernel } { bad-exp-end-f } } \fi: % \end{macrocode} % The same but grabbing an argument to remove spaces and braces. @@ -1848,7 +1848,7 @@ \tl_if_head_is_N_type:nTF {#2} { \@@_e_primitive_aux:NNw #1 } { - \__kernel_msg_expandable_error:nnn { kernel } { e-type } + \msg_expandable_error:nnn { kernel } { e-type } { Missing~primitive~name } \@@_e_primitive_aux:NNw #1 \c_empty_tl } @@ -1950,7 +1950,7 @@ { \tl_if_empty:nTF {#1} { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { kernel } { e-type } { \unexpanded missing~brace } \@@_e_end:nn @@ -1974,7 +1974,7 @@ \token_if_eq_meaning:NNTF #2 \scan_stop: { \exp_stop_f: } { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { kernel } { e-type } { \unexpanded missing~brace } { } @@ -2301,7 +2301,7 @@ \cs_new_protected:Npn \@@_generate_variant:nnNN #1#2#3#4 { \if_meaning:w \c_false_bool #3 - \__kernel_msg_error:nnx { kernel } { missing-colon } + \msg_error:nnx { kernel } { missing-colon } { \token_to_str:c {#1} } \exp_after:wN \@@_use_none_delimit_by_q_recursion_stop:w \fi: @@ -2504,7 +2504,7 @@ \exp_not:n { \s_@@_mark - \__kernel_msg_error:nnxx { kernel } { variant-too-long } + \msg_error:nnxx { kernel } { variant-too-long } {#5} { \token_to_str:N #3 } \use_none:nnn \s_@@_stop @@ -2519,7 +2519,7 @@ \exp_not:n { \s_@@_mark - \__kernel_msg_error:nnxxxx { kernel } { invalid-variant } + \msg_error:nnxxxx { kernel } { invalid-variant } {#7} { \token_to_str:N #5 } {#1} {#2} \use_none:nnn \s_@@_stop @@ -2533,7 +2533,7 @@ #3 \s_@@_stop #4 #5 {#6} {#7} \exp_not:n { - \__kernel_msg_error:nnxxxx + \msg_error:nnxxxx { kernel } { deprecated-variant } {#7} { \token_to_str:N #5 } {#1} {#2} } @@ -2757,7 +2757,7 @@ \cs_new_protected:Npn \@@_generate_variant:nnNnn #1#2#3#4#5 { \if_meaning:w \c_false_bool #3 - \__kernel_msg_error:nnx { kernel } { missing-colon } + \msg_error:nnx { kernel } { missing-colon } { \token_to_str:c {#1} } \@@_use_i_delimit_by_s_stop:nw \fi: @@ -2777,7 +2777,7 @@ \cs_if_exist_use:cTF { @@_generate_variant_#1_form:nnn } { {#3} {#4} {#5} } { - \__kernel_msg_error:nnxx + \msg_error:nnxx { kernel } { conditional-form-unknown } {#1} { \token_to_str:c { #3 : #4 } } } @@ -2810,7 +2810,7 @@ { \str_if_in:nnF { NnpcofeVvx } {####1} { - \__kernel_msg_error:nnnn { kernel } { invalid-exp-args } + \msg_error:nnnn { kernel } { invalid-exp-args } {####1} {##1} \str_map_break:n { \use_none:nn } } diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx index 2b85b49dfa..ee7cc4e2a9 100644 --- a/macros/latex/contrib/l3kernel/l3file.dtx +++ b/macros/latex/contrib/l3kernel/l3file.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1166,8 +1166,8 @@ % \texttt{show-streams} takes care of translating |ior|/|iow| to % English. % \begin{macrocode} -\cs_new_protected:Npn \ior_show_list: { \@@_list:N \__kernel_msg_show:nnxxxx } -\cs_new_protected:Npn \ior_log_list: { \@@_list:N \__kernel_msg_log:nnxxxx } +\cs_new_protected:Npn \ior_show_list: { \@@_list:N \msg_show:nnxxxx } +\cs_new_protected:Npn \ior_log_list: { \@@_list:N \msg_log:nnxxxx } \cs_new_protected:Npn \@@_list:N #1 { #1 { kernel } { show-streams } @@ -1592,8 +1592,8 @@ % \begin{macro}{\@@_list:N} % Done as for input, but with a copy of the auxiliary so the name is correct. % \begin{macrocode} -\cs_new_protected:Npn \iow_show_list: { \@@_list:N \__kernel_msg_show:nnxxxx } -\cs_new_protected:Npn \iow_log_list: { \@@_list:N \__kernel_msg_log:nnxxxx } +\cs_new_protected:Npn \iow_show_list: { \@@_list:N \msg_show:nnxxxx } +\cs_new_protected:Npn \iow_log_list: { \@@_list:N \msg_log:nnxxxx } \cs_new_protected:Npn \@@_list:N #1 { #1 { kernel } { show-streams } @@ -1845,13 +1845,13 @@ % \begin{macrocode} \cs_new_protected:Npn \iow_allow_break: { - \__kernel_msg_error:nnnn { kernel } { iow-indent } + \msg_error:nnnn { kernel } { iow-indent } { \iow_wrap:nnnN } { \iow_allow_break: } } \cs_new:Npx \@@_allow_break: { \c_@@_wrap_allow_break_marker_tl } \cs_new:Npn \@@_allow_break_error: { - \__kernel_msg_expandable_error:nnnn { kernel } { iow-indent } + \msg_expandable_error:nnnn { kernel } { iow-indent } { \iow_wrap:nnnN } { \iow_allow_break: } } % \end{macrocode} @@ -1872,7 +1872,7 @@ % \begin{macrocode} \cs_new_protected:Npn \iow_indent:n #1 { - \__kernel_msg_error:nnnnn { kernel } { iow-indent } + \msg_error:nnnnn { kernel } { iow-indent } { \iow_wrap:nnnN } { \iow_indent:n } {#1} #1 } @@ -1884,7 +1884,7 @@ } \cs_new:Npn \@@_indent_error:n #1 { - \__kernel_msg_expandable_error:nnnnn { kernel } { iow-indent } + \msg_expandable_error:nnnnn { kernel } { iow-indent } { \iow_wrap:nnnN } { \iow_indent:n } {#1} #1 } @@ -2570,7 +2570,7 @@ % \begin{macrocode} \cs_new:Npn \@@_name_expand_end: { - \__kernel_msg_expandable_error:nn + \msg_expandable_error:nn { kernel } { filename-missing-endcsname } \cs_end: \@@_name_expand_end: } @@ -2584,7 +2584,7 @@ \cs_new:Npn \@@_name_expand_error_aux:Nw #1 #2 \cs_end: #3 \@@_name_expand_end: { - \__kernel_msg_expandable_error:nnff + \msg_expandable_error:nnff { kernel } { filename-chars-lost } { \token_to_str:N #1 } { \exp_stop_f: #2 } } @@ -2611,7 +2611,7 @@ \fi: \int_if_odd:nT {#2} { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { kernel } { unbalanced-quote-in-filename } {#3} } } @@ -2843,12 +2843,12 @@ { \cs_gset:Npn \file_full_name:n #1 { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { kernel } { primitive-not-available } { \(pdf)filesize } } } -\__kernel_msg_new:nnnn { kernel } { primitive-not-available } +\msg_new:nnnn { kernel } { primitive-not-available } { Primitive~\token_to_str:N #1 not~available } { The~version~of~your~TeX~engine~does~not~provide~functionality~equivalent~to~ @@ -3113,7 +3113,7 @@ \cs_set_protected:Npn \@@_get_details:nnN #1#2#3 { \tl_clear:N #3 - \__kernel_msg_error:nnx + \msg_error:nnx { kernel } { primitive-not-available } { \token_to_str:N \(pdf)file @@ -3212,7 +3212,7 @@ \prg_set_conditional:Npnn \file_compare_timestamp:nNn #1#2#3 { p , T , F , TF } { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { kernel } { primitive-not-available } { \(pdf)filemoddate } \prg_return_false: @@ -3269,7 +3269,7 @@ % \begin{macrocode} \cs_new_protected:Npn \__kernel_file_missing:n #1 { - \__kernel_msg_error:nnx { kernel } { file-not-found } + \msg_error:nnx { kernel } { file-not-found } { \__kernel_file_name_sanitize:n {#1} } } % \end{macrocode} @@ -3458,8 +3458,8 @@ % \cs{AtBeginDocument} into \cs{g_@@_record_seq}), turning it to a % string (this does not affect the commas of this comma list). % \begin{macrocode} -\cs_new_protected:Npn \file_show_list: { \@@_list:N \__kernel_msg_show:nnxxxx } -\cs_new_protected:Npn \file_log_list: { \@@_list:N \__kernel_msg_log:nnxxxx } +\cs_new_protected:Npn \file_show_list: { \@@_list:N \msg_show:nnxxxx } +\cs_new_protected:Npn \file_log_list: { \@@_list:N \msg_log:nnxxxx } \cs_new_protected:Npn \@@_list:N #1 { \seq_clear:N \l_@@_tmp_seq @@ -3635,7 +3635,7 @@ \ior_map_inline:Nn \g_@@_internal_ior { \seq_put_right:Nn \l_@@_tmp_seq {##1} } \ior_close:N \g_@@_internal_ior - \__kernel_msg_error:nnnn { kernel } { mismatched-support-file } + \msg_error:nnnn { kernel } { mismatched-support-file } {#1} {#2} % \end{macrocode} % And finish by ending the current file. @@ -3646,7 +3646,7 @@ % % Now define the actual error message: % \begin{macrocode} -\__kernel_msg_new:nnnn { kernel } { mismatched-support-file } +\msg_new:nnnn { kernel } { mismatched-support-file } { Mismatched~LaTeX~support~files~detected. \\ Loading~'#2'~aborted! @@ -3700,38 +3700,38 @@ % \subsection{Messages} % % \begin{macrocode} -\__kernel_msg_new:nnnn { kernel } { file-not-found } +\msg_new:nnnn { kernel } { file-not-found } { File~'#1'~not~found. } { The~requested~file~could~not~be~found~in~the~current~directory,~ in~the~TeX~search~path~or~in~the~LaTeX~search~path. } -\__kernel_msg_new:nnn { kernel } { file-list } +\msg_new:nnn { kernel } { file-list } { >~File~List~< #1 \\ ............. } -\__kernel_msg_new:nnnn { kernel } { filename-chars-lost } +\msg_new:nnnn { kernel } { filename-chars-lost } { #1~invalid~in~file~name.~Lost:~#2. } { There~was~an~invalid~token~in~the~file~name~that~caused~ the~characters~following~it~to~be~lost. } -\__kernel_msg_new:nnnn { kernel } { filename-missing-endcsname } +\msg_new:nnnn { kernel } { filename-missing-endcsname } { Missing~\iow_char:N\\endcsname~inserted~in~filename. } { The~file~name~had~more~\iow_char:N\\csname~commands~than~ \iow_char:N\\endcsname~ones.~LaTeX~will~add~the~missing~ \iow_char:N\\endcsname~and~try~to~continue~as~best~as~it~can. } -\__kernel_msg_new:nnnn { kernel } { unbalanced-quote-in-filename } +\msg_new:nnnn { kernel } { unbalanced-quote-in-filename } { Unbalanced~quotes~in~file~name~'#1'. } { File~names~must~contain~balanced~numbers~of~quotes~("). } -\__kernel_msg_new:nnnn { kernel } { iow-indent } - { Only~#1 (arg~1)~allows~#2 } +\msg_new:nnnn { kernel } { iow-indent } + { Only~#1 allows~#2 } { The~command~#2 can~only~be~used~in~messages~ which~will~be~wrapped~using~#1. diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx index bcf1c5f645..f7b5705858 100644 --- a/macros/latex/contrib/l3kernel/l3flag.dtx +++ b/macros/latex/contrib/l3kernel/l3flag.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx index 59007556d5..27a6f2d8af 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 2021-07-12} +% \date{Released 2021-08-27} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx index 679036fa86..3bba643681 100644 --- a/macros/latex/contrib/l3kernel/l3fp-aux.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-aux.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -226,7 +226,7 @@ % stream and its contents reach \TeX{}'s stomach. % \begin{macrocode} \cs_new_protected:Npn \@@_misused:n #1 - { \__kernel_msg_error:nnx { fp } { misused } { \fp_to_tl:n {#1} } } + { \msg_error:nnx { fp } { misused } { \fp_to_tl:n {#1} } } % \end{macrocode} % \end{macro} % @@ -1267,7 +1267,7 @@ % % Using a floating point directly is an error. % \begin{macrocode} -\__kernel_msg_new:nnnn { fp } { misused } +\msg_new:nnnn { fp } { misused } { A~floating~point~with~value~'#1'~was~misused. } { To~obtain~the~value~of~a~floating~point~variable,~use~ @@ -1275,6 +1275,8 @@ '\token_to_str:N \fp_to_tl:N',~or~other~ conversion~functions. } +\prop_gput:Nnn \g_msg_module_name_prop { fp } { LaTeX3 } +\prop_gput:Nnn \g_msg_module_type_prop { fp } { } % \end{macrocode} % % \begin{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx index 35d2d50039..5c6b8333b4 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 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx index 64290bb1b2..bf1dbb092d 100644 --- a/macros/latex/contrib/l3kernel/l3fp-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-convert.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx index 850bde051d..3a7b5737aa 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 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx index ff64954a67..6a1780b67d 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 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx index 5e79cff9e9..8a86bee4fa 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 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -438,7 +438,7 @@ { \token_if_eq_meaning:NNTF #2 0 { - \__kernel_msg_expandable_error:nnn { kernel } + \msg_expandable_error:nnn { kernel } { zero-step } {#6} } { @@ -506,12 +506,12 @@ % \end{macro} % % \begin{macrocode} -\__kernel_msg_new:nnn { fp } { step-tuple } +\msg_new:nnn { fp } { step-tuple } { Tuple~argument~in~fp_step_...~{#1}{#2}{#3}. } -\__kernel_msg_new:nnn { fp } { bad-step } - { Invalid~step~size~#2~in~step~function~#3. } -\__kernel_msg_new:nnn { fp } { tiny-step } - { Tiny~step~size~(#1+#2=#1)~in~step~function~#3. } +\msg_new:nnn { fp } { bad-step } + { Invalid~step~size~#2~for~function~#3. } +\msg_new:nnn { fp } { tiny-step } + { Tiny~step~size~(#1+#2=#1)~for~function~#3. } % \end{macrocode} % % \subsection{Extrema} @@ -697,7 +697,7 @@ \@@_parse_operand:Nw \c_@@_prec_colon_int \@@_parse_expand:w \else: - \__kernel_msg_expandable_error:nnnn + \msg_expandable_error:nnnn { fp } { missing } { : } { ~for~?: } \exp_after:wN \@@_parse_continue:NwN \exp_after:wN #1 diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx index e73eadf6d1..41acb5d629 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 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -789,14 +789,14 @@ } } { - \__kernel_msg_expandable_error:nn { fp } { early-end } + \msg_expandable_error:nn { fp } { early-end } \exp_after:wN \c_nan_fp \exp:w \exp_end_continue_f:w } #1 } \cs_new:cpn { @@_exp_after_?_f:nw } #1#2 { - \__kernel_msg_expandable_error:nnn { kernel } { bad-variable } + \msg_expandable_error:nnn { kernel } { bad-variable } {#2} \exp_after:wN \c_nan_fp \exp:w \exp_end_continue_f:w #1 } @@ -811,12 +811,12 @@ { \cs_if_eq:NNTF ##2 #1 { \use_i:nn } { \use:n } { - \__kernel_msg_expandable_error:nnn { fp } + \msg_expandable_error:nnn { fp } { robust-cmd } } } { - \__kernel_msg_expandable_error:nnn { kernel } + \msg_expandable_error:nnn { kernel } { bad-variable } {##2} } } @@ -927,7 +927,7 @@ #3 \str_if_eq:nnTF {#1} {#2} { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { fp } { infty-pi } {#1} \c_nan_fp } @@ -1025,7 +1025,7 @@ \cs_if_exist_use:cF { @@_parse_caseless_ \str_foldcase:n {#2} :N } { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { fp } { unknown-fp-word } {#2} \exp_after:wN \c_nan_fp \exp:w \exp_end_continue_f:w \@@_parse_infix:NN @@ -1080,13 +1080,13 @@ { \cs_if_exist:cTF { @@_parse_infix_ \token_to_str:N #1 :N } { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { fp } { missing-number } {#1} \exp_after:wN \c_nan_fp \exp:w \exp_end_continue_f:w \@@_parse_infix:NN #3 #1 } { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { fp } { unknown-symbol } {#1} \@@_parse_one:Nw #3 } @@ -1759,12 +1759,12 @@ \@@_str_if_eq:nn { \s_@@ } { \exp_not:N #1 } = \c_zero_int 0 - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { fp } { after-e } { floating~point~ } \prg_return_true: \else: 0 - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { kernel } { bad-variable } {#1} \prg_return_false: \fi: @@ -1775,14 +1775,14 @@ \int_value:w #1 \else: 0 - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { fp } { after-e } { dimension~#1 } \fi: \prg_return_false: \fi: \else: 0 - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { fp } { missing } { exponent } \prg_return_true: \fi: @@ -1954,7 +1954,7 @@ \exp_not:N \@@_parse_expand:w } { - \exp_not:N \__kernel_msg_expandable_error:nnn + \exp_not:N \msg_expandable_error:nnn { fp } { missing } { ) } \exp_not:N \tl_if_empty:nT {#2} \exp_not:N \c_@@_empty_tuple_fp #2 @ @@ -1977,7 +1977,7 @@ \if_int_compare:w #1 = \c_@@_prec_tuple_int \exp_after:wN \c_@@_empty_tuple_fp \exp:w \else: - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { fp } { missing-number } { ) } \exp_after:wN \c_nan_fp \exp:w \fi: @@ -2293,7 +2293,7 @@ \cs_new:Npn \@@_parse_infix_check:NNN #1#2#3 { \if_meaning:w \scan_stop: #1 - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { fp } { missing } { * } \exp_after:wN \@@_parse_infix_mul:N \exp_after:wN #2 @@ -2380,7 +2380,7 @@ \exp_after:wN \use_none:n \exp_after:wN #1 \else: - \__kernel_msg_expandable_error:nnn { fp } { extra } { ) } + \msg_expandable_error:nnn { fp } { extra } { ) } \exp_after:wN \@@_parse_infix:NN \exp_after:wN ##1 \exp:w \exp_after:wN \@@_parse_expand:w @@ -2583,7 +2583,7 @@ \exp_args:Nc \@@_tmp:w { @@_parse_infix_::N } \@@_ternary_auxii:NwwN \c_@@_prec_colon_int { - \__kernel_msg_expandable_error:nnnn + \msg_expandable_error:nnnn { fp } { missing } { ? } { ~for~?: } } % \end{macrocode} @@ -2624,7 +2624,7 @@ } \cs_new:Npn \@@_parse_excl_error: { - \__kernel_msg_expandable_error:nnnn + \msg_expandable_error:nnnn { fp } { missing } { = } { ~after~!. } } \cs_new:Npn \@@_parse_compare:NNNNNNN #1 @@ -2859,37 +2859,37 @@ % \subsection{Messages} % % \begin{macrocode} -\__kernel_msg_new:nnn { fp } { deprecated } +\msg_new:nnn { fp } { deprecated } { '#1'~deprecated;~use~'#2' } -\__kernel_msg_new:nnn { fp } { unknown-fp-word } +\msg_new:nnn { fp } { unknown-fp-word } { Unknown~fp~word~#1. } -\__kernel_msg_new:nnn { fp } { missing } +\msg_new:nnn { fp } { missing } { Missing~#1~inserted #2. } -\__kernel_msg_new:nnn { fp } { extra } +\msg_new:nnn { fp } { extra } { Extra~#1~ignored. } -\__kernel_msg_new:nnn { fp } { early-end } +\msg_new:nnn { fp } { early-end } { Premature~end~in~fp~expression. } -\__kernel_msg_new:nnn { fp } { after-e } +\msg_new:nnn { fp } { after-e } { Cannot~use~#1 after~'e'. } -\__kernel_msg_new:nnn { fp } { missing-number } +\msg_new:nnn { fp } { missing-number } { Missing~number~before~'#1'. } -\__kernel_msg_new:nnn { fp } { unknown-symbol } +\msg_new:nnn { fp } { unknown-symbol } { Unknown~symbol~#1~ignored. } -\__kernel_msg_new:nnn { fp } { extra-comma } +\msg_new:nnn { fp } { extra-comma } { Unexpected~comma~turned~to~nan~result. } -\__kernel_msg_new:nnn { fp } { no-arg } +\msg_new:nnn { fp } { no-arg } { #1~got~no~argument;~used~nan. } -\__kernel_msg_new:nnn { fp } { multi-arg } +\msg_new:nnn { fp } { multi-arg } { #1~got~more~than~one~argument;~used~nan. } -\__kernel_msg_new:nnn { fp } { num-args } +\msg_new:nnn { fp } { num-args } { #1~expects~between~#2~and~#3~arguments. } -\__kernel_msg_new:nnn { fp } { bad-args } +\msg_new:nnn { fp } { bad-args } { Arguments~in~#1#2~are~invalid. } -\__kernel_msg_new:nnn { fp } { infty-pi } +\msg_new:nnn { fp } { infty-pi } { Math~command~#1 is~not~an~fp } \cs_if_exist:cT { @unexpandable@protect } { - \__kernel_msg_new:nnn { fp } { robust-cmd } + \msg_new:nnn { fp } { robust-cmd } { Robust~command~#1 invalid~in~fp~expression! } } % \end{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx index 809ba5a8d9..b44b6dbab9 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 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -78,24 +78,24 @@ % \begin{macrocode} \sys_if_rand_exist:F { - \__kernel_msg_new:nnn { kernel } { fp-no-random } + \msg_new:nnn { kernel } { fp-no-random } { Random~numbers~unavailable~for~#1 } \cs_new:Npn \@@_rand_o:Nw ? #1 @ { - \__kernel_msg_expandable_error:nnn { kernel } { fp-no-random } + \msg_expandable_error:nnn { kernel } { fp-no-random } { fp~rand } \exp_after:wN \c_nan_fp } \cs_new_eq:NN \@@_randint_o:Nw \@@_rand_o:Nw \cs_new:Npn \int_rand:nn #1#2 { - \__kernel_msg_expandable_error:nnn { kernel } { fp-no-random } + \msg_expandable_error:nnn { kernel } { fp-no-random } { \int_rand:nn {#1} {#2} } \int_eval:n {#1} } \cs_new:Npn \int_rand:n #1 { - \__kernel_msg_expandable_error:nnn { kernel } { fp-no-random } + \msg_expandable_error:nnn { kernel } { fp-no-random } { \int_rand:n {#1} } 1 } @@ -333,7 +333,7 @@ \@@_rand_myriads:n { XXXX } { 0000 } { 0000 } ; 0 } { - \__kernel_msg_expandable_error:nnnnn + \msg_expandable_error:nnnnn { fp } { num-args } { rand() } { 0 } { 0 } \exp_after:wN \c_nan_fp } @@ -516,7 +516,7 @@ \cs_new:Npn \@@_randint:ww #1; #2; { \if_int_compare:w #1 > #2 \exp_stop_f: - \__kernel_msg_expandable_error:nnnn + \msg_expandable_error:nnnn { kernel } { randint-backward-range } {#1} {#2} \@@_randint:ww #2; #1; \else: @@ -633,7 +633,7 @@ \cs_new:Npn \@@_randint:n #1 { \if_int_compare:w #1 < \c_one_int - \__kernel_msg_expandable_error:nnnn + \msg_expandable_error:nnnn { kernel } { randint-backward-range } { 1 } {#1} \@@_randint:ww #1; 1; \else: diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx index dbbd3683ee..d82a919275 100644 --- a/macros/latex/contrib/l3kernel/l3fp-round.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-round.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx index 776955fb9c..e57c3d0bb2 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 2021-07-12} +% \date{Released 2021-08-27} % \maketitle % % \begin{documentation} @@ -127,11 +127,11 @@ { invalid_operation , division_by_zero , overflow , underflow } {#1} { - \__kernel_msg_error:nnxx { fp } + \msg_error:nnxx { fp } { unknown-fpu-trap-type } {#1} {#2} } { - \__kernel_msg_error:nnx + \msg_error:nnx { fp } { unknown-fpu-exception } {#1} } } @@ -338,7 +338,7 @@ % \begin{macro}[EXP]{\@@_error:nnnn, \@@_error:nnfn, \@@_error:nffn, \@@_error:nfff} % \begin{macrocode} \cs_new:Npn \@@_error:nnnn - { \__kernel_msg_expandable_error:nnnnn { fp } } + { \msg_expandable_error:nnnnn { fp } } \cs_generate_variant:Nn \@@_error:nnnn { nnf, nff , nfff } % \end{macrocode} % \end{macro} @@ -347,7 +347,7 @@ % % Some messages. % \begin{macrocode} -\__kernel_msg_new:nnnn { fp } { unknown-fpu-exception } +\msg_new:nnnn { fp } { unknown-fpu-exception } { The~FPU~exception~'#1'~is~not~known:~ that~trap~will~never~be~triggered. @@ -362,7 +362,7 @@ * ~ underflow } } -\__kernel_msg_new:nnnn { fp } { unknown-fpu-trap-type } +\msg_new:nnnn { fp } { unknown-fpu-trap-type } { The~FPU~trap~type~'#2'~is~not~known. } { The~trap~type~must~be~one~of \\ @@ -373,19 +373,19 @@ * ~ none } } -\__kernel_msg_new:nnn { fp } { flow } +\msg_new:nnn { fp } { flow } { An ~ #3 ~ occurred. } -\__kernel_msg_new:nnn { fp } { flow-to } +\msg_new:nnn { fp } { flow-to } { #1 ~ #3 ed ~ to ~ #2 . } -\__kernel_msg_new:nnn { fp } { zero-div } +\msg_new:nnn { fp } { zero-div } { Division~by~zero~in~ #1 (#2) } -\__kernel_msg_new:nnn { fp } { zero-div-ii } +\msg_new:nnn { fp } { zero-div-ii } { Division~by~zero~in~ (#1) #3 (#2) } -\__kernel_msg_new:nnn { fp } { invalid } +\msg_new:nnn { fp } { invalid } { Invalid~operation~ #1 (#2) } -\__kernel_msg_new:nnn { fp } { invalid-ii } +\msg_new:nnn { fp } { invalid-ii } { Invalid~operation~ (#1) #3 (#2) } -\__kernel_msg_new:nnn { fp } { unknown-type } +\msg_new:nnn { fp } { unknown-type } { Unknown~type~for~'#1' } % \end{macrocode} % diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx index aa76dc356a..93d463b457 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 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx index 202a784b10..0706daa85a 100644 --- a/macros/latex/contrib/l3kernel/l3fp.dtx +++ b/macros/latex/contrib/l3kernel/l3fp.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx index 21a8fb490a..e2fc7a0ff2 100644 --- a/macros/latex/contrib/l3kernel/l3fparray.dtx +++ b/macros/latex/contrib/l3kernel/l3fparray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -172,7 +172,7 @@ { \int_compare:nNnTF {#1} < 0 { - \__kernel_msg_error:nnn { kernel } { negative-array-size } {#1} + \msg_error:nnn { kernel } { negative-array-size } {#1} \cs_undefine:N #1 \int_gsub:Nn \g_@@_array_int { 3 } } @@ -250,7 +250,7 @@ \cs_generate_variant:Nn \fparray_gset:Nnn { c } \cs_new_protected:Npn \@@_array_gset:NNNNww #1#2#3#4#5 ; #6 ; { - \@@_array_bounds:NNnTF \__kernel_msg_error:nnxxx #4 {#5} + \@@_array_bounds:NNnTF \msg_error:nnxxx #4 {#5} { \exp_after:wN \@@_change_func_type:NNN \@@_use_i_until_s:nw #6 ; @@ -346,7 +346,7 @@ \cs_generate_variant:Nn \fparray_item_to_tl:Nn { c } \cs_new:Npn \@@_array_item:NwN #1#2 ; #3 { - \@@_array_bounds:NNnTF \__kernel_msg_expandable_error:nnfff #1 {#2} + \@@_array_bounds:NNnTF \msg_expandable_error:nnfff #1 {#2} { \exp_after:wN \@@_array_item:NNNnN #1 {#2} #3 } { \exp_after:wN #3 \c_nan_fp } } diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx index 35871da7db..a115dcf4b8 100644 --- a/macros/latex/contrib/l3kernel/l3int.dtx +++ b/macros/latex/contrib/l3kernel/l3int.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1508,7 +1508,7 @@ { { } \c_zero_int \fi: - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { kernel } { unknown-comparison } {#1} \prg_return_false: } @@ -1859,7 +1859,7 @@ { \int_compare:nNnTF {#2} = \c_zero_int { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { kernel } { zero-step } {#4} \prg_break: } diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx index 87eafe5a0c..1633b92147 100644 --- a/macros/latex/contrib/l3kernel/l3intarray.dtx +++ b/macros/latex/contrib/l3kernel/l3intarray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -205,7 +205,7 @@ % \end{variable} % % \begin{macrocode} -\__kernel_msg_new:nnn { kernel } { negative-array-size } +\msg_new:nnn { kernel } { negative-array-size } { Size~of~array~may~not~be~negative:~#1 } % \end{macrocode} % @@ -236,7 +236,7 @@ \@@_count:w #1 = \int_eval:n {#2} \scan_stop: \int_compare:nNnT { \intarray_count:N #1 } < 0 { - \__kernel_msg_error:nnx { kernel } { negative-array-size } + \msg_error:nnx { kernel } { negative-array-size } { \intarray_count:N #1 } } \int_compare:nNnT { \intarray_count:N #1 } > 0 @@ -312,7 +312,7 @@ \cs_generate_variant:Nn \intarray_gset:Nnn { c } \cs_new_protected:Npn \@@_gset:Nww #1#2 ; #3 ; { - \@@_bounds:NNnTF \__kernel_msg_error:nnxxx #1 {#2} + \@@_bounds:NNnTF \msg_error:nnxxx #1 {#2} { \@@_gset_overflow_test:nw {#3} \__kernel_intarray_gset:Nnn #1 {#2} {#3} @@ -338,7 +338,7 @@ } \cs_new_protected:Npn \@@_gset_overflow:NNnn #1#2#3#4 { - \__kernel_msg_error:nnxxxx { kernel } { overflow } + \msg_error:nnxxxx { kernel } { overflow } { \token_to_str:N #2 } {#3} {#4} { \@@_signed_max_dim:n {#4} } #1 #2 {#3} { \@@_signed_max_dim:n {#4} } } @@ -383,7 +383,7 @@ \cs_generate_variant:Nn \intarray_item:Nn { c } \cs_new:Npn \@@_item:Nw #1#2 ; { - \@@_bounds:NNnTF \__kernel_msg_expandable_error:nnfff #1 {#2} + \@@_bounds:NNnTF \msg_expandable_error:nnfff #1 {#2} { \__kernel_intarray_item:Nn #1 {#2} } { 0 } } @@ -509,9 +509,9 @@ % \begin{macro}{\intarray_show:N, \intarray_show:c, \intarray_log:N, \intarray_log:c} % Convert the list to a comma list (with spaces after each comma) % \begin{macrocode} -\cs_new_protected:Npn \intarray_show:N { \@@_show:NN \__kernel_msg_show:nnxxxx } +\cs_new_protected:Npn \intarray_show:N { \@@_show:NN \msg_show:nnxxxx } \cs_generate_variant:Nn \intarray_show:N { c } -\cs_new_protected:Npn \intarray_log:N { \@@_show:NN \__kernel_msg_log:nnxxxx } +\cs_new_protected:Npn \intarray_log:N { \@@_show:NN \msg_log:nnxxxx } \cs_generate_variant:Nn \intarray_log:N { c } \cs_new_protected:Npn \@@_show:NN #1#2 { @@ -565,7 +565,7 @@ { \int_compare:nNnTF {#2} > {#3} { - \__kernel_msg_expandable_error:nnnn + \msg_expandable_error:nnnn { kernel } { randint-backward-range } {#2} {#3} \@@_gset_rand:Nnn #1 {#3} {#2} } @@ -613,7 +613,7 @@ { \cs_new_protected:Npn \intarray_gset_rand:Nnn #1#2#3 { - \__kernel_msg_error:nnn { kernel } { fp-no-random } + \msg_error:nnn { kernel } { fp-no-random } { \intarray_gset_rand:Nnn #1 {#2} {#3} } } } diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx index 095718793f..1486986945 100644 --- a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx +++ b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -284,157 +284,6 @@ % Inserts a kern of the specified \meta{length}, a dimension expression. % \end{variable} % -% \begin{function} -% {\__kernel_msg_new:nnnn, \__kernel_msg_new:nnn} -% \begin{syntax} -% \cs{__kernel_msg_new:nnnn} \Arg{module} \Arg{message} \Arg{text} \Arg{more text} -% \end{syntax} -% Creates a kernel \meta{message} for a given \meta{module}. -% The message is defined to first give \meta{text} and then -% \meta{more text} if the user requests it. If no \meta{more text} is -% available then a standard text is given instead. Within \meta{text} -% and \meta{more text} four parameters (|#1| to |#4|) can be used: -% these will be supplied and expanded at the time the message is used. -% An error is raised if the \meta{message} already exists. -% \end{function} -% -% \begin{function} -% {\__kernel_msg_set:nnnn, \__kernel_msg_set:nnn} -% \begin{syntax} -% \cs{__kernel_msg_set:nnnn} \Arg{module} \Arg{message} \Arg{text} \Arg{more text} -% \end{syntax} -% Sets up the text for a kernel \meta{message} for a given \meta{module}. -% The message is defined to first give \meta{text} and then -% \meta{more text} if the user requests it. If no \meta{more text} is -% available then a standard text is given instead. Within \meta{text} -% and \meta{more text} four parameters (|#1| to |#4|) can be used: -% these will be supplied and expanded at the time the message is used. -% \end{function} -% -% \begin{function} -% { -% \__kernel_msg_fatal:nnnnnn , -% \__kernel_msg_fatal:nnnnn , -% \__kernel_msg_fatal:nnnn , -% \__kernel_msg_fatal:nnn , -% \__kernel_msg_fatal:nn , -% \__kernel_msg_fatal:nnxxxx , -% \__kernel_msg_fatal:nnxxx , -% \__kernel_msg_fatal:nnxx , -% \__kernel_msg_fatal:nnx -% } -% \begin{syntax} -% \cs{__kernel_msg_fatal:nnnnnn} \Arg{module} \Arg{message} \Arg{arg one} \Arg{arg two} \Arg{arg three} \Arg{arg four} -% \end{syntax} -% Issues kernel \meta{module} error \meta{message}, passing \meta{arg one} -% to \meta{arg four} to the text-creating functions. After issuing a -% fatal error the \TeX{} run halts. Cannot be redirected. -% \end{function} -% -% \begin{function} -% { -% \__kernel_msg_critical:nnnnnn , -% \__kernel_msg_critical:nnnnn , -% \__kernel_msg_critical:nnnn , -% \__kernel_msg_critical:nnn , -% \__kernel_msg_critical:nn , -% \__kernel_msg_critical:nnxxxx , -% \__kernel_msg_critical:nnxxx , -% \__kernel_msg_critical:nnxx , -% \__kernel_msg_critical:nnx -% } -% \begin{syntax} -% \cs{__kernel_msg_critical:nnnnnn} \Arg{module} \Arg{message} \Arg{arg one} \Arg{arg two} \Arg{arg three} \Arg{arg four} -% \end{syntax} -% Issues kernel \meta{module} error \meta{message}, passing \meta{arg one} -% to \meta{arg four} to the text-creating functions. After issuing a -% critical error, \TeX{} stops reading the current input file. -% Cannot be redirected. -% \end{function} -% -% \begin{function} -% { -% \__kernel_msg_error:nnnnnn , -% \__kernel_msg_error:nnnnn , -% \__kernel_msg_error:nnnn , -% \__kernel_msg_error:nnn , -% \__kernel_msg_error:nn , -% \__kernel_msg_error:nnxxxx , -% \__kernel_msg_error:nnxxx , -% \__kernel_msg_error:nnxx , -% \__kernel_msg_error:nnx -% } -% \begin{syntax} -% \cs{__kernel_msg_error:nnnnnn} \Arg{module} \Arg{message} \Arg{arg one} \Arg{arg two} \Arg{arg three} \Arg{arg four} -% \end{syntax} -% Issues kernel \meta{module} error \meta{message}, passing \meta{arg one} -% to -% \meta{arg four} to the text-creating functions. The error -% stops processing and issues the text at the terminal. After user input, -% the run continues. Cannot be redirected. -% \end{function} -% -% \begin{function} -% { -% \__kernel_msg_warning:nnnnnn , -% \__kernel_msg_warning:nnnnn , -% \__kernel_msg_warning:nnnn , -% \__kernel_msg_warning:nnn , -% \__kernel_msg_warning:nn , -% \__kernel_msg_warning:nnxxxx , -% \__kernel_msg_warning:nnxxx , -% \__kernel_msg_warning:nnxx , -% \__kernel_msg_warning:nnx -% } -% \begin{syntax} -% \cs{__kernel_msg_warning:nnnnnn} \Arg{module} \Arg{message} \Arg{arg one} \Arg{arg two} \Arg{arg three} \Arg{arg four} -% \end{syntax} -% Issues kernel \meta{module} warning \meta{message}, passing -% \meta{arg one} to -% \meta{arg four} to the text-creating functions. The warning text -% is added to the log file, but the \TeX{} run is not interrupted. -% \end{function} -% -% \begin{function} -% { -% \__kernel_msg_info:nnnnnn , -% \__kernel_msg_info:nnnnn , -% \__kernel_msg_info:nnnn , -% \__kernel_msg_info:nnn , -% \__kernel_msg_info:nn , -% \__kernel_msg_info:nnxxxx , -% \__kernel_msg_info:nnxxx , -% \__kernel_msg_info:nnxx , -% \__kernel_msg_info:nnx -% } -% \begin{syntax} -% \cs{__kernel_msg_info:nnnnnn} \Arg{module} \Arg{message} \Arg{arg one} \Arg{arg two} \Arg{arg three} \Arg{arg four} -% \end{syntax} -% Issues kernel \meta{module} information \meta{message}, passing -% \meta{arg one} to \meta{arg four} to the text-creating functions. -% The information text is added to the log file. -% \end{function} -% -% \begin{function}[EXP] -% { -% \__kernel_msg_expandable_error:nnnnnn, -% \__kernel_msg_expandable_error:nnnnn, -% \__kernel_msg_expandable_error:nnnn, -% \__kernel_msg_expandable_error:nnn, -% \__kernel_msg_expandable_error:nn, -% \__kernel_msg_expandable_error:nnffff, -% \__kernel_msg_expandable_error:nnfff, -% \__kernel_msg_expandable_error:nnff, -% \__kernel_msg_expandable_error:nnf, -% } -% \begin{syntax} -% \cs{__kernel_msg_expandable_error:nnnnnn} \Arg{module} \Arg{message} \Arg{arg one} \Arg{arg two} \Arg{arg three} \Arg{arg four} -% \end{syntax} -% Issues an error, passing \meta{arg one} to \meta{arg four} -% to the text-creating functions. The resulting string must -% be much shorter than a line, otherwise it is cropped. -% \end{function} -% % \begin{variable}{\g__kernel_prg_map_int} % This integer is used by non-expandable mapping functions to track % the level of nesting in force. The functions diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx index af7ed2f1e5..cf7257daf5 100644 --- a/macros/latex/contrib/l3kernel/l3keys.dtx +++ b/macros/latex/contrib/l3kernel/l3keys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1242,7 +1242,7 @@ \s_@@_mark ##3 \s_@@_nil #2 \s_@@_mark \@@_clean_up_active:w { - \__kernel_msg_expandable_error:nn + \msg_expandable_error:nn { keyval } { misplaced-equals-sign } \@@_loop_other:nnw } @@ -1250,7 +1250,7 @@ \s_@@_mark ##1 \s_@@_stop \s_@@_mark ##2 \s_@@_nil ##3 \s_@@_mark ##4 ##5 { - \__kernel_msg_expandable_error:nn + \msg_expandable_error:nn { keyval } { misplaced-equals-sign } \@@_loop_other:nnw } @@ -1345,7 +1345,7 @@ { \@@_loop_other:nnw } \cs_new:Npn \@@_blank_key_error:w #1 \@@_loop_other:nnw { - \__kernel_msg_expandable_error:nn { keyval } { blank-key-name } + \msg_expandable_error:nn { keyval } { blank-key-name } \@@_loop_other:nnw } % \end{macrocode} @@ -1353,10 +1353,12 @@ % % Two messages for the low level parsing system. % \begin{macrocode} -\__kernel_msg_new:nnn { keyval } { misplaced-equals-sign } - { Misplaced~equals~sign~in~key-value~input~\msg_line_context: } -\__kernel_msg_new:nnn { keyval } { blank-key-name } +\msg_new:nnn { keyval } { misplaced-equals-sign } + { Misplaced~'='~in~key-value~input~\msg_line_context: } +\msg_new:nnn { keyval } { blank-key-name } { Blank~key~name~in~key-value~input~\msg_line_context: } +\prop_gput:Nnn \g_msg_module_name_prop { keyval } { LaTeX3 } +\prop_gput:Nnn \g_msg_module_type_prop { keyval } { } % \end{macrocode} % % \begin{macro}[EXP]{\@@_trim:nN} @@ -1645,7 +1647,7 @@ { \str_if_empty:NF \l_@@_property_str { - \__kernel_msg_error:nnxx { keys } { property-unknown } + \msg_error:nnxx { keys } { property-unknown } \l_@@_property_str \l_keys_path_str } } @@ -1708,7 +1710,7 @@ #1 \s_@@_nil #2 \@@_property_find_err:w { \str_clear:N \l_@@_property_str - \__kernel_msg_error:nnn { keys } { no-property } {#1} + \msg_error:nnn { keys } { no-property } {#1} } % \end{macrocode} % \end{macro} @@ -1730,7 +1732,7 @@ \l_@@_property_str \s_@@_stop { \use:c { \c_@@_props_root_str \l_@@_property_str } } { - \__kernel_msg_error:nnxx { keys } { property-requires-value } + \msg_error:nnxx { keys } { property-requires-value } \l_@@_property_str \l_keys_path_str } } @@ -1760,7 +1762,7 @@ { \exp_not:c { bool_ #2 set_false:N } \exp_not:N #1 } \@@_cmd_set:nn { \l_keys_path_str / unknown } { - \__kernel_msg_error:nnx { keys } { boolean-values-only } + \msg_error:nnx { keys } { boolean-values-only } \l_keys_key_str } \@@_default_set:n { true } @@ -1782,7 +1784,7 @@ { \exp_not:c { bool_ #2 set_true:N } \exp_not:N #1 } \@@_cmd_set:nn { \l_keys_path_str / unknown } { - \__kernel_msg_error:nnx { keys } { boolean-values-only } + \msg_error:nnx { keys } { boolean-values-only } \l_keys_key_str } \@@_default_set:n { true } @@ -1811,7 +1813,7 @@ { \c_@@_type_root_str \@@_parent:o \l_keys_path_str } { choice } { - \__kernel_msg_error:nnxx { keys } { nested-choice-key } + \msg_error:nnxx { keys } { nested-choice-key } \l_keys_path_tl { \@@_parent:o \l_keys_path_str } } { \@@_choice_make_aux:N #1 } @@ -1825,7 +1827,7 @@ \@@_cmd_set:nn \l_keys_path_str { #1 {##1} } \@@_cmd_set:nn { \l_keys_path_str / unknown } { - \__kernel_msg_error:nnxx { keys } { choice-unknown } + \msg_error:nnxx { keys } { choice-unknown } \l_keys_path_str {##1} } } @@ -2049,7 +2051,7 @@ } } { - \__kernel_msg_error:nnx { keys } + \msg_error:nnx { keys } { property-boolean-values-only } { .value_ #1 :n } } @@ -2058,7 +2060,7 @@ { \bool_if:NF \l_@@_no_value_bool { - \__kernel_msg_error:nnxx { keys } { value-forbidden } + \msg_error:nnxx { keys } { value-forbidden } \l_keys_path_str \l_keys_value_tl \use_none:nnn } @@ -2067,7 +2069,7 @@ { \bool_if:NT \l_@@_no_value_bool { - \__kernel_msg_error:nnx { keys } { value-required } + \msg_error:nnx { keys } { value-required } \l_keys_path_str \use_none:nnn } @@ -2911,7 +2913,7 @@ { \c_@@_code_root_str \l_@@_module_str / unknown } { \@@_execute:no { \l_@@_module_str / unknown } \l_keys_value_tl } { - \__kernel_msg_error:nnxx { keys } { unknown } + \msg_error:nnxx { keys } { unknown } \l_keys_path_str \l_@@_module_str } } @@ -2984,7 +2986,7 @@ { \tl_if_blank:nF {##1} { - \__kernel_msg_error:nnxx { keys } { bad-relative-key-path } + \msg_error:nnxx { keys } { bad-relative-key-path } \l_keys_path_str \l_@@_relative_tl } @@ -3155,9 +3157,9 @@ % To show a key, show its code using a message. % \begin{macrocode} \cs_new_protected:Npn \keys_show:nn - { \@@_show:Nnn \__kernel_msg_show:nnxxxx } + { \@@_show:Nnn \msg_show:nnxxxx } \cs_new_protected:Npn \keys_log:nn - { \@@_show:Nnn \__kernel_msg_log:nnxxxx } + { \@@_show:Nnn \msg_log:nnxxxx } \cs_new_protected:Npn \@@_show:Nnn #1#2#3 { #1 { keys } { show-key } @@ -3184,49 +3186,51 @@ % % For when there is a need to complain. % \begin{macrocode} -\__kernel_msg_new:nnnn { keys } { bad-relative-key-path } +\msg_new:nnnn { keys } { bad-relative-key-path } { The~key~'#1'~is~not~inside~the~'#2'~path. } { The~key~'#1'~cannot~be~expressed~relative~to~path~'#2'. } -\__kernel_msg_new:nnnn { keys } { boolean-values-only } +\msg_new:nnnn { keys } { boolean-values-only } { Key~'#1'~accepts~boolean~values~only. } { The~key~'#1'~only~accepts~the~values~'true'~and~'false'. } -\__kernel_msg_new:nnnn { keys } { choice-unknown } +\msg_new:nnnn { keys } { choice-unknown } { Key~'#1'~accepts~only~a~fixed~set~of~choices. } { The~key~'#1'~only~accepts~predefined~values,~ and~'#2'~is~not~one~of~these. } -\__kernel_msg_new:nnnn { keys } { unknown } +\msg_new:nnnn { keys } { unknown } { The~key~'#1'~is~unknown~and~is~being~ignored. } { The~module~'#2'~does~not~have~a~key~called~'#1'.\\ Check~that~you~have~spelled~the~key~name~correctly. } -\__kernel_msg_new:nnnn { keys } { nested-choice-key } +\msg_new:nnnn { keys } { nested-choice-key } { Attempt~to~define~'#1'~as~a~nested~choice~key. } { The~key~'#1'~cannot~be~defined~as~a~choice~as~the~parent~key~'#2'~is~ itself~a~choice. } -\__kernel_msg_new:nnnn { keys } { value-forbidden } +\msg_new:nnnn { keys } { value-forbidden } { The~key~'#1'~does~not~take~a~value. } { The~key~'#1'~should~be~given~without~a~value.\\ The~value~'#2'~was~present:~the~key~will~be~ignored. } -\__kernel_msg_new:nnnn { keys } { value-required } +\msg_new:nnnn { keys } { value-required } { The~key~'#1'~requires~a~value. } { The~key~'#1'~must~have~a~value.\\ No~value~was~present:~the~key~will~be~ignored. } -\__kernel_msg_new:nnn { keys } { show-key } +\msg_new:nnn { keys } { show-key } { The~key~#1~ \tl_if_empty:nTF {#2} { is~undefined. } { has~the~properties: #2 . } } +\prop_gput:Nnn \g_msg_module_name_prop { keys } { LaTeX3 } +\prop_gput:Nnn \g_msg_module_type_prop { keys } { } % \end{macrocode} % % \begin{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx index adc82af2f9..4babaa4c14 100644 --- a/macros/latex/contrib/l3kernel/l3legacy.dtx +++ b/macros/latex/contrib/l3kernel/l3legacy.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx index 37f55d4247..da0659b924 100644 --- a/macros/latex/contrib/l3kernel/l3luatex.dtx +++ b/macros/latex/contrib/l3kernel/l3luatex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -279,7 +279,7 @@ { \cs_set:Npn #1 ##1 { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { luatex } { luatex-required } { #1 } } } @@ -288,7 +288,7 @@ { \cs_set_protected:Npn #1 ##1 { - \__kernel_msg_error:nnn + \msg_error:nnn { luatex } { luatex-required } { #1 } } } @@ -301,7 +301,7 @@ % \subsection{Messages} % % \begin{macrocode} -\__kernel_msg_new:nnnn { luatex } { luatex-required } +\msg_new:nnnn { luatex } { luatex-required } { LuaTeX~engine~not~in~use!~Ignoring~#1. } { The~feature~you~are~using~is~only~available~ diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx index d08550273e..0c689251a4 100644 --- a/macros/latex/contrib/l3kernel/l3msg.dtx +++ b/macros/latex/contrib/l3kernel/l3msg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -693,7 +693,7 @@ { \msg_if_exist:nnT {#1} {#2} { - \__kernel_msg_error:nnxx { msg } { already-defined } + \msg_error:nnxx { msg } { already-defined } {#1} {#2} } } @@ -1166,8 +1166,12 @@ % } % For an error, the interrupt routine is called. We check if there is % a \enquote{more text} by comparing that control sequence with a -% permanently empty text. +% permanently empty text. We have to undefine the bootstrap versions +% here. % \begin{macrocode} + \cs_undefine:N \msg_error:nnxx + \cs_undefine:N \msg_error:nnx + \cs_undefine:N \msg_error:nn \@@_class_new:nn { error } { \@@_interrupt:NnnnN @@ -1180,6 +1184,7 @@ % % \begin{macro} % { +% \@@_info_aux:NNnnnnnn , % \msg_warning:nnnnnn , % \msg_warning:nnnnn , % \msg_warning:nnnn , @@ -1188,38 +1193,7 @@ % \msg_warning:nnxxxx , % \msg_warning:nnxxx , % \msg_warning:nnxx , -% \msg_warning:nnx -% } -% Warnings are printed to the terminal. -% \begin{macrocode} - \@@_class_new:nn { warning } - { - \str_set:Nx \l_@@_text_str { \msg_warning_text:n {#1} } - \str_set:Nx \l_@@_name_str { \msg_module_name:n {#1} } - \iow_term:n { } - \iow_wrap:nxnN - { - \l_@@_text_str : ~ - \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6} - } - { - ( \l_@@_name_str ) - \prg_replicate:nn - { - \str_count:N \l_@@_text_str - - \str_count:N \l_@@_name_str - } - { ~ } - } - { } \iow_term:n - \iow_term:n { } - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro} -% { -% \@@_info_aux:Nnn , +% \msg_warning:nnx , % \msg_note:nnnnnn , % \msg_note:nnnnn , % \msg_note:nnnn , @@ -1237,27 +1211,22 @@ % \msg_info:nnxxxx , % \msg_info:nnxxx , % \msg_info:nnxx , -% \msg_info:nnx +% \msg_info:nnx , % } -% Information has no decoration and goes either to the log or both -% log and terminal. +% Warnings and information messages have no decoration. Warnings are +% printed to the terminal while information can either go to the log +% or both log and terminal. % \begin{macrocode} - \@@_class_new:nn { note } - { - \@@_info_aux:Nnn \iow_term:n {#1} - { \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6} } - } - \@@_class_new:nn { info } + \cs_new_protected:Npn \@@_info_aux:NNnnnnnn #1#2#3#4#5#6#7#8 { - \@@_info_aux:Nnn \iow_log:n {#1} - { \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6} } - } - \cs_new_protected:Npn \@@_info_aux:Nnn #1#2#3 - { - \str_set:Nx \l_@@_text_str { \msg_info_text:n {#2} } - \str_set:Nx \l_@@_name_str { \msg_module_name:n {#2} } + \str_set:Nx \l_@@_text_str { #2 {#3} } + \str_set:Nx \l_@@_name_str { \msg_module_name:n {#3} } #1 { } - \iow_wrap:nxnN { \l_@@_text_str : ~ #3 } + \iow_wrap:nxnN + { + \l_@@_text_str : ~ + \use:c { \c_@@_text_prefix_tl #3 / #4 } {#5} {#6} {#7} {#8} + } { ( \l_@@_name_str ) \prg_replicate:nn @@ -1270,6 +1239,21 @@ { } #1 #1 { } } + \@@_class_new:nn { warning } + { + \@@_info_aux:NNnnnnnn \iow_term:n \msg_warning_text:n + {#1} {#2} {#3} {#4} {#5} {#6} + } + \@@_class_new:nn { note } + { + \@@_info_aux:NNnnnnnn \iow_term:n \msg_info_text:n + {#1} {#2} {#3} {#4} {#5} {#6} + } + \@@_class_new:nn { info } + { + \@@_info_aux:NNnnnnnn \iow_log:n \msg_info_text:n + {#1} {#2} {#3} {#4} {#5} {#6} + } % \end{macrocode} % \end{macro} % @@ -1283,22 +1267,7 @@ % \msg_log:nnxxxx , % \msg_log:nnxxx , % \msg_log:nnxx , -% \msg_log:nnx -% } -% \enquote{Log} data is very similar to information, but with no extras -% added. -% \begin{macrocode} - \@@_class_new:nn { log } - { - \iow_wrap:nnnN - { \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6} } - { } { } \iow_log:n - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro} -% { +% \msg_log:nnx , % \msg_term:nnnnnn , % \msg_term:nnnnn , % \msg_term:nnnn , @@ -1307,12 +1276,20 @@ % \msg_term:nnxxxx , % \msg_term:nnxxx , % \msg_term:nnxx , -% \msg_term:nnx +% \msg_term:nnx , % } +% \enquote{Log} data is very similar to information, but with no extras +% added. % \enquote{Term} is used for communicating with the user through the % terminal, like diagnostic messages, and debugging. This is similar % to \enquote{log} messages, but uses the terminal output. % \begin{macrocode} + \@@_class_new:nn { log } + { + \iow_wrap:nnnN + { \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6} } + { } { } \iow_log:n + } \@@_class_new:nn { term } { \iow_wrap:nnnN @@ -1415,7 +1392,7 @@ \cs_new:Npn \@@_class_chk_exist:nT #1 { \cs_if_free:cTF { @@_ #1 _code:nnnnnn } - { \__kernel_msg_error:nnx { msg } { class-unknown } {#1} } + { \msg_error:nnx { msg } { class-unknown } {#1} } } % \end{macrocode} % \end{macro} @@ -1485,7 +1462,7 @@ \@@_use_redirect_name:n { #2 / #3 } } } - { \__kernel_msg_error:nnxx { msg } { unknown } {#2} {#3} } + { \msg_error:nnxx { msg } { unknown } {#2} {#3} } \cs_if_exist_use:N \conditionally@traceon } \cs_new_protected:Npn \@@_use_code: { } @@ -1635,7 +1612,7 @@ \tl_if_eq:NNTF \l_@@_class_tl \l_@@_current_class_tl { \prop_put:cnn { l_@@_redirect_ #2 _prop } {#3} {#2} - \__kernel_msg_warning:nnxxxx + \msg_warning:nnxxxx { msg } { redirect-loop } { \seq_item:Nn \l_@@_class_loop_seq { 1 } } { \seq_item:Nn \l_@@_class_loop_seq { 2 } } @@ -1659,177 +1636,64 @@ % % \subsection{Kernel-specific functions} % -% \begin{macro}{\__kernel_msg_new:nnnn, \__kernel_msg_new:nnn} -% \begin{macro}{\__kernel_msg_set:nnnn, \__kernel_msg_set:nnn} -% The kernel needs some messages of its own. These are created using -% pre-built functions. Two functions are provided: one more general -% and one which only has the short text part. -% \begin{macrocode} -\cs_new_protected:Npn \__kernel_msg_new:nnnn #1#2 - { \msg_new:nnnn { LaTeX } { #1 / #2 } } -\cs_new_protected:Npn \__kernel_msg_new:nnn #1#2 - { \msg_new:nnn { LaTeX } { #1 / #2 } } -\cs_new_protected:Npn \__kernel_msg_set:nnnn #1#2 - { \msg_set:nnnn { LaTeX } { #1 / #2 } } -\cs_new_protected:Npn \__kernel_msg_set:nnn #1#2 - { \msg_set:nnn { LaTeX } { #1 / #2 } } -% \end{macrocode} -% \end{macro} -% \end{macro} +% These are all retained purely for older \pkg{xparse} support. % -% \begin{macro}{\@@_kernel_class_new:nN} -% \begin{macro}{\@@_kernel_class_new_aux:nN} -% All the functions for kernel messages come in variants ranging -% from~$0$ to~$4$ arguments. Those with less than~$4$ arguments are -% defined in terms of the $4$-argument variant, in a way very similar -% to \cs{@@_class_new:nn}. This auxiliary is destroyed at the end of -% the group. -% \begin{macrocode} -\group_begin: - \cs_set_protected:Npn \@@_kernel_class_new:nN #1 - { \@@_kernel_class_new_aux:nN { __kernel_msg_ #1 } } - \cs_set_protected:Npn \@@_kernel_class_new_aux:nN #1#2 - { - \cs_new_protected:cpn { #1 :nnnnnn } ##1##2##3##4##5##6 - { - \use:x - { - \exp_not:n { #2 { LaTeX } { ##1 / ##2 } } - { \tl_to_str:n {##3} } { \tl_to_str:n {##4} } - { \tl_to_str:n {##5} } { \tl_to_str:n {##6} } - } - } - \cs_new_protected:cpx { #1 :nnnnn } ##1##2##3##4##5 - { \exp_not:c { #1 :nnnnnn } {##1} {##2} {##3} {##4} {##5} { } } - \cs_new_protected:cpx { #1 :nnnn } ##1##2##3##4 - { \exp_not:c { #1 :nnnnnn } {##1} {##2} {##3} {##4} { } { } } - \cs_new_protected:cpx { #1 :nnn } ##1##2##3 - { \exp_not:c { #1 :nnnnnn } {##1} {##2} {##3} { } { } { } } - \cs_new_protected:cpx { #1 :nn } ##1##2 - { \exp_not:c { #1 :nnnnnn } {##1} {##2} { } { } { } { } } - \cs_new_protected:cpx { #1 :nnxxxx } ##1##2##3##4##5##6 - { - \use:x - { - \exp_not:N \exp_not:n - { \exp_not:c { #1 :nnnnnn } {##1} {##2} } - {##3} {##4} {##5} {##6} - } - } - \cs_new_protected:cpx { #1 :nnxxx } ##1##2##3##4##5 - { \exp_not:c { #1 :nnxxxx } {##1} {##2} {##3} {##4} {##5} { } } - \cs_new_protected:cpx { #1 :nnxx } ##1##2##3##4 - { \exp_not:c { #1 :nnxxxx } {##1} {##2} {##3} {##4} { } { } } - \cs_new_protected:cpx { #1 :nnx } ##1##2##3 - { \exp_not:c { #1 :nnxxxx } {##1} {##2} {##3} { } { } { } } - } -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{macro} -% { -% \__kernel_msg_fatal:nnnnnn , -% \__kernel_msg_fatal:nnnnn , -% \__kernel_msg_fatal:nnnn , -% \__kernel_msg_fatal:nnn , -% \__kernel_msg_fatal:nn , -% \__kernel_msg_fatal:nnxxxx , -% \__kernel_msg_fatal:nnxxx , -% \__kernel_msg_fatal:nnxx , -% \__kernel_msg_fatal:nnx , -% \__kernel_msg_critical:nnnnnn , -% \__kernel_msg_critical:nnnnn , -% \__kernel_msg_critical:nnnn , -% \__kernel_msg_critical:nnn , -% \__kernel_msg_critical:nn , -% \__kernel_msg_critical:nnxxxx , -% \__kernel_msg_critical:nnxxx , -% \__kernel_msg_critical:nnxx , -% \__kernel_msg_critical:nnx , -% \__kernel_msg_error:nnnnnn , -% \__kernel_msg_error:nnnnn , -% \__kernel_msg_error:nnnn , -% \__kernel_msg_error:nnn , -% \__kernel_msg_error:nn , -% \__kernel_msg_error:nnxxxx , -% \__kernel_msg_error:nnxxx , -% \__kernel_msg_error:nnxx , -% \__kernel_msg_error:nnx -% } -% Neither fatal kernel errors nor kernel errors can be redirected. We -% directly use the code for (non-kernel) fatal errors and errors, -% adding the \enquote{\LaTeX{}} module name. Three functions are -% already defined by \pkg{l3basics}; we need to undefine them to avoid -% errors. +% \begin{macro}{\__kernel_msg_new:nnnn, \__kernel_msg_new:nnn} % \begin{macrocode} - \@@_kernel_class_new:nN { fatal } \@@_fatal_code:nnnnnn - \@@_kernel_class_new:nN { critical } \@@_critical_code:nnnnnn - \cs_undefine:N \__kernel_msg_error:nnxx - \cs_undefine:N \__kernel_msg_error:nnx - \cs_undefine:N \__kernel_msg_error:nn - \@@_kernel_class_new:nN { error } \@@_error_code:nnnnnn +\cs_new_protected:Npn \__kernel_msg_new:nnnn #1 + { \msg_new:nnnn { LaTeX / #1 } } +\cs_new_protected:Npn \__kernel_msg_new:nnn #1 + { \msg_new:nnn { LaTeX / #1 } } % \end{macrocode} % \end{macro} % % \begin{macro} % { -% \__kernel_msg_warning:nnnnnn , -% \__kernel_msg_warning:nnnnn , -% \__kernel_msg_warning:nnnn , -% \__kernel_msg_warning:nnn , -% \__kernel_msg_warning:nn , -% \__kernel_msg_warning:nnxxxx , -% \__kernel_msg_warning:nnxxx , -% \__kernel_msg_warning:nnxx , -% \__kernel_msg_warning:nnx , -% \__kernel_msg_info:nnnnnn , -% \__kernel_msg_info:nnnnn , -% \__kernel_msg_info:nnnn , -% \__kernel_msg_info:nnn , -% \__kernel_msg_info:nn , -% \__kernel_msg_info:nnxxxx , -% \__kernel_msg_info:nnxxx , -% \__kernel_msg_info:nnxx , -% \__kernel_msg_info:nnx +% \__kernel_msg_info:nnxx , +% \__kernel_msg_warning:nnx , +% \__kernel_msg_warning:nnxx , +% \__kernel_msg_error:nnx , +% \__kernel_msg_error:nnxx , +% \__kernel_msg_error:nnxxx % } -% Kernel messages which can be redirected simply use the machinery for -% normal messages, with the module name \enquote{\LaTeX{}}. % \begin{macrocode} - \@@_kernel_class_new:nN { warning } \msg_warning:nnxxxx - \@@_kernel_class_new:nN { info } \msg_info:nnxxxx +\cs_new_protected:Npn \__kernel_msg_info:nnxx #1 + { \msg_info:nnxx { LaTeX / #1 } } +\cs_new_protected:Npn \__kernel_msg_warning:nnx #1 + { \msg_warning:nnx { LaTeX / #1 } } +\cs_new_protected:Npn \__kernel_msg_warning:nnxx #1 + { \msg_warning:nnxx { LaTeX / #1 } } +\cs_new_protected:Npn \__kernel_msg_error:nnx #1 + { \msg_error:nnx { LaTeX / #1 } } +\cs_new_protected:Npn \__kernel_msg_error:nnxx #1 + { \msg_error:nnxx { LaTeX / #1 } } +\cs_new_protected:Npn \__kernel_msg_error:nnxxx #1 + { \msg_error:nnxxx { LaTeX / #1 } } % \end{macrocode} % \end{macro} % % \begin{macro} % { -% \__kernel_msg_log:nnnnnn, \__kernel_msg_log:nnxxxx, -% \__kernel_msg_term:nnnnnn, \__kernel_msg_term:nnxxxx, -% \__kernel_msg_show:nnnnnn, \__kernel_msg_show:nnxxxx +% \__kernel_msg_expandable_error:nnn , +% \__kernel_msg_expandable_error:nnf , +% \__kernel_msg_expandable_error:nnff % } -% For showing messages. % \begin{macrocode} -\cs_new_protected:Npn \__kernel_msg_log:nnnnnn #1 - { \msg_log:nnnnnn { LaTeX / #1 } } -\cs_generate_variant:Nn \__kernel_msg_log:nnnnnn { nnxxxx } -\cs_new_protected:Npn \__kernel_msg_term:nnnnnn #1 - { \msg_term:nnnnnn { LaTeX / #1 } } -\cs_generate_variant:Nn \__kernel_msg_term:nnnnnn { nnxxxx } -\cs_new_protected:Npn \__kernel_msg_show:nnnnnn #1 - { \msg_show:nnnnnn { LaTeX / #1 } } -\cs_generate_variant:Nn \__kernel_msg_show:nnnnnn { nnxxxx } +\cs_new:Npn \__kernel_msg_expandable_error:nnn #1 + { \msg_expandable_error:nnn { LaTeX / #1 } } +\cs_new:Npn \__kernel_msg_expandable_error:nnf #1 + { \msg_expandable_error:nnf { LaTeX / #1 } } +\cs_new:Npn \__kernel_msg_expandable_error:nnff #1 + { \msg_expandable_error:nnff { LaTeX / #1 } } % \end{macrocode} % \end{macro} % -% End the group to eliminate \cs{@@_kernel_class_new:nN}. -% \begin{macrocode} -\group_end: -% \end{macrocode} +% \subsection{Internal messages} % % Error messages needed to actually implement the message system % itself. % \begin{macrocode} -\__kernel_msg_new:nnnn { msg } { already-defined } +\msg_new:nnnn { msg } { already-defined } { Message~'#2'~for~module~'#1'~already~defined. } { \c_@@_coding_error_text_tl @@ -1837,7 +1701,7 @@ by~the~module~'#1':~this~message~already~exists. \c_@@_return_text_tl } -\__kernel_msg_new:nnnn { msg } { unknown } +\msg_new:nnnn { msg } { unknown } { Unknown~message~'#2'~for~module~'#1'. } { \c_@@_coding_error_text_tl @@ -1845,14 +1709,14 @@ by~the~module~'#1':~this~message~does~not~exist. \c_@@_return_text_tl } -\__kernel_msg_new:nnnn { msg } { class-unknown } +\msg_new:nnnn { msg } { class-unknown } { Unknown~message~class~'#1'. } { LaTeX~has~been~asked~to~redirect~messages~to~a~class~'#1':\\ this~was~never~defined. \c_@@_return_text_tl } -\__kernel_msg_new:nnnn { msg } { redirect-loop } +\msg_new:nnnn { msg } { redirect-loop } { Message~redirection~loop~caused~by~ {#1} ~=>~ {#2} \tl_if_empty:nF {#3} { ~for~module~' \use_none:n #3 ' } . @@ -1868,7 +1732,7 @@ % Messages for earlier kernel modules plus a few for \pkg{l3keys} which % cover coding errors. % \begin{macrocode} -\__kernel_msg_new:nnnn { kernel } { bad-number-of-arguments } +\msg_new:nnnn { kernel } { bad-number-of-arguments } { Function~'#1'~cannot~be~defined~with~#2~arguments. } { \c_@@_coding_error_text_tl @@ -1876,7 +1740,7 @@ #2~arguments.~ TeX~allows~between~0~and~9~arguments~for~a~single~function. } -\__kernel_msg_new:nnnn { kernel } { command-already-defined } +\msg_new:nnnn { kernel } { command-already-defined } { Control~sequence~#1~already~defined. } { \c_@@_coding_error_text_tl @@ -1885,28 +1749,21 @@ The~current~meaning~is:\\ \ \ #2 } -\__kernel_msg_new:nnnn { kernel } { command-not-defined } +\msg_new:nnnn { kernel } { command-not-defined } { Control~sequence~#1~undefined. } { \c_@@_coding_error_text_tl LaTeX~has~been~asked~to~use~a~control~sequence~'#1':\\ this~has~not~been~defined~yet. } -\__kernel_msg_new:nnnn { kernel } { empty-search-pattern } +\msg_new:nnnn { kernel } { empty-search-pattern } { Empty~search~pattern. } { \c_@@_coding_error_text_tl LaTeX~has~been~asked~to~replace~an~empty~pattern~by~'#1':~that~ would~lead~to~an~infinite~loop! } -\__kernel_msg_new:nnnn { kernel } { out-of-registers } - { No~room~for~a~new~#1. } - { - TeX~only~supports~\int_use:N \c_max_register_int \ % - of~each~type.~All~the~#1~registers~have~been~used.~ - This~run~will~be~aborted~now. - } -\__kernel_msg_new:nnnn { kernel } { non-base-function } +\msg_new:nnnn { kernel } { non-base-function } { Function~'#1'~is~not~a~base~function } { \c_@@_coding_error_text_tl @@ -1916,7 +1773,7 @@ To~define~variants~use~\iow_char:N\\cs_generate_variant:Nn~ and~to~define~other~functions~use~\iow_char:N\\cs_new:Npn. } -\__kernel_msg_new:nnnn { kernel } { missing-colon } +\msg_new:nnnn { kernel } { missing-colon } { Function~'#1'~contains~no~':'. } { \c_@@_coding_error_text_tl @@ -1925,36 +1782,36 @@ needed~when~defining~conditionals~or~variants,~or~when~building~a~ parameter~text~from~the~number~of~arguments~of~the~function. } -\__kernel_msg_new:nnnn { kernel } { overflow } +\msg_new:nnnn { kernel } { overflow } { Integers~larger~than~2^{30}-1~cannot~be~stored~in~arrays. } { An~attempt~was~made~to~store~#3~ \tl_if_empty:nF {#2} { at~position~#2~ } in~the~array~'#1'.~ The~largest~allowed~value~#4~will~be~used~instead. } -\__kernel_msg_new:nnnn { kernel } { out-of-bounds } +\msg_new:nnnn { kernel } { out-of-bounds } { Access~to~an~entry~beyond~an~array's~bounds. } { An~attempt~was~made~to~access~or~store~data~at~position~#2~of~the~ array~'#1',~but~this~array~has~entries~at~positions~from~1~to~#3. } -\__kernel_msg_new:nnnn { kernel } { protected-predicate } +\msg_new:nnnn { kernel } { protected-predicate } { Predicate~'#1'~must~be~expandable. } { \c_@@_coding_error_text_tl LaTeX~has~been~asked~to~define~'#1'~as~a~protected~predicate.~ Only~expandable~tests~can~have~a~predicate~version. } -\__kernel_msg_new:nnn { kernel } { randint-backward-range } - { Bounds~ordered~backwards~in~\iow_char:N\\int_rand:nn~{#1}~{#2}. } -\__kernel_msg_new:nnnn { kernel } { conditional-form-unknown } +\msg_new:nnn { kernel } { randint-backward-range } + { Wrong~order~of~bounds~in~\iow_char:N\\int_rand:nn{#1}{#2}. } +\msg_new:nnnn { kernel } { conditional-form-unknown } { Conditional~form~'#1'~for~function~'#2'~unknown. } { \c_@@_coding_error_text_tl LaTeX~has~been~asked~to~define~the~conditional~form~'#1'~of~ the~function~'#2',~but~only~'TF',~'T',~'F',~and~'p'~forms~exist. } -\__kernel_msg_new:nnnn { kernel } { variant-too-long } +\msg_new:nnnn { kernel } { variant-too-long } { Variant~form~'#1'~longer~than~base~signature~of~'#2'. } { \c_@@_coding_error_text_tl @@ -1962,7 +1819,7 @@ with~a~signature~starting~with~'#1',~but~that~is~longer~than~ the~signature~(part~after~the~colon)~of~'#2'. } -\__kernel_msg_new:nnnn { kernel } { invalid-variant } +\msg_new:nnnn { kernel } { invalid-variant } { Variant~form~'#1'~invalid~for~base~form~'#2'. } { \c_@@_coding_error_text_tl @@ -1970,7 +1827,7 @@ with~a~signature~starting~with~'#1',~but~cannot~change~an~argument~ from~type~'#3'~to~type~'#4'. } -\__kernel_msg_new:nnnn { kernel } { invalid-exp-args } +\msg_new:nnnn { kernel } { invalid-exp-args } { Invalid~variant~specifier~'#1'~in~'#2'. } { \c_@@_coding_error_text_tl @@ -1978,7 +1835,7 @@ function~with~signature~'N#2'~but~'#1'~is~not~a~valid~argument~ specifier. } -\__kernel_msg_new:nnn { kernel } { deprecated-variant } +\msg_new:nnn { kernel } { deprecated-variant } { Variant~form~'#1'~deprecated~for~base~form~'#2'.~ One~should~not~change~an~argument~from~type~'#3'~to~type~'#4' @@ -1989,20 +1846,20 @@ {#4} { :~base~form~is~already~a~variant. } } { . } } -\__kernel_msg_new:nnn { char } { active } +\msg_new:nnn { char } { active } { Cannot~generate~active~chars. } -\__kernel_msg_new:nnn { char } { invalid-catcode } +\msg_new:nnn { char } { invalid-catcode } { Invalid~catcode~for~char~generation. } -\__kernel_msg_new:nnn { char } { null-space } +\msg_new:nnn { char } { null-space } { Cannot~generate~null~char~as~a~space. } -\__kernel_msg_new:nnn { char } { out-of-range } +\msg_new:nnn { char } { out-of-range } { Charcode~requested~out~of~engine~range. } -\__kernel_msg_new:nnn { char } { space } +\msg_new:nnn { char } { space } { Cannot~generate~space~chars. } -\__kernel_msg_new:nnnn { ior } { quote-in-shell } +\msg_new:nnnn { ior } { quote-in-shell } { Quotes~in~shell~command~'#1'. } { Shell~commands~cannot~contain~quotes~("). } -\__kernel_msg_new:nnnn { keys } { no-property } +\msg_new:nnnn { keys } { no-property } { No~property~given~in~definition~of~key~'#1'. } { \c_@@_coding_error_text_tl @@ -2011,27 +1868,27 @@ \iow_indent:n { #1 . } \\ \\ LaTeX~did~not~find~a~'.'~to~indicate~the~start~of~a~property. } -\__kernel_msg_new:nnnn { keys } { property-boolean-values-only } +\msg_new:nnnn { keys } { property-boolean-values-only } { The~property~'#1'~accepts~boolean~values~only. } { \c_@@_coding_error_text_tl The~property~'#1'~only~accepts~the~values~'true'~and~'false'. } -\__kernel_msg_new:nnnn { keys } { property-requires-value } +\msg_new:nnnn { keys } { property-requires-value } { The~property~'#1'~requires~a~value. } { \c_@@_coding_error_text_tl LaTeX~was~asked~to~set~property~'#1'~for~key~'#2'.\\ No~value~was~given~for~the~property,~and~one~is~required. } -\__kernel_msg_new:nnnn { keys } { property-unknown } +\msg_new:nnnn { keys } { property-unknown } { The~key~property~'#1'~is~unknown. } { \c_@@_coding_error_text_tl LaTeX~has~been~asked~to~set~the~property~'#1'~for~key~'#2':~ this~property~is~not~defined. } -\__kernel_msg_new:nnnn { quark } { invalid-function } +\msg_new:nnnn { quark } { invalid-function } { Quark~test~function~'#1'~is~invalid. } { \c_@@_coding_error_text_tl @@ -2043,14 +1900,14 @@ } \__kernel_msg_new:nnn { quark } { invalid } { Invalid~quark~variable~'#1'. } -\__kernel_msg_new:nnnn { scanmark } { already-defined } +\msg_new:nnnn { scanmark } { already-defined } { Scan~mark~#1~already~defined. } { \c_@@_coding_error_text_tl LaTeX~has~been~asked~to~create~a~new~scan~mark~'#1'~ but~this~name~has~already~been~used~for~a~scan~mark. } -\__kernel_msg_new:nnnn { seq } { shuffle-too-large } +\msg_new:nnnn { seq } { shuffle-too-large } { The~sequence~#1~is~too~long~to~be~shuffled~by~TeX. } { TeX~has~ \int_eval:n { \c_max_register_int + 1 } ~ @@ -2058,14 +1915,14 @@ \int_use:N \c_max_register_int \ items.~ The~list~will~not~be~shuffled. } -\__kernel_msg_new:nnnn { kernel } { variable-not-defined } +\msg_new:nnnn { kernel } { variable-not-defined } { Variable~#1~undefined. } { \c_@@_coding_error_text_tl LaTeX~has~been~asked~to~show~a~variable~#1,~but~this~has~not~ been~defined~yet. } -\__kernel_msg_new:nnnn { kernel } { bad-type } +\msg_new:nnnn { kernel } { bad-type } { Variable~'#1'~is~not~a~valid~#3. } { \c_@@_coding_error_text_tl @@ -2081,7 +1938,7 @@ { internal~structure:\\\\\iow_indent:n {#4} } } } -\__kernel_msg_new:nnnn { kernel } { non-clist } +\msg_new:nnnn { clist } { non-clist } { Variable~'#1'~is~not~a~valid~clist. } { \c_@@_coding_error_text_tl @@ -2097,7 +1954,7 @@ % \texttt{log-functions}, or on the contrary if debugging is turned off. % In format mode the error is somewhat different. % \begin{macrocode} -\__kernel_msg_new:nnnn { debug } { enable-debug } +\msg_new:nnnn { debug } { enable-debug } { To~use~'#1'~set~the~'enable-debug'~option. } { The~function~'#1'~will~be~ignored~because~it~can~only~work~if~ @@ -2111,55 +1968,55 @@ % Some errors only appear in expandable settings, % hence don't need a \enquote{more-text} argument. % \begin{macrocode} -\__kernel_msg_new:nnn { kernel } { bad-exp-end-f } +\msg_new:nnn { kernel } { bad-exp-end-f } { Misused~\exp_end_continue_f:w or~:nw } -\__kernel_msg_new:nnn { kernel } { bad-variable } +\msg_new:nnn { kernel } { bad-variable } { Erroneous~variable~#1 used! } -\__kernel_msg_new:nnn { seq } { misused } +\msg_new:nnn { seq } { misused } { A~sequence~was~misused. } -\__kernel_msg_new:nnn { prop } { misused } +\msg_new:nnn { prop } { misused } { A~property~list~was~misused. } -\__kernel_msg_new:nnn { prg } { negative-replication } +\msg_new:nnn { prg } { negative-replication } { Negative~argument~for~\iow_char:N\\prg_replicate:nn. } -\__kernel_msg_new:nnn { prop } { prop-keyval } +\msg_new:nnn { prop } { prop-keyval } { Missing/extra~'='~in~'#1'~(in~'..._keyval:Nn') } -\__kernel_msg_new:nnn { kernel } { unknown-comparison } - { Relation~'#1'~unknown:~use~=,~<,~>,~==,~!=,~<=,~>=. } -\__kernel_msg_new:nnn { kernel } { zero-step } - { Zero~step~size~for~step~function~#1. } +\msg_new:nnn { kernel } { unknown-comparison } + { Relation~'#1'~not~among~=,<,>,==,!=,<=,>=. } +\msg_new:nnn { kernel } { zero-step } + { Zero~step~size~for~function~#1. } \cs_if_exist:NF \tex_expanded:D { - \__kernel_msg_new:nnn { kernel } { e-type } + \msg_new:nnn { kernel } { e-type } { #1 ~ in~e-type~argument } } % \end{macrocode} % % Messages used by the \enquote{\texttt{show}} functions. % \begin{macrocode} -\__kernel_msg_new:nnn { clist } { show } +\msg_new:nnn { clist } { show } { The~comma~list~ \tl_if_empty:nF {#1} { #1 ~ } \tl_if_empty:nTF {#2} { is~empty \\>~ . } { contains~the~items~(without~outer~braces): #2 . } } -\__kernel_msg_new:nnn { intarray } { show } +\msg_new:nnn { intarray } { show } { The~integer~array~#1~contains~#2~items: \\ #3 . } -\__kernel_msg_new:nnn { prop } { show } +\msg_new:nnn { prop } { show } { The~property~list~#1~ \tl_if_empty:nTF {#2} { is~empty \\>~ . } { contains~the~pairs~(without~outer~braces): #2 . } } -\__kernel_msg_new:nnn { seq } { show } +\msg_new:nnn { seq } { show } { The~sequence~#1~ \tl_if_empty:nTF {#2} { is~empty \\>~ . } { contains~the~items~(without~outer~braces): #2 . } } -\__kernel_msg_new:nnn { kernel } { show-streams } +\msg_new:nnn { kernel } { show-streams } { \tl_if_empty:nTF {#2} { No~ } { The~following~ } \str_case:nn {#1} @@ -2174,13 +2031,13 @@ % % System layer messages % \begin{macrocode} -\__kernel_msg_new:nnnn { sys } { backend-set } +\msg_new:nnnn { sys } { backend-set } { Backend~configuration~already~set. } { Run-time~backend~selection~may~only~be~carried~out~once~during~a~run.~ This~second~attempt~to~set~them~will~be~ignored. } -\__kernel_msg_new:nnnn { sys } { wrong-backend } +\msg_new:nnnn { sys } { wrong-backend } { Backend~request~inconsistent~with~engine:~using~'#2'~backend. } { You~have~requested~backend~'#1',~but~this~is~not~suitable~for~use~with~the~ @@ -2190,104 +2047,31 @@ % % \subsection{Expandable errors} % -% \begin{macro}{\@@_expandable_error:n} -% \begin{macro}{\@@_expandable_error:w} +% \begin{macro}{\@@_expandable_error:nn} % In expansion only context, we cannot use the normal means of -% reporting errors. Instead, we feed \TeX{} an undefined control -% sequence, \cs[module = {}]{LaTeX3 error:}. It is thus interrupted, and shows +% reporting errors. Instead, we rely on a low-level \TeX{} error +% caused by expanding a macro \cs{???} with parameter text ``|?|'' +% (this could be any token) which we used followed by something else +% (here, a space). This shows % the context, which thanks to the odd-looking \cs{use:n} is % \begin{verbatim} -% \LaTeX3 error: -% The error message. +% \??? +% ! mypkg Error: The error message. % \end{verbatim} % In other words, \TeX{} is processing the argument of \cs{use:n}, -% which is \cs[module = {}]{LaTeX3 error:} \meta{error message}. -% Then \cs{@@_expandable_error:w} cleans up. In fact, there -% is an extra subtlety: if the user inserts tokens for error recovery, -% they should be kept. Thus we also use an odd space character -% (with category code $7$) and keep tokens until that space character, -% dropping everything else until \cs{s_@@_stop}. The \cs{exp_end:} prevents -% losing braces around the user-inserted text if any, and stops the -% expansion of \cs{exp:w}. The group is used to prevent -% |\LaTeX3~error:| from being globally equal to \cs{scan_stop:}. +% which is \cs{???} \meta{space} |!| \meta{error type} |:| \meta{error message}. % \begin{macrocode} -\group_begin: -\cs_set_protected:Npn \@@_tmp:w #1#2 +\cs_set_protected:Npn \@@_tmp:w #1 { - \cs_new:Npn \@@_expandable_error:n ##1 + \cs_new:Npn #1 ? { } + \cs_new:Npn \@@_expandable_error:nn ##1##2 { - \exp:w \exp_after:wN \exp_after:wN - \exp_after:wN \@@_expandable_error:w - \exp_after:wN \exp_after:wN - \exp_after:wN \exp_end: - \use:n { #1 #2 ##1 } #2 + \exp_after:wN \@@_use_none_delimit_by_s_stop:w + \use:n { #1 ~ ! ~ ##2 : ~ ##1 } \s_@@_stop } - \cs_new:Npn \@@_expandable_error:w ##1 #2 ##2 #2 {##1} } -\exp_args:Ncx \@@_tmp:w { LaTeX3~error: } - { \char_generate:nn { `\ } { 7 } } -\group_end: -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{macro} -% { -% \__kernel_msg_expandable_error:nnnnnn, -% \__kernel_msg_expandable_error:nnnnn, -% \__kernel_msg_expandable_error:nnnn, -% \__kernel_msg_expandable_error:nnn, -% \__kernel_msg_expandable_error:nn, -% \__kernel_msg_expandable_error:nnffff, -% \__kernel_msg_expandable_error:nnfff, -% \__kernel_msg_expandable_error:nnff, -% \__kernel_msg_expandable_error:nnf, -% } -% The command built from the csname -% \cs{c_@@_text_prefix_tl} |LaTeX / #1 / #2| -% takes four arguments and builds the error text, which is fed to -% \cs{@@_expandable_error:n} with appropriate expansion: just as for -% usual messages the arguments are first turned to strings, then the -% message is fully expanded. -% \begin{macrocode} -\exp_args_generate:n { oooo } -\cs_new:Npn \__kernel_msg_expandable_error:nnnnnn #1#2#3#4#5#6 - { - \exp_args:Ne \@@_expandable_error:n - { - \exp_args:Nc \exp_args:Noooo - { \c_@@_text_prefix_tl LaTeX / #1 / #2 } - { \tl_to_str:n {#3} } - { \tl_to_str:n {#4} } - { \tl_to_str:n {#5} } - { \tl_to_str:n {#6} } - } - } -\cs_new:Npn \__kernel_msg_expandable_error:nnnnn #1#2#3#4#5 - { - \__kernel_msg_expandable_error:nnnnnn - {#1} {#2} {#3} {#4} {#5} { } - } -\cs_new:Npn \__kernel_msg_expandable_error:nnnn #1#2#3#4 - { - \__kernel_msg_expandable_error:nnnnnn - {#1} {#2} {#3} {#4} { } { } - } -\cs_new:Npn \__kernel_msg_expandable_error:nnn #1#2#3 - { - \__kernel_msg_expandable_error:nnnnnn - {#1} {#2} {#3} { } { } { } - } -\cs_new:Npn \__kernel_msg_expandable_error:nn #1#2 - { - \__kernel_msg_expandable_error:nnnnnn - {#1} {#2} { } { } { } { } - } -\cs_generate_variant:Nn \__kernel_msg_expandable_error:nnnnnn { nnffff } -\cs_generate_variant:Nn \__kernel_msg_expandable_error:nnnnn { nnfff } -\cs_generate_variant:Nn \__kernel_msg_expandable_error:nnnn { nnff } -\cs_generate_variant:Nn \__kernel_msg_expandable_error:nnn { nnf } +\exp_args:Nc \@@_tmp:w { ??? } % \end{macrocode} % \end{macro} % @@ -2303,12 +2087,17 @@ % \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 +% The command built from the csname +% \cs{c_@@_text_prefix_tl} |#1 / #2| +% takes four arguments and builds the error text, which is fed to +% \cs{@@_expandable_error:n} with appropriate expansion: just as for +% usual messages the arguments are first turned to strings, then the +% message is fully expanded. The module name also has to be determined. % \begin{macrocode} +\exp_args_generate:n { oooo } \cs_new:Npn \msg_expandable_error:nnnnnn #1#2#3#4#5#6 { - \exp_args:Ne \@@_expandable_error_module:nn + \exp_args:Nee \@@_expandable_error:nn { \exp_args:Nc \exp_args:Noooo { \c_@@_text_prefix_tl #1 / #2 } @@ -2317,7 +2106,7 @@ { \tl_to_str:n {#5} } { \tl_to_str:n {#6} } } - {#1} + { \msg_error_text:n {#1} } } \cs_new:Npn \msg_expandable_error:nnnnn #1#2#3#4#5 { \msg_expandable_error:nnnnnn {#1} {#2} {#3} {#4} {#5} { } } @@ -2331,15 +2120,28 @@ \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 +% \end{macrocode} +% \end{macro} +% +% \subsection{Message formatting} +% +% \begin{macrocode} +\prop_gput:Nnn \g_msg_module_name_prop { kernel } { LaTeX3 } +\prop_gput:Nnn \g_msg_module_type_prop { kernel } { } +\clist_map_inline:nn { - \exp_after:wN \exp_after:wN - \exp_after:wN \@@_use_none_delimit_by_s_stop:w - \use:n { \::error ! ~ #2 : ~ #1 } \s_@@_stop + char , clist , coffin , debug , deprecation , msg , + quark , prg , prop , scanmark , seq , sys } + { + \prop_gput:Nnn \g_msg_module_name_prop {#1} { LaTeX3 } + \prop_gput:Nnn \g_msg_module_type_prop {#1} { } + } +\prop_gput:Nnn \g_msg_module_name_prop { LaTeX / cmd } { LaTeX3 } +\prop_gput:Nnn \g_msg_module_type_prop { LaTeX / cmd } { } +\prop_gput:Nnn \g_msg_module_name_prop { LaTeX / ltcmd } { LaTeX3 } +\prop_gput:Nnn \g_msg_module_type_prop { LaTeX / ltcmd } { } % \end{macrocode} -% \end{macro} -% \end{macro} % % \begin{macrocode} % diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx index 13904fbbaf..63216bd3ab 100644 --- a/macros/latex/contrib/l3kernel/l3names.dtx +++ b/macros/latex/contrib/l3kernel/l3names.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1193,6 +1193,8 @@ % \end{macrocode} % Newer cross-engine primitives. % \begin{macrocode} + \@@_primitive:NN \partokencontext \tex_partokencontext:D + \@@_primitive:NN \partokenname \tex_partokenname:D \@@_primitive:NN \tracingstacklevels \tex_tracingstacklevels:D % \end{macrocode} % End of the \enquote{just the names} part of the source. diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf index d22238c0dd..1099a4b2ad 100644 Binary files a/macros/latex/contrib/l3kernel/l3news.pdf and b/macros/latex/contrib/l3kernel/l3news.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news01.pdf b/macros/latex/contrib/l3kernel/l3news01.pdf index 70073206a0..1ea1cc2d78 100644 Binary files a/macros/latex/contrib/l3kernel/l3news01.pdf and b/macros/latex/contrib/l3kernel/l3news01.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news02.pdf b/macros/latex/contrib/l3kernel/l3news02.pdf index 64d37bc644..6306bba5e1 100644 Binary files a/macros/latex/contrib/l3kernel/l3news02.pdf and b/macros/latex/contrib/l3kernel/l3news02.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news03.pdf b/macros/latex/contrib/l3kernel/l3news03.pdf index 77b6bb2243..f54ec43f12 100644 Binary files a/macros/latex/contrib/l3kernel/l3news03.pdf and b/macros/latex/contrib/l3kernel/l3news03.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news04.pdf b/macros/latex/contrib/l3kernel/l3news04.pdf index 62cda66f24..bc18d056df 100644 Binary files a/macros/latex/contrib/l3kernel/l3news04.pdf and b/macros/latex/contrib/l3kernel/l3news04.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news05.pdf b/macros/latex/contrib/l3kernel/l3news05.pdf index 85b9f321cd..591819232a 100644 Binary files a/macros/latex/contrib/l3kernel/l3news05.pdf and b/macros/latex/contrib/l3kernel/l3news05.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news06.pdf b/macros/latex/contrib/l3kernel/l3news06.pdf index b08dc9a31a..2c8b4210b2 100644 Binary files a/macros/latex/contrib/l3kernel/l3news06.pdf and b/macros/latex/contrib/l3kernel/l3news06.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news07.pdf b/macros/latex/contrib/l3kernel/l3news07.pdf index e014af8e0f..11fe7ee24f 100644 Binary files a/macros/latex/contrib/l3kernel/l3news07.pdf and b/macros/latex/contrib/l3kernel/l3news07.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news08.pdf b/macros/latex/contrib/l3kernel/l3news08.pdf index 4aa1dbfe54..6507f3c1cf 100644 Binary files a/macros/latex/contrib/l3kernel/l3news08.pdf and b/macros/latex/contrib/l3kernel/l3news08.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news09.pdf b/macros/latex/contrib/l3kernel/l3news09.pdf index 72c6f8c483..d65f8a6479 100644 Binary files a/macros/latex/contrib/l3kernel/l3news09.pdf and b/macros/latex/contrib/l3kernel/l3news09.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news10.pdf b/macros/latex/contrib/l3kernel/l3news10.pdf index 08f15c074e..46faec805f 100644 Binary files a/macros/latex/contrib/l3kernel/l3news10.pdf and b/macros/latex/contrib/l3kernel/l3news10.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news11.pdf b/macros/latex/contrib/l3kernel/l3news11.pdf index 333a1835d1..e72a882322 100644 Binary files a/macros/latex/contrib/l3kernel/l3news11.pdf and b/macros/latex/contrib/l3kernel/l3news11.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news12.pdf b/macros/latex/contrib/l3kernel/l3news12.pdf index 2f7c4c8b94..2914e04001 100644 Binary files a/macros/latex/contrib/l3kernel/l3news12.pdf and b/macros/latex/contrib/l3kernel/l3news12.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3pdf.dtx b/macros/latex/contrib/l3kernel/l3pdf.dtx index e58d87f648..27875f0ca6 100644 --- a/macros/latex/contrib/l3kernel/l3pdf.dtx +++ b/macros/latex/contrib/l3kernel/l3pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3prefixes.csv b/macros/latex/contrib/l3kernel/l3prefixes.csv index 3330c62273..2c1d7cab43 100644 --- a/macros/latex/contrib/l3kernel/l3prefixes.csv +++ b/macros/latex/contrib/l3kernel/l3prefixes.csv @@ -15,9 +15,11 @@ arch,archaeologie,Lukas C. Bossert,http://www.biblatex-archaeologie.de,https://g array,hobby,Andrew Stacey,https://github.com/loopspace/hobby,https://github.com/loopspace/hobby,https://github.com/loopspace/hobby/issues,2013-03-16,2020-10-29, atsign,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, avm,langsci-avm,Felix Kopecky,https://ctan.org/pkg/langsci-avm,https://github.com/langsci/langsci-avm,https://github.com/langsci/langsci-avm/issues,2020-03-11,2020-03-11, +babellatin,babel-latin,Keno Wehr,https://ctan.org/pkg/babel-latin,https://github.com/wehro/babel-latin,https://github.com/wehro/babel-latin/issues,2021-08-23,2021-08-23, backend,l3backend,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2019-06-04,2019-06-04, backslash,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, bearwear,bearwear,Ulrike Fischer,https://github.com/u-fischer/bearwear,https://github.com/u-fischer/bearwear,https://github.com/u-fischer/bearwear/issues,2020-04-24,2020-04-24, +beuron,beuron,Keno Wehr,https://ctan.org/pkg/beuron,,,2021-08-23,2021-08-23, bitset,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2020-12-26,2020-12-26, bool,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, box,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, @@ -65,6 +67,7 @@ emojicite,emojicite,Leon Sixt,https://github.com/berleon/emojicite,https://githu empty,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, enotez,enotez,Clemens Niederberger,https://github.com/cgnieder/enotez/,https://github.com/cgnieder/enotez.git,https://github.com/cgnieder/enotez/issues,2013-03-16,2020-04-14, etex,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, +etl,etl,Jonathan P. Spratte,https://github.com/Skillmon/ltx_etl,git@github.com:Skillmon/ltx_etl.git,https://github.com/Skillmon/ltx_etl/issues,2021-08-16,2021-08-16, exp,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, expl,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, exsheets,exsheets,Clemens Niederberger,https://bitbucket.org/cgnieder/exsheets/,git@bitbucket.org:cgnieder/exsheets.git,https://bitbucket.org/cgnieder/exsheets/issues,2013-03-16,2013-03-16, @@ -115,6 +118,7 @@ keys,"l3kernel,l3keys2e",The LaTeX Project,https://www.latex-project.org/latex3. keyval,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, kgl,kantlipsum,Enrico Gregorio,,,,2013-03-16,2013-03-16, kivitendo,"kiviletter, kivitables",Marei Peischl for Kivitendo,https://www.kivitendo.de/,https://github.com/kivitendo/kivitendo-erp,https://forum.kivitendo.de/,2021-05-28,2021-05-28, +langsci,langscibook ,Language Science Press,https://langsci-press.org,https://github.com/langsci/langscibook,https://github.com/langsci/langscibook/issues,2021-07-20,2021-07-21, left,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, lltxmath,lualatex-math,Philipp Stephani,https://github.com/phst/lualatex-math,https://github.com/phst/lualatex-math.git,https://github.com/phst/lualatex-math/issues,2012-11-07,2012-11-07, 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, @@ -167,6 +171,7 @@ peek,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https: percent,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, pgf,pgf,The PGF/TikZ Team,https://pgf-tikz.github.io,https://github.com/pgf-tikz/pgf,https://github.com/pgf-tikz/pgf/issues,2020-07-03,2020-07-03, pgfmxfp,pgfmath-xfp,Jonathan P. Spratte,https://github.com/Skillmon/ltx_pgfmath-xfp,https://github.com/Skillmon/ltx_pgfmath-xfp,https://github.com/Skillmon/ltx_pgfmath-xfp/issues,2021-05-20,2021-05-20, +phone,phonenumbers,Keno Wehr,https://ctan.org/pkg/phonenumbers,https://github.com/wehro/phonenumbers,https://github.com/wehro/phonenumbers/issues,2021-08-23,2021-08-23, pi,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, pkgploader,pkgploader,Michiel Helvensteijn,,,,2014-02-05,2014-02-05, platex,platex,Japanese TeX Development Community,https://github.com/texjporg/platex,https://github.com/texjporg/platex.git,https://github.com/texjporg/platex/issues,2020-09-30,2020-09-30, @@ -189,6 +194,7 @@ right,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https rivbook,rivbook,Julien Rivaud,,,,2018-06-13,2018-06-14, rivmath,rivmath,Julien Rivaud,,,,2018-06-13,2018-06-13, scan,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, +schulma,schulmathematik,Keno Wehr,https://ctan.org/pkg/schulmathematik,,,2021-08-23,2021-08-23, scontents,scontents,Pablo González,https://github.com/pablgonz/scontents,git@github.com:pablgonz/scontents.git,https://github.com/pablgonz/scontents/issues,2019-12-05,2019-12-05, sdaps,sdaps,Benjamin Berg,https://sdaps.org,https://github.com/sdaps/sdaps-class.git,https://github.com/sdaps/sdaps-class/issues,2020-02-17,2020-02-17, seq,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, @@ -246,4 +252,5 @@ yoin,yoin,Tom Hejda,https://github.com/tohecz/yoin,https://github.com/tohecz/yoi zero,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, zhlipsum,zhlipsum,Xiangdong Zeng,https://github.com/stone-zeng/zhlipsum,https://github.com/stone-zeng/zhlipsum.git,https://github.com/stone-zeng/zhlipsum/issues,2018-06-14,2018-06-14, zhnum,zhnumber,Qing Lee,https://github.com/CTeX-org/ctex-kit,https://github.com/CTeX-org/ctex-kit.git,https://github.com/CTeX-org/ctex-kit/issues,2013-03-16,2013-05-26, +zrefcheck,zref-check,Gustavo Barros,https://github.com/gusbrs/zref-check,https://github.com/gusbrs/zref-check,https://github.com/gusbrs/zref-check/issues,2021-08-05,2021-08-05, zxjt,zxjatype,Takayuki Yato,,,,2013-03-16,2013-03-16, diff --git a/macros/latex/contrib/l3kernel/l3prefixes.pdf b/macros/latex/contrib/l3kernel/l3prefixes.pdf index 03c390a8d6..509e23643c 100644 Binary files a/macros/latex/contrib/l3kernel/l3prefixes.pdf and b/macros/latex/contrib/l3kernel/l3prefixes.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3prg.dtx b/macros/latex/contrib/l3kernel/l3prg.dtx index 1053097c6f..7c863f2a11 100644 --- a/macros/latex/contrib/l3kernel/l3prg.dtx +++ b/macros/latex/contrib/l3kernel/l3prg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -994,7 +994,7 @@ \c_false_bool { \exp_args:Nx #1 { \token_to_str:N #2 = false } } } { - \__kernel_msg_error:nnxxx { kernel } { bad-type } + \msg_error:nnxxx { kernel } { bad-type } { \token_to_str:N #2 } { \token_to_meaning:N #2 } { bool } } } @@ -1550,7 +1550,7 @@ \cs_new:cpn { @@_replicate_first_-:n } #1 { \exp_end: - \__kernel_msg_expandable_error:nn { prg } { negative-replication } + \msg_expandable_error:nn { prg } { negative-replication } } \cs_new:cpn { @@_replicate_first_0:n } #1 { \exp_end: } \cs_new:cpn { @@_replicate_first_1:n } #1 { \exp_end: #1 } diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx index 5cdd55d178..88c60018f4 100644 --- a/macros/latex/contrib/l3kernel/l3prop.dtx +++ b/macros/latex/contrib/l3kernel/l3prop.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -124,7 +124,7 @@ % \} % \end{syntax} % Sets \meta{prop~var} to contain key--value pairs given in the second -% argument. If duplicate keys appear only one of the values is kept. +% argument. If duplicate keys appear only the last of the values is kept. % % Spaces are trimmed around every \meta{key} and every \meta{value}, % and if the result of trimming spaces consists of a single brace @@ -146,7 +146,7 @@ % name is already taken. The \meta{prop~var} is set globally to % contain key--value pairs given in the second argument, processed in % the way described for \cs{prop_set_from_keyval:Nn}. If duplicate -% keys appear only one of the values is kept. +% keys appear only the last of the values is kept. % \end{function} % % \section{Adding and updating property list entries} @@ -202,8 +202,7 @@ % Combines the key--value pairs of \meta{prop~var_2} and % \meta{prop~var_3}, and saves the result in \meta{prop~var_1}. If a % key appears in both \meta{prop~var_2} and \meta{prop~var_3} then the -% last value, namely the value in \meta{prop~var_3} is kept while the -% other is discarded. +% last value, namely the value in \meta{prop~var_3} is kept. % \end{function} % % \begin{function}[added = 2021-05-16] @@ -223,7 +222,7 @@ % \cs{prop_put:Nnn}, hence if the \meta{prop~var} already contains % some of the keys, the corresponding values are discarded and % replaced by those given in the key--value list. If duplicate keys -% appear in the key--value list then only one of the values is kept. +% appear in the key--value list then only the last of the values is kept. % % The function is equivalent to storing the key--value pairs in a % temporary property variable using \cs{prop_set_from_keyval:Nn}, then @@ -649,7 +648,7 @@ % error and removes its argument. % \begin{macrocode} \cs_new:Npn \@@_pair:wn #1 \s_@@ #2 - { \__kernel_msg_expandable_error:nn { prop } { misused } } + { \msg_expandable_error:nn { prop } { misused } } % \end{macrocode} % \end{macro} % @@ -903,7 +902,7 @@ { \tl_if_empty:nF { #3 #1 #2 } { - \__kernel_msg_error:nnx { prop } { prop-keyval } + \msg_error:nnx { prop } { prop-keyval } { \exp_not:o {#4} } } } @@ -1433,9 +1432,9 @@ % we use \cs{msg_show_item:nn} to format both the key and the value % for each pair. % \begin{macrocode} -\cs_new_protected:Npn \prop_show:N { \@@_show:NN \__kernel_msg_show:nnxxxx } +\cs_new_protected:Npn \prop_show:N { \@@_show:NN \msg_show:nnxxxx } \cs_generate_variant:Nn \prop_show:N { c } -\cs_new_protected:Npn \prop_log:N { \@@_show:NN \__kernel_msg_log:nnxxxx } +\cs_new_protected:Npn \prop_log:N { \@@_show:NN \msg_log:nnxxxx } \cs_generate_variant:Nn \prop_log:N { c } \cs_new_protected:Npn \@@_show:NN #1#2 { diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx index 40923da37b..1e322ed365 100644 --- a/macros/latex/contrib/l3kernel/l3quark.dtx +++ b/macros/latex/contrib/l3kernel/l3quark.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -640,7 +640,7 @@ \cs_new_protected:Npn \@@_new_test_aux:Nn #1 #2 { \if_meaning:w \q_nil #2 \q_nil - \__kernel_msg_error:nnx { quark } { invalid-function } + \msg_error:nnx { quark } { invalid-function } { \token_to_str:N #1 } \else: \@@_new_test:Nccn #1 @@ -664,11 +664,11 @@ \cs_new_protected:Npn \@@_new_conditional:Nnnn #1#2#3#4 { \if_meaning:w \q_nil #2 \q_nil - \__kernel_msg_error:nnx { quark } { invalid-function } + \msg_error:nnx { quark } { invalid-function } { \token_to_str:N #1 } \else: \if_meaning:w \q_nil #3 \q_nil - \__kernel_msg_error:nnx { quark } { invalid-function } + \msg_error:nnx { quark } { invalid-function } { \token_to_str:N #1 } \else: \exp_last_unbraced:Nf \@@_new_test_aux:nnNNnnnn @@ -683,7 +683,7 @@ { \cs_if_exist_use:cTF { @@_new_#5_#2:Nnnn } { #4 } { - \__kernel_msg_error:nnxx { quark } { invalid-function } + \msg_error:nnxx { quark } { invalid-function } { \token_to_str:N #4 } {#2} \use_none:nnn } @@ -960,7 +960,7 @@ { \tl_if_in:NnTF \g_@@_marks_tl { #1 } { - \__kernel_msg_error:nnx { scanmark } { already-defined } + \msg_error:nnx { scanmark } { already-defined } { \token_to_str:N #1 } } { diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx index 5005284d33..fc68a0eeea 100644 --- a/macros/latex/contrib/l3kernel/l3regex.dtx +++ b/macros/latex/contrib/l3kernel/l3regex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1633,7 +1633,7 @@ \cs_new_eq:cN { @@_escape_ \iow_char:N\\scan_stop: :w } \prg_break: \cs_new:cpn { @@_escape_/ \iow_char:N\\scan_stop: :w } { - \__kernel_msg_expandable_error:nn { regex } { trailing-backslash } + \msg_expandable_error:nn { regex } { trailing-backslash } \prg_break: } \cs_new:cpn { @@_escape_~:w } { } @@ -1670,7 +1670,7 @@ { \int_compare:nNnTF {#1} > \c_max_char_int { - \__kernel_msg_expandable_error:nnff { regex } { x-overflow } + \msg_expandable_error:nnff { regex } { x-overflow } {#1} { \int_to_Hex:n {#1} } } { @@ -1765,7 +1765,7 @@ } \cs_new:Npn \@@_escape_x_loop_error:n #1 { - \__kernel_msg_expandable_error:nnn { regex } { x-missing-rbrace } {#1} + \msg_expandable_error:nnn { regex } { x-missing-rbrace } {#1} \@@_escape_loop:N #1 } % \end{macrocode} @@ -2202,7 +2202,7 @@ \if_int_compare:w \l_@@_mode_int = \c_@@_class_mode_int \exp_after:wN \exp_after:wN \exp_after:wN \use:n \else: - \__kernel_msg_error:nn { regex } { c-bad-mode } + \msg_error:nn { regex } { c-bad-mode } \exp_after:wN \exp_after:wN \exp_after:wN \use_none:n \fi: \fi: @@ -2255,13 +2255,13 @@ { \@@_if_in_class:TF { - \__kernel_msg_error:nn { regex } { missing-rbrack } + \msg_error:nn { regex } { missing-rbrack } \use:c { @@_compile_]: } \prg_do_nothing: \prg_do_nothing: } { } \if_int_compare:w \l_@@_group_level_int > \c_zero_int - \__kernel_msg_error:nnx { regex } { missing-rparen } + \msg_error:nnx { regex } { missing-rparen } { \int_use:N \l_@@_group_level_int } \prg_replicate:nn { \l_@@_group_level_int } @@ -2318,10 +2318,10 @@ \prg_do_nothing: \prg_do_nothing: \prg_do_nothing: \prg_do_nothing: \int_compare:nNnT \l_@@_mode_int = \c_@@_catcode_mode_int - { \__kernel_msg_error:nn { regex } { c-trailing } } + { \msg_error:nn { regex } { c-trailing } } \int_compare:nNnT \l_@@_mode_int < \c_@@_outer_mode_int { - \__kernel_msg_error:nn { regex } { c-missing-rbrace } + \msg_error:nn { regex } { c-missing-rbrace } \@@_compile_end_cs: \prg_do_nothing: \prg_do_nothing: \prg_do_nothing: \prg_do_nothing: @@ -2447,7 +2447,7 @@ \cs_new_protected:Npn \@@_compile_quantifier_abort:xNN #1#2#3 { \@@_compile_quantifier_none: - \__kernel_msg_warning:nnxx { regex } { invalid-quantifier } {#1} {#3} + \msg_warning:nnxx { regex } { invalid-quantifier } {#1} {#3} \@@_compile_abort_tokens:x {#1} #2 #3 } @@ -2563,7 +2563,7 @@ { \if_int_compare:w \l_@@_internal_a_int > \l_@@_internal_b_int - \__kernel_msg_error:nnxx { regex } { backwards-quantifier } + \msg_error:nnxx { regex } { backwards-quantifier } { \int_use:N \l_@@_internal_a_int } { \int_use:N \l_@@_internal_b_int } \int_zero:N \l_@@_internal_b_int @@ -2597,7 +2597,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_compile_raw_error:N #1 { - \__kernel_msg_error:nnx { regex } { bad-escape } {#1} + \msg_error:nnx { regex } { bad-escape } {#1} \@@_compile_raw:N #1 } % \end{macrocode} @@ -2656,7 +2656,7 @@ \@@_if_end_range:NNTF #2 #3 { \if_int_compare:w `#1 > `#3 \exp_stop_f: - \__kernel_msg_error:nnxx { regex } { range-backwards } {#1} {#3} + \msg_error:nnxx { regex } { range-backwards } {#1} {#3} \else: \tl_build_put_right:Nx \l_@@_build_tl { @@ -2670,7 +2670,7 @@ \fi: } { - \__kernel_msg_warning:nnxx { regex } { range-missing-end } + \msg_warning:nnxx { regex } { range-missing-end } {#1} { \c_backslash_str #3 } \tl_build_put_right:Nx \l_@@_build_tl { @@ -2933,11 +2933,11 @@ { : { \@@_compile_class_posix:NNNNw } = { - \__kernel_msg_warning:nnx { regex } + \msg_warning:nnx { regex } { posix-unsupported } { = } } . { - \__kernel_msg_warning:nnx { regex } + \msg_warning:nnx { regex } { posix-unsupported } { . } } } @@ -2979,7 +2979,7 @@ } } { - \__kernel_msg_warning:nnx { regex } { posix-unknown } + \msg_warning:nnx { regex } { posix-unknown } { \l_@@_internal_a_tl } \@@_compile_abort_tokens:x { @@ -2989,7 +2989,7 @@ } } { - \__kernel_msg_error:nnxx { regex } { posix-missing-close } + \msg_error:nnxx { regex } { posix-missing-close } { [: \l_@@_internal_a_tl } { #2 #4 } \@@_compile_abort_tokens:x { [: \l_@@_internal_a_tl } #1 #2 #3 #4 @@ -3035,7 +3035,7 @@ \int_set_eq:NN \l_@@_catcodes_int \l_@@_default_catcodes_int \exp_after:wN \@@_compile_quantifier:w \else: - \__kernel_msg_warning:nn { regex } { extra-rparen } + \msg_warning:nn { regex } { extra-rparen } \exp_after:wN \@@_compile_raw:N \exp_after:wN ) \fi: } @@ -3054,7 +3054,7 @@ { \if_int_compare:w \l_@@_mode_int = \c_@@_catcode_in_class_mode_int - \__kernel_msg_error:nn { regex } { c-lparen-in-class } + \msg_error:nn { regex } { c-lparen-in-class } \exp_after:wN \@@_compile_raw:N \exp_after:wN ( \else: \exp_after:wN \@@_compile_lparen:w @@ -3068,7 +3068,7 @@ \cs_if_exist_use:cF { @@_compile_special_group_\token_to_str:N #4 :w } { - \__kernel_msg_warning:nnx { regex } { special-group-unknown } + \msg_warning:nnx { regex } { special-group-unknown } { (? #4 } \@@_compile_group_begin:N \@@_group:nnnN \@@_compile_raw:N ? #3 #4 @@ -3137,7 +3137,7 @@ { \@@_item_caseless_range:nn } } { - \__kernel_msg_warning:nnx { regex } { unknown-option } { (?i #2 } + \msg_warning:nnx { regex } { unknown-option } { (?i #2 } \@@_compile_raw:N ( \@@_compile_raw:N ? \@@_compile_raw:N i @@ -3156,7 +3156,7 @@ { \@@_item_caseful_range:nn } } { - \__kernel_msg_warning:nnx { regex } { unknown-option } { (?-#2#4 } + \msg_warning:nnx { regex } { unknown-option } { (?-#2#4 } \@@_compile_raw:N ( \@@_compile_raw:N ? \@@_compile_raw:N - @@ -3195,7 +3195,7 @@ } { \cs_if_exist_use:cF { @@_compile_c_#2:w } } { - \__kernel_msg_error:nnx { regex } { c-missing-category } {#2} + \msg_error:nnx { regex } { c-missing-category } {#2} #1 #2 } } @@ -3216,7 +3216,7 @@ { \token_if_eq_charcode:NNF #2 ( } % ) } { \use:n } - { \__kernel_msg_error:nnn { regex } { c-C-invalid } {#2} } + { \msg_error:nnn { regex } { c-C-invalid } {#2} } #1 #2 } % \end{macrocode} @@ -3269,7 +3269,7 @@ { \@@_compile_c_lbrack_end: } } { - \__kernel_msg_error:nnx { regex } { c-missing-rbrack } {#2} + \msg_error:nnx { regex } { c-missing-rbrack } {#2} \@@_compile_c_lbrack_end: #1 #2 } @@ -3320,7 +3320,7 @@ \cs_new_protected:cpn { @@_compile_ \c_left_brace_str : } { \@@_if_in_cs:TF - { \__kernel_msg_error:nnn { regex } { cu-lbrace } { c } } + { \msg_error:nnn { regex } { cu-lbrace } { c } } { \exp_after:wN \@@_compile_raw:N \c_left_brace_str } } % \end{macrocode} @@ -3442,7 +3442,7 @@ \@@_compile_u_loop:NN } { - \__kernel_msg_error:nn { regex } { u-missing-lbrace } + \msg_error:nn { regex } { u-missing-lbrace } \token_if_eq_meaning:NNTF #1 \@@_compile_ur_end: { \@@_compile_raw:N u \@@_compile_raw:N r } { \@@_compile_raw:N u } @@ -3472,7 +3472,7 @@ { \if_false: { \fi: } \l_@@_internal_b_tl } { \if_charcode:w \c_left_brace_str #2 - \__kernel_msg_expandable_error:nnn { regex } { cu-lbrace } { u } + \msg_expandable_error:nnn { regex } { cu-lbrace } { u } \else: #2 \fi: @@ -3481,7 +3481,7 @@ } { \if_false: { \fi: } - \__kernel_msg_error:nnx { regex } { u-missing-rbrace } {#2} + \msg_error:nnx { regex } { u-missing-rbrace } {#2} \l_@@_internal_b_tl #1 #2 } @@ -5597,14 +5597,14 @@ {#1} \prg_do_nothing: \prg_do_nothing: \if_int_compare:w \l_@@_replacement_csnames_int > \c_zero_int - \__kernel_msg_error:nnx { regex } { replacement-missing-rbrace } + \msg_error:nnx { regex } { replacement-missing-rbrace } { \int_use:N \l_@@_replacement_csnames_int } \tl_build_put_right:Nx \l_@@_build_tl { \prg_replicate:nn \l_@@_replacement_csnames_int \cs_end: } \fi: \seq_if_empty:NF \l_@@_replacement_category_seq { - \__kernel_msg_error:nnx { regex } { replacement-missing-rparen } + \msg_error:nnx { regex } { replacement-missing-rparen } { \seq_count:N \l_@@_replacement_category_seq } \seq_clear:N \l_@@_replacement_category_seq } @@ -5747,7 +5747,7 @@ \if_int_compare:w #1 < \l_@@_capturing_group_int \@@_replacement_put_submatch_aux:n {#1} \else: - \__kernel_msg_expandable_error:nnff { regex } { submatch-too-big } + \msg_expandable_error:nnff { regex } { submatch-too-big } {#1} { \int_eval:n { \l_@@_capturing_group_int - 1 } } \fi: } @@ -5894,7 +5894,7 @@ \cs_new_protected:Npn \@@_replacement_lbrace:N #1 { \if_int_compare:w \l_@@_replacement_csnames_int > \c_zero_int - \__kernel_msg_error:nnn { regex } { cu-lbrace } { u } + \msg_error:nnn { regex } { cu-lbrace } { u } \else: \@@_replacement_normal:n {#1} \fi: @@ -5915,11 +5915,11 @@ \cs_new_protected:Npn \@@_replacement_cat:NNN #1#2#3 { \token_if_eq_meaning:NNTF \prg_do_nothing: #3 - { \__kernel_msg_error:nn { regex } { replacement-catcode-end } } + { \msg_error:nn { regex } { replacement-catcode-end } } { \int_compare:nNnTF { \l_@@_replacement_csnames_int } > 0 { - \__kernel_msg_error:nnnn + \msg_error:nnnn { regex } { replacement-catcode-in-cs } {#1} {#3} #2 #3 } @@ -5935,7 +5935,7 @@ { \@@_char_if_alphanumeric:NTF #3 { - \__kernel_msg_error:nnnn + \msg_error:nnnn { regex } { replacement-catcode-escaped } {#1} {#3} } @@ -6100,7 +6100,7 @@ \cs_new_protected:Npn \@@_replacement_c_S:w #1#2 { \if_int_compare:w `#2 = \c_zero_int - \__kernel_msg_error:nn { regex } { replacement-null-space } + \msg_error:nn { regex } { replacement-null-space } \fi: \tex_lccode:D `\ = `#2 \scan_stop: \tex_lowercase:D { \@@_replacement_put:n {~} } @@ -6143,7 +6143,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_replacement_error:NNN #1#2#3 { - \__kernel_msg_error:nnx { regex } { replacement-#1 } {#3} + \msg_error:nnx { regex } { replacement-#1 } {#3} #2 #3 } % \end{macrocode} @@ -6201,8 +6201,8 @@ % Then show the variable with some appropriate text. The auxiliary % \cs{@@_show:N} is defined in a different section. % \begin{macrocode} -\cs_new_protected:Npn \regex_show:n { \@@_show:Nn \__kernel_msg_show:nnxxxx } -\cs_new_protected:Npn \regex_log:n { \@@_show:Nn \__kernel_msg_log:nnxxxx } +\cs_new_protected:Npn \regex_show:n { \@@_show:Nn \msg_show:nnxxxx } +\cs_new_protected:Npn \regex_log:n { \@@_show:Nn \msg_log:nnxxxx } \cs_new_protected:Npn \@@_show:Nn #1#2 { \@@_compile:n {#2} @@ -6211,8 +6211,8 @@ { \tl_to_str:n {#2} } { } { \l_@@_internal_a_tl } { } } -\cs_new_protected:Npn \regex_show:N { \@@_show:NN \__kernel_msg_show:nnxxxx } -\cs_new_protected:Npn \regex_log:N { \@@_show:NN \__kernel_msg_log:nnxxxx } +\cs_new_protected:Npn \regex_show:N { \@@_show:NN \msg_show:nnxxxx } +\cs_new_protected:Npn \regex_log:N { \@@_show:NN \msg_log:nnxxxx } \cs_new_protected:Npn \@@_show:NN #1#2 { \__kernel_chk_tl_type:NnnT #2 { regex } @@ -6561,7 +6561,7 @@ \int_compare:nNnT { \l_@@_added_begin_int + \l_@@_added_end_int } > 0 { - \__kernel_msg_error:nnxxx { regex } { result-unbalanced } + \msg_error:nnxxx { regex } { result-unbalanced } { splitting~or~extracting~submatches } { \int_use:N \l_@@_added_begin_int } { \int_use:N \l_@@_added_end_int } @@ -6876,7 +6876,7 @@ \@@_group_end_replace_try: \int_compare:nNnT { \l_@@_added_begin_int + \l_@@_added_end_int } > 0 { - \__kernel_msg_error:nnxxx { regex } { result-unbalanced } + \msg_error:nnxxx { regex } { result-unbalanced } { replacing } { \int_use:N \l_@@_added_begin_int } { \int_use:N \l_@@_added_end_int } } @@ -7287,14 +7287,14 @@ % \begin{macrocode} \use:x { - \__kernel_msg_new:nnn { regex } { trailing-backslash } - { Trailing~escape~char~'\iow_char:N\\'~in~regex~or~replacement. } - \__kernel_msg_new:nnn { regex } { x-missing-rbrace } + \msg_new:nnn { regex } { trailing-backslash } + { Trailing~'\iow_char:N\\'~in~regex~or~replacement. } + \msg_new:nnn { regex } { x-missing-rbrace } { Missing~brace~'\iow_char:N\}'~in~regex~ '...\iow_char:N\\x\iow_char:N\{...##1'. } - \__kernel_msg_new:nnn { regex } { x-overflow } + \msg_new:nnn { regex } { x-overflow } { Character~code~##1~too~large~in~ \iow_char:N\\x\iow_char:N\{##2\iow_char:N\}~regex. @@ -7304,7 +7304,7 @@ % % Invalid quantifier. % \begin{macrocode} -\__kernel_msg_new:nnnn { regex } { invalid-quantifier } +\msg_new:nnnn { regex } { invalid-quantifier } { Braced~quantifier~'#1'~may~not~be~followed~by~'#2'. } { The~character~'#2'~is~invalid~in~the~braced~quantifier~'#1'.~ @@ -7316,13 +7316,13 @@ % Messages for missing or extra closing brackets and parentheses, with % some fancy singular/plural handling for the case of parentheses. % \begin{macrocode} -\__kernel_msg_new:nnnn { regex } { missing-rbrack } +\msg_new:nnnn { regex } { missing-rbrack } { Missing~right~bracket~inserted~in~regular~expression. } { LaTeX~was~given~a~regular~expression~where~a~character~class~ was~started~with~'[',~but~the~matching~']'~is~missing. } -\__kernel_msg_new:nnnn { regex } { missing-rparen } +\msg_new:nnnn { regex } { missing-rparen } { Missing~right~ \int_compare:nTF { #1 = 1 } { parenthesis } { parentheses } ~ @@ -7332,7 +7332,7 @@ LaTeX~was~given~a~regular~expression~with~\int_eval:n {#1} ~ more~left~parentheses~than~right~parentheses. } -\__kernel_msg_new:nnnn { regex } { extra-rparen } +\msg_new:nnnn { regex } { extra-rparen } { Extra~right~parenthesis~ignored~in~regular~expression. } { LaTeX~came~across~a~closing~parenthesis~when~no~submatch~group~ @@ -7342,7 +7342,7 @@ % % Some escaped alphanumerics are not allowed everywhere. % \begin{macrocode} -\__kernel_msg_new:nnnn { regex } { bad-escape } +\msg_new:nnnn { regex } { bad-escape } { Invalid~escape~'\iow_char:N\\#1'~ \@@_if_in_cs:TF { within~a~control~sequence. } @@ -7370,14 +7370,14 @@ % % Range errors. % \begin{macrocode} -\__kernel_msg_new:nnnn { regex } { range-missing-end } +\msg_new:nnnn { regex } { range-missing-end } { Invalid~end-point~for~range~'#1-#2'~in~character~class. } { The~end-point~'#2'~of~the~range~'#1-#2'~may~not~serve~as~an~ end-point~for~a~range:~alphanumeric~characters~should~not~be~ escaped,~and~non-alphanumeric~characters~should~be~escaped. } -\__kernel_msg_new:nnnn { regex } { range-backwards } +\msg_new:nnnn { regex } { range-backwards } { Range~'[#1-#2]'~out~of~order~in~character~class. } { In~ranges~of~characters~'[x-y]'~appearing~in~character~classes,~ @@ -7389,7 +7389,7 @@ % % Errors related to |\c| and |\u|. % \begin{macrocode} -\__kernel_msg_new:nnnn { regex } { c-bad-mode } +\msg_new:nnnn { regex } { c-bad-mode } { Invalid~nested~'\iow_char:N\\c'~escape~in~regular~expression. } { The~'\iow_char:N\\c'~escape~cannot~be~used~within~ @@ -7397,40 +7397,40 @@ nor~another~category~test.~ To~combine~several~category~tests,~use~'\iow_char:N\\c[...]'. } -\__kernel_msg_new:nnnn { regex } { c-C-invalid } +\msg_new:nnnn { regex } { c-C-invalid } { '\iow_char:N\\cC'~should~be~followed~by~'.'~or~'(',~not~'#1'. } { The~'\iow_char:N\\cC'~construction~restricts~the~next~item~to~be~a~ control~sequence~or~the~next~group~to~be~made~of~control~sequences.~ It~only~makes~sense~to~follow~it~by~'.'~or~by~a~group. } -\__kernel_msg_new:nnnn { regex } { cu-lbrace } +\msg_new:nnnn { regex } { cu-lbrace } { Left~braces~must~be~escaped~in~'\iow_char:N\\#1{...}'. } { Constructions~such~as~'\iow_char:N\\#1{...\iow_char:N\{...}'~are~ not~allowed~and~should~be~replaced~by~ '\iow_char:N\\#1{...\token_to_str:N\{...}'. } -\__kernel_msg_new:nnnn { regex } { c-lparen-in-class } +\msg_new:nnnn { regex } { c-lparen-in-class } { Catcode~test~cannot~apply~to~group~in~character~class } { Construction~such~as~'\iow_char:N\\cL(abc)'~are~not~allowed~inside~a~ class~'[...]'~because~classes~do~not~match~multiple~characters~at~once. } -\__kernel_msg_new:nnnn { regex } { c-missing-rbrace } +\msg_new:nnnn { regex } { c-missing-rbrace } { Missing~right~brace~inserted~for~'\iow_char:N\\c'~escape. } { LaTeX~was~given~a~regular~expression~where~a~ '\iow_char:N\\c\iow_char:N\{...'~construction~was~not~ended~ with~a~closing~brace~'\iow_char:N\}'. } -\__kernel_msg_new:nnnn { regex } { c-missing-rbrack } +\msg_new:nnnn { regex } { c-missing-rbrack } { Missing~right~bracket~inserted~for~'\iow_char:N\\c'~escape. } { A~construction~'\iow_char:N\\c[...'~appears~in~a~ regular~expression,~but~the~closing~']'~is~not~present. } -\__kernel_msg_new:nnnn { regex } { c-missing-category } +\msg_new:nnnn { regex } { c-missing-category } { Invalid~character~'#1'~following~'\iow_char:N\\c'~escape. } { In~regular~expressions,~the~'\iow_char:N\\c'~escape~sequence~ @@ -7438,19 +7438,19 @@ capital~letter~representing~a~character~category,~namely~ one~of~'ABCDELMOPSTU'. } -\__kernel_msg_new:nnnn { regex } { c-trailing } +\msg_new:nnnn { regex } { c-trailing } { Trailing~category~code~escape~'\iow_char:N\\c'... } { A~regular~expression~ends~with~'\iow_char:N\\c'~followed~ by~a~letter.~It~will~be~ignored. } -\__kernel_msg_new:nnnn { regex } { u-missing-lbrace } +\msg_new:nnnn { regex } { u-missing-lbrace } { Missing~left~brace~following~'\iow_char:N\\u'~escape. } { The~'\iow_char:N\\u'~escape~sequence~must~be~followed~by~ a~brace~group~with~the~name~of~the~variable~to~use. } -\__kernel_msg_new:nnnn { regex } { u-missing-rbrace } +\msg_new:nnnn { regex } { u-missing-rbrace } { Missing~right~brace~inserted~for~'\iow_char:N\\u'~escape. } { LaTeX~ @@ -7464,14 +7464,14 @@ % % Errors when encountering the \textsc{posix} syntax |[:...:]|. % \begin{macrocode} -\__kernel_msg_new:nnnn { regex } { posix-unsupported } +\msg_new:nnnn { regex } { posix-unsupported } { POSIX~collating~element~'[#1 ~ #1]'~not~supported. } { The~'[.foo.]'~and~'[=bar=]'~syntaxes~have~a~special~meaning~ in~POSIX~regular~expressions.~This~is~not~supported~by~LaTeX.~ Maybe~you~forgot~to~escape~a~left~bracket~in~a~character~class? } -\__kernel_msg_new:nnnn { regex } { posix-unknown } +\msg_new:nnnn { regex } { posix-unknown } { POSIX~class~'[:#1:]'~unknown. } { '[:#1:]'~is~not~among~the~known~POSIX~classes~ @@ -7480,7 +7480,7 @@ '[:print:]',~'[:punct:]',~'[:space:]',~'[:upper:]',~ '[:word:]',~and~'[:xdigit:]'. } -\__kernel_msg_new:nnnn { regex } { posix-missing-close } +\msg_new:nnnn { regex } { posix-missing-close } { Missing~closing~':]'~for~POSIX~class. } { The~POSIX~syntax~'#1'~must~be~followed~by~':]',~not~'#2'. } % \end{macrocode} @@ -7489,7 +7489,7 @@ % with an unbalanced token list, which we must re-balance by adding % begin-group or end-group character tokens. % \begin{macrocode} -\__kernel_msg_new:nnnn { regex } { result-unbalanced } +\msg_new:nnnn { regex } { result-unbalanced } { Missing~brace~inserted~when~#1. } { LaTeX~was~asked~to~do~some~regular~expression~operation,~ @@ -7501,13 +7501,13 @@ % % Error message for unknown options. % \begin{macrocode} -\__kernel_msg_new:nnnn { regex } { unknown-option } +\msg_new:nnnn { regex } { unknown-option } { Unknown~option~'#1'~for~regular~expressions. } { The~only~available~option~is~'case-insensitive',~toggled~by~ '(?i)'~and~'(?-i)'. } -\__kernel_msg_new:nnnn { regex } { special-group-unknown } +\msg_new:nnnn { regex } { special-group-unknown } { Unknown~special~group~'#1~...'~in~a~regular~expression. } { The~only~valid~constructions~starting~with~'(?'~are~ @@ -7517,21 +7517,21 @@ % % Errors in the replacement text. % \begin{macrocode} -\__kernel_msg_new:nnnn { regex } { replacement-c } +\msg_new:nnnn { regex } { replacement-c } { Misused~'\iow_char:N\\c'~command~in~a~replacement~text. } { In~a~replacement~text,~the~'\iow_char:N\\c'~escape~sequence~ can~be~followed~by~one~of~the~letters~'ABCDELMOPSTU'~ or~a~brace~group,~not~by~'#1'. } -\__kernel_msg_new:nnnn { regex } { replacement-u } +\msg_new:nnnn { regex } { replacement-u } { Misused~'\iow_char:N\\u'~command~in~a~replacement~text. } { In~a~replacement~text,~the~'\iow_char:N\\u'~escape~sequence~ must~be~~followed~by~a~brace~group~holding~the~name~of~the~ variable~to~use. } -\__kernel_msg_new:nnnn { regex } { replacement-g } +\msg_new:nnnn { regex } { replacement-g } { Missing~brace~for~the~'\iow_char:N\\g'~construction~ in~a~replacement~text. @@ -7541,7 +7541,7 @@ submatches~are~represented~either~as~'\iow_char:N \\g{dd..d}',~ or~'\\d',~where~'d'~are~single~digits.~Here,~a~brace~is~missing. } -\__kernel_msg_new:nnnn { regex } { replacement-catcode-end } +\msg_new:nnnn { regex } { replacement-catcode-end } { Missing~character~for~the~'\iow_char:N\\c'~ construction~in~a~replacement~text. @@ -7552,7 +7552,7 @@ the~character~category.~Then,~a~character~must~follow.~LaTeX~ reached~the~end~of~the~replacement~when~looking~for~that. } -\__kernel_msg_new:nnnn { regex } { replacement-catcode-escaped } +\msg_new:nnnn { regex } { replacement-catcode-escaped } { Escaped~letter~or~digit~after~category~code~in~replacement~text. } @@ -7562,7 +7562,7 @@ the~character~category.~Then,~a~character~must~follow,~not~ '\iow_char:N\\#2'. } -\__kernel_msg_new:nnnn { regex } { replacement-catcode-in-cs } +\msg_new:nnnn { regex } { replacement-catcode-in-cs } { Category~code~'\iow_char:N\\c#1#3'~ignored~inside~ '\iow_char:N\\c\{...\}'~in~a~replacement~text. @@ -7572,7 +7572,7 @@ '\iow_char:N\\c\{...\}'~are~ignored~when~building~the~control~ sequence~name. } -\__kernel_msg_new:nnnn { regex } { replacement-null-space } +\msg_new:nnnn { regex } { replacement-null-space } { TeX~cannot~build~a~space~token~with~character~code~0. } { You~asked~for~a~character~token~with~category~space,~ @@ -7581,38 +7581,40 @@ This~specific~case~is~impossible~and~will~be~replaced~ by~a~normal~space. } -\__kernel_msg_new:nnnn { regex } { replacement-missing-rbrace } +\msg_new:nnnn { regex } { replacement-missing-rbrace } { Missing~right~brace~inserted~in~replacement~text. } { There~ \int_compare:nTF { #1 = 1 } { was } { were } ~ #1~ missing~right~\int_compare:nTF { #1 = 1 } { brace } { braces } . } -\__kernel_msg_new:nnnn { regex } { replacement-missing-rparen } +\msg_new:nnnn { regex } { replacement-missing-rparen } { Missing~right~parenthesis~inserted~in~replacement~text. } { There~ \int_compare:nTF { #1 = 1 } { was } { were } ~ #1~ missing~right~ \int_compare:nTF { #1 = 1 } { parenthesis } { parentheses } . } -\__kernel_msg_new:nnn { regex } { submatch-too-big } +\msg_new:nnn { regex } { submatch-too-big } { Submatch~#1~used~but~regex~only~has~#2~group(s) } % \end{macrocode} % % Some escaped alphanumerics are not allowed everywhere. % \begin{macrocode} -\__kernel_msg_new:nnnn { regex } { backwards-quantifier } +\msg_new:nnnn { regex } { backwards-quantifier } { Quantifer~"{#1,#2}"~is~backwards. } { The~values~given~in~a~quantifier~must~be~in~order. } % \end{macrocode} % % Used when showing a regex. % \begin{macrocode} -\__kernel_msg_new:nnn { regex } { show } +\msg_new:nnn { regex } { show } { >~Compiled~regex~ \tl_if_empty:nTF {#1} { variable~ #2 } { {#1} } : #3 } +\prop_gput:Nnn \g_msg_module_name_prop { regex } { LaTeX3 } +\prop_gput:Nnn \g_msg_module_type_prop { regex } { } % \end{macrocode} % % \begin{macro}{\@@_msg_repeated:nnN} diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx index a04c6dc27c..1780c75145 100644 --- a/macros/latex/contrib/l3kernel/l3seq.dtx +++ b/macros/latex/contrib/l3kernel/l3seq.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1077,7 +1077,7 @@ % \begin{macrocode} \cs_new:Npn \@@_item:n { - \__kernel_msg_expandable_error:nn { seq } { misused } + \msg_expandable_error:nn { seq } { misused } \use_none:n } % \end{macrocode} @@ -1617,7 +1617,7 @@ { \int_compare:nNnTF { \seq_count:N #2 } > \c_max_register_int { - \__kernel_msg_error:nnx { seq } { shuffle-too-large } + \msg_error:nnx { seq } { shuffle-too-large } { \token_to_str:N #2 } } { @@ -1648,7 +1648,7 @@ { \cs_new_protected:Npn \seq_shuffle:N #1 { - \__kernel_msg_error:nnn { kernel } { fp-no-random } + \msg_error:nnn { kernel } { fp-no-random } { \seq_shuffle:N #1 } } \cs_new_eq:NN \seq_gshuffle:N \seq_shuffle:N @@ -2273,7 +2273,7 @@ } } { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { kernel } { bad-variable } {#1} } } @@ -2380,9 +2380,9 @@ % \UnitTested % Apply the general \cs{__kernel_chk_tl_type:NnnT}. % \begin{macrocode} -\cs_new_protected:Npn \seq_show:N { \@@_show:NN \__kernel_msg_show:nnxxxx } +\cs_new_protected:Npn \seq_show:N { \@@_show:NN \msg_show:nnxxxx } \cs_generate_variant:Nn \seq_show:N { c } -\cs_new_protected:Npn \seq_log:N { \@@_show:NN \__kernel_msg_log:nnxxxx } +\cs_new_protected:Npn \seq_log:N { \@@_show:NN \msg_log:nnxxxx } \cs_generate_variant:Nn \seq_log:N { c } \cs_new_protected:Npn \@@_show:NN #1#2 { diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx index fdbd36427d..e463f7d8f8 100644 --- a/macros/latex/contrib/l3kernel/l3skip.dtx +++ b/macros/latex/contrib/l3kernel/l3skip.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1542,7 +1542,7 @@ { \dim_compare:nNnTF {#2} = \c_zero_dim { - \__kernel_msg_expandable_error:nnn { kernel } { zero-step } {#4} + \msg_expandable_error:nnn { kernel } { zero-step } {#4} \use_none:nnnn } { \@@_step:NnnnN < } diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx index 1cf74d0e40..d381ee4d19 100644 --- a/macros/latex/contrib/l3kernel/l3sort.dtx +++ b/macros/latex/contrib/l3kernel/l3sort.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -590,14 +590,14 @@ \cs_new_protected:Npn \@@_return_mark:w #1 \s_@@_mark { } \cs_new_protected:Npn \@@_return_none_error: { - \__kernel_msg_error:nnxx { sort } { return-none } + \msg_error:nnxx { sort } { return-none } { \tex_the:D \tex_toks:D \l_@@_A_int } { \tex_the:D \tex_toks:D \l_@@_C_int } \@@_return_same:w \@@_return_none_error: } \cs_new_protected:Npn \@@_return_two_error: { - \__kernel_msg_error:nnxx { sort } { return-two } + \msg_error:nnxx { sort } { return-two } { \tex_the:D \tex_toks:D \l_@@_A_int } { \tex_the:D \tex_toks:D \l_@@_C_int } } @@ -1025,12 +1025,12 @@ { \cs_set_eq:NN \toksdef \@@_disabled_toksdef:n } \cs_new_protected:Npn \@@_disabled_toksdef:n #1 { - \__kernel_msg_error:nnx { sort } { toksdef } + \msg_error:nnx { sort } { toksdef } { \token_to_str:N #1 } \@@_error: \tex_toksdef:D #1 } -\__kernel_msg_new:nnnn { sort } { toksdef } +\msg_new:nnnn { sort } { toksdef } { Allocation~of~\iow_char:N\\toks~registers~impossible~while~sorting. } { The~comparison~code~used~for~sorting~a~list~has~attempted~to~ @@ -1049,13 +1049,13 @@ \cs_new_protected:Npn \@@_too_long_error:NNw #1#2 \fi: { \fi: - \__kernel_msg_error:nnxxx { sort } { too-large } + \msg_error:nnxxx { sort } { too-large } { \token_to_str:N #2 } { \int_eval:n { \l_@@_true_max_int - \l_@@_min_int } } { \int_eval:n { \l_@@_top_int - \l_@@_min_int } } #1 \@@_error: } -\__kernel_msg_new:nnnn { sort } { too-large } +\msg_new:nnnn { sort } { too-large } { The~list~#1~is~too~long~to~be~sorted~by~TeX. } { TeX~has~#2~toks~registers~still~available:~ @@ -1066,7 +1066,7 @@ % \end{macro} % % \begin{macrocode} -\__kernel_msg_new:nnnn { sort } { return-none } +\msg_new:nnnn { sort } { return-none } { The~comparison~code~did~not~return. } { When~sorting~a~list,~the~code~to~compare~items~#1~and~#2~ @@ -1075,7 +1075,7 @@ \iow_char:N\\sort_return_swapped: .~ Exactly~one~of~these~should~be~called. } -\__kernel_msg_new:nnnn { sort } { return-two } +\msg_new:nnnn { sort } { return-two } { The~comparison~code~returned~multiple~times. } { When~sorting~a~list,~the~code~to~compare~items~#1~and~#2~called~ @@ -1083,6 +1083,8 @@ \iow_char:N\\sort_return_swapped: ~multiple~times.~ Exactly~one~of~these~should~be~called. } +\prop_gput:Nnn \g_msg_module_name_prop { sort } { LaTeX3 } +\prop_gput:Nnn \g_msg_module_type_prop { sort } { } % \end{macrocode} % % \begin{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx index 904f84fc31..d09fb3ad06 100644 --- a/macros/latex/contrib/l3kernel/l3str-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3str-convert.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -614,7 +614,7 @@ \cs_new_protected:Npn \@@_if_flag_error:nnx #1 { \flag_if_raised:nTF {#1} - { \__kernel_msg_error:nnx { str } } + { \msg_error:nnx { str } } { \use_none:nn } } \cs_new_protected:Npn \@@_if_flag_no_error:nnx #1#2#3 @@ -758,7 +758,7 @@ { \if_meaning:w #1 #5 \tl_if_empty:nF {#3} - { \__kernel_msg_error:nnx { str } { native-escaping } {#3} } + { \msg_error:nnx { str } { native-escaping } {#3} } #1 \else: #4 #2 #1 @@ -830,7 +830,7 @@ } { \tl_clear:N \l_@@_internal_tl - \__kernel_msg_error:nnxx { str } { unknown-#2 } {#4} {#1} + \msg_error:nnxx { str } { unknown-#2 } {#4} {#1} } } \cs_if_exist:cF { @@_convert_#3_#1: } @@ -1009,7 +1009,7 @@ \char_generate:nn {#1} {12} \fi: } - \__kernel_msg_new:nnnn { str } { native-overflow } + \msg_new:nnnn { str } { native-overflow } { Character~code~too~large~for~this~engine. } { This~engine~only~support~8-bit~characters:~ @@ -1257,18 +1257,18 @@ % General messages, and messages for the encodings and escapings loaded % by default (\enquote{native}, and \enquote{bytes}). % \begin{macrocode} -\__kernel_msg_new:nnn { str } { unknown-esc } +\msg_new:nnn { str } { unknown-esc } { Escaping~scheme~'#1'~(filtered:~'#2')~unknown. } -\__kernel_msg_new:nnn { str } { unknown-enc } +\msg_new:nnn { str } { unknown-enc } { Encoding~scheme~'#1'~(filtered:~'#2')~unknown. } -\__kernel_msg_new:nnnn { str } { native-escaping } +\msg_new:nnnn { str } { native-escaping } { The~'native'~encoding~scheme~does~not~support~any~escaping. } { Since~native~strings~do~not~consist~in~bytes,~ none~of~the~escaping~methods~make~sense.~ The~specified~escaping,~'#1',~will be ignored. } -\__kernel_msg_new:nnn { str } { file-not-found } +\msg_new:nnn { str } { file-not-found } { File~'l3str-#1.def'~not~found. } % \end{macrocode} % @@ -1284,7 +1284,7 @@ \sys_if_engine_xetex_p: } { - \__kernel_msg_new:nnnn { str } { non-byte } + \msg_new:nnnn { str } { non-byte } { String~invalid~in~escaping~'#1':~it~may~only~contain~bytes. } { Some~characters~in~the~string~you~asked~to~convert~are~not~ @@ -1302,13 +1302,13 @@ % % Those messages are used when converting to and from 8-bit encodings. % \begin{macrocode} -\__kernel_msg_new:nnnn { str } { decode-8-bit } +\msg_new:nnnn { str } { decode-8-bit } { Invalid~string~in~encoding~'#1'. } { LaTeX~came~across~a~byte~which~is~not~defined~to~represent~ any~character~in~the~encoding~'#1'. } -\__kernel_msg_new:nnnn { str } { encode-8-bit } +\msg_new:nnnn { str } { encode-8-bit } { Unicode~string~cannot~be~converted~to~encoding~'#1'. } { The~encoding~'#1'~only~contains~a~subset~of~all~Unicode~characters.~ @@ -1384,7 +1384,7 @@ \@@_unescape_hex_auxii:N } } -\__kernel_msg_new:nnnn { str } { unescape-hex } +\msg_new:nnnn { str } { unescape-hex } { String~invalid~in~escaping~'hex':~only~hexadecimal~digits~allowed. } { Some~characters~in~the~string~you~asked~to~convert~are~not~ @@ -1459,7 +1459,7 @@ \@@_output_end: \use_i:nnn #3 ##2##3 } - \__kernel_msg_new:nnnn { str } { unescape-#2 } + \msg_new:nnnn { str } { unescape-#2 } { String~invalid~in~escaping~'#2'. } { LaTeX~came~across~the~escape~character~'#1'~not~followed~by~ @@ -1582,7 +1582,7 @@ \if_charcode:w ^^J #2 \else: ^^J \fi: \@@_unescape_string_newlines:wN #2 } - \__kernel_msg_new:nnnn { str } { unescape-string } + \msg_new:nnnn { str } { unescape-string } { String~invalid~in~escaping~'string'. } { LaTeX~came~across~an~escape~character~'\c_backslash_str'~ @@ -1848,7 +1848,7 @@ \flag_clear_new:n { str_extra } \flag_clear_new:n { str_overlong } \flag_clear_new:n { str_overflow } -\__kernel_msg_new:nnnn { str } { utf8-decode } +\msg_new:nnnn { str } { utf8-decode } { Invalid~UTF-8~string: \exp_last_unbraced:Nf \use_none:n @@ -1895,6 +1895,8 @@ Unicode~limits~code~points~to~the~range~[0,1114111]. } } +\prop_gput:Nnn \g_msg_module_name_prop { str } { LaTeX3 } +\prop_gput:Nnn \g_msg_module_type_prop { str } { } % \end{macrocode} % \end{variable} % @@ -2161,14 +2163,14 @@ \flag_clear_new:n { str_missing } \flag_clear_new:n { str_extra } \flag_clear_new:n { str_end } - \__kernel_msg_new:nnnn { str } { utf16-encode } + \msg_new:nnnn { str } { utf16-encode } { Unicode~string~cannot~be~expressed~in~UTF-16:~surrogate. } { Surrogate~code~points~(in~the~range~[U+D800,~U+DFFF])~ can~be~expressed~in~the~UTF-8~and~UTF-32~encodings,~ but~not~in~the~UTF-16~encoding. } - \__kernel_msg_new:nnnn { str } { utf16-decode } + \msg_new:nnnn { str } { utf16-decode } { Invalid~UTF-16~string: \exp_last_unbraced:Nf \use_none:n @@ -2461,7 +2463,7 @@ % \begin{macrocode} \flag_clear_new:n { str_overflow } \flag_clear_new:n { str_end } - \__kernel_msg_new:nnnn { str } { utf32-decode } + \msg_new:nnnn { str } { utf32-decode } { Invalid~UTF-32~string: \exp_last_unbraced:Nf \use_none:n diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx index ae1715761b..f15f86f4a6 100644 --- a/macros/latex/contrib/l3kernel/l3str.dtx +++ b/macros/latex/contrib/l3kernel/l3str.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -342,7 +342,7 @@ % % \begin{function}[TF, added = 2017-10-08]{\str_if_in:nn} % \begin{syntax} -% \cs{str_if_in:nnTF} \meta{tl_1} \Arg{tl_2} \Arg{true code} \Arg{false code} +% \cs{str_if_in:nnTF} \Arg{tl_1} \Arg{tl_2} \Arg{true code} \Arg{false code} % \end{syntax} % Converts both \meta{token lists} to \meta{strings} and % tests whether \meta{string_2} is found inside \meta{string_1}. @@ -1051,7 +1051,7 @@ { \tl_if_empty:nTF {#4} { - \__kernel_msg_error:nnx { kernel } { empty-search-pattern } {#5} + \msg_error:nnx { kernel } { empty-search-pattern } {#5} } { \use:x diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf index b6697e9949..bc876bf255 100644 Binary files a/macros/latex/contrib/l3kernel/l3styleguide.pdf and b/macros/latex/contrib/l3kernel/l3styleguide.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3styleguide.tex b/macros/latex/contrib/l3kernel/l3styleguide.tex index 786296bd3a..44547e3fd2 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 2021-07-12} +\date{Released 2021-08-27} \begin{document} diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf index a1f156a8bd..3a8c7d5b60 100644 Binary files a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf and b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.tex b/macros/latex/contrib/l3kernel/l3syntax-changes.tex index 7159309d36..b024803198 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 2021-07-12} +\date{Released 2021-08-27} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx index 1c1ad4b0d9..be0d31d005 100644 --- a/macros/latex/contrib/l3kernel/l3sys.dtx +++ b/macros/latex/contrib/l3kernel/l3sys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -211,7 +211,7 @@ % \cs{sys_get_shell:nnN} \Arg{shell~command} \Arg{setup} \meta{tl~var} % \cs{sys_get_shell:nnNTF} \Arg{shell~command} \Arg{setup} \meta{tl~var} \Arg{true code} \Arg{false code} % \end{syntax} -% Defines \meta{tl} to the text returned by the \meta{shell command}. +% Defines \meta{tl~var} to the text returned by the \meta{shell command}. % The \meta{shell command} is converted to a string using % \cs{tl_to_str:n}. Category codes may need to be set appropriately % via the \meta{setup} argument, which is run just before running the @@ -494,7 +494,7 @@ \str_if_exist:NTF \c_sys_backend_str { \str_if_eq:VnF \c_sys_backend_str {#1} - { \__kernel_msg_error:nn { sys } { backend-set } } + { \msg_error:nn { sys } { backend-set } } } { \tl_if_blank:nF {#1} @@ -516,7 +516,7 @@ { xetex } { } } { - \__kernel_msg_error:nnxx { sys } { wrong-backend } + \msg_error:nnxx { sys } { wrong-backend } #1 { xetex } \tl_gset:Nn #1 { xetex } } @@ -535,7 +535,7 @@ { \str_if_eq_p:Vn #1 { luatex } } { \str_if_eq_p:Vn #1 { pdftex } } { - \__kernel_msg_error:nnxx { sys } { wrong-backend } + \msg_error:nnxx { sys } { wrong-backend } #1 { \sys_if_engine_luatex:TF { luatex } { pdftex } } \sys_if_engine_luatex:TF { \tl_gset:Nn #1 { luatex } } @@ -551,7 +551,7 @@ { dvisvgm } { } } { - \__kernel_msg_error:nnxx { sys } { wrong-backend } + \msg_error:nnxx { sys } { wrong-backend } #1 { dvips } \tl_gset:Nn #1 { dvips } } @@ -623,7 +623,7 @@ { \tl_if_in:nnTF {#1} { " } { - \__kernel_msg_error:nnx + \msg_error:nnx { kernel } { quote-in-shell } {#1} \prg_return_false: } @@ -844,7 +844,7 @@ end \cs_new:Npn \sys_rand_seed: { \int_value:w - \__kernel_msg_expandable_error:nnn { kernel } { fp-no-random } + \msg_expandable_error:nnn { kernel } { fp-no-random } { \sys_rand_seed: } \c_zero_int } @@ -866,7 +866,7 @@ end { \cs_new_protected:Npn \sys_gset_rand_seed:n #1 { - \__kernel_msg_error:nnn { kernel } { fp-no-random } + \msg_error:nnn { kernel } { fp-no-random } { \sys_gset_rand_seed:n {#1} } } } @@ -903,13 +903,13 @@ end { \int_value:w \tex_elapsedtime:D } } { - \__kernel_msg_new:nnnn { kernel } { no-elapsed-time } + \msg_new:nnnn { kernel } { no-elapsed-time } { No~clock~detected~for~#1. } { The~current~engine~provides~no~way~to~access~the~system~time. } \cs_new:Npn \sys_timer: { \int_value:w - \__kernel_msg_expandable_error:nnn { kernel } { no-elapsed-time } + \msg_expandable_error:nnn { kernel } { no-elapsed-time } { \sys_timer: } \c_zero_int } diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf index 915031ea1a..a6b64eab91 100644 Binary files a/macros/latex/contrib/l3kernel/l3term-glossary.pdf and b/macros/latex/contrib/l3kernel/l3term-glossary.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.tex b/macros/latex/contrib/l3kernel/l3term-glossary.tex index 5830f4e7c3..b449c5ae26 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 2021-07-12} +\date{Released 2021-08-27} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx index 64b7401e51..ed9abc2c87 100644 --- a/macros/latex/contrib/l3kernel/l3text-case.dtx +++ b/macros/latex/contrib/l3kernel/l3text-case.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx index 35a5f67a31..04556e6b02 100644 --- a/macros/latex/contrib/l3kernel/l3text-purify.dtx +++ b/macros/latex/contrib/l3kernel/l3text-purify.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx index 5f35a92972..c1c4055ed5 100644 --- a/macros/latex/contrib/l3kernel/l3text.dtx +++ b/macros/latex/contrib/l3kernel/l3text.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx index 1b79732fde..bb33215be1 100644 --- a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx +++ b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -989,9 +989,9 @@ % as \cs{tl_show:N} by simply calling that function. % \begin{macrocode} \cs_new_protected:Npn \tl_analysis_show:N - { \@@_analysis_show:NNN \__kernel_msg_show:nnxxxx \tl_show:N } + { \@@_analysis_show:NNN \msg_show:nnxxxx \tl_show:N } \cs_new_protected:Npn \tl_analysis_log:N - { \@@_analysis_show:NNN \__kernel_msg_log:nnxxxx \tl_log:N } + { \@@_analysis_show:NNN \msg_log:nnxxxx \tl_log:N } \cs_new_protected:Npn \@@_analysis_show:NNN #1#2#3 { \tl_if_exist:NTF #3 @@ -1009,9 +1009,9 @@ % No existence test needed here. % \begin{macrocode} \cs_new_protected:Npn \tl_analysis_show:n - { \@@_analysis_show:Nn \__kernel_msg_show:nnxxxx } + { \@@_analysis_show:Nn \msg_show:nnxxxx } \cs_new_protected:Npn \tl_analysis_log:n - { \@@_analysis_show:Nn \__kernel_msg_log:nnxxxx } + { \@@_analysis_show:Nn \msg_log:nnxxxx } \cs_new_protected:Npn \@@_analysis_show:Nn #1#2 { \@@_analysis:n {#2} @@ -1498,7 +1498,7 @@ % \end{variable} % % \begin{macrocode} -\__kernel_msg_new:nnn { tl } { show-analysis } +\msg_new:nnn { tl } { show-analysis } { The~token~list~ \tl_if_empty:nF {#1} { #1 ~ } \tl_if_empty:nTF {#2} diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx index cbbb122adb..64b37fa1e7 100644 --- a/macros/latex/contrib/l3kernel/l3tl.dtx +++ b/macros/latex/contrib/l3kernel/l3tl.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1967,7 +1967,7 @@ { \tl_if_empty:nTF {#6} { - \__kernel_msg_error:nnx { kernel } { empty-search-pattern } + \msg_error:nnx { kernel } { empty-search-pattern } { \tl_to_str:n {#7} } } { @@ -2633,7 +2633,7 @@ { \tl_if_exist:NTF #1 {#1} { - \__kernel_msg_expandable_error:nnn + \msg_expandable_error:nnn { kernel } { bad-variable } {#1} } } @@ -3195,7 +3195,7 @@ % \begin{macro}[EXP]{\@@_act_normal:NwNNN} % \begin{macro}[EXP]{\@@_act_group:nwNNN} % \begin{macro}[EXP]{\@@_act_space:wwNNN} -% \begin{macro}[EXP]{\@@_act_end:w} +% \begin{macro}[EXP]{\@@_act_end:wn} % \begin{macro}[EXP] % { % \@@_act_if_head_is_space:nTF, @@ -3567,7 +3567,7 @@ { \token_to_str:N #2 = \__kernel_exp_not:w \exp_after:wN {#2} } } { - \__kernel_msg_error:nnxxx { kernel } { bad-type } + \msg_error:nnxxx { kernel } { bad-type } { \token_to_str:N #2 } { \token_to_meaning:N #2 } { tl } } } @@ -3641,13 +3641,13 @@ \tl_if_eq:NNTF #1 \l_@@_internal_a_tl {#4} { - \__kernel_msg_error:nnxxxx { kernel } { bad-type } + \msg_error:nnxxxx { kernel } { bad-type } { \token_to_str:N #1 } { \tl_to_str:N #1 } {#2} { \tl_to_str:N \l_@@_internal_a_tl } } } { - \__kernel_msg_error:nnxxx { kernel } { bad-type } + \msg_error:nnxxx { kernel } { bad-type } { \token_to_str:N #1 } { \token_to_meaning:N #1 } {#2} } } diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx index 173b866dfb..c487041cb4 100644 --- a/macros/latex/contrib/l3kernel/l3token.dtx +++ b/macros/latex/contrib/l3kernel/l3token.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % @@ -1581,9 +1581,9 @@ { \if_int_compare:w #2 = 10 \exp_stop_f: \if_int_compare:w #1 = \c_zero_int - \__kernel_msg_expandable_error:nn { char } { null-space } + \msg_expandable_error:nn { char } { null-space } \else: - \__kernel_msg_expandable_error:nn { char } { space } + \msg_expandable_error:nn { char } { space } \fi: \else: \if_int_odd:w 0 @@ -1591,13 +1591,13 @@ \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: - \__kernel_msg_expandable_error:nn { char } + \msg_expandable_error:nn { char } { invalid-catcode } \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: - \__kernel_msg_expandable_error:nn { char } + \msg_expandable_error:nn { char } { out-of-range } \else: \@@_generate_aux:nnw {#1} {#2} @@ -1641,7 +1641,7 @@ { #3 \if_int_compare:w #2 = 13 \exp_stop_f: - \__kernel_msg_expandable_error:nn { char } { active } + \msg_expandable_error:nn { char } { active } \else: \@@_generate_auxii:nnw {#1} {#2} \fi: diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx index e439c55069..fade572c6d 100644 --- a/macros/latex/contrib/l3kernel/l3unicode.dtx +++ b/macros/latex/contrib/l3kernel/l3unicode.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-27} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf index 447e74fb34..78acace709 100644 Binary files a/macros/latex/contrib/l3kernel/source3.pdf and b/macros/latex/contrib/l3kernel/source3.pdf differ diff --git a/macros/latex/contrib/l3kernel/source3.tex b/macros/latex/contrib/l3kernel/source3.tex index ca9255d6e4..e3695dcdbb 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 2021-07-12} +\date{Released 2021-08-27} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/l3kernel/source3body.tex b/macros/latex/contrib/l3kernel/source3body.tex index 946f7a4abc..a2e87856bd 100644 --- a/macros/latex/contrib/l3kernel/source3body.tex +++ b/macros/latex/contrib/l3kernel/source3body.tex @@ -328,6 +328,15 @@ following variable types: \item[\texttt{regex}] Regular expression. \end{description} +\subsection{Scratch variables} + +Modules focussed on variable usage typically provide four scratch variables, +two local and two global, with names of the form +\cs{\meta{scope}_tmpa_\meta{type}}/\cs{\meta{scope}_tmpb_\meta{type}}. These +are never used by the core code. The nature of \TeX{} grouping means that as +with any other scratch variable, these should only be set and used with no +intervening third-party code. + \subsection{Terminological inexactitude} A word of warning. In this document, and others referring to the \pkg{expl3} diff --git a/macros/latex/contrib/l3packages/CHANGELOG.md b/macros/latex/contrib/l3packages/CHANGELOG.md index 8b9928d648..9b7487dc51 100644 --- a/macros/latex/contrib/l3packages/CHANGELOG.md +++ b/macros/latex/contrib/l3packages/CHANGELOG.md @@ -7,6 +7,11 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2021-08-27] + +### Changed +- Track message changes in `l3kernel` + ## [2021-08-04] ### Changed @@ -154,7 +159,8 @@ this project uses date-based 'snapshot' version identifiers. - Switch to ISO date format - Improve cross-module use of internal functions -[Unreleased]: https://github.com/latex3/latex3/compare/2021-08-04...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2021-08-27...HEAD +[2021-08-27]: https://github.com/latex3/latex3/compare/2021-08-04...2021-08-27 [2021-08-04]: https://github.com/latex3/latex3/compare/2021-06-18...2021-08-04 [2021-06-18]: https://github.com/latex3/latex3/compare/2021-06-01...2021-06-18 [2021-06-01]: https://github.com/latex3/latex3/compare/2021-05-27...2021-06-01 diff --git a/macros/latex/contrib/l3packages/README.md b/macros/latex/contrib/l3packages/README.md index 316526984b..d20f9f83be 100644 --- a/macros/latex/contrib/l3packages/README.md +++ b/macros/latex/contrib/l3packages/README.md @@ -1,7 +1,7 @@ LaTeX3 High-Level Concepts ========================== -Release 2021-08-04 +Release 2021-08-27 Overview -------- diff --git a/macros/latex/contrib/l3packages/l3keys2e.dtx b/macros/latex/contrib/l3packages/l3keys2e.dtx index 52cb416cf2..f10eb7e8ce 100644 --- a/macros/latex/contrib/l3packages/l3keys2e.dtx +++ b/macros/latex/contrib/l3packages/l3keys2e.dtx @@ -62,7 +62,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -139,7 +139,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3keys2e}{2021-08-04}{} +\ProvidesExplPackage{l3keys2e}{2021-08-27}{} {LaTeX2e option processing using LaTeX3 keys} % \end{macrocode} % diff --git a/macros/latex/contrib/l3packages/l3keys2e.pdf b/macros/latex/contrib/l3packages/l3keys2e.pdf index 6cba692ad1..587e3201c2 100644 Binary files a/macros/latex/contrib/l3packages/l3keys2e.pdf and b/macros/latex/contrib/l3packages/l3keys2e.pdf differ diff --git a/macros/latex/contrib/l3packages/xfp.dtx b/macros/latex/contrib/l3packages/xfp.dtx index ef09bccc36..cef3891fe2 100644 --- a/macros/latex/contrib/l3packages/xfp.dtx +++ b/macros/latex/contrib/l3packages/xfp.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -166,7 +166,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xfp}{2021-08-04}{} +\ProvidesExplPackage{xfp}{2021-08-27}{} {L3 Floating point unit} % \end{macrocode} % diff --git a/macros/latex/contrib/l3packages/xfp.pdf b/macros/latex/contrib/l3packages/xfp.pdf index 293ba0ff0e..cd5a23f601 100644 Binary files a/macros/latex/contrib/l3packages/xfp.pdf and b/macros/latex/contrib/l3packages/xfp.pdf differ diff --git a/macros/latex/contrib/l3packages/xfrac.dtx b/macros/latex/contrib/l3packages/xfrac.dtx index 58d35df80e..2840b4318a 100644 --- a/macros/latex/contrib/l3packages/xfrac.dtx +++ b/macros/latex/contrib/l3packages/xfrac.dtx @@ -65,7 +65,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -535,7 +535,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xfrac}{2021-08-04}{} +\ProvidesExplPackage{xfrac}{2021-08-27}{} {L3 Experimental split-level fractions} % \end{macrocode} % diff --git a/macros/latex/contrib/l3packages/xfrac.pdf b/macros/latex/contrib/l3packages/xfrac.pdf index c0ec5bd048..2895df4613 100644 Binary files a/macros/latex/contrib/l3packages/xfrac.pdf and b/macros/latex/contrib/l3packages/xfrac.pdf differ diff --git a/macros/latex/contrib/l3packages/xparse.dtx b/macros/latex/contrib/l3packages/xparse.dtx index 78a73fddde..fd4b615e15 100644 --- a/macros/latex/contrib/l3packages/xparse.dtx +++ b/macros/latex/contrib/l3packages/xparse.dtx @@ -67,7 +67,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -1064,7 +1064,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xparse}{2021-08-04}{} +\ProvidesExplPackage{xparse}{2021-08-27}{} {L3 Experimental document command parser} % \end{macrocode} % @@ -1087,10 +1087,10 @@ } \keys_set:nV {#1} \l_@@_options_clist \bool_if:NF \l_@@_log_bool - { \msg_redirect_module:nnn { LaTeX / #1 } { info } { none } } + { \msg_redirect_module:nnn {#1} { info } { none } } \cs_new_protected:Npn \@@_unknown_argument_type_error:n ##1 { - \__kernel_msg_error:nnxx {#1} { unknown-argument-type } + \msg_error:nnxx {#1} { unknown-argument-type } { \@@_environment_or_command: } { \tl_to_str:n {##1} } } } diff --git a/macros/latex/contrib/l3packages/xparse.pdf b/macros/latex/contrib/l3packages/xparse.pdf index 551520d023..139e90a873 100644 Binary files a/macros/latex/contrib/l3packages/xparse.pdf and b/macros/latex/contrib/l3packages/xparse.pdf differ diff --git a/macros/latex/contrib/l3packages/xtemplate.dtx b/macros/latex/contrib/l3packages/xtemplate.dtx index e4e581c6b1..9c038494f3 100644 --- a/macros/latex/contrib/l3packages/xtemplate.dtx +++ b/macros/latex/contrib/l3packages/xtemplate.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2021-08-04} +% \date{Released 2021-08-27} % % \maketitle % @@ -682,7 +682,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xtemplate}{2021-08-04}{} +\ProvidesExplPackage{xtemplate}{2021-08-27}{} {L3 Experimental prototype document functions} % \end{macrocode} % diff --git a/macros/latex/contrib/l3packages/xtemplate.pdf b/macros/latex/contrib/l3packages/xtemplate.pdf index 2fc25bc8ba..dd14606df0 100644 Binary files a/macros/latex/contrib/l3packages/xtemplate.pdf and b/macros/latex/contrib/l3packages/xtemplate.pdf differ diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md index 121df71248..193bd0cb47 100644 --- a/macros/latex/contrib/siunitx/CHANGELOG.md +++ b/macros/latex/contrib/siunitx/CHANGELOG.md @@ -7,6 +7,12 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to ## [Unreleased] +## [v3.0.28] + +### Fixed +- Pre-spacing for free-standing units (issue + [#538](https://github.com/josephwright/siunitx/issues/538)) + ## [v3.0.27] ### Fixed @@ -1551,7 +1557,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to ### Added - First public testing release (as `si`) -[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.27...HEAD +[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.28...HEAD +[v3.0.28]: https://github.com/josephwright/siunitx/compare/v3.0.27...v3.0.28 [v3.0.27]: https://github.com/josephwright/siunitx/compare/v3.0.26...v3.0.27 [v3.0.26]: https://github.com/josephwright/siunitx/compare/v3.0.25...v3.0.26 [v3.0.25]: https://github.com/josephwright/siunitx/compare/v3.0.24...v3.0.25 diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf index b98335bb63..69de10dbc3 100644 Binary files a/macros/latex/contrib/siunitx/siunitx-code.pdf and b/macros/latex/contrib/siunitx/siunitx-code.pdf differ diff --git a/macros/latex/contrib/siunitx/siunitx-command.dtx b/macros/latex/contrib/siunitx/siunitx-command.dtx index f12b5382fd..354ab3734c 100644 --- a/macros/latex/contrib/siunitx/siunitx-command.dtx +++ b/macros/latex/contrib/siunitx/siunitx-command.dtx @@ -256,11 +256,12 @@ { \use_i:nn } { \siunitx_unit_options_apply:n {##1} - \bool_if:NT \l_@@_prespace_bool { \exp_not:N \ } \siunitx_unit_format:nN {##1} \exp_not:N \l_@@_tmp_tl - \siunitx_print_unit:V - \exp_not:N \l_@@_tmp_tl + \bool_if:NTF \l_@@_prespace_bool + { \siunitx_quantity_print:nV { } } + { \siunitx_print_unit:V } + \exp_not:N \l_@@_tmp_tl } { \siunitx_quantity:nn {####1} {##1} } \group_end: diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx index 594ad909da..dde4c1ade4 100644 --- a/macros/latex/contrib/siunitx/siunitx.dtx +++ b/macros/latex/contrib/siunitx/siunitx.dtx @@ -121,7 +121,7 @@ % % Identify the package and give the over all version information. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2021-08-22} {3.0.27} +\ProvidesExplPackage {siunitx} {2021-08-27} {3.0.28} {A comprehensive (SI) units package} % \end{macrocode} % diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf index e09324e6ff..417219bbc0 100644 Binary files a/macros/latex/contrib/siunitx/siunitx.pdf and b/macros/latex/contrib/siunitx/siunitx.pdf differ -- cgit v1.2.3