Phantom and Align Environment

If you "hide" the tab alignment & from align, it will fail to work as expected. This is only because & is read as part of the argument to \phantom, which knowns nothing about & and its use. As such, you either have to spread the \phantom across the aligned components, or use an altogether different approach:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align*}
  a & = b + c \\
  \phantom{a} & \phantom{{} = b} + c \\ % Hides some components of above line
   & = d + e \\
   & \phantom{{}= d} + e % Hides some components of above line
\end{align*}
\end{document}

In the above example, some components were left untouched to indicate how some spacing correction is sometimes required when using \phantom (for example, when hiding the relation =).

The reason why \phantom around an entire cases structure works is because the tab alignment character is buried within the environment where it makes sense.


It's probably easier to use textcolor with white:

\textcolor{white}{sometext}

You need the color package.

Tags:

Align