I try to format a table in LaTeX and have trouble putting content on the left and the right side of the table. This is what it looks like:
And this is what I expect it to look like:
I want to add the table name on the left side of the table. I tried to achieve this by adding another column to the table before the first column and adding the table name there, but unfortunately the three lines in the pictures were drawn as well. I want the table name to look like it is not part of the actual table.
The second problem I have is that the Relation text on the right side should only apply to the three rows and not the whole table. I have only found solutions which caused the bracket to be placed inside the table like they did it here or solutions which used \left and \right commands which I was not able to compile without errors.
This should be the MWE:
\documentclass[a4paper, twoside=false, DIV=12, BCOR=5mm, bibliography=totocnumbered, headheight=1cm, footheight=1cm, numbers=autoendperiod]{scrartcl}
\usepackage{booktabs}
\usepackage[table]{xcolor}
\usepackage{amsmath}
\newenvironment{rcases}
{\left.\begin{aligned}}
{\end{aligned}\right\rbrace}
\begin{document}
\begin{figure}[hbp]
\center
\[
\begin{rcases}
\begin{tabular}{lllr}
\toprule
\multicolumn{1}{c}{\textbf{A}} & \multicolumn{1}{c}{\textbf{B}} & \multicolumn{1}{c}{\textbf{C}} & \multicolumn{1}{c}{\textbf{D}}\\
\midrule
1 & 4 & 7 & 16 \\
2 & 5 & 8 & 15 \\
3 & 6 & 9 & 14 \\
\rowcolor{gray!30}10 & 11 & 12 & 13 \\
& & & \multicolumn{1}{c}{$\underbrace{\hspace{15em}}$} \\
& & & \multicolumn{1}{c}{Column} \\
\bottomrule
\end{tabular}
~\hspace{0.5cm}\end{rcases} Relation
\]
\caption{Example of a DB}
\end{figure}
\end{document}





figurebeforedocumentthat suggested less than extensive testing ;). – cfr Oct 25 '15 at 01:13