PDF 输出文件中的垂直方向横向页面

PDF 输出文件中的垂直方向横向页面

我正在使用该lscape环境在我的 LaTeX 文档中为包含大图形或表格的页面生成横向页面,以便在打印等时我的页码位于正确的位置。但是,当\begin{landscape} ... \end{landscape}所有其他页面都处于纵向时,代码的结果是将横向页面作为横向放置在 PDF 文档中。

有没有办法让横向页面与 PDF 输出文档中其他页面的方向相同?

\documentclass[12pt,a4paper]{report}
\usepackage{lscape}
\begin{document}
\pagenumbering{arabic}
\chapter{Title 1}
\begin{landscape}
\centering
Text here.
\end{landscape}
\chapter{Title 2}
\end{document}

上面的代码输出为pdf如下图左侧所示,我想要实现右侧所示的输出。

非常感谢

在此处输入图片描述

答案1

\usepackage{lscape}- 页面不旋转

\usepackage{pdflscape}- 自动旋转页面

答案2

软件包rotating(描述于LaTeX 维基百科加拿大运输安全局) 提供了几种环境(包括sidewaysfiguresidewaystable),使您可以将浮动元素放置在自己的页面上,并相对于正常的页眉和页码进行旋转。图形和标题都旋转了 90 度。但是,这些环境会强制浮动元素放置在自己的页面上。

举个例子:

\documentclass[12pt]{article}

\usepackage[demo]{graphicx} % Used for illustration purposes
\usepackage{rotating} % Provides {sideways}{sidewaysfigure}{sidewaystable} environments
\begin{document}

\Huge
\section{Non-Rotated Figure}
\begin{figure}
\centering
\includegraphics[width=0.5\columnwidth]{demo.jpg}
\caption{Upright Figure}
\end{figure}

\section{Rotated Figure on Next Page}
\begin{sidewaysfigure}[htb]
\centering
\includegraphics[width=0.5\columnwidth]{demo.jpg}
\caption{Sideways Figure}
\end{sidewaysfigure}

\end{document}

给出您想要的输出:

两页横向图形环境

相关内容