答案1
作为起点:
\documentclass{standalone}
\usepackage{mathtools,array,booktabs}
\mathtoolsset{showonlyrefs}
\newcolumntype{D}{>{$}r<{$}} % Description
\newcolumntype{E}{D<{={}}@{}D} % Equation
\begin{document}
\begin{tabular}{DEDE}
4 \cdot [\text{equation 3}] & 4x_3 & -4 & -1 \cdot [\text{equation 3}] & -x_3 & 1 \\
{}+ [\text{equation 2}] & x_2 - 4x_3 & 4 & {}+ [\text{equation 1}] & x_1 - 2x_2 + x_3 & 0 \\
\cmidrule(lr){1-1} \cmidrule(lr){2-3} \cmidrule(lr){4-4} \cmidrule(lr){5-6}
[\text{new equation 2}] & x_2 \hphantom{{}-4x_3} & 0 & [\text{new equation 1}] & x_1 - 2x_2 \hphantom{{}+x_3} & 0
\end{tabular}
\end{document}
这导致:
答案2
您可以使用表格环境:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\usepackage{array}
\usepackage[margin={1cm,1cm}]{geometry}
\begin{document}
\begin{tabular}{@{}r@{}}
4.[equation3] \\
+ [equation2] \\
\hline
[new equation2]\\
\end{tabular}
\hfill
\begin{tabular}{@{}rcr@{=}r@{}}
& & $4x_3$ & $-4$ \\
$x_2$ & $-$ & $4x_3$ & $4$ \\
\hline
$x_2$ & & & 0 \\
\end{tabular}
\hfill
\begin{tabular}{@{}r@{}}
-1.[equation3] \\
+ [equation1] \\
\hline
[new equation1]\\
\end{tabular}
\hfill
\begin{tabular}{@{}rrrrr@{=}r@{}}
& & & & $-x_3$ & $1$ \\
$x_1$ & - & $2x_2$ & + & $x_3$ & $0$ \\
\hline
$x_1$ & - & $2x_2$ & & & $1$ \\
\end{tabular}
\end{document}