Although I searched the Web and indeed found an answer here, I still seem unable to address my issue of aligning two rows in my step-by-step process for solving a very basic equation. Just in case it matters, I am using MathJax, which is a JavaScript library that renders LaTeX in various forms of output (in my case, as MathML and HTML/CSS).
My code:
\begin{eqnarray}
\hphantom{-} 9 + x &=& 12 \\
-9 \hphantom{+ x} &=& -9 \\
\hline \\
\implies x &=& 3
\end{eqnarray}
My goal is to get the "9" to align in the first two rows, however, the \hphantom macro in the first row isn't adjusting the 9 + x = 12 at all. I came up with the code using the help of people who answered a similar alignment question elsewhere here.
I noted that when I reversed the first two rows in my code, \hphantom did indeed align the 9 correctly.
I would appreciate anyone helping me determine if there is an issue with my LaTeX. If not, I can investigate the HTML/CSS layout issues.
\hphantom{{} + x}. And do not useeqnarray: eqnarray vs align – Qrrbrbirlbel Mar 03 '13 at 06:29