I want to align contents of my equations inside an already aligned environment like align
:
Below is what I get using the \phantom
command as a trick to get the previous spacing together with a minimal working example:
\documentclass[varwidth,margin=0.5cm]{standalone}
\usepackage{amsmath}
\begin{document}
\begin{align*}
N &= (-9) - (+5) &
O &= (+7) - (-8) &
P &= (+5) + (-6) &
Q &= (-3) + (+2) \\
%
&=\phantom{(} -9 \phantom{)-(} -5 &
&=\phantom{(+} 7 \phantom{)-(} +8 &
&=\phantom{(+} 5 \phantom{)+(} -6 &
&=\phantom{(} -3 \phantom{)+(} +2
\end{align*}
\end{document}
It seems like I'm encountering a similar problem as in question 28075 (Phantom width of binary operator). Reading this answer to question 38984, I have the feeling I'm losing the character's class and hence loosing the "natural" spacing.
Is there a proper way to add phantom space in math mode?
\mathopen
might help (untested)\mathcolor
command defined in this answer to question 85035 to display white text...