答案1
基于的解决方案array
:
\documentclass{article}
\usepackage{amsmath,array}
\begin{document}
\begin{equation*}
\setlength{\arraycolsep}{0pt}% so we don't need too many @{}
\newcommand{\LD}{\ldots}%
\newcommand{\DF}[1]{\multicolumn{#1}{c}{\dotfill}}%
\newcommand{\DD}{\multicolumn{2}{r}{\ddots}}%
\newcommand{\VD}{\multicolumn{1}{c}{\vdots}}%
\begin{array}{*{5}{r>{{}}c<{{}}}l}
a_{1,1}x_1 &+& a_{1,2}x_2 &+& \DF{3} &+& a_{1,n}x_n &=& b_1 \\[1ex]
& & a_{2,2}x_2 &+& \DF{3} &+& a_{2,n}x_n &=& b_2 \\
& & \DD & & & && \VD & & \VD \\
& & & & a_{i,i}x_i &+& \LD &+& a_{i,n}x_n &=& b_i \\
& & & & \DD & && \VD & & \VD \\
& & & & && & & a_{n,n}x_n &=& b_n
\end{array}
\end{equation*}
\end{document}
答案2
这是一个array
基于 的解决方案:
\documentclass{article}
\usepackage{newtxtext,newtxmath} % Times Roman clone - optional
\usepackage{array} % for '\newcolumntype' macro
\newcolumntype{C}{>{{}}c<{{}}} % col. type for bin. and rel. operators
\newcommand\myddots{\multicolumn{1}{r}{\ddots}} % handy shortcut macro
\begin{document}
\[
\setlength\arraycolsep{0pt}
\begin{array}{*{5}{cC}c}
a_{1,1}x_1 &+& a_{1,2}x_2 &+& \multicolumn{3}{c}{\dotfill} &+& a_{1,n}x_n &=& b_1 \\
&& a_{2,2}x_2 &+& \multicolumn{3}{c}{\dotfill} &+& a_{2,n}x_n &=& b_2 \\
&& \myddots && && \phantom{a_{i,n}x_n} && \vdots && \vdots\\
&&&& a_{i,i}x_i &+& \dotfill &+& a_{i,n}x_n &=& b_i \\
&&&& \myddots &&&& \vdots && \vdots\\
&&&&&&&& a_{n,n}x_n &=& b_n
\end{array}
\]
\end{document}
答案3
好的,我找到了解决方案
\[
\begin{array}{@{}*{7}{c@{}}}
& a_{1,1}x_{1} + a_{1,2}x_{2} +\;.....+ a_{1},{n}X_{n} = b_{1}\\
& a_{2,2}x_{2} +\;.....+a_{2},{n}X_{n} = b_{2}\\
\end{array}
\]
答案4
基于 的解决方案alignedat
,借助于eqparbox
:
\documentclass{article}
\usepackage{mathtools}
\usepackage{eqparbox}
\begin{document}
\begin{equation*}
\begin{alignedat}{2}
a_{1,1}x_{1} + a_{1,2}x_{2} & +{}&\cdots\cdots \cdots \cdots + a_{1,n}X_{n} & = b_{1}\\
a_{2,2}x_{2} & +{} &\cdots\cdots \cdots\cdots +a_{2,n}X_{n} & = b_{2}\\[-1.5ex]
&\ddots && \vdotswithin{=}\\[-1ex]
& & a_{i, i}x_{i}\eqparbox{M}{${} + \dots + a_{i, n}X_{n} $} & = b_{i} \\[-1.5ex]
& &\eqparbox{M}{\raisebox{1ex}{$\ddots $}} & \vdotswithin{=}\\[-2ex]
& & a_{n, n}X_{n} & =b_{n}
\end{alignedat}
\end{equation*}
\end{document}