我怎样才能将文件中的某些页面改为横向模式,而将其他页面保留在纵向模式(或反之)?
试试lscape
软件包。
% lscape.sty Produce landscape pages in a (mainly) portrait document.
\usepackage{lscape}
...
\begin{landscape}
...
\end{landscape}
它可以修改页边距,旋转页面内容,但不旋转页码。例如,在处理大型多页表格时很有用,并与longtable
和supertabular
包兼容。
如果你使用pdfLaTeX,你应该使用pdflscape
代替。
pdflscape
包通过设置PDF/Rotate页面属性,在lscape
包的landscape
环境中增加了PDF支持。带有这个属性的页面将被符合要求的PDF浏览器以横向显示。
\usepackage{pdflscape}
...
\begin{landscape}
...
\end{landscape}
lscape
包在处理双面文件时有问题!
偶数页(在文件的左边)和奇数页(在文件的右边)的横向页面应该是颠倒的。
为了解决双面文件的这个问题,请使用`旋转'包。
\usepackage{rotating}
...
\begin{sidewaysfigure}
...
\end{sidewaysfigure}
它能使数字相对于页码进行旋转。它还支持用begin{sideways}
(逆时针90度)和begin{turn}{30}
(30度旋转)进行手动旋转。
我找到了解决方案这里。
有一个很好的&
简单的解决方案,基于Koma-脚本的typearea
包(灵感来自[本回答][1])。
你只需要在你想改变页面方向的地方添加以下命令块。
\newpage
\KOMAoptions{paper={portrait or landscape},pagesize}
\recalctypearea
最棒的是,页码仍然垂直保留在底部(不随页面旋转),而且脚注也被轻轻地保留了下来。
\documentclass{article}
\usepackage[paper=portrait,pagesize]{typearea}
\begin{document}
\section{This is my Portrait Page}
\newpage
\KOMAoptions{paper=landscape,pagesize}
\recalctypearea
\section{This is my Landscape Page}
Text in my landscape section\footnote{Footnote in Landscape}
\newpage
\KOMAoptions{paper=portrait,pagesize}
\recalctypearea
\section{This is again Portrait Page}
\end{document}
[![在此输入图像描述][2]][2]
[1]: https://tex.stackexchange.com/questions/6834/change-paper-size-in-mid-document#21431 [2]: https://i.stack.imgur.com/Ofzew.png
我来到这个页面是因为我有一个太宽的表格,无法在纵向页面上显示。 对我来说,"lscape "或 "pdflscape "的问题是,它们在横向页面开始的确切位置打破了页面。 这不是我想要的。 相反,我使用了这里的答案。 https://tex.stackexchange.com/questions/50070/landscape-figure-in-latex
旋转 "包提供两种环境。
begin{sidewaystable} .... \
end{sidewaystable}`。begin{sidewaysfigure} ... ... \
end{sidewaysfigure}`。如果你的表格或数字足够大,你也会得到一个横向页面。 不同的是,分页符将在你的文档中的一个自然点上,而不是在你定义它的确切位置(可能看起来很丑)。
请注意,这个包也兼容twoside
文档。
如果'twoside'选项已经被赋予了主文档类(无论是显式的,还是隐式的,就像书本类的默认值一样),这个包将根据页码旋转横向的数字(这需要至少两次通过LATEX)。
更多细节,请参见CTAN上的包。
这对我来说是有效的。 在你的文档开始之前定义一个花式页面,然后在你需要横向时调用这个花式页面。 原文由UTK研究生院的模板提供。
\usepackage{pdflscape}
\usepackage{fancyhdr}
\fancypagestyle{mylandscape}{
\fancyhf{} %Clears the header/footer
\fancyfoot{% Footer
\makebox[\textwidth][r]{% Right
\rlap{\hspace{.75cm}% Push out of margin by \footskip
\smash{% Remove vertical height
\raisebox{4.87in}{% Raise vertically
\rotatebox{90}{\thepage}}}}}}% Rotate counter-clockwise
\renewcommand{\headrulewidth}{0pt}% No header rule
\renewcommand{\footrulewidth}{0pt}% No footer rule
}
%%%% Now the actual Document %%%%
\begin{document}
% When you need landscape page do this
\begin{landscape}
\thispagestyle{mylandscape} %Call our predefined page type
% Put your figure, table, whatever, here
\begin{figure}[h]
\centering
\includegraphics[width=9in]{The wide angle...}
\caption{This view is too wide for a portrait page.}
\label{fig:wide-pic}
\end{figure}
%End lanscape to go back to portrait
\end{landscape}
\end{document}