How can I change the orientation of some pages of my document into landscape mode, while leaving the others in portrait mode (or vice versa)?
[Tex/LaTex] How to change certain pages into landscape/portrait mode
landscape
Related Solutions
Also with beamer you could use the landscape
environment of the lscape
or the pdflscape
package for changing the frame orientation - this time to portrait, since landscape is the default.
For example:
\documentclass{beamer}
\usetheme{Rochester}
\title{The title}
\subtitle{A subtitle}
\author{Author}
\institute{TeX LaTeX StackExchange}
\date{\today}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{pdflscape}
\begin{document}
\maketitle
\begin{landscape}
\begin{frame}
\frametitle{Landscape}
\begin{itemize}
\item Some blindtext
\item \blindtext
\item more
\item and
\item more
\item text
\end{itemize}
\end{frame}
\end{landscape}
\begin{frame}
\blindtext
\end{frame}
\end{document}
This seems like a bug to me, involving a conflict between the storeareas
command and the KOMAoptions
. Here are a few workarounds.
I have simplified the example a little. The one change I have made is to add a clearpage
after each page. Otherwise, in some cases the wrong page is affected or pages are joined together.
You can get it to work by using a second storeareas
command:
\documentclass[pagesize,paper=a4]{scrreprt}
\begin{document}
First page in portrait\\
\clearpage
\storeareas\myvalues
\KOMAoptions{pagesize,paper=landscape,DIV=20}
\storeareas\landscapevalues
Second page in landscape\\
\clearpage
\myvalues
Third page in portrait again\\
\clearpage
\landscapevalues
Fourth page IS in landscape!!!!\\
\end{document}
Or, you can scrap the storeareas
command altogether:
\documentclass[pagesize,paper=a4]{scrreprt}
\begin{document}
First page in portrait\\
\clearpage
\KOMAoptions{pagesize,paper=landscape,DIV=20}
Second page in landscape\\
\clearpage
\KOMAoptions{pagesize,paper=portrait,DIV=calc}
Third page in portrait again\\
\clearpage
\KOMAoptions{pagesize,paper=landscape,DIV=20}
Fourth page IS in landscape!!!!\\
\end{document}
The simplest change is hacky and shows how fragile things are. You can change the paper "back" to a4 right before the second landscape declaration. (It actually also works to simply change the second paper=landscape
to paper=a4
, but this seems even hackier.)
\documentclass[pagesize,paper=a4]{scrreprt}
\begin{document}
First page in portrait\\
\clearpage
\storeareas\myvalues
\KOMAoptions{pagesize,paper=landscape,DIV=20}
Second page in landscape\\
\clearpage
\myvalues
Third page in portrait again\\
\clearpage
\KOMAoptions{paper=a4}
\KOMAoptions{pagesize, paper=landscape,DIV=20}
Fourth page IS in landscape!!!!\\
\end{document}
Best Answer
Try the
lscape
package:This modifies the margins and rotates the page contents but not the page number. Useful, for example, with large multipage tables, and is compatible with the packages
longtable
andsupertabular
.If you are using pdfLaTeX, you should use
pdflscape
instead. Thepdflscape
package adds PDF support to thelandscape
environment of packagelscape
, by setting the PDF/Rotate page attribute. Pages with this attribute will be displayed in landscape orientation by conforming PDF viewers: