[latex3-commits] [git/LaTeX3-latex3-latex2e] gh501: avoid infinite loop on math alphabet error #501 (6277aa3b)
David Carlisle
d.p.carlisle at gmail.com
Mon Feb 15 13:08:10 CET 2021
Repository : https://github.com/latex3/latex2e
On branch : gh501
Link : https://github.com/latex3/latex2e/commit/6277aa3b3636e729d303883b540cb2172367eb87
>---------------------------------------------------------------
commit 6277aa3b3636e729d303883b540cb2172367eb87
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Mon Feb 15 12:08:10 2021 +0000
avoid infinite loop on math alphabet error #501
>---------------------------------------------------------------
6277aa3b3636e729d303883b540cb2172367eb87
base/changes.txt | 5 +++++
base/ltfssdcl.dtx | 8 ++++++--
base/testfiles/github-0501.lvt | 14 ++++++++++++++
base/testfiles/{tlb0483.tlg => github-0501.tlg} | 8 +++-----
4 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 1424800a..67f9c839 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,11 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2021-02-15 David Carlisle <David.Carlisle at latex-project.org>
+
+ * ltfssdcl.dtx: two additional \expandafter to avoid infinite
+ loop on not in math error. (gh/501)
+
2021-02-11 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* classes.dtx (subsubsection{Itemize}):
diff --git a/base/ltfssdcl.dtx b/base/ltfssdcl.dtx
index dd4e14fa..9710d543 100644
--- a/base/ltfssdcl.dtx
+++ b/base/ltfssdcl.dtx
@@ -36,7 +36,7 @@
%
%
\ProvidesFile{ltfssdcl.dtx}
- [2021/01/15 v3.0v LaTeX Kernel (NFSS Declarative Interface)]
+ [2021/02/15 v3.0w LaTeX Kernel (NFSS Declarative Interface)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -490,7 +490,11 @@
in version \math at version}%
\@eha
\fi
- \else \expandafter\non at alpherr\fi
+% \end{macrocode}
+% extra \cs{expandafter} to remove the \cs{expandafter} added below
+% \changes{v3.0w}{2021/02/115}{fix for (gh/501)}
+% \begin{macrocode}
+ \else \expandafter\expandafter\expandafter\non at alpherr\fi
% \end{macrocode}
% If the legacy interface is used, e.g., \verb=$\sf -1$= the math
% alphabet \verb=#1= does not take an argument so we better do not
diff --git a/base/testfiles/github-0501.lvt b/base/testfiles/github-0501.lvt
new file mode 100644
index 00000000..9ad2a9b0
--- /dev/null
+++ b/base/testfiles/github-0501.lvt
@@ -0,0 +1,14 @@
+\documentclass{article}
+
+\input{test2e}
+
+\begin{document}
+
+\START
+
+% should give a single error on \mathit
+% not loop errors on \expandafter
+
+\mathit{x}
+
+\END
\ No newline at end of file
diff --git a/base/testfiles/tlb0483.tlg b/base/testfiles/github-0501.tlg
similarity index 69%
copy from base/testfiles/tlb0483.tlg
copy to base/testfiles/github-0501.tlg
index 282221a9..ee87539b 100644
--- a/base/testfiles/tlb0483.tlg
+++ b/base/testfiles/github-0501.tlg
@@ -1,11 +1,9 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
-! LaTeX Error: Counter too large.
+! LaTeX Error: \mathit allowed only in math mode.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
-l. ...\section{ccc}
-You've lost some text. Try typing <return> to proceed.
+l. ...\mathit{x}
+You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
-[1
-] (tlb0483.aux)
More information about the latex3-commits
mailing list.