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.

Now, first of all let me get something clear: I do not ask for any reasons why align is btter than eqnarray. All I ask is a simple way to make this work, using eqnarray (It's obviously possible, but I'm not sure how).

\begin{eqnarray}~\label{eqn07}
\begin{tabular}{llll}
$\Psi_{1}(x,\lambda)$ & = & & $ U(x,\lambda)e_{1} $ \cr
&   & & \cr
\end {tabular}
\end {eqnarray}

Yet after compiling it, I get the equation centered, instead of left-aligned. I've tried to insert \left{ ... \right} , but it wouldn't even build, and I just had many errors popping up. Could someone tell me a simple way to do so, wihout using \begin{align}. I do want to use \begin{eqnarray} (I've got my own reasons why).

share|improve this question

migrated from stackoverflow.com Apr 8 '13 at 14:58

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

    
What do you mean by "left-aligned"? The default behaviour of eqnarray is to provide a right-centre-left alignment of the three components of the equation. Collectively, the entire structure is centred. Do you want the entire structure to be left-aligned? –  Werner Apr 7 '13 at 21:06
    
Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. –  Werner Apr 8 '13 at 15:32

1 Answer 1

You should add the fleqn option to your document class. Regardless, the following is the correct way of using eqnarray:

enter image description here

\documentclass[fleqn]{article}
\begin{document}
\begin{eqnarray}
  \Psi_{1}(x,\lambda) & = & U(x,\lambda)e_{1}\label{eqn07}
\end{eqnarray}
\end{document}

You'll notice that the equation is left-aligned, although not flush with the left margin. To achieve this, add \setlength{\mathindent}{0pt} to the document preamble as well.

Note that you don't need eqnarray for a single equation. For this, the equation environment is sufficient. However, since the spacing of eqnarray is inferior to the regular math spacing, it might be better for consistency.

share|improve this answer
1  
And one doesn't need eqnarray at all. –  egreg Apr 8 '13 at 16:01

Your Answer

 
discard

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