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 code:

 \begin{align*}
(a-bu)e^{-\frac{1}{4}(v^2+u^2)(1+c)+\frac{1}{2}(1-c)u|v|} 
&=(a-bx-by)e^{-\frac{1}{4}((x-y)^2+(x+y)^2)(1+c)+\frac{1}{2}(1-c)(x+y)(y-x)}\\
&=(a-bx-by)e^{-(x^2+cy^2)} \\
&=f(x,y).
\end{align*}

I have a long equation. My question is as follows: I want to isolate the expression

 (a-bu)e^{-\frac{1}{4}(v^2+u^2)(1+c)+\frac{1}{2}(1-c)u|v|}

on the first line so that I don't have an equation on the first line and I want this expression left justified with the other lines (that have the equal sign). How can I do this?

share|improve this question
    
You should consider accepting one of the answers. –  Svend Tveskæg Jan 18 at 17:55
add comment

5 Answers 5

You can also use \MoveEqLeft from the mathtools package:

\documentclass{article}

\usepackage{mathtools}

\begin{document}

\begin{align*}
  \MoveEqLeft (a-bu)e^{-\frac{1}{4}(v^2+u^2)(1+c)+\frac{1}{2}(1-c)u|v|}\\
  &= (a-bx-by)e^{-\frac{1}{4}((x-y)^2+(x+y)^2)(1+c)+\frac{1}{2}(1-c)(x+y)(y-x)}\\
  &= (a-bx-by)e^{-(x^2+cy^2)}\\
  &= f(x,y).
\end{align*}

\end{document}

output

giving the same output at egreg's solution.

share|improve this answer
    
+1 very nice and clean! –  Please don't touch Jan 18 at 1:26
add comment
\documentclass{article}

\usepackage{amsmath}

\begin{document}

You have:

 \begin{align*}
(a-bu)e^{-\frac{1}{4}(v^2+u^2)(1+c)+\frac{1}{2}(1-c)u|v|} 
&=(a-bx-by)e^{-\frac{1}{4}((x-y)^2+(x+y)^2)(1+c)+\frac{1}{2}(1-c)(x+y)(y-x)}\\
&=(a-bx-by)e^{-(x^2+cy^2)} \\
&=f(x,y).
\end{align*}

You want to:

 \begin{align*}
&(a-bu)e^{-\frac{1}{4}(v^2+u^2)(1+c)+\frac{1}{2}(1-c)u|v|} \\
&=(a-bx-by)e^{-\frac{1}{4}((x-y)^2+(x+y)^2)(1+c)+\frac{1}{2}(1-c)(x+y)(y-x)}\\
&=(a-bx-by)e^{-(x^2+cy^2)} \\
&=f(x,y).
\end{align*}

But probably better is:


\begin{align*}
&(a-bu)e^{-\frac{1}{4}(v^2+u^2)(1+c)+\frac{1}{2}(1-c)u|v|} \\
&\qquad=(a-bx-by)e^{-\frac{1}{4}((x-y)^2+(x+y)^2)(1+c)+\frac{1}{2}(1-c)(x+y)(y-x)}\\
&\qquad=(a-bx-by)e^{-(x^2+cy^2)} \\
&\qquad=f(x,y).
\end{align*}

\end{document}

enter image description here

share|improve this answer
1  
@Manuel See my answer. :) –  Svend Tveskæg Jan 18 at 1:32
    
@Manuel No problem. :) It's also quite late in Denmark, so I'll go to sleep now. –  Svend Tveskæg Jan 18 at 1:47
    
I think it would be easier than putting &\qquad= in all following lines, as in the "better" solution above, to put a single \qquad in the LHS in the first line and back up over it: \begin{align*}\qquad&\kern-2em(a-bu)... and then just the usual &= in the following lines. –  Marc van Leeuwen Jan 18 at 9:25
add comment

The easiest way is to enclose the first line in \lefteqn that gives it zero width and then add a spacing. Beware that if the formula in the first line is too long, it will spill in the margin without any warning.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

Here's an example
\begin{align*}
\lefteqn{(a-bu)e^{-\frac{1}{4}(v^2+u^2)(1+c)+\frac{1}{2}(1-c)u|v|}}
  \qquad\\
&=(a-bx-by)e^{-\frac{1}{4}((x-y)^2+(x+y)^2)(1+c)+\frac{1}{2}(1-c)(x+y)(y-x)}\\
&=(a-bx-by)e^{-(x^2+cy^2)} \\
&=f(x,y).
\end{align*}

\end{document}

Change \qquad to any other spacing you'd like; I suggest not remove this spacing, because it will give more clues to the readers for understanding what's going on. In a chain of equalities, the initial expression should always start at the left of the derived expressions.

enter image description here

share|improve this answer
add comment

What about this? Do you like it? Note the use of \phantom, suggested by @Harish.

\begin{multline*}
(a-bu)e^{-\frac{1}{4}(v^2+u^2)(1+c)+\frac{1}{2}(1-c)u|v|} =\\
(a-bx-by)e^{-\frac{1}{4}((x-y)^2+(x+y)^2)(1+c)+\frac{1}{2}(1-c)(x+y)(y-x)}=\\
(a-bx-by)e^{-(x^2+cy^2)} = f(x,y).
\end{multline*} 

\begin{align*}  %% note the use of \phantom, suggested by Harish
&\phantom{{}={}} (a-bu)e^{-\frac{1}{4}(v^2+u^2)(1+c)+\frac{1}{2}(1-c)u|v|} \\
&=(a-bx-by)e^{-\frac{1}{4}((x-y)^2+(x+y)^2)(1+c)+\frac{1}{2}(1-c)(x+y)(y-x)}\\
&=(a-bx-by)e^{-(x^2+cy^2)} \\
&=f(x,y).
\end{align*}

enter image description here

share|improve this answer
    
@SvendTveskæg, I agree. But we try to satisfy his/her wishes. lol –  Sigur Jan 18 at 0:37
add comment

A beautiful and useful approach!

\documentclass[preview,border=12pt,12pt]{standalone}% change this line back to \documentclass{article}
\usepackage{mathtools}

\begin{document}
It is the Code Mocker's equation
\begin{multline*}
    \hspace{3cm} (a-bu)e^{-\frac{1}{4}(v^2+u^2)(1+c)+\frac{1}{2}(1-c)u|v|}\\
    \!
    \begin{aligned}
            &=(a-bx-by)e^{-\frac{1}{4}((x-y)^2+(x+y)^2)(1+c)+\frac{1}{2}(1-c)(x+y)(y-x)}\\
            &=(a-bx-by)e^{-(x^2+cy^2)} \\
            &=f(x,y)
    \end{aligned}
\end{multline*}
where $f(x,y)$ is nothing.
\end{document}

enter image description here

share|improve this answer
add comment

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.