有人能帮我画出这样的表格花括号吗?

有人能帮我画出这样的表格花括号吗?

在此处输入图片描述

大家好,我正在尝试使用 \multirow 命令绘制这样的花括号,但是我无法放大花括号,有人可以帮我吗?

命令如下:

\begin{center}
\begin{tabular}{ r m{2pt} c |c |c |c |c |}
&\multicolumn{1}{ c }{}&\multicolumn{1}{ c }{} &\multicolumn{4}{ c }{\texttt{\tabincell{c}{Element\\numbers($\ve$)}}} \\
&\multicolumn{1}{ c }{}&\multicolumn{1}{ c }{} &\multicolumn{4}{ c }{$\overbrace{\,\quad\quad\quad\quad\quad\quad}$} \\[-5pt]

& \multicolumn{1}{ c }{} &\multicolumn{1}{ c }{}& \multicolumn{1}{ c }{1}& \multicolumn{1}{ c }{2}& \multicolumn{1}{ c }{3}& \multicolumn{1}{ c }{4} \\ \cline{4-7}
\multirow{4}{*}{\texttt{Local node numbers($a$)}\hspace{-8pt}} & \multirow{4}{*}{$\left.\left\{ \right.\right.\hspace{-10pt}$}
   & 1 & 1 & 1 & 4 & 8 \\ \cline{4-7}
 & & 2 & 2 & 3 & 3 & 6 \\ \cline{4-7}
 & & 3 & 8 & 4 & 5 & 5 \\ \cline{4-7}
 & & 4 & 7 & 2 & 6 & 7 \\ \cline{4-7}
\end{tabular}
\end{center}

谢谢

答案1

只是出于好奇,也是为了好玩,想知道如何绘制 OP 所显示的图像。这是通过自制的tikzmarkbrace装饰和tikzlibrary相关宏(如link和)进行的尝试sidelink

在此处输入图片描述

代码

\documentclass[border=5cm]{standalone}
\usepackage{tikz,array,calc}
\usetikzlibrary{decorations.pathreplacing}

\newcommand\tikzmark[2]{%
\tikz[remember picture,overlay] 
\node[inner sep=0pt,outer sep=2pt] (#1){#2};%
}
\newcommand\link[3]{%
\begin{tikzpicture}[remember picture, overlay]
\draw [decorate,decoration={brace,amplitude=5pt,raise=1pt}] 
(#1.north west)--(#2.north east) node[above=5pt,midway,text width=2cm,align=center]{#3};
\end{tikzpicture}%
}

\newcommand\sidelink[4]{%
\begin{tikzpicture}[remember picture,overlay]
\draw [decorate,decoration={brace,amplitude=3pt,raise=1pt,mirror}] 
(#1.west)--(#2.west) node[left=0.3cm,midway, align=center](#3){#4};
\end{tikzpicture}%
}

\def\cwidth{0.5cm}

\newcolumntype{C}[1]{>{\centering\arraybackslash\hspace{0pt}}m{#1}}

\begin{document}
\noindent
\begin{tabular}{c C{1.5cm} c |C{\cwidth}|C{\cwidth}|C{\cwidth}|C{\cwidth}|@{}C{0pt}@{}}
                         && \multicolumn{1}{l}{} & \multicolumn{1}{c}{\tikzmark{b}{1}}
 & \multicolumn{1}{c}{\tikzmark{}{2}} & \multicolumn{1}{c}{\tikzmark{}{3}}
 & \multicolumn{1}{c}{\tikzmark{e}{4}}\\[1ex]\cline{4-7}
\tikzmark{aa}{1}&&\tikzmark{b1}{1} & $0^\star$ & 1 & 4 & 8 & \\  [2ex]\cline{4-7}
2                       &&\tikzmark{c1}{2} & 0 & 3 & 3 & 6 & \\  [2ex]\cline{4-7}
3                       &&\tikzmark{d1}{1} & 1 & 4 & 5 & 5 & \\  [2ex]\cline{4-7}
4                       &&\tikzmark{e1}{2} & 2 & 2 & 6 & 7 & \\  [2ex]\cline{4-7}
5                       &&\tikzmark{f1}{1}  & 6 & 4 & 5 & 5 & \\  [2ex]\cline{4-7}
6                       &&\tikzmark{g1}{2} & 7 & 2 & 6 & 7 & \\  [2ex]\cline{4-7}
7                       &&\tikzmark{h1}{1} & 4 & 4 & 5 & 5 & \\  [2ex]\cline{4-7}
\tikzmark{bb}{8}&&\tikzmark{i1}{2}  & 5 & 2 & 6 & 7 & \\  [2ex]\cline{4-7}
\end{tabular}

\link{b}{e}{Element \\ numbers ($v$)}
\sidelink{b1}{c1}{}{1}
\sidelink{d1}{e1}{}{2}
\sidelink{f1}{g1}{}{3}
\sidelink{h1}{i1}{aaa}{4}
\sidelink{aa}{bb}{cc}{}

\begin{tikzpicture}[remember picture, overlay]
\draw[<-] (cc) -| ++(-1.5,-4);
\draw[<-] (aaa) -- ++(0,-2);
\draw[<-] (i1) |- ++(0.5,-1)node[right,text width=2cm]{Element \\ $1 \le i \le n_{ed}$ };
\node[below] at (bb){($n_{ee}=8$)};
\end{tikzpicture}

\end{document}

答案2

ldelim从包中使用bigdelim

\documentclass[border=2mm]{standalone}
\usepackage{multirow}
\usepackage{bigdelim}
\usepackage{MnSymbol}

\begin{document}

    $\begin{array}{ccc|c|c|c|c|}
        & & \multicolumn{1}{c}{} & \multicolumn{4}{c}{\begin{minipage}[c][10mm][c]{17mm}\begin{center}\texttt{Element} \\ \texttt{numbers($v$)} \\ $\overbrace{\hspace*{17.5mm}}$\end{center} \end{minipage}} \\ 
        & & \multicolumn{1}{c}{} & \multicolumn{1}{c}{1} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{3} & \multicolumn{1}{c}{4} \\ \cline{4-7}
        \multirow{4}{18.5mm}{\texttt{Local node numbers($a$)}}& \ldelim\{{4}{.1mm} & 1 & 1 & 1 & 4 & 8 \\ \cline{4-7}
        & & 2 & 2 & 3 & 3 & 6 \\ \cline{4-7}
        & & 3 & 8 & 4 & 5 & 5 \\ \cline{4-7}
        & & 4 & 7 & 2 & 6 & 7 \\ \cline{4-7}
    \end{array}$

\end{document}

在此处输入图片描述

相关内容