5

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

  • 1
    Welcome to TeX.SX! Can you show your best attempt? – egreg Feb 2 '15 at 21:41
  • 1
    At least provide code that would construct an ordinary table in a specific \documentclass. Recreating something from scratch shouldn't be left to the community. – Werner Feb 2 '15 at 21:49
  • $\big\lbrace\Big\lbrace\bigg\lbrace\Bigg\lbrace$ – touhami Feb 2 '15 at 21:59
  • What are the commands \ve and \numbers? – Bernard Feb 2 '15 at 23:02
  • There must be a clearer way to explain this information. Unless you are required to use this layout against your will, you might want to read the documentation of the booktabs package and see if you come up with something easier to read. – Benjamin McKay Feb 3 '15 at 6:54
4

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}
| improve this answer | |
  • great, are you working on FEA? – Di Miao Feb 3 '15 at 15:52
  • Thanks, I am afraid not, if FEA means Finite Element Analysis. – Jesse Feb 3 '15 at 16:40
5

use ldelim from the package 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}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.