0

I have used the following to show five figures, but there are two problems which I think happen because the total size of all five figures is too large.

First, the figures are not placed exactly where I want them (they go at the beginning of the next page). Second, the rest of them aren't placed on the next page but under the current page! I don't have these problems with just a single image.

enter image description here

The code:

    \begin{figure}[H]
    \begin{center}
        \subfigure[Weak]{\includegraphics[scale=0.35]{fab reg_overall_initial_b0.jpg}\label{img02a}}
        \subfigure[Weak]{\includegraphics[scale=0.35]{fab reg_overall_initial_b28.jpg}\label{img02b}}
        \subfigure[Weak]{\includegraphics[scale=0.35]{fab reg_overall_initial_b50.jpg}\label{img02c}}
        \subfigure[Weak]{\includegraphics[scale=0.35]{fab reg_overall_initial_b732.jpg}\label{img02d}}
        \subfigure[Weak]{\includegraphics[scale=0.35]{fab reg_overall_initial_b1.jpg}\label{img02e}}
    \end{center}
    \caption{different types: \subref{img02a} O \subref{img02b} S \subref{img02c} W \subref{img02d} D \subref{img02e} A}
    \label{fig02}
    \end{figure}
Ingmar
  • 6,690
  • 5
  • 26
  • 47
  • Why don't you just make the images smaller so that the images fit? Maybe I do not get the question :). – Dr. Manuel Kuehner May 16 '22 at 03:00
  • 2
    Please have a look at https://tex.stackexchange.com/questions/122314, if you use the sub­fig­ure package, be aware that the subfig package (https://www.ctan.org/pkg/subfig) replaces the sub­fig­ure pack­age (https://www.ctan.org/pkg/subfigure, "The package is now considered obsolete") – Dr. Manuel Kuehner May 16 '22 at 03:03
  • 3
    Please provide a working (compilable) code so that we can see which packages you're using. You seem to be using subfigure, which was obsoleted a long time ago. Also, since you're using the H placement option, you mostly prevent LaTeX from moving the figures to fit the page. – Miyase May 16 '22 at 03:04
  • I dont make images smaller because I need to show the detail – Ehsan Benabbas May 16 '22 at 03:21
  • 1
    The main problem is that you cannot split a float across two pages. OTOH, you can treat multiple floats as if they were one float using \ContinuedFloat (capton packaged). See https://tex.stackexchange.com/questions/278727/split-subfigures-over-multiple-pages – John Kormylo May 16 '22 at 03:43
  • Don't use the H position! This might not fix the issue at hand, but H leads to unpleasant pagination, if you use it you'll have to fine tune all positioning manually if you want pleasant typography. It's much easier (and usually better) to let LaTeX decide and stick to the default placement of floats. – Skillmon May 16 '22 at 06:51
  • figure makes a box so no text within a figure will break over a page. Also the only function of a figure environmnt is to allow that text to move, so if you don't want it to move, and do want to allow page breaking, not using figure is probably the simplest option. – David Carlisle May 16 '22 at 07:00

0 Answers0