# Lining up the equals sign on several lines of workings.

• July 7th 2011, 08:02 AM
Srengam
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:

$1000x=100y$
$10x=y$

Another example:

$x=10-8$
$=2$

It would be nice if the equals were lined up.

Cheers all.
• July 7th 2011, 08:26 AM
Plato
Re: Lining up the equals sign on several lines of workings.
\begin{align*} \cos (2x) &= \cos^2(x)-\sin^2(x) \\ &=1-2\sin^2(x) \\ &= 2\cos^2(x)-1 \end{align*}
gives

\begin{align*} \cos (2x) &= \cos^2(x)-\sin^2(x) \\ &=1-2\sin^2(x) \\ &= 2\cos^2(x)-1 \end{align*}
• July 7th 2011, 12:11 PM
Srengam
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.
• July 7th 2011, 12:21 PM
Plato
Re: Lining up the equals sign on several lines of workings.
Quote:

Originally Posted by Srengam

$1000x=100y$
$10x=y$

Another example:
$x=10-8$
$=2$

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

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