GeneralCenter rotated text in table cell vertically

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
mro
Posts: 18
Joined: Thu Oct 16, 2008 10:49 pm

Center rotated text in table cell vertically

Post by mro »

see subject :D
I would like the labels on the left to be vertically centered.
Obviously, they are, when they are not rotated.
Now the question is:
- How can I change the center of rotation to be the center of the actual box/text, or
- How can I move the rotated stuff a little bit down (i.e. half of the rotated box's height, which would make it centered again)
A pity this doesn't work out of the box

An MWE (i.e. MNWE, minimum non-working example) is attached
Attachments
test.pdf
compiled example
(9.98 KiB) Downloaded 711 times
test.tex
source
(1.54 KiB) Downloaded 519 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Center rotated text in table cell vertically

Post by Stefan Kottwitz »

Hi mro,

you could use the \rotatebox macro of the graphicx package, set the keys origin or x,y, see graphicx documentation. To raise or to lower a box you could use the \raisebox macro.

Stefan
LaTeX.org admin
mro
Posts: 18
Joined: Thu Oct 16, 2008 10:49 pm

Center rotated text in table cell vertically

Post by mro »

Code: Select all

\rotatebox[origin=c]{90}{
   VertLabel1
}
does the trick

Thanks!
Post Reply