Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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*}
share|improve this question
    
Possible duplicate question here? –  DJP Feb 21 '12 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 Feb 21 '12 at 5:27

1 Answer 1

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.

share|improve this answer
    
Thank you so much Werner! I want to learn more about LaTeX in the future –  Calculus2 Student Feb 21 '12 at 5:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.