Align large vertical delimiters (brackets) to rows of a table?
You can use bigdelim
from multirow
to achieve this:
\documentclass{minimal}
\usepackage{multirow,bigdelim}
\begin{document}
\begin{tabular}{lll}
Aardvark & Armenia & \rdelim\}{2}{3mm}[things beginning with vowels] \\
Elephant & Ethiopia \\
Platypus & Portugal & \rdelim\}{2}{3mm}[things beginning with consonants] \\
Zebra & Zimbabwe \\
text & text & \rdelim\}{3}{3mm}[things beginning and ending with t] \\
text & text \\
text & text \\
\end{tabular}
\end{document}
One possible solution would be to nest tabular
and array
environments; in the following example I used a tabular
with two columns; the first column will contain the tabular
with the data and the second column will contain an array
for the extensible braces and the text for the classification of the rows.
I also defined a command \MyLBrace
(with two arguments) to typeset the brace; the first argument controls the height of the brace and the second one contains the text corresponding to the particular category; since the number of rows belonging to the same category is variable, some manual calculation will be needed to adjust the height of the braces.
A little example:
\documentclass{book}
\usepackage{amsmath}
\newcommand\MyLBrace[2]{%
\left.\rule{0pt}{#1}\right\}\text{#2}}
\begin{document}
\noindent\begin{tabular}{c@{}l}
\begin{tabular}{ll@{}}
Aardvark & Armenia \\
Elephant & Ethiopia \\
Platypus & Portugal \\
Zebra & Zimbabwe \\
text & text \\
text & text \\
text & text \\
\end{tabular}
&
$\begin{array}{l}
\MyLBrace{3ex}{things beginning with vowels} \\
\MyLBrace{3ex}{things beginning with consonants} \\
\MyLBrace{4.4ex}{things beginning and ending with t}
\end{array}$
\end{tabular}
\end{document}
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{tabular}{@{}l}
$\left.
\begin{tabular}{@{}*2{p{1.5cm}}}
Aardvark & Armenia \\
Elephant & Ethiopia
\end{tabular}
\right\}\text{things beginning with vowels}$\\[\bigskipamount]
%
$\left.
\begin{tabular}{@{}*2{p{1.5cm}}}
Platypus & Portugal \\
Zebra & Zimbabwe
\end{tabular}
\right\}\text{things beginning with consonants}$
\end{tabular}
\end{document}