In essence, this is the same, since align
issues $$
before assembling the environment contents. Here is the definition of the align
environment in amsmath
:
\newenvironment{align}{%
\start@align\@ne\st@rredfalse\m@ne
}{%
% <removed \end{align} part for brevity>
}
So, at \begin{align}
is equivalent to
\start@align{\@ne}{\st@rredfalse}{\m@ne}
where \start@align
is defined to take three parameters and condition appropriately. In the definition of \start@align
, I've marked the conditionals, as well as the final $$
for entering display math mode:
\def\start@align#1#2#3{%
\let\xatlevel@#1% always \z@, \@ne, or \tw@
\maxfields@#3\relax
\ifnum\maxfields@>\m@ne % <------------------- FALSE
\checkat@true
\ifnum\xatlevel@=\tw@
\xxat@true
\fi
\multiply\maxfields@\tw@
\else % <------------------------------------- TRUE
\checkat@false
\fi
\ifingather@ % <------------------------------ FALSE
\iffalse{\fi\ifnum0=`}\fi
\DN@{\vcenter\bgroup\savealignstate@\align@#2}%
\else % <------------------------------------- TRUE
\ifmmode % <------------------------------ FALSE
\if@display
\DN@{\align@recover}%
\else
\nomath@env
\DN@{\@namedef{end\@currenvir}{}\@gobble}%
\fi
\else % <--------------------------------- TRUE
$$% <--------------------------------- enter display math mode
\let\split\insplit@
\DN@{\align@#2}%
\fi
\fi
\collect@body\next@
}
The conclusion? Use an empty line (or paragraph break). The output with or without is the same, except in this case with lineno
.
\begin{linenomath}
and\end{linenomath}
(see documentaion for lineno). – prettygully Feb 7 '12 at 4:18