# Figure not automatically being placed on two pages

My figures are not being placed on 2 pages, instead they are disappearing off the end of the first page.

\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}


Page breaks in table rows addresses the problem in tables. Is this what I need too?

• You are forcing it to be kept together by putting all in a single box. There is no way LaTeX would be able to break it over several pages. Apr 30 '13 at 15:11
• What would you suggest to work round this but keeping fingure numbering as 1a b c d?
– HCAI
Apr 30 '13 at 15:14
• I suggest you use the subfig package with the \ContinuedFloat command. I don't have the time right now, but if you have problems working it out, I can post a full answer in about 1 hour... Apr 30 '13 at 15:22
• Thank you. tex.stackexchange.com/questions/58578/… This seems to cover it. but I find that the first half of my float has a caption that gets cut off however the second half does not. This occurs even though all 4 figures are the same size....
– HCAI
Apr 30 '13 at 16:35
• what exactly gets cut off? I can't reproduce such behavior... Apr 30 '13 at 16:41

So here is the code:

\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}


Which will result in something like this:

The magic is done by the \continueFloat command, which prevents the figure (float) numbering from advancing, but increments the subfloat counter. It needs to be placed at the beginning of the next part of the float.

Notice the empty optional argument in the second figure (float) caption. It is necessary to avoid subsequent ﬂoat entries from appearing as duplicates on the List-of-Floats page (if you have one).

If you want to avoid the caption after the first group of floats (i.e. have only a caption after all the floats have been typeset), you can define a caption style (the caption package that enables this feature is loaded anyway with subfig), which makes the label invisible in the preamble:

\DeclareCaptionLabelFormat{nocaption}{}


and where you don't want a caption to appear:

\captionsetup{labelformat=nocaption}
\caption[]{}

• Thank you very much. I learn something new every day! The caption was getting trimmed for some reason in my first float. So to avoid it I've just resized my first two figures to width=\textwidth. Seems to do the trick.
– HCAI
Apr 30 '13 at 17:26