我有几个图像并排放置。图像数量太多,无法放在一页上。是否有一个环境可以让图像跨页面显示,而无需将图像切成几部分?所需的行为将类似于 的行为longtable
。
这是我当前的代码:
\begin{figure}[t]
\centering
\includegraphics[width=6.3cm]{images/img_1}%
\hspace{.25cm}%
\includegraphics[width=6.3cm]{images/img_2}\\ \vspace{.25cm}%
\includegraphics[width=6.3cm]{images/img_3}%
\hspace{.25cm}%
\includegraphics[width=6.3cm]{images/img_4} \\ \vspace{.25cm}%
\includegraphics[width=6.3cm]{images/img_5}%
\hspace{.25cm}%
\includegraphics[width=6.3cm]{images/img_6}
\caption{
\small{This is a caption.}
}
\label{fig:results}
\end{figure}
答案1
浮动的概念通常不允许分页。您的一个选择是不使用浮动,而只是\captionof
在所有图片之后发出一个。
另一个版本:使用该caption
包(顺便说一下,这使得更改字体大小更容易)及其\ContinuedFloat
。
\documentclass{article}
\usepackage{graphicx}
\usepackage[font=small]{caption}
\begin{document}
\begin{figure}[t]
\centering
\includegraphics[width=6.3cm]{example-image.pdf}%
\hspace{.25cm}%
\includegraphics[width=6.3cm]{example-image.pdf}\\ \vspace{.25cm}%
\includegraphics[width=6.3cm]{example-image.pdf}%
\hspace{.25cm}%
\includegraphics[width=6.3cm]{example-image.pdf} \\ \vspace{.25cm}%
\caption{This is a caption.}
\label{fig:results}
\end{figure}
\begin{figure}[t]
\ContinuedFloat
\includegraphics[width=6.3cm]{example-image.pdf}%
\hspace{.25cm}%
\includegraphics[width=6.3cm]{example-image.pdf}
\caption{This is a caption.}
\label{fig:results}
\end{figure}
\end{document}