Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am sorry, there seems to be a similar question already, but I didn't get the answer. I have a chapter heading and then two wide but short tables with captions, which I would like to rotate. But after rotating they should be on the same page as the caption.

\chapter{Some caption}
\begin{table}
\begin{tabular}
[...some table...]
\end{tabular}
\caption{caption1}
\end{table}

\begin{table}
\begin{tabular}
[...some other table...]
\end{tabular}
\caption{caption2}
\end{table}

If I use sidewaystable, it puts the tables on a seperate page. I can also use:

\begin{table}
\begin{rotate}
\begin{tabular}
[...some table...]
\end{tabular}
\begin{tabular}
[...some other table...]
\end{tabular}
\end{rotate}
\cation{combined caption 1 and 2}
\end{table}

but that will place the two tables alongside and not after each other. So if _ is the non rotated table and | the rotated table, I can get

caption
_
_

or

caption
|
|

but what i want is

caption
| |

Thanks for any help!

share|improve this question

2 Answers 2

Will this do?

\documentclass{article}
\usepackage{graphicx}
\begin{document}
  \begin{table}[htbp]
  \centering
  \caption{combined caption 1 and 2}
\rotatebox[origin=c]{90}{%
\begin{tabular}{ccc}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9 \\
\end{tabular}%
}%
\hfil   %% just to demarkate
\rotatebox[origin=c]{90}{%
\begin{tabular}{ccc}
7 & 8  \\
4 & 5  \\
1 & 2  \\
\end{tabular}%
}%
\end{table}
\end{document}

enter image description here

share|improve this answer
    
Wonderful! simple and fast and just what I wanted! –  user1638145 Apr 12 at 14:05

Using the adjustbox package:

\documentclass{book}
\usepackage{adjustbox}

\begin{document}

\begin{table}
\centering
\caption{combined caption for both rotated tables}
\begin{adjustbox}{angle=90}
\begin{tabular}{l}
\hline
text \\
text \\
text \\
\hline
\end{tabular}
\end{adjustbox}\quad
\begin{adjustbox}{angle=90}
\begin{tabular}{l}
\hline
text \\
text \\
text \\
\hline
\end{tabular}
\end{adjustbox}
\end{table}

\end{document}

enter image description here

Since you want your tables to appear at a specific location, perhaps you should consider not using a float object; you can use a minipage instead and you can provide a caption using \captionof from the caption or the capt-of packages:

\documentclass{book}
\usepackage{adjustbox}
\usepackage{caption}

\begin{document}

\noindent\begin{minipage}{\linewidth}
\centering
\captionof{figure}{combined caption for both rotated tables}
\begin{adjustbox}{angle=90}
\begin{tabular}{l}
\hline
text \\
text \\
text \\
\hline
\end{tabular}
\end{adjustbox}\quad
\begin{adjustbox}{angle=90}
\begin{tabular}{l}
\hline
text \\
text \\
text \\
\hline
\end{tabular}
\end{adjustbox}
\end{minipage}

\end{document}

Are you sure there isn't a better alternative than forcing the reader to rotate his/her head to read the tables?

share|improve this answer
    
same for your answer!: Wonderful! Thank you very much! And yes, I believe it is the best alternative. Its just a unit conversion table... –  user1638145 Apr 12 at 14:06
    
@user1638145 I've updated my answer providing an option that might be of interest for you. –  Gonzalo Medina Apr 12 at 14:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.