梅威瑟:
\documentclass{book}
\usepackage{amsmath,amssymb,amsfonts}
\begin{document}
\begin{tabular}{llll}
\textbf{3} & Write this information in a matrix. Remember to use square brackets. & \textbf{3} & $\left\{\begin{array}[t]{r@{\hskip0.25em}c@{\hskip0.25em}l}
140 & 58 & 85\cr
200 & 125 & 150\end{array}\right\}$
\end{tabular}
\end{document}
答案1
该delarray
软件包提供了解决方案:
\documentclass{book}
\usepackage{amsmath,amssymb,amsfonts,delarray}
\begin{document}
\noindent
\begin{tabular}{lp{.6\textwidth}l}
\textbf{3} &
Write this information in a matrix. Remember to use square brackets. &
\setlength{\arraycolsep}{0.25em}%
$\begin{array}[t]\lbrack{@{}rcl@{}}\rbrack
140 & 58 & 85\\\
200 & 125 & 150
\end{array}$
\\[6ex]
\textbf{4} &
Write this information in a matrix. Remember to use braces. &
\setlength{\arraycolsep}{0.25em}%
$\begin{array}[t]\lbrace{@{}rcl@{}}\rbrace
140 & 58 & 85\\\
200 & 125 & 150
\end{array}$
\end{tabular}
\end{document}
答案2
两种可能,取决于您想要的垂直对齐方式。请确保使用最新版本的tabstackengine 2018/03/05 (V2.10)
。
经过修改的答案与rcl
对齐
\documentclass{book}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{tabstackengine}
\begin{document}
\begin{tabular}{llll} \textbf{3} & Write this information in a matrix.
Remember to use square brackets. & \textbf{3} &
$\left[\tabularCenterstack{rcl}{ 140 & 58 & 85\\ 200 & 125 & 150}\right]$ \end{tabular}
\bigskip
\begin{tabular}{llll} \textbf{3} & Write this information in a matrix.
Remember to use square brackets. & \textbf{3} & \belowbaseline[-\ht\strutbox]{%
$\left[\tabularCenterstack{rcl}{ 140 & 58 & 85\\ 200 & 125 & 150}\right]$} \end{tabular}
\end{document}
列间间隙可以用 重置\setstacktabulargap{<length>}
,默认为\tabcolsep
。
原始答案左对齐
\documentclass{book}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{tabstackengine}
\setstacktabbedgap{1ex}
\renewcommand\stackalignment{l}
\begin{document}
\begin{tabular}{llll} \textbf{3} & Write this information in a matrix.
Remember to use square brackets. & \textbf{3} &
$\bracketMatrixstack{ 140 & 58 & 85\\ 200 & 125 & 150}$ \end{tabular}
\bigskip
\begin{tabular}{llll} \textbf{3} & Write this information in a matrix.
Remember to use square brackets. & \textbf{3} & \belowbaseline[-\ht\strutbox]{%
$\bracketMatrixstack{ 140 & 58 & 85\\ 200 & 125 & 150}$} \end{tabular}
\end{document}
如果您想要矩阵左/右端的额外空间,只需在两端添加一个额外的空白列:$\bracketMatrixstack{&140 & 58 & 85&\\&200 & 125 & 150&}$
同样,如果使用堆栈上的可选参数\renewcommand\stackalignment{l}
,则可以消除声明[l]
\bracketMatrixstack[l]{ 140 & 58 & 85\\ 200 & 125 & 150}
答案3
您必须创建\vtop
第一行支撑的位置,然后是负跳过\baselineskip
,然后\hbox
在数学模式下打印矩阵的位置。
{\bf 3}\quad\vtop{\hbox{\strut}\vskip-\baselineskip\nointerlineskip\hbox{%
$\left\{\matrix{140 & 58 & 85\cr 200 & 125 & 150}\right\}$}}
\bye