eqnarray or equation for single-line equations?

1,265

Use equation for single line equations (or \[...\] for unnumbered ones) and never ever use eqnarray. See eqnarray vs align for more information.

Share:
1,265

Related videos on Youtube

Reinstate Monica
Author by

Reinstate Monica

Go fund Monica Cellio's legal fees!

Updated on September 02, 2020

Comments

  • Reinstate Monica
    Reinstate Monica about 3 years

    Normally I would use \begin{equation}, of course. But I got a huge file (more than two hundred pages) where many equations are formatted like this:

    \begin{eqnarray}
      a = b + 1 % no & here!
    \end{eqnarray}
    

    AFAICT the visual difference is minimal. Still, should I convert all this to \begin{equation}?

    (I suspect that the bigger problem might be the missing & characters around the =. If I add them, I get exactly the same output as with \[...\], which should be the right thing.)

    I use the svmono document class, if that is important.

    • Marco Daniel
      Marco Daniel over 11 years
    • Reinstate Monica
      Reinstate Monica over 11 years
      @MarcoDaniel Thanks, but that question is about a list of related equations, which I don't have here.
    • egreg
      egreg over 11 years
      Use equation for single line equations (or \[...\] for unnumbered ones) and never ever use eqnarray.
    • bodo
      bodo about 11 years
      @egreg: It seems to me your comment answers this question. Maybe you should put it as an answer!?!
    • cmhughes
      cmhughes about 11 years
  • Reinstate Monica
    Reinstate Monica about 11 years
    This suggests that I convert all equations. However, the link and the documents linked from it and the answers do not seem to give any information for my specific question: single line, no alignment (i.e. no &). No source says anything bad (or good) about that (unless I missed something). So while your answer certainly is good general advice, I am not sure how it applies here.
  • egreg
    egreg about 11 years
    @WolframH If you don't want to edit your document, fine. But you'll do yourself a favor using the right environment for each equation or group thereof. This doesn't include eqnarray. :)