Generalrotating a table

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
sgoetgel
Posts: 1
Joined: Fri Feb 29, 2008 2:34 pm

rotating a table

Post by sgoetgel »

Can someone help me how to rotate 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

Recommended reading 2024:

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

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

rotating a table

Post by gmedina »

The hvfloat package could be useful. Please take a look at the following simple example (compare the results obtained with sidewaystable and with \hvfloat):

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}
Read the package documentation (it includes several examples) to see all the options it offers.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply