Left-Justified eqnarray?

8,293 views
Skip to first unread message

XeTaL

unread,
Oct 14, 2008, 2:39:17 PM10/14/08
to LaTeX Users Group
Hi All,

I'm trying to split long equations by using eqnarray rather than
widetext. However, even when I write \lefteqn{ . . .} the equations,
although now left-justified, are not flush to the left but are aligned
in the center. Is there a way to have them moved further to the left?
Thanks in advance.

Werner Grundlingh

unread,
Oct 16, 2008, 12:11:27 PM10/16/08
to LaTeX Users Group
Would it be possible for you to do the following:
(1) Duplicate a mock-up of your requirement in MS Word, complete with
labels/eqn #'s and the works...possibly even using equation editor;
(2) Print the output to PDF; and
(3) post it in the files section of this forum, or attach it to an
email if your not using an internet browser as your group viewing
client.
Perhaps that'll instigate some response...

Werner

XeTaL

unread,
Oct 16, 2008, 1:03:53 PM10/16/08
to LaTeX Users Group
Hi Werner,

Thanks for the suggestion. I just uploaded a file named eqnarray
+lefteqn.pdf to the file section of this forum. Hope it now gives a
better idea of what I'm trying to achieve.

Werner Grundlingh

unread,
Oct 17, 2008, 2:37:52 AM10/17/08
to LaTeX Users Group
On Oct 16, 10:03 am, XeTaL <kooo...@gmail.com> wrote:
> Hi Werner,
>
> Thanks for the suggestion. I just uploaded a file named eqnarray
> +lefteqn.pdf to the file section of this forum. Hope it now gives a
> better idea of what I'm trying to achieve.

Wow, this makes it much clearer than before. Here are my suggestions:

(1) Consider reading the UK TeX FAQ entry
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=eqnarray
with regards to the use of the eqnarray environment as well as the
AMSLaTeX align environment.

(2) Using the above suggestion, here's the code (a minimal example)
that will generate your left-aligned equation using the align
environment:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
\tau & = \beta\left(t-\frac{v^2}{c^2}t\right)=\beta t\left(1-
\frac{v^2}{c^2}\right) \\
& = t\frac{\sqrt{1-\frac{v^2}{c^2}}\sqrt{1-\frac{v^2}{c^2}}}
{\sqrt{1-\frac{v^2}{c^2}}} \\
& = t\sqrt{1-\frac{v^2}{c^2}}
\end{align*}

\end{document}

Hope this helps,
Werner

XeTaL

unread,
Oct 17, 2008, 10:43:56 AM10/17/08
to LaTeX Users Group
Thanks a lot Werner. This may be acceptable, I guess, but I need the
whole block moved to the far left. I'd appreciate it if you could take
a look at the file section of the forum where I posted another file
named eqnarray+lefteqn2.pdf showing the position I need for the block.
Hope that can be done. If not, I should probably live with what you
showed me.

Werner Grundlingh

unread,
Oct 18, 2008, 9:59:58 PM10/18/08
to LaTeX Users Group
On Oct 17, 7:43 am, XeTaL <kooo...@gmail.com> wrote:
> Thanks a lot Werner. This may be acceptable, I guess, but I need the
> whole block moved to the far left. I'd appreciate it if you could take
> a look at the file section of the forum where I posted another file
> named eqnarray+lefteqn2.pdf showing the position I need for the block.
> Hope that can be done. If not, I should probably live with what you
> showed me.

Of course it's possible:

\documentclass{article}

\usepackage{lipsum,amsmath}

\setlength{\parindent}{0mm}

\begin{document}

\lipsum[1-2]

$ \begin{array}{@{\hspace{0mm}}r@{\;}l@{\hspace{0mm}}}
\tau & = \displaystyle \beta\left(t-\frac{v^2}{c^2}t\right)=
\beta t\left(1-\frac{v^2}{c^2}\right) \\[5\jot]
& = \displaystyle t\frac{\sqrt{1-\frac{v^2}{c^2}}\sqrt{1-
\frac{v^2}{c^2}}}{\sqrt{1-\frac{v^2}{c^2}}} \\[7\jot]
& = \displaystyle t\sqrt{1-\frac{v^2}{c^2}}
\end{array}
$ \hfill \phantom{.}

\lipsum[3-4]

\end{document}

I've added the lipsum package just to show perspective in terms of the
page dimensions, and also removed the regular paragraph indentation.
Would this work for you?

Werner

XeTaL

unread,
Oct 18, 2008, 11:05:06 PM10/18/08
to LaTeX Users Group
Hi Werner, this is exactly what I needed. Thank you so much. It is a
bit complicated but once you get the structure it works very well. I
had to add \vspace{10mm} before and after the equation to separate it
from the text. Also, the \jot seems to need adjustment for each
individual equation but this is minor. Like I said it works very well.
Thanks again and all the best.

evan

unread,
Oct 21, 2008, 3:20:49 PM10/21/08
to LaTeX Users Group
You could also use flalign instead of align. For example

\begin{flalign*}
&y = x\\
&u = v
\end{flalign*}
Reply all
Reply to author
Forward
0 new messages