## LaTeX forum ⇒ General ⇒ Rotate text in tables

LaTeX specific issues not fitting into one of the other forums of this category.
erhnam
Posts: 4
Joined: Thu Jan 18, 2007 1:51 pm

### Rotate text in tables

The problem is:
I have a table which is a bit too wide to fit in the page.
If I could rotate the column headers the table would fit perfectly.

I've checked CTAN and it seems that rotating is only possible to entire float elements or entire pages (landscaping)
Is there any way to do what I need?

Thks

Tags:

Posts: 9
Joined: Sun Jan 14, 2007 4:14 pm
There is a solution to your problem (if I understand it correctly.)
You must use the package graphicx and do the same thing as in a page.
For example :

\begin{tabular}{|c|c|c|c|}\hline& \rotatebox{90}{bidule}& \rotatebox{90}{machin}& \rotatebox{90}{chose}\hlinetruc & 1 & 2 & 3 \\\hline\hlinetruc & 1 & 2 & 3 \\\hlinetruc & 1 & 2 & 3 \\\hline\end{tabular}

I couldn't carry out a test but it seems to work well. I try this if i have time.

[Edit : I have realised a test and its well. I could use 270 in the place of 90 according to the orientation of the text.
I have a tex file and a pdf file for illustration but it isn't allowed to join files with this extension sorry.]
Sorry for my english. I'm french.

Posts: 9
Joined: Sun Jan 14, 2007 4:14 pm
[Edit : I have realised a test and its well. I could use 270 in the place of 90 according to the orientation of the text.
I have a tex file and a pdf file for illustration but it isn't allowed to join files with this extension sorry.]

Sven have solve the problem, so my files are in this message.
Attachments
tabular.pdf
tabular.tex
Sorry for my english. I'm french.

dustbinbear
Posts: 19
Joined: Wed Jan 17, 2007 11:42 am
sorry but do u mean rotating the whole table by 90 degrees, or just rotate the text in the table so as to get a shorter table width?

erhnam
Posts: 4
Joined: Thu Jan 18, 2007 1:51 pm
@Sven: Yeah, I kinda posted in the wrong section...

@RÃ©mi: THKS! That was exactly what I needed.

@dustbinbear: I meant rotate the text in the table so as to get a shorter table width. Just like RÃ©mi did.

Thks for the help. Problem solved!