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.

The following will not compile with LaTeX. Can you give advice, please?

\documentclass[12pt]{article}
\usepackage{amsmath,amsthm,amssymb}
\begin{document}

$$\eqalign{a_1&=1+2+3\cr
a_1+a_2 &=1+2+3+4\cr
a_1+a_2+a_3 &=1+2+3+4+5\cr}$$
\end{document}
share|improve this question
    
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  Anke Mar 18 '13 at 12:18
7  
Isn't \eqalign plain TeX? If you're using amsmath anyway, I would recommend just using an align environment, i.e. \begin{align} a_1 &= 1+2+3\\ a_1+a_2 &= ... \end{align} –  benwilfut Mar 18 '13 at 12:25

1 Answer 1

I think you should use it like:

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}

\begin{align}
a_1         &= 1+2+3     \\
a_1+a_2     &= 1+2+3+4   \\
a_1+a_2+a_3 &= 1+2+3+4+5 
\end{align}
\end{document}

enter image description here

share|improve this answer

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.