Lining up the equals sign on several lines of workings.

Hi all,

How do I get the equals sign to line up under each other like they would when writing by hand.

Example:

$\displaystyle 1000x=100y$

$\displaystyle 10x=y$

Another example:

$\displaystyle x=10-8$

$\displaystyle =2$

It would be nice if the equals were lined up.

Cheers all.

Re: Lining up the equals sign on several lines of workings.

[tex]\begin{align*} \cos (2x) &= \cos^2(x)-\sin^2(x) \\ &=1-2\sin^2(x) \\ &= 2\cos^2(x)-1 \end{align*}[/tex]

gives

$\displaystyle \begin{align*} \cos (2x) &= \cos^2(x)-\sin^2(x) \\ &=1-2\sin^2(x) \\ &= 2\cos^2(x)-1 \end{align*}$

Re: Lining up the equals sign on several lines of workings.

Hi there,

I had a little trouble getting your method to work for me. I was however able to achieve it using the tabbing environment. Once I get a bit better with LaTeX I will return to your suggested method, but for now I can carry on with the tabbing method.

Many thanks.

Re: Lining up the equals sign on several lines of workings.

Quote:

Originally Posted by

**Srengam**

$\displaystyle 1000x=100y$

$\displaystyle 10x=y$

Another example:

$\displaystyle x=10-8$

$\displaystyle =2$

[tex]\begin{align*} 1000x &= 100y \\ 10x &=y\end{align*}[/tex]

$\displaystyle \begin{align*} 1000x &= 100y \\ 10x &=y\end{align*}$

[tex]\begin{align*} x &= 10-8 \\ &=2\end{align*}[/tex]

$\displaystyle \begin{align*} x &= 10-8 \\ &=2\end{align*}$