我的图表没有被放置在两页上,而是消失在第一页的末尾。
\documentclass{amsart}
\usepackage{graphicx}
\usepackage{subfig}
\begin{document}
\begin{figure}[!ht]
\centering\makebox[\textwidth]{
\begin{tabular}{c}
\subfloat[Infectious patient=1]{\label{fig:Yw_YAB_HBN4_pos_1_all.pdf}\includegraphics[width=12cm,height=6cm]{./Figures/chapter7/Yw_YAB_HBN4_pos_1_all.pdf}}\\
\subfloat[Infectious patient=2]{\label{fig:Yw_YAB_HBN4_pos_2_all.pdf}\includegraphics[width=12cm,height=6cm]{./Figures/chapter7/Yw_YAB_HBN4_pos_2_all.pdf}}\\
\subfloat[Infectious patient=3]{\label{fig:Yw_YAB_HBN4_pos_1_all.pdf}\includegraphics[width=12cm,height=6cm]{./Figures/chapter7/Yw_YAB_HBN4_pos_3_all.pdf}}\\
\subfloat[Infectious patient=4]{\label{fig:Yw_YAB_HBN4_pos_1_all.pdf}\includegraphics[width=12cm,height=6cm]{./Figures/chapter7/Yw_YAB_HBN4_pos_4_all.pdf}}
\end{tabular}
}%}
\smallskip
\caption{Comparison of CFU values (Y) normalised against YAB single room \emph{direct care} after hand hygiene between YAB single room and HBN04-01 4-bed room}
\label{fig:Yw_YAB_HBN4}
\end{figure}
\end{document}
表格行中的分页符解决了表格中的问题。这也是我需要的吗?
答案1
代码如下:
\documentclass{amsart}
\usepackage{graphicx}
\usepackage{subfig}
\begin{document}
\begin{figure}[!ht]
\centering
\subfloat[Infectious patient=1]{\label{fig:Yw_YAB_HBN4_pos_1_all.pdf}\includegraphics[width=12cm,height=6cm]{./Figures/chapter7/Yw_YAB_HBN4_pos_1_all.pdf}}\\
\subfloat[Infectious patient=2]{\label{fig:Yw_YAB_HBN4_pos_2_all.pdf}\includegraphics[width=12cm,height=6cm]{./Figures/chapter7/Yw_YAB_HBN4_pos_2_all.pdf}}
\caption{Comparison of CFU values (Y) normalised against YAB single room \emph{direct care} after hand hygiene between YAB single room and HBN04-01 4-bed room (continued on next page)}
\end{figure}
\begin{figure}[!ht]
\ContinuedFloat
\centering
\subfloat[Infectious patient=3]{\label{fig:Yw_YAB_HBN4_pos_3_all.pdf}\includegraphics[width=12cm,height=6cm]{./Figures/chapter7/Yw_YAB_HBN4_pos_3_all.pdf}}\\
\subfloat[Infectious patient=4]{\label{fig:Yw_YAB_HBN4_pos_4_all.pdf}\includegraphics[width=12cm,height=6cm]{./Figures/chapter7/Yw_YAB_HBN4_pos_4_all.pdf}}
%}
\smallskip
\caption[]{Comparison of CFU values (Y) normalised against YAB single room \emph{direct care} after hand hygiene between YAB single room and HBN04-01 4-bed room (continued from previous page)}
\label{fig:Yw_YAB_HBN4}
\end{figure}
\end{document}
结果如下:
魔法是由\continueFloat
命令完成的,它阻止数字(浮点数)编号前进,但增加子浮点数计数器。它需要放在浮点数的下一部分的开头。
请注意第二个图(浮点)标题中的空可选参数。有必要避免后续浮点条目在浮点列表页面上重复出现(如果有的话)。
如果要避免在第一组浮动框之后显示标题(即,仅在所有浮动框排版完成后才显示标题),则可以定义一个标题样式(caption
启用此功能的包无论如何都会随 一起加载subfig
),这会使标签在序言中不可见:
\DeclareCaptionLabelFormat{nocaption}{}
以及你在哪里不想要显示标题:
\captionsetup{labelformat=nocaption}
\caption[]{}