如何使下面的等式与上面的等式对齐

如何使下面的等式与上面的等式对齐
\underline{ \left\{\begin{aligned}
2x + 3y +4z & = 7\\
x-7y +z & = 8  \\
z-5y + 4x & = 9 
\end{aligned} \right. }
 \atop
 x + y + z = 10

在此处输入图片描述

答案1

我将使用 1 个外部环境和 2 个内部array环境,以及包\midrule的宏booktabs

在此处输入图片描述

\documentclass{article}
\usepackage{array}    % for '\newcolumntype' macro
\usepackage{booktabs} % for '\midrule' macro
\newcolumntype{C}{>{{}}c<{{}}} 
\newcommand\xx{\hphantom{0}} % handy shortcut macro

\begin{document}
\[
\setlength{\arraycolsep}{0pt}
\begin{array}{r} % begin of 'outer' array
\left\{
\begin{array}{rCrCrCr} % 1st 'inner' array
2x &+& 3y &+& 4z &=& 7 \\
 x &-& 7y &+&  z &=& 8 \\
4x &-& 5y &+&  z &=& 9 \\
\end{array} 
\right.\kern-\nulldelimiterspace \\ 
   % '\kern-\nulldelimiterspace' gobbles up the space that's inserted by '\right.'
\midrule
\begin{array}{rCrCrCr} % 2nd 'inner' array
 \xx x &+& \xx y &+& \xx z &=& 3 
\end{array}
\end{array} % end of outer array
\]
\end{document}

相关内容