Graphics, Figures & Tables ⇒ rotated centred boxes in a nonrotated table?
rotated centred boxes in a nonrotated table?
I have a question regarding tables. I would like to ask you how to produce the table that I have attached (LongTerm.pdf) with LaTeX, more specifically with Beamer? I have tried so far with the package rotating, but I could not reproduce the good-looking horizontally and vertically centred writings in the table boxes. I would be very thankful if someone provides me some clue.
Thanks in advance,
Martin Ivanov
- Attachments
-
- LongTerm.pdf
- (58.24 KiB) Downloaded 275 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
rotated centred boxes in a nonrotated table?
Code: Select all
\documentclass[12pt]{beamer}\usepackage{helvet}\usepackage{multirow}\usepackage{array}\begin{document}\begin{frame}\begin{center}\renewcommand{\arraystretch}{1.4}\begin{tabular}{>{\centering\arraybackslash}m{4ex}>{\centering\arraybackslash}m{4ex}>{\centering\arraybackslash}m{4ex}>{\centering\arraybackslash}m{4ex}}\cline{3-4}% row 1& & 1963 & 1976 \\\hline% row 2\multirow{2}{*}{%\rotatebox{90}{Climate Indices\hspace{-0.4em}}}&\rotatebox{90}{\textcolor{red}{\shortstack{Polarity\\Change}}\ }&\textcolor{red}{\shortstack{SOI\\PNA\\AMO}}&\textcolor{red}{\raisebox{-0.6ex}{\shortstack{NAO\\SOI\\PNA\\PDO}}}\\ \cline{2-4}&\rotatebox{90}{Extrema\ }&\shortstack{NAO\\PDO}& \\\hline\rotatebox{90}{\shortstack{Thermal\\Forcings}\ }&\rotatebox{90}{\shortstack{Trend\\Change}\ }&EPG& \\ \hline\end{tabular}\end{center}\end{frame}\end{document}
rotated centred boxes in a nonrotated table?
Thank you really very very much for your reply, it was tremendously helpful. However, as I am using a coloured version of this table there are some further complications. Here is a working example of my table:
Code: Select all
\begin{tabular}{*{4}{>{\columncolor[gray]{1}\centering\arraybackslash}m{4ex}}}\hhline{~~--}% row 1& & \raisebox{-.3ex}{1963} & \raisebox{-.3ex}{1976} \\\hline% row 2\multirow{2}{*}{%\rotatebox{90}{Climate Indices\hspace{-0.4em}}}&\rotatebox{90}{\textcolor{red}{\shortstack{Polarity\\Change}}\ }&\textcolor{red}{\shortstack{SOI\\PNA\\AMO}}&\textcolor{red}{\raisebox{-0.6ex}{\shortstack{NAO\\SOI\\PNA\\PDO}}}\\\hhline{~---}&\rotatebox{90}{Extrema\ }&\shortstack{NAO\\PDO}& \\\hline\rotatebox{90}{\shortstack{Thermal\\Forcings}\ }&\rotatebox{90}{\shortstack{Trend\\Change}\ }&EPG& \\ \hline\end{tabular}
I am posting an outlook of the current state of my table in my beamer presentation (Table.png). Any suggestions will be appreciated.
- Attachments
-
- table.png (31.74 KiB) Viewed 2324 times