The rotating package

Turns a figure or table with its caption by 90° on a page of its own (sidewaysfigure, sidewaystable) and rotates text by any angle.

Loading the package

\usepackage{rotating}

A table with many columns can be wider than the page is high. sidewaystable sets the table and its caption turned by 90°, so the long side of the page becomes the width. The float always takes a page of its own, and the page stays a portrait page in the PDF: header, footer and page number are where they always are.

For small rotations the package has sideways (90°), turn (any angle) and rotate (any angle, without reserving space). It loads graphicx.

Main commands

\begin{sidewaystable} ... \end{sidewaystable}Table float turned by 90° on its own page.
\begin{sidewaysfigure} ... \end{sidewaysfigure}The same for a figure.
\begin{sideways} ... \end{sideways}Turns its content by 90°, for example a long column heading.
\begin{turn}{45} ... \end{turn}Turns its content by 45° and reserves the space of the turned box.
\usepackage[figuresright]{rotating}Turns all sideways floats in the same direction; figuresleft is the opposite one.

Complete example

\documentclass{article}
\usepackage{rotating}
\begin{document}
The table follows on a page of its own.
\begin{sidewaystable}
  \centering
  \caption{A wide table, turned by 90 degrees}
  \begin{tabular}{lrrrrrr}
    \hline
    Year & Jan & Feb & Mar & Apr & May & Jun \\ \hline
    2025 & 12 & 15 & 11 & 18 & 21 & 19 \\
    2026 & 14 & 13 & 16 & 20 & 22 & 25 \\ \hline
  \end{tabular}
\end{sidewaystable}

\begin{tabular}{lcc}
  & \begin{sideways}Experiment A\end{sideways}
  & \begin{sideways}Experiment B\end{sideways} \\ \hline
  Passed & yes & no
\end{tabular}
\end{document}
Result
Page 1 of the compiled examplePage 1
Page 2 of the compiled examplePage 2

Open in the editor

Compiled with pdfLaTeX from TeX Live 2023.

Pitfalls

Related pages