8

Is gather* with one line of math equivalent to displaymath?

2

2 Answers 2

10

No, it is not: the vertical spaces before and after the display are different.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\noindent Text
\begin{gather*}
  a=b
\end{gather*}
Text
\begin{displaymath}
  a=b
\end{displaymath}
Text
\end{document}

enter image description here

1

Also, if you have a very long equation in a \[...\], the space between the binary operators (like + and \times) will shrink to make the equation break the margin as little as possible (as happens with an equation in an ordinary paragraph; I'm assuming you're using Computer Modern fonts here). This space never shrinks inside a \begin...\end{gather*}.

This space also shrinks when necessary in an equation in \begin...\end{equation}, and never in an equation in \begin...\end{gather}.

By the way, very old versions of amsmath did define \[...\] and \begin...\end{equation} as a one-line \begin...\end{gather*} and \begin...\end{gather}, respectively. See "Changes in amsmath 2.0" here. The first edition (1994) of The LaTeX Companion is no longer correct about \[...\] and \begin...\end{equation} (see page 243).

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.