[Tex/LaTex] Could someone help me draw the Curly bracket for the tabular like this

bracketstables

enter image description here

Hi guys, I am trying to draw curly bracket like this by using \multirow command but i can't enlarge the curly bracket, can someone help me out?

Here is the commands:

\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}

Thanks

Best Answer

Just out of curiosity and for fun on how to draw the image shown by the OP. This is an attempt via homemade tikzmark, brace decoration from tikzlibrary with related macros like link and sidelink.

enter image description here

Code

\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}
Related Question