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.

Other than manually going over all the dozen plus instances where I ignorantly used eqnarray must all be changed to align.

I first tried doing a finad replace all and replaced align, and then, for example, making the changes:

\begin{align}
S(x) &= S_0+S_1 x+\sum_{n=2}^\infty S_{n+1} x^n - \sum_{n=2}^\infty S_{n-1} x^n  -\sum_{n=2}^\infty x^n\\
&= S_0+S_1 x+\frac{1}{x}\sum_{n=2}^\infty S_{n+1} x^{n+1} - x\sum_{n=2}^\infty S_{n-1} x^{n-1}  -\sum_{n=2}^\infty x^n\\
&= S_0+S_1 x+\frac{1}{x}(S(x) - S_0 - S_1 x -S_2 x^2) - x(S(x) - S_0 )  -\frac{x^2}{1-x}
\end{align}

To what was initially just

\begin{eqnarray}
S(x) = S_0+S_1 x+\sum_{n=2}^\infty S_{n+1} x^n - \sum_{n=2}^\infty S_{n-1} x^n -\sum_{n=2}^\infty x^n\\
 S(x) = S_0+S_1 x+\frac{1}{x}\sum_{n=2}^\infty S_{n+1} x^{n+1} - x\sum_{n=2}^\infty S_{n-1} x^{n-1} -\sum_{n=2}^\infty x^n\\
 S(x) = S_0+S_1 x+\frac{1}{x}(S(x) - S_0 - S_1 x -S_2 x^2) - x(S(x) - S_0 ) -\frac{x^2}{1-x} 
\end{eqnarray}

Now I am getting hundreds of error prompts, constituted solely of these four

! LaTeX Error: Environment align undefined.
! Misplaced alignment tab character &.
! Missing $ inserted.
! Extra }, or forgotten $.

Is there any hope?

share|improve this question
add comment

1 Answer

up vote 9 down vote accepted

The align environment is defined by the amsmath package. Add \usepackage{amsmath} to your preamble and all should be well.

share|improve this answer
1  
Thanks a lot. Number of errors go down from 191 to 0. –  yayu May 18 '11 at 11:23
    
how can I get my equations to align to the left rahter than to the right? –  user27182 Apr 15 '13 at 22:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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