答案1
blkarray
以下是使用和bigdelim
少量 来实现的方法mathtools
:
\documentclass{article}
\usepackage{mathtools}
\usepackage{blkarray, bigstrut, bigdelim}
\begin{document}
\begin{equation}
\setlength{\bigstrutjot}{1ex}
\begin{blockarray}{rccc|ccc}
\begin{block}{rcccccc}
& \overbrace{}^{r}& \overbrace{}^{\mathclap{n-k-r-s}} & \overbrace{}^{r + s} &
\overbrace{}^{r} & \overbrace{}^{\mathclap{n-k-r-s}} & \overbrace{ }^{r + s} \\[-1.5ex]
\end{block}
\begin{block}{r[ccc|ccc]}
\ldelim\{{1}{2mm}[$\scriptstyle r $] & I & A_1 & A_2 & B & C_1 & C_2 \bigstrut\\[0.5ex]
\ldelim\{{1}{2mm}[$\scriptstyle\mathllap{n-k-r -}s$] & 0 & 0 & 0 & D_1 & I & E_2\\[0.5ex]
\ldelim\{{1}{2mm}[$\scriptstyle s$] & 0 & 0 & 0 & D_2 & 0 & 0 \bigstrut[b] \\
\end{blockarray}
\end{equation}
\end{document}