# How to format table with long column head entries?

I would like to create some kind of feature matrix with available classes in columns and implemented features as rows. Problem is, that the class names are quite long.

Rotating them by 90° simply looked quite silly, so am looking for alternate ideas.

The only idea I had so far was to write the heading text horizontally with a arrow (or similar) matching the "heading row" with a column. But frankly I have no idea how to do something like this in latex.

An minimal example of my naive approach looks like this.

\documentclass{beamer}

\usepackage{tabularx}

% I am actually using a custom theme
% The space wasted'' is similar for PaloAlto though
\usetheme{PaloAlto}

\begin{document}
\frame
{
\frametitle{Comparision of boost implemented graph classes}
\begin{tabularx}{\textwidth}{X c c c}
%
% Column Headers, first column is empts
%
& \rotatebox{90}{compressed\_sparse\_row\_graph}      \\

%
% Rows, I suspect I need about 10
\hline
AdjacencyGraph        & Yes            & No          & Yes \\
Interface \#2         & Yes            & No          & Yes \\
Interface \#3         & Yes            & No          & Yes \\
Interface \#4         & Yes            & No          & Yes \\
Interface \#5         & Yes            & No          & Yes \\
Interface \#6         & Yes            & No          & Yes \\
Interface \#7         & Yes            & No          & Yes \\
Interface \#8         & Yes            & No          & Yes \\
Interface \#9         & Yes            & No          & Yes \\
% Rest omitted
\end{tabularx}
}
\end{document}



If its important: I am doing this for a presentation with beamer.

-
I was going to suggest using sidewaystable from rotating package, but for beamer, this isn't an option... –  Seamus Mar 8 '11 at 19:06
Sadly anything involving rotating the projector is indeed not quite an option. [SCNR] –  Marcus Riemer Mar 8 '11 at 19:19
make a running minimal example and do not show only a fragment of your code –  Herbert Mar 8 '11 at 19:25
See the related question "Formatting table". –  Martin Scharrer Mar 8 '11 at 19:44
@Herbert: Done, I hope this does compile everywhere. I only tried pdflatex, as I am only interested in pdf output. –  Marcus Riemer Mar 8 '11 at 19:44

Here's an example using your idea of putting the headers horizontally and connecting them to the columns with arrows:

\documentclass{beamer}
\usepackage{tikz}
\usepackage{tabularx}
\newcommand*{\hnode}[1]{\tikz[remember picture] \node (#1) {};}
% I am actually using a similar theme
% The space wasted'' is similar for PaloAlto though
\usetheme{PaloAlto}

\begin{document}
\frame
{
\frametitle{Comparision of boost implemented graph classes}
\begin{tabular}{l}
%
% Column Headers, first column is empts
%
compressed\_sparse\_row\_graph\hnode{H3}\\
\\
\end{tabular}
\begin{tabularx}{\textwidth}{X c c c}
%
& \hnode{C1}
& \hnode{C2}
& \hnode{C3}\\
% Rows, I suspect I need about 10
\hline
AdjacencyGraph        & Yes            & No          & Yes \\
Interface \#2         & Yes            & No          & Yes \\
Interface \#3         & Yes            & No          & Yes \\
Interface \#4         & Yes            & No          & Yes \\
Interface \#5         & Yes            & No          & Yes \\
Interface \#6         & Yes            & No          & Yes \\
Interface \#7         & Yes            & No          & Yes \\
Interface \#8         & Yes            & No          & Yes \\
Interface \#9         & Yes            & No          & Yes \\
% Rest omitted
\end{tabularx}
\tikz[remember picture,overlay] \draw (H1)  [very thick, red,->] -| (C1);
\tikz[remember picture,overlay] \draw (H2)  [very thick, red,->] -| (C2);
\tikz[remember picture,overlay] \draw (H3)  [very thick, red,->] -| (C3);
}

\end{document}


It actually looks pretty good, if I may say so myself.

-
That is indeed very impressive! Thanks alot! –  Marcus Riemer Mar 8 '11 at 20:30
& \llap{\rotatebox[origin=rb]{-30}{\small adjacency\_list}}