Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}{adjacency\_list}
    & \rotatebox{90}{adjacency\_matrix}
    & \rotatebox{90}{compressed\_sparse\_row\_graph}      \\

    %
    % Rows, I suspect I need about 10
    % Class               adjlist          adjmatrix     csrg
    \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.

share|improve this question
    
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
show 1 more comment

2 Answers

up vote 9 down vote accepted

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}\\
    adjacency\_matrix\hnode{H2}\\
    adjacency\_list\hnode{H1}\\
    \\
  \end{tabular}
  \begin{tabularx}{\textwidth}{X c c c}
    %
    & \hnode{C1}
    & \hnode{C2}
    & \hnode{C3}\\
    % Rows, I suspect I need about 10
    % Class               adjlist          adjmatrix     csrg
    \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.

beamer slide

share|improve this answer
1  
That is indeed very impressive! Thanks alot! –  Marcus Riemer Mar 8 '11 at 20:30
add comment
& \llap{\rotatebox[origin=rb]{-30}{\small adjacency\_list}}
& \llap{\rotatebox[origin=rb]{-30}{\small adjacency\_matrix}}
& \llap{\rotatebox[origin=rb]{-30}{\small compressed\_sparse\_row\_graph}}\\

maybe a solution

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.