I would like to create a table (cf. attached figure) and use curly brakes to summarize some of the cells.

enter image description here

I did a lot of research and found this solution (Curly brackets around a table), but it doesn't help me much as it is only math content and I would like to enter text only.

Does anyone have an idea about how to solve this problem elegantly?



This is one solution where tikzmark taking 2 arguments, brace decoration and link macro that takes 3 arguments are used.

enter image description here



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

\def\cwidth{1.5cm} % change this for column width

&\multicolumn{1}{c}{\tikzmark{d}{\makebox[\cwidth][c]{Bird}}}\\ [1ex]\cline{2-4}
Apple & Here is a sample of text describing an apple&Some text here & some text\\  \cline{2-4}
Banana & Here is a sample of text describing a banana &  & \\ \cline{2-4}
\link{b}{c}{Category A}
\link{d}{d}{Category B}
| improve this answer | |
  • Looks great and works very well, thank you for your reply! – Mil Jan 30 '15 at 15:28

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.