# Summarize parts of a table with curly brackets

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

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?

Cheers

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

Code

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

\newcommand\tikzmark[2]{%
\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};
\end{tikzpicture}%
}

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

\begin{document}
\noindent
\begin{tabular}{m{\cwidth}|m{\cwidth}|m{\cwidth}|m{\cwidth}|}
\multicolumn{1}{l}{}
&\multicolumn{1}{c}{\tikzmark{b}{\makebox[\cwidth][c]{Fish}}}
&\multicolumn{1}{c}{\tikzmark{c}{\makebox[\cwidth][c]{Mouse}}}
&\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}
\end{tabular}