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.

I have the following MWE

\documentclass[10pt, a4paper]{article}
\usepackage{amsfonts, amsmath, amssymb, amsfonts}
\begin{document}
\begin{align}
\sum_i{ c_i}           &= \cos \sin\cos \sin\cos \sin\cos \sin\cos \sin \\
\sum_i{ c_i}           &= \delta \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \\ 
                       &\hphantom{{}=} \delta^2\sin\cos \cos \sin\cos \sin\cos \cos 
\end{align}
\end{document}

How do I align the last equation with the two above it? I have previously had success with phantom, but doesn't work here.

share|improve this question
1  
not sure why you're loading amsfonts twice. actually, since amssymb loads amsfonts, all you need is \usepackage{amsmath, amssymb}. loading these particular packages multiple times shouldn't cause problems, but it's likely to cause confusion for unwary newbies who may want to copy your code. –  barbara beeton Feb 17 at 15:04

4 Answers 4

up vote 7 down vote accepted

Or use \hphantom{{}={}}:

\documentclass[10pt, a4paper]{article}
\usepackage{amsfonts, amsmath, amssymb, amsfonts}
\begin{document}
\begin{align}
\sum_i{ c_i}           &= \cos \sin\cos \sin\cos \sin\cos \sin\cos \sin \\
\sum_i{ c_i}           &= \delta \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \\ 
                       &\hphantom{{}={}} \delta^2\sin\cos \cos \sin\cos \sin\cos \cos 
\end{align}
\end{document}

enter image description here

A better option would be to indent successive lines of an expression that breaks across lines, so it becomes clear that it's the continuation of a previous expression; something like

\documentclass[10pt, a4paper]{article}
\usepackage{amsfonts, amsmath, amssymb, amsfonts}
\begin{document}
\begin{align}
\sum_i{ c_i}           &= \cos \sin\cos \sin\cos \sin\cos \sin\cos \sin \\
\sum_i{ c_i}           &= \delta \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \\ 
                       &\hphantom{{}={}}\quad\delta^2\sin\cos \cos \sin\cos \sin\cos \cos 
\end{align}
\end{document}

enter image description here

share|improve this answer

use \mathrel{...}

\documentclass[10pt, a4paper]{article}
\usepackage{amsfonts, amsmath, amssymb, amsfonts}
\begin{document}
\begin{align}
\sum_i{ c_i}           &= \cos \sin\cos \sin\cos \sin\cos \sin\cos \sin \\
\sum_i{ c_i}           &= \delta \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \sin\cos \cos \sin\cos \\ 
                       &\mathrel{\hphantom{=}}\delta^2\sin\cos \cos \sin\cos \sin\cos \cos 
\end{align}
\end{document}
share|improve this answer

I typically use

\begin{align}
  ... = {} & ... \\
      = {} & ... \\
           & ...
\end{align}

note the set of {} between the = and the & a lot faster to type than \phantom and friends

share|improve this answer

You don't need all the packages loaded; amsmath is enough:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align}
\sum_{i}c_{i}
&= \cos\sin\cos\sin\cos\sin\cos\sin\cos\sin\\
\sum_{i}c_{i}
&= \delta\cos\sin\cos\sin\cos\cos\sin\cos\sin\cos\cos\sin\cos\sin\cos\cos\sin\cos\\ 
&\hphantom{{}={}} \delta^{2}\sin\cos\cos\sin\cos\sin\cos\cos 
\end{align}

\end{document}

output

share|improve this answer

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.