TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here

Is it possible to align the second row as to where it is, and align the third row with = sign? I'm new to LaTeX, so I only know basic stuff. This is my code:

\\&&-\frac 12 abcd\cos(\alpha+\gamma)
share|improve this question
Welcome to TeX.sx! Please provide your problem as a complete Minimal Working Example (MWE instead of just a code snippet. – Peter Jansson Jan 31 '13 at 14:31
up vote 4 down vote accepted

Here are two ways to accomplish the task:


First way, ``automatic'':
P^2 &=& \frac{1}{16}\cdot\biggl(&-a^4-b^4-c^4-d^4\nonumber\\
    &&& {}+2a^2b^2+2a^2c^2+2a^2d^2+2b^2c^2+2b^2d^2+2c^2d^2\biggr)\nonumber\\
    &&  \rlap{$\displaystyle-\frac 12 abcd\cos(\alpha+\gamma)$}

Second way, ``with hints'':
P^2 &=& \frac{1}{16}\cdot\biggl(-a^4-b^4-c^4-d^4\nonumber\\
    && -\frac 12 abcd\cos(\alpha+\gamma)


With \rlap in the first way, the entry doesn't take any space. In the second way, we use a phantom to push the second line to the right.

The result is the same in both cases:

enter image description here

share|improve this answer

Your Answer


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.