以下代码中的环境中显示了一个线性方程组array
。我有一个省略号需要垂直排版。如何让它们与等号在同一列中居中?
\documentclass{amsart}
\usepackage{mathtools,array}
\begin{document}
\begin{equation*}
\begin{array}{@{}r@{{}}l}
a_{1,1}x_{1} + a_{1,2}x_{2} + \ldots + a_{1,n}x_{n} & {}={} b_{1} \\
a_{2,1}x_{1} + a_{2,2}x_{2} + \ldots + a_{2,n}x_{n} & {}={} b_{2} \\
\vdots \\
a_{m,1}x_{1} + a_{m,2}x_{2} + \ldots + a_{m,n}x_{n} & {}={} b_{m}
\end{array}
\end{equation*}
\end{document}
答案1
像这样?
(我不确定我是否理解正确)
\documentclass{amsart}
\usepackage{array,mathtools}
\begin{document}
\[\setlength\arraycolsep{1pt}
\begin{array}{rcl}
a_{1,1}x_{1} + a_{1,2}x_{2} + \ldots + a_{1,n}x_{n} & = & b_{1} \\
a_{2,1}x_{1} + a_{2,2}x_{2} + \ldots + a_{2,n}x_{n} & = & b_{2} \\
& \vdots & \\
a_{m,1}x_{1} + a_{m,2}x_{2} + \ldots + a_{m,n}x_{n} & = & b_{m}
\end{array}
\]
\end{document}
答案2
可以使用包align*
的环境(包和类amsmath
所需的)。提供和命令精确地居中mathtools
amsart
mathtools
\vdotswithin{<symbol>}
\shortvdotswithin{<symbol>}
\vdots
符号(\MTFlushSpaceAbove
和\MTFlushSpaceBelow
命令管理周围的空间)如数学工具文档(第 22 页版本 2015-11-12)。
\documentclass{amsart}
\usepackage{mathtools}
\begin{document}
Using \textsf{align*} environment
\begin{align*}
a_{1,1}x_{1} + a_{1,2}x_{2} + \ldots + a_{1,n}x_{n} &= b_{1} \\
a_{2,1}x_{1} + a_{2,2}x_{2} + \ldots + a_{2,n}x_{n} &= b_{2} \\
\shortvdotswithin{=}
a_{m,1}x_{1} + a_{m,2}x_{2} + \ldots + a_{m,n}x_{n} &= b_{m}
\end{align*}
or \textsf{alignat*} with 3 alignment blocks to align also by the $+$ sign.
\begin{alignat*}{3}
a_{1,1}x_{1} &+ {} & a_{1,2}x_{2} &+ \ldots + {} & a_{1,n}x_{n} &= b_{1} \\
a_{2,1}x_{1} &+ {} & a_{2,2}x_{2} &+ \ldots + {} & a_{2,n}x_{n} &= b_{2} \\
\MTFlushSpaceAbove
&\vdotswithin{+} & & & &\vdotswithin{=}
\MTFlushSpaceBelow
a_{m,1}x_{1} &+ {} & a_{m,2}x_{2} &+ \ldots + {} & a_{m,n}x_{n} &= b_{m}
\end{alignat*}
\end{document}