5

I have several images in a figure which can not come on a single page. The images near the bottom are trying to insert inside the bottom instead of going to the new page. I am using a package \raggedbottom because earlier I was facing the problem of unusual space between equation.

Please suggest me, how can I move the images to the next page which are near the bottom.

image

The black line above is the bottom of first page.

\begin{figure}[!ht]
\subfloat[Original image]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/assignPixels/img1/image1}}\\%%Org 
\subfloat[Layer-1, Subgraph-1]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L1_SG1}} 
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L1_VI}}  
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L1_Sal}}\\       
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L2_SG1}}%%Layer-2
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L2_SG2}}  
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L2_VI}}      
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L2_Sal}}\\           
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L3_SG1}}%%Layer-3
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L3_SG2}}  
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L3_SG5}}     
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L3_SG6}}\\   
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L3_VI}}  
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L3_Sal}}\\       
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L4_SG1}}%%Layer-4
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L4_SG2}}  
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L4_SG3}}     
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L4_SG8}} 
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L4_VI}}  
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L4_Sal}}
\caption{images}
\label{image}
\end{figure}
10
  • 2
    a figure is a box and never breaks, you need to split it up into smaller chunks Commented May 19, 2015 at 10:20
  • @DavidCarlisle: But then the numbering of figures will get disturbed. Is there any way that I can start the numbering in sequence with the previous image and then I will write a final description.
    – skm
    Commented May 19, 2015 at 10:24
  • 2
    Not necessarily disturbed. You have shown no code (always a bad idea:-) so we don't know how you have done the sub-figure labels (a)--(t) but there are always ways of having a continuation figure that re-starts the sub captions so (say) (a)-(n) in the first and (o)-(t) in the second, but the details depend on what you have already. Commented May 19, 2015 at 10:26
  • @DavidCarlisle: Sorry, I will update the code in a minute
    – skm
    Commented May 19, 2015 at 10:32
  • 2
    Package caption includes a \ContinuedFloat mechanism.
    – Johannes_B
    Commented May 19, 2015 at 10:40

1 Answer 1

4

Your issue with placement here seem to resolve when using the following:

  1. Don't use a float. Instead, use the float package's [H] float specifier to set the float inside a minipage. This will give you preference over the (non-)float placement.

  2. Break the float manually at the desired location.

  3. Use \ContinuedFloat from the caption package to retain the existing \caption number.

enter image description here

\documentclass{article}

\usepackage{lipsum,graphicx,float}
\usepackage{subfig,caption}

\begin{document}

\lipsum[1-2]

\begin{figure}[H]
  \centering
  \setkeys{Gin}{width=2in,height=2cm,keepaspectratio}%
  \subfloat[Original image]{\includegraphics{example-image}} \\
  \subfloat[Layer-1]{\includegraphics{example-image-a}} 
  \subfloat[]{\includegraphics{example-image-b}}  
  \subfloat[]{\includegraphics{example-image-c}} \\
  \subfloat[]{\includegraphics{example-image-a}}%%Layer-2
  \subfloat[]{\includegraphics{example-image-b}}
  \subfloat[]{\includegraphics{example-image-c}}
  \subfloat[]{\includegraphics{example-image-a}}
  \caption{images}
\end{figure}

\begin{figure}[H]
  \ContinuedFloat\centering
  \setkeys{Gin}{width=2in,height=2cm,keepaspectratio}%
  \subfloat[]{\includegraphics{example-image-b}}%%Layer-3
  \subfloat[]{\includegraphics{example-image-c}}
  \subfloat[]{\includegraphics{example-image-a}}
  \subfloat[]{\includegraphics{example-image-b}}\\
  \subfloat[]{\includegraphics{example-image-c}}%%Layer-4
  \subfloat[]{\includegraphics{example-image-a}}
  \subfloat[]{\includegraphics{example-image-b}}
  \subfloat[]{\includegraphics{example-image-c}}\\
  \subfloat[]{\includegraphics{example-image-a}}%%Layer-5
  \subfloat[]{\includegraphics{example-image-b}}
  \subfloat[]{\includegraphics{example-image-c}}
  \subfloat[]{\includegraphics{example-image-a}}
  \caption{images}
\end{figure}

\end{document}

Placing the images using [H] removes the issue of the last page float being set vertically centred, since the float is set like regular text, which will end up at the top of the page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .