1

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*}
2
  • Possible duplicate question here?
    – DJP
    Commented Feb 21, 2012 at 5:00
  • @DJP: I don't think this is a duplicate, since the it seems the OP is after dual alignment: \iff flush left, with the rest of the equation aligned "as usual".
    – Werner
    Commented Feb 21, 2012 at 5:27

1 Answer 1

5

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.

1
  • Thank you so much Werner! I want to learn more about LaTeX in the future Commented Feb 21, 2012 at 5:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .