8

I use "rotating" package to rotate my table in LATEX. It rotates my table in a page lonely. I want to put paragraphs in right side of the rotated table. Is there any solution?

my used code is:

\usepackage{rotating}

\begin{sidewaystable*}[!htbp]

\caption{...}

\begin{tabular}{ccc}

..... data

\end{tabular}

\end{sidewaystable*}
4
  • How should the caption be aligned in terms of the table? Say, sideways table with regular caption and regular text?
    – Werner
    Oct 11, 2013 at 4:34
  • I did not understand well! In my code, Caption is also rotated 90 degree with table rotation. My main concern is that in a page, can i use both rotated table and some texts (paragraph)? Or, if we rotate a table, this table occupies whole a page? We can not use empty spaces of the page?
    – BlueBit
    Oct 11, 2013 at 11:53
  • 1
    A sidewaystable float always use a full page. You should use table and rotate only the tabular.
    – egreg
    Oct 11, 2013 at 12:46
  • @egreg : how can i do it? I need to rotate table, then use empty spaces of the page with some other texts.
    – BlueBit
    Oct 11, 2013 at 12:51

1 Answer 1

7

The sidewaystable float always occupies a page by itself. You can use the normal table float and rotate only the table inside or both the table and the caption. I'd prefer the first way. Don't use the h option:

\documentclass{article}
\usepackage{graphicx,booktabs}

\usepackage{lipsum}

\begin{document}

\lipsum[1-3]

\begin{table}[tp] % NO h HERE!
\centering

\rotatebox{90}{%
  \small
  \begin{tabular}{lp{7.5cm}}
  \toprule
  \textbf{A} & \textbf{Text} \\
  \midrule
  X & \lipsum*[2] \\
  Y & \lipsum*[2] \\
  \bottomrule
  \end{tabular}%
}

\caption{Some caption that shouldn't be rotated}\label{tab:r}
\end{table}

\lipsum[4-9]

\begin{table}[tp]% NO h HERE!
\centering

\rotatebox{90}{%
  \begin{minipage}{9cm}
  \small\centering
  \begin{tabular}{lp{7.5cm}}
  \toprule
  \textbf{A} & \textbf{Text} \\
  \midrule
  X & \lipsum*[2] \\
  Y & \lipsum*[2] \\
  \bottomrule
  \end{tabular}%
  \caption{Some caption that shouldn't be rotated}\label{tab:s}
  \end{minipage}%
}
\end{table}

\lipsum[10-15]


\end{document}

enter image description here

enter image description here

2
  • for second code, can we copy "\caption{}" outside of the "\rotatebox{90}{" in order to shift Caption up the Table not down?
    – BlueBit
    Oct 11, 2013 at 14:15
  • 1
    @BlueBit If you move the caption outside the \rotatebox it won't be rotated. My preference would go to an unrotated caption, if you want it above the table, just move it after \centering in the first code.
    – egreg
    Oct 11, 2013 at 14:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .