# align with equal sign centered [duplicate]

Possible Duplicate:
Align to center

I want to align some equations to the equal signs, so I wrote this:

\begin{align}
-3z &= -9\\
z &=  3\\
-3y-3*3 &=  3\\
y &= -4\\
2x+8*(-4)+4*3 &=  2\\
x &= 11
\end{align}


However, because one equation is much longer than the others, all the equations appear somewhat at the right of the page.

How can I make the equal signs appear in the middle of the page, while still aligning all the equations to them?

-
Your question was migrated here from another stackexchange site. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. –  percusse Sep 2 '12 at 12:42

## migrated from stackoverflow.comSep 2 '12 at 12:12

This question came from our site for professional and enthusiast programmers.

## marked as duplicate by Harish Kumar, lockstep, Stephan Lehmke, morbusg, WernerSep 2 '12 at 13:42

One possibility is to make the long expression occupy no space:

\begin{align}
-3z &= -9\\
z &=  3\\
-3y-3*3 &=  3\\
y &= -4\\
\makebox[0pt][r]{$\displaystyle 2x+8*(-4)+4*3$} &=  2\\
x &= 11
\end{align}

-
@HarishKumar No, it's more of a simple answer to the original reason "one equation is much longer than the others". Of course one could wrap every expression like this (for instance with a dedicated command), then it would be completely centered. –  Stephan Lehmke Sep 2 '12 at 12:59
If the OP really needs complete centering, then probably a patch to \align is required. I'll wait for comments. –  Stephan Lehmke Sep 2 '12 at 13:00
@HarishKumar Just noticed. I think Werners answer is much better (and more work). –  Stephan Lehmke Sep 2 '12 at 13:04
If you have a patch to align in mind, please add it to the the other question. –  Harish Kumar Sep 2 '12 at 13:13