General ⇒ Rotate text in tables
Rotate text in tables
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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Rotate text in tables
You must use the package graphicx and do the same thing as in a page.
For example :
Code: Select all
\begin{tabular}{|c|c|c|c|}
\hline
& \rotatebox{90}{bidule}
& \rotatebox{90}{machin}
& \rotatebox{90}{chose}
\hline
truc & 1 & 2 & 3 \\
\hline
\hline
truc & 1 & 2 & 3 \\
\hline
truc & 1 & 2 & 3 \\
\hline
\end{tabular}
Rémi.
[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.]
Rotate text in tables
[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
- (3.9 KiB) Downloaded 7479 times
-
- tabular.tex
- (1.78 KiB) Downloaded 4609 times
-
- Posts: 19
- Joined: Wed Jan 17, 2007 11:42 am
Re: Rotate text in tables
Re: Rotate text in tables
@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!