6

I am typesetting a physics document, and sometimes I need to type equations of several lines while in most cases I only need to type one-line formula. So is it OK if I always use align environment instead of switching between align and equation What are their differences?

6

The vertical spacing is different, but only noticeable in certain instances. To see this, consider all the possible ways in which you can have text around these displays:

enter image description here

\documentclass{article}
\usepackage{amsmath}
\setlength{\parindent}{0pt}% Just for this example
\begin{document}

Long/long line before/after display:

\begin{minipage}[t]{.5\textwidth}
  Lorem ipsum.
  \begin{equation}
    f(x) = ax^2 + bx + c
  \end{equation}
  Lorem ipsum.
\end{minipage}%
\begin{minipage}[t]{.5\textwidth}
  Lorem ipsum.
  \begin{align}
    f(x) = ax^2 + bx + c
  \end{align}
  Lorem ipsum.
\end{minipage}

\hrulefill

Long/short line before/after display:

\begin{minipage}[t]{.5\textwidth}
  Lorem ipsum.
  \begin{equation}
    f(x) = ax^2 + bx + c
  \end{equation}
  Lrm.
\end{minipage}%
\begin{minipage}[t]{.5\textwidth}
  Lorem ipsum.
  \begin{align}
    f(x) = ax^2 + bx + c
  \end{align}
  Lrm.
\end{minipage}

\bigskip

\hrulefill

\bigskip

Short/long line before/after display:

\begin{minipage}[t]{.5\textwidth}
  Lrm:
  \begin{equation}
    f(x) = ax^2 + bx + c
  \end{equation}
  Lorem ipsum.
\end{minipage}%
\begin{minipage}[t]{.5\textwidth}
  Lrm:
  \begin{align}
    f(x) = ax^2 + bx + c
  \end{align}
  Lorem ipsum.
\end{minipage}

\hrulefill

Short/short line before/after display:

\begin{minipage}[t]{.5\textwidth}
  Lrm:
  \begin{equation}
    f(x) = ax^2 + bx + c
  \end{equation}
  Lrm.
\end{minipage}%
\begin{minipage}[t]{.5\textwidth}
  Lrm:
  \begin{align}
    f(x) = ax^2 + bx + c
  \end{align}
  Lrm.
\end{minipage}

\end{document}

The above showcases the use of all combinations of long/short pieces of text immediately before/after the display; left column denotes the use of an equation and the right column uses the equivalent with an align. These influence the use of TeX's display skips:

\abovedisplayskip% If the line ending above the display is not short
\abovedisplayshortskip% ... If the line ending above the display is short
\belowdisplayskip% If the line ending below the display is not short
\belowdisplayshortskip% ... If the line ending below the display is short

It's clear that a short line above align is interpreted differently than that of equation (compare the bigger skips above equations (6) and (8) in relation to that of equations (5) and (7)).

That's not all though, and the above image is slightly misleading in that sense. If the minipages where aligned to the [b]ottom rather than the [t]op

enter image description here

you'll see that even the skip below the align is interpreted differently when the line following the display is short.


Is it okay to use a single equation inside an align? Sure, if you're comfortable with the look of it. With surrounding text there's you could expect there to be long ("not short") lines on both sides of the display, in which case align "performs" similarly to equation (equations (1)-(4) above).

  • 1
    This is (partially) wrong. It is always irrelevant whether a long or short line follows the display, as your final examples show. What triggers (in non-aligned displays) the difference between \belowdisplayskip and \belowdisplayshortskip is whether the line before the display is long or short. This seems paradoxical, but goes for a more aesthetically pleasing effect. TeXbook page 189. – Marc van Leeuwen Apr 20 '15 at 12:09
4

As stated in the comments, the only difference is the spacing of the formulas. You should attempt to use equation when possible, and align when you have multi-line formulas.

Also: equation throws an error when you have an & inside the environment, so look out for that when converting between the two.

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Symbol 1 Apr 20 '15 at 4:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.