Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 

?

share|improve this question

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

10  
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
1  
@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
add comment

1 Answer 1

up vote 10 down vote accepted

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.)

share|improve this answer
    
Using amsmath to "minimise" the example in what sense? –  ptrcao Oct 1 '11 at 0:01
1  
@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
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.