I am using "align" to display two equations, the second of which is much shorter than the first one. Unfortunately, LaTeX shifts the RHS of the second equation all the way to the right, so that both equations end at the same point.
This does not happen when I use eqnarray, but I'd rather use align. Is there a way around it?
Thanks.
Math & Science ⇒ Problem with align
Problem with align
Last edited by marcdein on Mon Jun 27, 2011 1:33 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Problem with align
Hi,
I guess you used an incorrect syntax in the align environment. Perhaps post your code of that environment here.
Stefan
I guess you used an incorrect syntax in the align environment. Perhaps post your code of that environment here.
Stefan
LaTeX.org admin
Problem with align
Ok, here is the code:
Code: Select all
\begin{align}
a_n(\sg,ct)&=&-\frac{c\tau + n/2-1}{n/2} \sg^2 a_{n-2}(\sg,ct) = -\frac{2\sg^2}{n} \left(c+\frac{n}{2}-1\right) a_{n-2}(\sg,ct),\\
c_n(\sg,\om,ct)&=&a_n(\sg,c\tau)-i\om c_{n-1}(\sg,ct).
\end{align}
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Problem with align
I see, just write &= instead of &=&:
In contrast to eqnarray, & ist here used to mark the symbol where the alignment shall be.
Stefan
Code: Select all
\begin{align}
a_n(\sg,ct)&=-\frac{c\tau + n/2-1}{n/2} \sg^2 a_{n-2}(\sg,ct) = -\frac{2\sg^2}{n} \left(c+\frac{n}{2}-1\right) a_{n-2}(\sg,ct),\\
c_n(\sg,\om,ct)&=a_n(\sg,c\tau)-i\om c_{n-1}(\sg,ct).
\end{align}
Stefan
LaTeX.org admin