纵向报告中横向页面出现问题。第一张表符合 koma 手册,运行良好。使用相同代码的第二张表则不行。
例子:
\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}
有什么想法吗?
此致
答案1
storeareas
在我看来,这似乎是一个错误,涉及命令和之间的冲突KOMAoptions
。以下是一些解决方法。
我稍微简化了示例。我所做的一个更改是在clearpage
每个页面后添加一个。否则,在某些情况下,错误的页面会受到影响或页面会连接在一起。
您可以使用第二个命令使其工作storeareas
:
\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}
或者,你可以storeareas
完全放弃该命令:
\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}
最简单的更改很不合理,也显示出事情是多么脆弱。您可以在第二次横向声明之前将纸张“改回”为 a4。(实际上,只需将第二个更改paper=landscape
为也可以paper=a4
,但这似乎更不合理。)
\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}