LaTeX forum ⇒ Graphics, Figures & Tablestable with rotated headings - spacing Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
dyde
Posts: 2
Joined: Mon Oct 28, 2019 2:27 pm

table with rotated headings - spacing

Postby dyde » Mon Oct 28, 2019 3:00 pm

Hi@all,

sorry to bother you but although I tried the search function, I could not find a solution to my specific problem.

I am using a table in latex with rotated headings:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \newcommand*\rot{\rotatebox{90}}
  2. \begin{table}
  3. \caption{Table caption.}
  4. \begin{threeparttable}
  5. \begin{tabular}{ | l || c | c | }
  6. \hline
  7. \centering
  8. \diagbox[innerwidth=18em]{Text}{\raisebox{-0.27cm}{Method}} & \rot{Head1} & \rot{Head2} \\ \hline
  9. Description & foo\tnote{1} & bar \\ \hline
  10. \end{tabular}
  11. \begin{tablenotes}
  12. \item[1] Note
  13. \end{tablenotes}
  14. \end{threeparttable}
  15. \label{tbl:table}
  16. \end{table}


with the following result:
tableprob.png
tableprob.png (18.59 KiB) Viewed 332 times


How can I modify the spacing of the headings? The big space between the delimiter and the "Head1"/"Head2" seems a bit odd...

Thanks a lot for any help!

Greetings

User avatar
Stefan Kottwitz
Site Admin
Posts: 9495
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Thu Oct 31, 2019 3:46 am

Hi dyde,

welcome to the forum!

You could use the origin option, such as here, centered:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \rotatebox[origin=c]{90}


Stefan
Site admin

dyde
Posts: 2
Joined: Mon Oct 28, 2019 2:27 pm

Postby dyde » Thu Oct 31, 2019 8:59 am

Hi Stefan,

thanks a lot, that worked for me :)

Stefan Kottwitz wrote:Hi dyde,

welcome to the forum!

You could use the origin option, such as here, centered:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \rotatebox[origin=c]{90}


Stefan


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 3 guests