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 722 times
test.tex
source
(1.54 KiB) Downloaded 525 times

Recommended reading 2024:

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

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
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