General ⇒ rotating a table
rotating a table
I have some large tables that I included with sidewaystable so that they are in landscape form, but the bottom side of the table points to the outside side of the book-page and I want it to point to the inside of the book . So they need to turn 180 degrees.
Thanks in advance!
Sylvie
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
rotating a table
Code: Select all
\documentclass{article}
\usepackage{rotating}
\usepackage{hvfloat}
\begin{document}
\begin{sidewaystable}
\centering
\caption{Test table 1}
\label{tab:test1}
\begin{tabular}{cc}\hline
a & b \\
c & d \\
e & f \\
g & h \\ \hline
\end{tabular}
\end{sidewaystable}
%saving the table in a box to be passed as argument to \hvfloat
\newbox{\mytable}
\savebox{\mytable}{%
\begin{tabular}{cc}\hline
a & b \\
c & d \\
e & f \\
g & h \\ \hline
\end{tabular}}
\hvFloat[capPos=r,objectAngle=-90,capAngle=-90,]%
{table}%
{\usebox{\mytable}}%
{Test table 2}%
{tab:test2}
\end{document}