我想要一个带有图表的水平页面。我尝试使用 pdflscape 来实现这一点,但在我想要旋转的页面之前,我有空白的旋转页面。我该如何修复它?我的代码如下,pdf 文件这里
\documentclass{article}
\usepackage[utf8] {inputenc}
\usepackage {polski}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{float}
\usepackage{pdflscape}
\begin {document}
\newgeometry{tmargin=3cm, bmargin=3cm, lmargin=3cm, rmargin=3cm}
\section {Section on vertical pages before horizontal page with graphics}
\section {Section on vertical pages before horizontal page with graphics}
\begin{landscape}
\section {Graphics on the new horizontal page}
\begin{figure}[H]
\includegraphics[width=\linewidth]{wykres1.png}
\includegraphics[width=\linewidth]{wykres2.png}
\includegraphics[width=\linewidth]{wykres3.png}
\caption {Caption}
\end{figure}
\end{landscape}
\section {Section on pages afrer horizontal page with graphics}
\section {Section on pages afrer horizontal page with graphics}
\section {Section on pages afrer horizontal page with graphics}
\end {document}
答案1
更改为portrait
始终landscape
从新页面开始。因此,如果请求在页面中间某处进行更改,则该页面从此处开始将进一步变空。可以使用\afterpage
包中的命令来避免这种情况afterpage
。它会用文本填充此空白区域,文本将跟随landscape
页面。您可以在landscape
方向中消除页面前的空白区域::
\documentclass{article}
\usepackage[margin=3cm]{geometry}
\usepackage[demo]{graphicx} % in real document delete option `demo`
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{lipsum} % for dummy text
\begin {document}
\section {Section on vertical pages before horizontal page with graphics}
\lipsum[1]
\section {Section on vertical pages before horizontal page with graphics}
\lipsum[2]
\afterpage{\clearpage % <----------------
\begin{landscape}
\section {Graphics on the new horizontal page}
\begin{figure}[ht]
\includegraphics[width=\linewidth]{wykres1.png}
\medskip
\includegraphics[width=\linewidth]{wykres2.png}
\medskip
\includegraphics[width=\linewidth]{wykres3.png}
\caption {Caption}
\end{figure}
\end{landscape}
}
\lipsum[3-7]
\end {document}