You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a couple of minor inconsistencies with the aligned, alignedat and gathered environments of amsmath (which likely do not surface prominently in actual documents):
Effectively, this omits the check of maximum column on the final row. This also omits the elimination of the undesired trailing \tabsep in aligned on the final row.
\math@cr@@@aligned checks whether the column counter \@column is even or odd, but it never resets it:
Effectively, this sometimes leaves the undesired trailing \tabsep in place for aligned.
Minimal example showing the bug
\RequirePackage{latexbug}
\documentclass{article}
\usepackage{amsmath}
\makeatletter\def\@amsmath@err#1#2{\quad\text{ERROR}}
\begin{document}
detection of excessive columns works in nesting here:
\[\begin{alignedat}{1}YYYYY&\quad\text{col}: \the\column@\\\begin{aligned}Y&Y&Y&Y&Y\end{aligned}&\quad\text{col}: \the\column@/\the\maxfields@&\quad\text{col}: \the\column@/\the\maxfields@\\YYYYY&\quad\text{col}: \the\column@/\the\maxfields@\end{alignedat}\]
detection of excessive columns can be misled by gathered:
\[\begin{alignedat}{1}YYYYY&\quad\text{col}: \the\column@/\the\maxfields@\\\begin{gathered}YYYYY\end{gathered}&\quad\text{col}: \the\column@/\the\maxfields@&\quad\text{col}: \the\column@/\the\maxfields@\\YYYYY&\quad\text{col}: \the\column@/\the\maxfields@\end{alignedat}\]
alignedat does not detect excessive column in final row:
\[\begin{alignedat}{1}YYYYY&\quad\text{col}: \the\column@/\the\maxfields@&\quad\text{col}: \the\column@/\the\maxfields@\\YYYYY&\quad\text{col}: \the\column@/\the\maxfields@&\quad\text{col}: \the\column@/\the\maxfields@\\YYYYY&\quad\text{col}: \the\column@/\the\maxfields@&\quad\text{col}: \the\column@/\the\maxfields@\end{alignedat}\]
Inconsistencies in eliminating the trailing tabsep in aligned:
\[\vrule\begin{aligned}X\\X&Y\end{aligned}\vrule\]\[\vrule\begin{aligned}X\\X&Y\\\end{aligned}\vrule\]\[\vrule\begin{aligned}X&Y\end{aligned}\vrule\]\[\vrule\begin{aligned}X&Y\\\end{aligned}\vrule\]\[\vrule\begin{aligned}X&Y\\X&Y\end{aligned}\vrule\]\[\vrule\begin{aligned}X&Y\\X&Y\\\end{aligned}\vrule\]\end{document}
The text was updated successfully, but these errors were encountered:
Brief outline of the bug
There are a couple of minor inconsistencies with the
aligned
,alignedat
andgathered
environments of amsmath (which likely do not surface prominently in actual documents):gathered
uses\endaligned
latex2e/required/amsmath/amsmath.dtx
Line 4026 in 0e10f72
\restorecolumn@
latex2e/required/amsmath/amsmath.dtx
Line 3976 in 0e10f72
\savecolumn@
as inaligned
latex2e/required/amsmath/amsmath.dtx
Line 3865 in 0e10f72
alignedat
terminates processing of the body by\crcr
instead of by\math@cr@@@
latex2e/required/amsmath/amsmath.dtx
Line 3975 in 0e10f72
\tabsep
inaligned
on the final row.\math@cr@@@aligned
checks whether the column counter\@column
is even or odd, but it never resets it:latex2e/required/amsmath/amsmath.dtx
Line 3769 in 0e10f72
\math@cr@@@alignedat
performs a reset:latex2e/required/amsmath/amsmath.dtx
Line 3945 in 0e10f72
\tabsep
in place foraligned
.Minimal example showing the bug
The text was updated successfully, but these errors were encountered: