# Putting LaTeX table legend in a “x\y” style [duplicate]

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:

Thank you very much.

## marked as duplicate by Caramdir, lockstep, Joseph Wright♦Feb 22 '11 at 8:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

## 1 Answer

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}