Math & ScienceAlign Vs. Equation for single-line eq.

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
drgz
Posts: 44
Joined: Sat Apr 18, 2009 8:40 pm

Align Vs. Equation for single-line eq.

Post by drgz »

Just a quick question; is there any notable difference in the usage of

Code: Select all

\begin{align}
blabla
\end{align}
and

Code: Select all

\begin{equation}
blabla,
\end{equation}
other that align allows you to align the multi-line equations?

While writing my masters thesis I've found myself to almost constantly use align over equation, even for equations which are not spanning over multiple lines. I can't say I've noticed any difference in the document, but as I realized this fact when looking at my LaTeX code I started to wonder whether if there are any other obvious differences than the possibility for alignment.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Align Vs. Equation for single-line eq.

Post by gmedina »

The line changing command \\ has no effect inside a "pure" equation environment:

Code: Select all

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
a=b\\
c=d
\end{equation}

\begin{align}
a=b\\
c=d
\end{align}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
daleif
Posts: 199
Joined: Wed Nov 19, 2008 12:46 am

Re: Align Vs. Equation for single-line eq.

Post by daleif »

For oneliners there is one reason on favor for equation: if the math is short and the text line just above it is also short, equation will use something like \abovedisplayshortskip instead of the normal \abovedisplayskip, thus eliminating some white space above the formula.

Align cannot do this by construction.
drgz
Posts: 44
Joined: Sat Apr 18, 2009 8:40 pm

Re: Align Vs. Equation for single-line eq.

Post by drgz »

Thanks to your both. The part about the white-space is definitely true, however, I didn't notice it until I read your post.

Best regards,

drgz
Post Reply