14

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

  • 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 6 '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 6 '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 6 '14 at 13:46
19

\usepackage{lscape} - no rotation of the page

\usepackage{pdflscape} - automatic rotation of the page

  • 1
    Welcome to TeX.SX! Having pointed the difference of the packages is very good. However, it would be great if you could extend your answer highlighting with a concrete example how they work. You may want to use canonical minimal working examples for this. – Claudio Fiandrino Mar 5 '15 at 15:35
  • 2
    Honestly, this answer is enough. MWE produces the exact same output as in the question. – Ayberk Özgür Oct 30 '17 at 17:19
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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