Align all symbols in a system of equations

The systeme package allows you to do this. The command \sysdelim.. is used here to remove the braces that are placed by default.

screenshot

\documentclass{article}
\usepackage{systeme}
\begin{document}
\sysdelim..\systeme{4x+7=7x+2,7=3x+2,5=3x,\frac{5}{3}=x
}
\end{document}

You wrote,

I've managed to get this using the tabular environment, but it's obviously not the right way to do this.

You were actually quite close! The main change I'd recommend you make is switching from a tabular environment to an array environment. The following screenshot shows the effect of this change. The third "take" involves applying further tweaks -- at which point the output will be indistinguishable from what's produced by systeme.

enter image description here

\documentclass{article}
\usepackage{array,systeme}
\newcolumntype{C}{>{{}}c<{{}}} % for "Take 3" (see below)
\begin{document}

Take 1: OP's original form
\[
\begin{tabular}{rcrclcl}
4x & + & 7 & = & 7x & + & 2 \\
   &   & 7 & = & 3x & + & 2 \\
   &   & 5 & = & 3x \\
&&$\frac{5}{3}$ & = & x 
\end{tabular}
\]

\medskip
Take 2: \texttt{array} env.\ instead of \texttt{tabular} env.
\[
\begin{array}{rcrclcl}
4x & + & 7 & = & 7x & + & 2 \\
   &   & 7 & = & 3x & + & 2 \\
   &   & 5 & = & 3x \\
&&\frac{5}{3} & = & x 
\end{array}
\]

\medskip
Take 3: \texttt{array} env., \texttt{C} col.\ type, \texttt{\string\arraycolsep=0pt}
\[
\arraycolsep=0pt
\renewcommand\arraystretch{1.245}
\begin{array}{rCrClCl}
4x & + & 7 & = & 7x & + & 2 \\
   &   & 7 & = & 3x & + & 2 \\
   &   & 5 & = & 3x \\
&&\frac{5}{3} & = & x 
\end{array}
\]

\medskip
Take 4: \texttt{systeme} solution
\[
\sysdelim..
\systeme{4x+7=7x+2,7=3x+2,5=3x,\frac{5}{3}=x}
\]
\end{document}

Tags:

Equations