Graphics, Figures & TablesDiagonal Table Header

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
jubairarifctg
Posts: 13
Joined: Wed Sep 09, 2009 6:55 am

Diagonal Table Header

Post by jubairarifctg »

Hi there

I can create table with 5 columns with \begin{tabular}{|c|c|c|c|c|}

Thus, I get to have to 5 table header. But I want the table header to be diagonal, starting from bottom left to upper right. Google search wasn't of much help.

thanks for your help.

Cheers
Arif.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Diagonal Table Header

Post by gmedina »

Hi Arif,

you could use the \rotatebox command provided by the graphicx package; take a look at the following example:

Code: Select all

\documentclass{article}
\usepackage{graphicx}

\begin{document}

{\centering
\begin{tabular}{|p{1.8cm}|p{1.8cm}|p{1.8cm}|}
  \hline
  \rotatebox{15}{Header1} & \rotatebox{15}{Header2} & \rotatebox{15}{Header3}\\\hline
  column1a & column2a & column 3a\\
  column1b & column2b & column 3b\\\hline
\end{tabular}
}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
jubairarifctg
Posts: 13
Joined: Wed Sep 09, 2009 6:55 am

Re: Diagonal Table Header

Post by jubairarifctg »

COOL, thanks

that really works.

Cheers...now let me play around with that.
Post Reply