答案1
一个选项是使用blkarray
:
\documentclass{article}
\usepackage{blkarray}
\usepackage{amsmath}
\begin{document}
\[
ETC_{ij}=
\begin{blockarray}{ccccc}
& V_{1} & V_{2} & \cdots & V_{m} \\
\begin{block}{c\{cccc}
T_{1} & ETC_{11} & ETC_{12} & \cdots & ETC_{1m} \\
T_{2} & ETC_{21} & ETC_{22} & \cdots & ETC_{2m} \\
\vdots & \vdots & \vdots & \vdots & \vdots \\
T_{n} & ETC_{n1} & ETC_{n2} & \cdots & ETC_{nm} \\
\end{block}
\end{blockarray}
\]
\end{document}
作为伯纳德提及his comment
@{}
,抑制块开头的一些水平间距,并增加的值\arraystretch
可改善结果:
\documentclass{article}
\usepackage{blkarray}
\usepackage{amsmath}
\begin{document}
\[
\renewcommand\arraystretch{1.3}
ETC_{ij}=
\begin{blockarray}{ccccc}
& V_{1} & V_{2} & \cdots & V_{m} \\
\begin{block}{@{}c\{cccc}
T_{1} & ETC_{11} & ETC_{12} & \cdots & ETC_{1m} \\
T_{2} & ETC_{21} & ETC_{22} & \cdots & ETC_{2m} \\
\vdots & \vdots & \vdots & \vdots & \vdots \\
T_{n} & ETC_{n1} & ETC_{n2} & \cdots & ETC_{nm} \\
\end{block}
\end{blockarray}
\]
\end{document}
答案2
引自《TEXbook》:
有时矩阵的顶部和左侧用公式来标出行和列。Plain TEX
\bordermatrix
为这种情况提供了一个特殊的宏。
的定义\bordermatrix
可以在 The TEXbook 第 361 页或 中找到latex.ltx
。稍作调整即可:
\documentclass{article}
\usepackage{mathtools}
\makeatletter
\def\cbordermatrix#1{\begingroup \m@th
\@tempdima 8.75\p@
\setbox\z@\vbox{%
\def\cr{\crcr\noalign{\kern2\p@\global\let\cr\endline}}%
\ialign{\hfil$##$\hfil\kern2\p@\kern\@tempdima&\thinspace\hfil$##$\hfil
&&\quad\hfil$##$\hfil\crcr
\omit\strut\hfil\crcr\noalign{\kern-\baselineskip}%
#1\crcr\omit\strut\cr}}%
\setbox\tw@\vbox{\unvcopy\z@\global\setbox\@ne\lastbox}%
\setbox\tw@\hbox{\unhbox\@ne\unskip\global\setbox\@ne\lastbox}%
\setbox\tw@\hbox{$\kern\wd\@ne\kern-\@tempdima\left\{\kern-\wd\@ne
\global\setbox\@ne\vbox{\box\@ne\kern2\p@}%
\vcenter{\kern-\ht\@ne\unvbox\z@\kern-\baselineskip}\,\right.$}%
\null\;\vbox{\kern\ht\@ne\box\tw@}\endgroup}
\makeatother
\begin{document}
\[ETC_{ij}=\cbordermatrix{
& V_{1} & V_{2} & \cdots & V_{m} \cr
T_{1} & ETC_{11} & ETC_{12} & \cdots & ETC_{1m} \cr
T_{2} & ETC_{21} & ETC_{22} & \cdots & ETC_{2m} \cr
\vdots & \vdots & \vdots & \vdots & \vdots \cr
T_{n} & ETC_{n1} & ETC_{n2} & \cdots & ETC_{nm} \cr}\]
\end{document}
答案3
与。{NiceArray}
nicematrix
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\[
\renewcommand\arraystretch{1.5}
ETC_{ij}=
\begin{NiceArray}{c\left\lbrace cccc}[first-row,baseline=line-3]
& V_{1} & V_{2} & \cdots & V_{m} \\
T_{11} & ETC_{11,1} & ETC_{11,2} & \cdots & ETC_{11,m} \\
T_{12} & ETC_{12,1} & ETC_{12,2} & \cdots & ETC_{12,m} \\
\vdots & \vdots & \vdots & \vdots & \vdots \\
T_{1p1} & ETC_{1p1,1} & ETC_{1p1,2} & \cdots & ETC_{1p1,m} \\
\end{NiceArray}
\]
\end{document}