
図を挿入していますlandscape
。
\begin{landscape}
\begin{figure}
\centering
\includegraphics[width=\linewidth]{figures/sensor_diffs.jpg}
\caption{Example of a single rep in which sensors are fused together to create a reaction time algorithm}
\label{fig:sensor_diffs}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=\linewidth]{figures/sensor_diffs2.jpg}
\caption{Another example of a single rep in which sensors are fused together to create a reaction time algorithm}
\label{fig:sensor_diffs2}
\end{figure}
\end{landscape}
しかし、図の前のページでは、最後に多くの空白が生成されます。図の後の同じセクションには十分なテキストがありますが、適切に調整されていないようです。
何か案は?
さらに、この問題はドキュメントの複数の場所で発生しているため、何らかのグローバルな解決策があれば理想的です。
答え1
afterpage
これにはパッケージを使用して、現在のページを埋めた後に図がタイプセットされるようにすることができます。
\documentclass{article}
\usepackage{pdflscape}
\usepackage{graphicx}
\usepackage{afterpage}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2]
\afterpage{% <--------------like this
\begin{landscape}
\begin{figure}
\centering
\includegraphics[width=\linewidth]{example-image}
\caption{Example of a single rep in which sensors are fused together to create a reaction time algorithm}
\label{fig:sensor_diffs}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=\linewidth]{example-image-a}
\caption{Another example of a single rep in which sensors are fused together to create a reaction time algorithm}
\label{fig:sensor_diffs2}
\end{figure}
\end{landscape}
}
\lipsum
\end{document}
答え2
rotating
パッケージとその環境をロードすることをお勧めしますsidewaysfigure
。これはLaTeXの専門用語で「浮動環境」と呼ばれます。対照的に、landscape
環境はないフローティング環境であるため、これに遭遇するとすぐにページ区切りが入ります\begin{landscape}
。
また、(i)単一の環境で、それぞれ独自の\caption
およびステートメントを持つ複数のイメージを持つことが可能であり、(ii)グラフの幅が に設定されているため、命令は何も実行しない (したがって省略できる) ことにも注意してください。\label
sidewaysfigure
\centering
\linewidth
\documentclass{article}
\usepackage[demo]{graphicx} % omit 'demo' option in real document
\usepackage{rotating} % for 'sidewaysfigure' environment
\usepackage{lipsum} % for filler text
\begin{document}
\lipsum[1-2] % filler text
A cross-reference to Figures \ref{fig:sensor_diffs} and \ref{fig:sensor_diffs2}.
\begin{sidewaysfigure} % this will show up on page 2
\includegraphics[width=\linewidth]{figures/sensor_diffs.jpg}
\caption{Example of a single rep in which sensors are fused together to create a reaction time algorithm}
\label{fig:sensor_diffs}
\vspace{2cm} % get some vertical separation
\includegraphics[width=\linewidth]{figures/sensor_diffs2.jpg}
\caption{Another example of a single rep in which sensors are fused together to create a reaction time algorithm}
\label{fig:sensor_diffs2}
\end{sidewaysfigure}
\lipsum[3-7] % more filler text, continued on page 1 and then on page 3
\end{document}