# Error in align environment - runaway argument? [duplicate]

Possible Duplicate:
Blank lines in align environment

\documentclass[12pt,a4paper]{article}
\usepackage[version=3]{mhchem}
\usepackage{siunitx}

\begin{document}
\begin{align*}
\ce{K_a} & = \frac{\ce{[H3O+][A^-]}}{\ce{[HA]}} \\

\end{align*}
\end{document}


gives

 Runaway argument?
\ce {K_a} & = \frac {\ce {[H3O+][A^-]}}{\ce {[HA]}} \\
! Paragraph ended before \align* was complete.
<to be read again>
\par
l.8


?

-

## marked as duplicate by egreg, Andrey Vihrov, diabonas, Marco Daniel, Stefan Kottwitz♦Nov 12 '11 at 21:06

You can't have a blank line in the align* (or align) environment, or indeed in display math. – Joseph Wright Sep 30 '11 at 8:21
I vaguely remember now! Thanks! Post your comment as a solution and I will accept it. – ptrcao Sep 30 '11 at 8:27
@Joseph: I think this question is neither "too localized" nor an "exact duplicate". Please convert your commnet into an answer. – lockstep Sep 30 '11 at 14:59
@lockstep Done, in an enlarged form – Joseph Wright Sep 30 '11 at 15:03

You can't have a blank line in the align* (or align) environment, or indeed in display math. Thus you want

\documentclass[12pt,a4paper]{article}
\usepackage[version=3]{mhchem}
\usepackage{amsmath}

\begin{document}
\begin{align*}
\ce{K_a} & = \frac{\ce{[H3O+][A^-]}}{\ce{[HA]}} \\
%
\end{align*}
\end{document}


or

\documentclass[12pt,a4paper]{article}
\usepackage[version=3]{mhchem}
\usepackage{amsmath}

\begin{document}
\begin{align*}
\ce{K_a} & = \frac{\ce{[H3O+][A^-]}}{\ce{[HA]}} \\
\end{align*}
\end{document}


(I've used amsmath directly, rather than load it via siunitx, to minimise the example.)

-
Using amsmath to "minimise" the example in what sense? – ptrcao Oct 1 '11 at 0:01
@ptrcao The siunitx package is not necessary to see the problem, you only need to ensure that align* is defined. Thus I'm loading the minimum number of packages to show the problem. (Add \listfiles to the original and to my example, and the list of packages will be much shorter for the later.) – Joseph Wright Oct 1 '11 at 6:46
Oh, I see now, thanks! – ptrcao Oct 1 '11 at 7:00