[Tex/LaTex] I need help aligning the equations to the left

equationshorizontal alignment

Here is my working code: I want my equation to be aligned to the left, does anyone see how? I want each \iff sign to be under an \iff sign.

\begin{eqnarray*}
e^z &=& e^w  \\
\iff log(e^z) &=& log(e^w) \\
\iff ln|e^z| + i\cdot Arg(e^z) &=& ln|e^w| + i\cdot Arg(e^w) \\
\iff z + i2\pi n_1 &=& w + i2\pi n_2 \\
\iff z - w  &=&  i2\pi(n_2 - n_1) 
\end{eqnarray*}

Best Answer

You should Avoid using \eqnarray, and rather use equation environments supplied by amsmath. Here's one example that puts \iff flush with the left margin (using flalign*), while centering the rest of the equation:

enter image description here

\documentclass{article}
\usepackage{showframe}% http://ctan.org/pkg/showframe
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{flalign*}
  && e^z &= e^w & \\
  \iff && log(e^z) &= log(e^w) \\
  \iff && ln|e^z| + i\cdot Arg(e^z) &= ln|e^w| + i\cdot Arg(e^w) \phantom{\iff} \\
  \iff && z + i2\pi n_1 &= w + i2\pi n_2 \\
  \iff && z - w &= i2\pi(n_2 - n_1)
\end{flalign*}
\end{document}

The use of \phantom{\iff} is meant to centre the longest part of the equation. \phantom{<stuff>} sets a box the width of <stuff> without actually typesetting anything.

The addition of showframe is to highlight the text block boundary/margins, and is not needed in your final document.

For more information on AMS math environments (like flalign used above), consider reading Herbert's mathmode document.