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.

3
  • 3
    this was done to help external package to identify the last counter that was changed, see github.com/latex3/latex2e/issues/300 Commented Mar 1, 2022 at 22:03
  • 1
    note that change or no change, the same advice holds: don't use eqnarray, use the alignment environments from amsmath Commented Mar 1, 2022 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
    Commented Mar 7, 2022 at 16:24

1 Answer 1

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.

2
  • 1
    I read the comments above, I also suggest you to use align instead of eqnarray, in general.
    – Adame
    Commented Mar 2, 2022 at 0: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) Commented Mar 2, 2022 at 2:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .