[latex3-commits] [git/LaTeX3-latex3-latex2e] TL21-2-kernel-msgs: normalizing verb arg errors (7c7a338a)
Frank Mittelbach
frank.mittelbach at latex-project.org
Sat Jun 5 13:18:55 CEST 2021
Repository : https://github.com/latex3/latex2e
On branch : TL21-2-kernel-msgs
Link : https://github.com/latex3/latex2e/commit/7c7a338aae330bbec4cfa5b0f67c2621f3c79ebd
>---------------------------------------------------------------
commit 7c7a338aae330bbec4cfa5b0f67c2621f3c79ebd
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Sat Jun 5 13:18:55 2021 +0200
normalizing verb arg errors
>---------------------------------------------------------------
7c7a338aae330bbec4cfa5b0f67c2621f3c79ebd
base/changes.txt | 9 +++---
base/ltcmd.dtx | 16 ++++++-----
base/ltmiscen.dtx | 4 +--
base/testfiles-ltcmd/ltcmd001.tlg | 6 ++--
base/testfiles-ltcmd/ltcmd003.tlg | 48 ++++++++++++++++----------------
base/testfiles-ltcmd/ltcmd005.luatex.tlg | 33 +++++++++++-----------
base/testfiles-ltcmd/ltcmd005.tlg | 33 +++++++++++-----------
7 files changed, 75 insertions(+), 74 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index ba53bd87..335b4147 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -1,10 +1,11 @@
-2021-06-04 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+2021-06-05 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
- * ltdefns.dtx: Normalize message texts
-
- * ltcmd.dtx (subsection{Messages}):
+ * ltcmd.dtx,
+ * ltdefns.dtx,
+ * ltmiscen.dtx,
Normalize message texts
+
================================================================================
This file lists changes to the LaTeX2e files in reverse chronological order of
publication (therefore the dates might be out of sequence if there are hotfixes).
diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx
index d1e41f4a..a4f4b910 100644
--- a/base/ltcmd.dtx
+++ b/base/ltcmd.dtx
@@ -3701,23 +3701,25 @@
but~it~is~not~defined.
}
\msg_new:nnnn { cmd } { verbatim-newline }
- { Verbatim~argument~of~#1~ended~by~end~of~line. }
+ { Verbatim-like~#1~ended~by~end~of~line. }
{
The~verbatim~argument~of~the~#1~cannot~contain~more~than~one~line,~
but~the~end~
of~the~current~line~has~been~reached.~You~may~have~forgotten~the~
closing~delimiter.
\\ \\
- LaTeX~will~ignore~'#2'.
+ LaTeX~will~ignore~'#2'~and~you~may~get~some~additional~
+ (low-level)~errors.
}
\msg_new:nnnn { cmd } { verbatim-tokenized }
- { The~verbatim~#1~cannot~be~used~inside~an~argument. }
+ { Verbatim-like~#1~illegal~in~argument. }
{
- The~#1~takes~a~verbatim~argument.~
- It~may~not~appear~within~the~argument~of~another~function.~
- It~received~an~illegal~token \tl_if_empty:nF {#3} { ~'#3' } .
+ The~#1~takes~a~verbatim~argument~and~can~therefore~normally~
+ not~appear~in~arguments~of~other~commands~or~environments.~
+ LaTeX~found~an~illegal~token~ \tl_if_empty:nF {#3} { (#3)~ }
+ after~'#2'~and~will~drop~everything~up~to~this~point.
\\ \\
- LaTeX~will~ignore~'#2'.
+ Expect~further~(low-level)~errors.
}
% \end{macrocode}
%
diff --git a/base/ltmiscen.dtx b/base/ltmiscen.dtx
index 8bae3f9b..697e71ae 100644
--- a/base/ltmiscen.dtx
+++ b/base/ltmiscen.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmiscen.dtx}
- [2021/02/08 v1.1y LaTeX Kernel (Misc. Environments)]
+ [2021/06/05 v1.1z LaTeX Kernel (Misc. Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltmiscen.dtx}
@@ -1476,7 +1476,7 @@
\catcode`#1\active
\lccode`\~`#1%
\gdef\verb at balance@group{\verb at egroup
- \@latex at error{\noexpand\verb illegal in command argument}\@ehc}%
+ \@latex at error{\noexpand\verb illegal in argument}\@ehc}%
\aftergroup\verb at balance@group
\lowercase{\let~\verb at egroup}%
% \end{macrocode}
diff --git a/base/testfiles-ltcmd/ltcmd001.tlg b/base/testfiles-ltcmd/ltcmd001.tlg
index a6ce08c6..daea14e6 100644
--- a/base/testfiles-ltcmd/ltcmd001.tlg
+++ b/base/testfiles-ltcmd/ltcmd001.tlg
@@ -11,7 +11,7 @@ l. ...}
You have used \NewDocumentCommand with a command that already has a
definition.
The existing definition of '\foo' will not be altered.
-! LaTeX cmd Error: Command '\foo' not yet defined!
+! LaTeX cmd Error: Command '\foo' undefined!
For immediate help type H <return>.
...
l. ...}
@@ -464,7 +464,7 @@ l. ...}
You have used \NewDocumentEnvironment with an environment that already has a
definition.
The existing definition of 'foo' will not be altered.
-! LaTeX cmd Error: Environment 'foo' not yet defined!
+! LaTeX cmd Error: Environment 'foo' undefined!
For immediate help type H <return>.
...
l. ...}
@@ -725,7 +725,7 @@ l. ...}
You have used \NewExpandableDocumentCommand with a command that already has a
definition.
The existing definition of '\foo' will not be altered.
-! LaTeX cmd Error: Command '\foo' not yet defined!
+! LaTeX cmd Error: Command '\foo' undefined!
For immediate help type H <return>.
...
l. ...}
diff --git a/base/testfiles-ltcmd/ltcmd003.tlg b/base/testfiles-ltcmd/ltcmd003.tlg
index 1a42e23c..0978c75e 100644
--- a/base/testfiles-ltcmd/ltcmd003.tlg
+++ b/base/testfiles-ltcmd/ltcmd003.tlg
@@ -8,41 +8,41 @@ I got '\foo*-%#^^-{}
I got '\foo*-%^^-{}
I got '\foo[ak]-%-{}
I got '\foo[a]-bcd-{de}
-! LaTeX cmd Error: The verbatim command '\foo' cannot be used inside an
-(cmd) argument.
+! LaTeX cmd Error: Verbatim-like command '\foo' illegal in argument.
For immediate help type H <return>.
...
l. ...\use:n {\foo*+&#~+}
-The command '\foo' takes a verbatim argument. It may not appear within the
-argument of another function. It received an illegal token '##'.
-LaTeX will ignore '+&'.
+The command '\foo' takes a verbatim argument and can therefore normally not
+appear in arguments of other commands or environments. LaTeX found an illegal
+token (##) after '+&' and will drop everything up to this point.
+Expect further (low-level) errors.
I got '\foo*--NoValue--{##}
-! LaTeX cmd Error: The verbatim command '\foo' cannot be used inside an
-(cmd) argument.
+! LaTeX cmd Error: Verbatim-like command '\foo' illegal in argument.
For immediate help type H <return>.
...
l. ...\use:n {\foo[\ab]+\ab+}
-The command '\foo' takes a verbatim argument. It may not appear within the
-argument of another function. It received an illegal token '\ab '.
-LaTeX will ignore '+'.
+The command '\foo' takes a verbatim argument and can therefore normally not
+appear in arguments of other commands or environments. LaTeX found an illegal
+token (\ab ) after '+' and will drop everything up to this point.
+Expect further (low-level) errors.
I got '\foo[\ab ]--NoValue--{\ab }
-! LaTeX cmd Error: The verbatim command '\foo' cannot be used inside an
-(cmd) argument.
+! LaTeX cmd Error: Verbatim-like command '\foo' illegal in argument.
For immediate help type H <return>.
...
l. ...\use:n {\foo\abc\ }
-The command '\foo' takes a verbatim argument. It may not appear within the
-argument of another function. It received an illegal token '\abc '.
-LaTeX will ignore ''.
+The command '\foo' takes a verbatim argument and can therefore normally not
+appear in arguments of other commands or environments. LaTeX found an illegal
+token (\abc ) after '' and will drop everything up to this point.
+Expect further (low-level) errors.
I got '\foo--NoValue--{\abc }
-! LaTeX cmd Error: Verbatim argument of command '\foo' ended by end of line.
+! LaTeX cmd Error: Verbatim-like command '\foo' ended by end of line.
For immediate help type H <return>.
...
l. ...\foo+a
The verbatim argument of the command '\foo' cannot contain more than one line,
but the end of the current line has been reached. You may have forgotten the
closing delimiter.
-LaTeX will ignore '+a'.
+LaTeX will ignore '+a' and you may get some additional (low-level) errors.
I got '\foo--NoValue--{+}
I got '\foo-b-{}
I got '\foo*-c-{}
@@ -51,24 +51,24 @@ I got '\foo-%#$|+-{}
I got '\foo-@#${%{$}#}-{}
I got '\foo-{{}}-{}
I got '\foo--{}
-! LaTeX cmd Error: Verbatim argument of command '\foo' ended by end of line.
+! LaTeX cmd Error: Verbatim-like command '\foo' ended by end of line.
For immediate help type H <return>.
...
l. ...\foo{
The verbatim argument of the command '\foo' cannot contain more than one line,
but the end of the current line has been reached. You may have forgotten the
closing delimiter.
-LaTeX will ignore '{'.
+LaTeX will ignore '{' and you may get some additional (low-level) errors.
I got '\foo--NoValue--{}
-! LaTeX cmd Error: The verbatim command '\foo' cannot be used inside an
-(cmd) argument.
+! LaTeX cmd Error: Verbatim-like command '\foo' illegal in argument.
For immediate help type H <return>.
...
l. ...\foo#
{}
-The command '\foo' takes a verbatim argument. It may not appear within the
-argument of another function. It received an illegal token '##'.
-LaTeX will ignore ''.
+The command '\foo' takes a verbatim argument and can therefore normally not
+appear in arguments of other commands or environments. LaTeX found an illegal
+token (##) after '' and will drop everything up to this point.
+Expect further (low-level) errors.
I got '\foo--NoValue--{##}
I got '\foo-%#&\-{}
> ab.
diff --git a/base/testfiles-ltcmd/ltcmd005.luatex.tlg b/base/testfiles-ltcmd/ltcmd005.luatex.tlg
index b97fea79..d7df4dc6 100644
--- a/base/testfiles-ltcmd/ltcmd005.luatex.tlg
+++ b/base/testfiles-ltcmd/ltcmd005.luatex.tlg
@@ -252,13 +252,13 @@ You have used \NewDocumentEnvironment with an environment that already has a
definition.
The existing definition of 'foo' will not be altered.
foo
-! LaTeX cmd Error: Command '\testA' not yet defined!
+! LaTeX cmd Error: Command '\testA' undefined!
For immediate help type H <return>.
...
l. ... }
You have used \RenewDocumentCommand with a command that was never defined.
LaTeX will ignore this entire definition.
-! LaTeX cmd Error: Environment 'testA' not yet defined!
+! LaTeX cmd Error: Environment 'testA' undefined!
For immediate help type H <return>.
...
l. ... }
@@ -416,45 +416,44 @@ For immediate help type H <return>.
l. ... }
LaTeX was asked to split the input 'a,b,c,d' at each occurrence of the token
',', up to a maximum of 3 parts. There were too many ',' tokens.
-! LaTeX cmd Error: The verbatim command '\testE' cannot be used inside an
-(cmd) argument.
+! LaTeX cmd Error: Verbatim-like command '\testE' illegal in argument.
For immediate help type H <return>.
...
l. ... }
-The command '\testE' takes a verbatim argument. It may not appear within the
-argument of another function. It received an illegal token '\TYPE '.
-LaTeX will ignore '+'.
+The command '\testE' takes a verbatim argument and can therefore normally not
+appear in arguments of other commands or environments. LaTeX found an illegal
+token (\TYPE ) after '+' and will drop everything up to this point.
+Expect further (low-level) errors.
-NoValue-
+
-! LaTeX cmd Error: The verbatim environment 'testF' cannot be used inside an
-(cmd) argument.
+! LaTeX cmd Error: Verbatim-like environment 'testF' illegal in argument.
For immediate help type H <return>.
...
l. ... }
-The environment 'testF' takes a verbatim argument. It may not appear within
-the argument of another function. It received an illegal token '\TYPE '.
-LaTeX will ignore '+'.
+The environment 'testF' takes a verbatim argument and can therefore normally
+not appear in arguments of other commands or environments. LaTeX found an
+illegal token (\TYPE ) after '+' and will drop everything up to this point.
+Expect further (low-level) errors.
-NoValue-
+
============================================================
-! LaTeX cmd Error: Verbatim argument of command '\testG' ended by end of line.
+! LaTeX cmd Error: Verbatim-like command '\testG' ended by end of line.
For immediate help type H <return>.
...
l. ...\testG+
The verbatim argument of the command '\testG' cannot contain more than one
line, but the end of the current line has been reached. You may have forgotten
the closing delimiter.
-LaTeX will ignore '+'.
+LaTeX will ignore '+' and you may get some additional (low-level) errors.
-NoValue-
+
-! LaTeX cmd Error: Verbatim argument of environment 'testH' ended by end of
-(cmd) line.
+! LaTeX cmd Error: Verbatim-like environment 'testH' ended by end of line.
For immediate help type H <return>.
...
l. ...\begin{testH}+
The verbatim argument of the environment 'testH' cannot contain more than one
line, but the end of the current line has been reached. You may have forgotten
the closing delimiter.
-LaTeX will ignore '+'.
+LaTeX will ignore '+' and you may get some additional (low-level) errors.
-NoValue-
+
diff --git a/base/testfiles-ltcmd/ltcmd005.tlg b/base/testfiles-ltcmd/ltcmd005.tlg
index a0a63402..9b5eb87e 100644
--- a/base/testfiles-ltcmd/ltcmd005.tlg
+++ b/base/testfiles-ltcmd/ltcmd005.tlg
@@ -252,13 +252,13 @@ You have used \NewDocumentEnvironment with an environment that already has a
definition.
The existing definition of 'foo' will not be altered.
foo
-! LaTeX cmd Error: Command '\testA' not yet defined!
+! LaTeX cmd Error: Command '\testA' undefined!
For immediate help type H <return>.
...
l. ... }
You have used \RenewDocumentCommand with a command that was never defined.
LaTeX will ignore this entire definition.
-! LaTeX cmd Error: Environment 'testA' not yet defined!
+! LaTeX cmd Error: Environment 'testA' undefined!
For immediate help type H <return>.
...
l. ... }
@@ -416,45 +416,44 @@ For immediate help type H <return>.
l. ... }
LaTeX was asked to split the input 'a,b,c,d' at each occurrence of the token
',', up to a maximum of 3 parts. There were too many ',' tokens.
-! LaTeX cmd Error: The verbatim command '\testE' cannot be used inside an
-(cmd) argument.
+! LaTeX cmd Error: Verbatim-like command '\testE' illegal in argument.
For immediate help type H <return>.
...
l. ... }
-The command '\testE' takes a verbatim argument. It may not appear within the
-argument of another function. It received an illegal token '\TYPE '.
-LaTeX will ignore '+'.
+The command '\testE' takes a verbatim argument and can therefore normally not
+appear in arguments of other commands or environments. LaTeX found an illegal
+token (\TYPE ) after '+' and will drop everything up to this point.
+Expect further (low-level) errors.
-NoValue-
+
-! LaTeX cmd Error: The verbatim environment 'testF' cannot be used inside an
-(cmd) argument.
+! LaTeX cmd Error: Verbatim-like environment 'testF' illegal in argument.
For immediate help type H <return>.
...
l. ... }
-The environment 'testF' takes a verbatim argument. It may not appear within
-the argument of another function. It received an illegal token '\TYPE '.
-LaTeX will ignore '+'.
+The environment 'testF' takes a verbatim argument and can therefore normally
+not appear in arguments of other commands or environments. LaTeX found an
+illegal token (\TYPE ) after '+' and will drop everything up to this point.
+Expect further (low-level) errors.
-NoValue-
+
============================================================
-! LaTeX cmd Error: Verbatim argument of command '\testG' ended by end of line.
+! LaTeX cmd Error: Verbatim-like command '\testG' ended by end of line.
For immediate help type H <return>.
...
l. ...\testG+
The verbatim argument of the command '\testG' cannot contain more than one
line, but the end of the current line has been reached. You may have forgotten
the closing delimiter.
-LaTeX will ignore '+'.
+LaTeX will ignore '+' and you may get some additional (low-level) errors.
-NoValue-
+
-! LaTeX cmd Error: Verbatim argument of environment 'testH' ended by end of
-(cmd) line.
+! LaTeX cmd Error: Verbatim-like environment 'testH' ended by end of line.
For immediate help type H <return>.
...
l. ...\begin{testH}+
The verbatim argument of the environment 'testH' cannot contain more than one
line, but the end of the current line has been reached. You may have forgotten
the closing delimiter.
-LaTeX will ignore '+'.
+LaTeX will ignore '+' and you may get some additional (low-level) errors.
-NoValue-
+
More information about the latex3-commits
mailing list.