0

If I write

\begin{align} 
A = <long string of variables> \\
=& <another long string of variables>
\end{align}

This works and aligns the equal signs and makes the total block of two-lines centered.

Now I want to remove the "A =" part, and simply assert that <long string of variables> is equal to <another long string of variables>. However, every version of this I write makes the left alignment of the second line to the left of the first, since <another long string of variables> is even longer.

How can I force the second line to shift over to the right so that the equal sign lies underneath the first line, somewhat? I've tried \hspace and a million alignment tricks but none of them have worked. I'd also be fine if I could just left-align the first line and right-align the second line!

1
  • 1
    Your code doesn't align the = sign on whatever.
    – Bernard
    Commented May 11, 2016 at 17:07

1 Answer 1

1

Write this:

 \begin{align*}
 & \phantom{{}={}}\text{long string of variables}\\
& = \text{another long string of variables}
  \end{align*}

or this (as suggested by @daleif):

\begin{align*}
&\text{long string of variables}\\
 ={} & \text{another long string of variables}
  \end{align*}

enter image description here

2
  • Less to write if you use & in the first row and ={} & on the second.
    – daleif
    Commented May 11, 2016 at 17:55
  • 1
    @daleif: You're right, if there are no other lines with alignment. I've updated my answer. Thanks!
    – Bernard
    Commented May 11, 2016 at 18:03

You must log in to answer this question.

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