0

Looking at the PDF of the current LaTeX source, I noticed that very recently (2021-10-14, I believe), the standard definition of the eqnarray environment was changed to "explicitly set \@currentcounter". It seems that the command \def\@currentcounter{equation} was added to the definition of \eqnarray. What does this change accomplish? Was anything else changed in the definition of the eqnarray environment? Just wondering.

MSC
  • 2,722
  • 3
    this was done to help external package to identify the last counter that was changed, see https://github.com/latex3/latex2e/issues/300 – Ulrike Fischer Mar 01 '22 at 22:03
  • 1
    note that change or no change, the same advice holds: don't use eqnarray, use the alignment environments from amsmath – David Carlisle Mar 01 '22 at 22:53
  • So how often was something coming out wrong before this change? Was it mainly a problem with zref, or was it a problem with basic LaTeX with no extra packages at all? – MSC Mar 07 '22 at 16:24

1 Answers1

1

I believe it's because the package might have been having some really specific error when used with a really specific other package.

As you said, that's just an explicit definition of the environment counter (I believe for referring the equations in the array). I don't know exactly how it was before, but they might had been using this counter from elsewhere or in a different way. Probably, this is safer than the older version, even though it wasn't an actual problem.

Bernard
  • 271,350
Adame
  • 21
  • 1
    I read the comments above, I also suggest you to use align instead of eqnarray, in general. – Adame Mar 02 '22 at 00:45
  • 1
    Welcome to TeX.SX! While not really wrong, I'm afraid your answer doesn't actually answer the question. You could instead summarise the github issue Ulrike mentioned in her comment, which was the issue that motivated this change (although the actual change to eqnarray was done for a later issue) – Phelype Oleinik Mar 02 '22 at 02:41