答案1
我建议您采用一个array
环境。
\documentclass{article}
\usepackage{array,xcolor}
\newcolumntype{C}{>{{}}c<{{}}} % for binary and relational operators
\begin{document}
\[ % enter an unnumbered displaymath group
\setlength\arraycolsep{0pt}
\begin{array}{ lClClCl }
3y & + & \multicolumn{3}{l}{4\cdot(y+2)} & = & 15 \\
3y & + & 4y & + & 8 & = & 15 \\
\multicolumn{3}{c}{7y} & + & 8 & = & 15 \quad \textcolor{red}{\mid -8 } \\
\multicolumn{3}{c}{7y} &&& = & 7 \\
\multicolumn{5}{r}{y} & = & 1
\end{array}
\]
\end{document}