# Too much white space when using the align-environment

Consider the following example:

\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{align}
\prod a+bm      && \text{is a square in} && \mathbb{R}\\
\prod a+b\theta && \text{is a square in} && \mathbb{R}[\theta]
\end{align}

\begin{eqnarray}
\prod a+bm      & \text{is a square in} & \mathbb{R}\\
\prod a+b\theta & \text{is a square in} & \mathbb{R}[\theta]
\end{eqnarray}
\end{document}

The amount of white spce used by eqnarray is exactly what I want, whereas align adds a (in my opinion) freakishly large amount of white space. So I could just stick with eqnarray, but I've read that I should always (under any circumstances) refrain from using it.

So my question is, how do I make my equation look nice using align?

• Why do you use two ampersands in the align environment and not just one? – malin Jul 27 '13 at 13:31
• @malin Because if I use only one, then everything looks very messy. – Phil-ZXX Jul 27 '13 at 13:39
• I added flush left for you. – dustin Jul 27 '13 at 13:43

You could use the alignat environment, which is similar to align.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage{amssymb}

\begin{document}
\begin{alignat}{2}
\end{alignat}
\end{document}

In the »Math mode« document you can find more about advanced math typesetting.

Update:

As requested the same example but with all columns left aligned.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage{amssymb}

\begin{document}
\begin{alignat}{3}
\end{alignat}
\end{document}

• Great, just one more question: Is it possible to have the two products, i.e. the capital PIs, right underneath each other (just like the two Rs are right underneath each other)? – Phil-ZXX Jul 27 '13 at 13:36
• @Tom: I have edited my answer accordingly. – Thorsten Donig Jul 27 '13 at 14:09
• Is it possible to have center-aligned equations with alignat, as in the original question? Or only flushed left? – Dr_Zaszuś May 11 '15 at 13:22
\documentclass{article}
\usepackage{amsmath, amssymb}
\begin{document}
\begin{align}
\prod a+bm &\phantom{=} \text{is a square in}\quad \mathbb{R}\\
\prod a+b\theta &\phantom{=} \text{is a square in}\quad \mathbb{R}[\theta]
\end{align}
\end{document}

Flush left as requested:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\makeatletter
\newenvironment{lflalign}{%
\def\align@preamble{%
&\strut@
\setboxz@h{\@lign$\m@th\displaystyle{####}$}%
\ifmeasuring@\savefieldlength@\fi
\set@field
\hfil
\tabskip\z@skip
&\setboxz@h{\@lign$\m@th\displaystyle{{}####}$}%
\ifmeasuring@\savefieldlength@\fi
\set@field
\hfil
\tabskip\alignsep@
}
\flalign}
{\endflalign}
\makeatother
\begin{document}
\begin{align}
\prod a+bm & \phantom{=}\text{is a square in}\quad \mathbb{R}\\
\prod a+b\theta & \phantom{=}\text{is a square in}\quad \mathbb{R}[\theta]
\end{align}
\begin{lflalign}
\prod a+bm & \phantom{=}\text{is a square in}\quad \mathbb{R}\\
\prod a+b\theta & \phantom{=}\text{is a square in}\quad \mathbb{R}[\theta]
\end{lflalign}
\end{document}