横向的页码

横向的页码

我使用report类,现在我需要更改文档中某些页面的页面方向(纵向/横向)。我尝试过pdflscape,但有一个问题:页码保留原始方向,而不是像我预期的那样旋转。我尝试过lscape并遇到同样的问题。什么可能导致这种奇怪的行为?

以下是一个例子:

\documentclass{report}
\usepackage{indentfirst}
\usepackage{pdflscape}

\begin{document}

\chapter{Main chapter}
\section{Ut convallis pharetra augue at aliquet.}

It's all portrait. Some text Lorem ipsum dolor sit amet, consectetur adipisci veliturea
adipiscing elit. Ut convallis pharetra augue at aliquet.

%% Landscape area 
\begin{landscape}
 It's all landscape. Some text Lorem ipsum dolor sit amet, consectetur adipisci veliturea
 adipiscing elit. Ut convallis pharetra augue at aliquet.
\end{landscape}

\end{document}

答案1

周末遇到了同样的问题,然后切换到 koma-class -> 页眉、页脚和数字的问题都解决了。但一开始有点难,所以这里有一个小例子。希望它能帮助切换到 koma ;)

\documentclass[     12pt,                   %fontsize
                    paper=a4,               %papersize
                    pagesize,               %area
                    DIV=calc,               %relation colls and rows see koma manual
                    liststotocnumbered,     %numbered toc (best solution report sucks over here
                    headsepline,            %header with line
                    footsepline]            %foot with line
                    {scrreprt}              %equals to report

%pagemargins
\usepackage[left=1.5cm,right=1.5cm,top=1cm,bottom=1cm,includeheadfoot]{geometry}


%Chapter caption is somewhere in the center of the page, so move the shit ;)
\renewcommand*\chapterheadstartvskip{\vspace*{-1cm}}

%If you have a new chapter, the pagestyle will be plain (only pagenumber) according to koma
%To use ur setting redefine the chaperstyle
\renewcommand*{\chapterpagestyle}{scrheadings} 

%Settings for head and foot
\usepackage{scrpage2} 
\clearscrheadfoot
\pagestyle{scrheadings}
\ihead{top left}
\chead{top center}
\ohead{top right}       
\ifoot{bottom left} 
\cfoot{bottom center}
\ofoot{bottom right}

\begin{document}
\tableofcontents

\clearpage 
\chapter{First chap}
\section{First sec}
some blank text page is still in portrait

%Save area all setting in myvalues
\storeareas\myvalues

%Change pagestyle to landscape (will create a nee page)
\KOMAoptions{paper=landscape, DIV=20} 

some blank text in landscape

%Recover settings
\clearpage
\myvalues

some blank text page is still in portrait

\end{document}

相关内容