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 280 times
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
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 2368 times