16

I'm using the lscape environment to produce landscape pages in my LaTeX document for pages that have large figures or tables, so that my page numbering is in the right place when it comes to printing etc. However, the \begin{landscape} ... \end{landscape} code has the consequence of putting the landscape pages as landscape in the PDF document, when all the other pages are in the portrait orientation.

Is there a way to have the landscape pages put in the same orientation as the rest of the pages in the document for the PDF output?

\documentclass[12pt,a4paper]{report}
\usepackage{lscape}
\begin{document}
\pagenumbering{arabic}
\chapter{Title 1}
\begin{landscape}
\centering
Text here.
\end{landscape}
\chapter{Title 2}
\end{document}

The above code outputs to a pdf as shown on the left of the image below, I would like to achieve the output shown on the right.

Many thanks

enter image description here

cslstr
  • 6,545
cjms85
  • 891
  • 3
    well actually it doesn't do that (pdflscape does which is the main difference) however some pdf viewers autimatically detect the orientation of "most" text and rotate the page view (they may have an option not to do that, acrobat does for example) – David Carlisle Mar 06 '14 at 11:02
  • I've tried using the pdflscape package with the \begin{landscape} ...\end{landscape} commands, but it doesn't seem to change anything for me. I'm compiling using LaTeX + dvips + ps2pdf + View PDF in TexMaker. Would that have any effect? – cjms85 Mar 06 '14 at 11:58
  • 2
    if you use pdflscape there are view rotate instructions inserted in the page, if you use the original lscape there should not be, what happens if you look at the generated pdf in other pdf viewers, is that page always rotated? – David Carlisle Mar 06 '14 at 13:46

2 Answers2

31

\usepackage{lscape} - no rotation of the page

\usepackage{pdflscape} - automatic rotation of the page

Adrian
  • 311
  • 3
  • 2
4

The package rotating (described on LaTeX WikiBooks and CTAN) provides several environments (including sidewaysfigure and sidewaystable) enabling you to have a float on its own page rotated with respect to the normal headers and page numbering. The figure and caption are both rotated 90 degrees. These environments do force the float to its own page, however.

As an example:

\documentclass[12pt]{article}

\usepackage[demo]{graphicx} % Used for illustration purposes
\usepackage{rotating} % Provides {sideways}{sidewaysfigure}{sidewaystable} environments
\begin{document}

\Huge
\section{Non-Rotated Figure}
\begin{figure}
\centering
\includegraphics[width=0.5\columnwidth]{demo.jpg}
\caption{Upright Figure}
\end{figure}

\section{Rotated Figure on Next Page}
\begin{sidewaysfigure}[htb]
\centering
\includegraphics[width=0.5\columnwidth]{demo.jpg}
\caption{Sideways Figure}
\end{sidewaysfigure}

\end{document}

gives the output you desire:

Two Pages SidewaysFigure Environment

cslstr
  • 6,545