Try the lscape
package:
% lscape.sty Produce landscape pages in a (mainly) portrait document.
\usepackage{lscape}
...
\begin{landscape}
...
\end{landscape}
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
and supertabular
.
If you are using pdfLaTeX, you should use pdflscape
instead.
The pdflscape
package adds PDF support to the landscape
environment of package lscape
, by setting the PDF/Rotate page attribute. Pages with this attribute will be displayed in landscape orientation by conforming PDF viewers:
\usepackage{pdflscape}
...
\begin{landscape}
...
\end{landscape}
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
I don't think there's any specific functionality within
memoir
for this. Butpdflscape
is compatible withmemoir
so there should be no problem with using it.