latex3 / latex2e

The LaTeX2e kernel
https://www.latex-project.org/
LaTeX Project Public License v1.3c
1.95k stars 267 forks source link

amsmath \dots causes an error #1531

Closed hilshs closed 3 weeks ago

hilshs commented 3 weeks ago

Brief outline of the bug

I have updated amsmath.sty to the 2024/10/30 version.

Now I get an error if I don't write anything after \dots in the gather environment.

Minimal example showing the bug

\RequirePackage{latexbug}
\documentclass[a4paper]{article}

\usepackage{amsmath}

\begin{document}
\begin{gather}
\dots
\end{gather}
\end{document}

Here is the error message.

$ pdflatex amsmath_bug.tex This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./amsmath_bug.tex LaTeX2e <2024-11-01> L3 programming layer <2024-10-09> (c:/texlive/2024/texmf-dist/tex/latex/latexbug/latexbug.sty) (c:/texlive/2024/texmf-dist/tex/latex/base/article.cls Document Class: article 2024/06/29 v1.4n Standard LaTeX document class (c:/texlive/2024/texmf-dist/tex/latex/base/size10.clo)) (c:/texlive/2024/texmf-dist/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?' option. (c:/texlive/2024/texmf-dist/tex/latex/amsmath/amstext.sty (c:/texlive/2024/texmf-dist/tex/latex/amsmath/amsgen.sty)) (c:/texlive/2024/texmf-dist/tex/latex/amsmath/amsbsy.sty) (c:/texlive/2024/texmf-dist/tex/latex/amsmath/amsopn.sty)) (c:/texlive/2024/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) (./amsmath_bug.aux) ! Missing \endcsname inserted.

\csname\endcsname l.7 \end{gather} ## Log file (required) and possibly PDF file [amsmath_bug.log](https://github.com/user-attachments/files/17610738/amsmath_bug.log)
davidcarlisle commented 3 weeks ago

yes sorry this is a duplicate of #1448 a fix will be posted as soon as possible but meanwhile if you use \relax after the \dots to hide the end of the cell, it should work as intended.