7

Possible Duplicate:
Tables of numbers

Is it possible to put a "x\y" style legend in one cell (maybe be made up of several cells) of a table? It would be great to make the 'x' slightly lower while the 'y' slight higher.

Please see the picture below for illustration:

XY_style

Thank you very much.

11

AFAIK, there are two packages for this purpose. One is my diagbox (replacement of old slashbox). The other is makecell. Here is an example of \diaghead in makecell:

\documentclass{article}
\usepackage{diagbox}
\usepackage{makecell}
\begin{document}

\section*{diagbox}

\begin{tabular}{|l|c|c|}\hline
\theadfont\diagbox[width=11em]{Diag\\Column Head I}{Diag Column\\Head II}&
\thead{Second\\column}&\thead{Third\\column}\\    \hline
& foo & bar \\    \hline
\end{tabular}

\section*{makecell}

\begin{tabular}{|l|c|c|}\hline
\diaghead{\theadfont Diag ColumnmnHead II}%
{Diag\\Column Head I}{Diag Column\\Head II}&
\thead{Second\\column}&\thead{Third\\column}\\    \hline
& foo & bar \\    \hline
\end{tabular}
\end{document}

enter image description here

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