Got an problem regarding landscape pages in a portrait report.
The first sheet is according to the koma manual and works fine. The second with the same code won't.
Example:
\documentclass[ 12pt,
paper=a4,
pagesize,
DIV=calc,
liststotocnumbered,
headsepline,
footsepline]
{scrreprt}
\usepackage[left=1.5cm,right=1.5cm,top=1cm,bottom=1cm,includeheadfoot]{geometry}
%langue settings
%header and footer settings
\begin{document}
First page in portrait\\
\storeareas\myvalues
\KOMAoptions{pagesize, paper=landscape, DIV=20}
Second page in landscape\\
\clearpage
\myvalues
Third page in portrait again\\
\KOMAoptions{pagesize, paper=landscape, DIV=20}
Fourth page NOT in landscape!!!!\\
\clearpage
\end{document}
Some ideas?
best regards
Best Answer
This seems like a bug to me, involving a conflict between the
storeareas
command and theKOMAoptions
. 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:Or, you can scrap the
storeareas
command altogether: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
topaper=a4
, but this seems even hackier.)