0

For practical reasons I need to use the old subfigure package with is considered obsolete but I have to spread a big set of subfigures over multiple pages. Do anyone know how I can do it?

I tried with:

\ContinuedFloat

but of course it doesn't work, it doesn't break the page or I get an error.

Do anyone know if it is possible to get round this problem?

thank you in advance for any help!


The reason is that in the code I have this part which I am not able to understand. I used this since long time but it is not real clear what it needs for.

    \usepackage[TABTOPCAP, FIGBOTCAP]{subfigure}
%\usepackage[TABTOPCAP, FIGBOTCAP]{subfig}
\newcommand{\figbox}[1]{%
  \fcolorbox{white}{white}{
    \vbox to 6.5 cm{%
    \vfil
    \hbox to 8 cm{%
      \hfil
      #1%
      \hfil}%
    \vfil}}}

\newcommand{\Bfigbox}[1]{% \fcolorbox{white}{white}{% \vbox to 5.6 cm{% \vfil \hbox to 7 cm{% \hfil #1% \hfil}% \vfil}}} %Da usare per le immagini multiple da ingrandire oltre il margine

\newcommand{\Cfigbox}[1]{% \fcolorbox{white}{white}{% \vbox to 4.5 cm{% \vfil \hbox to 6.4 cm{% \hfil #1% \hfil}% \vfil}}}

\makeatletter \def\subfigtopskip{4pt} \def\subfigbottomskip{4pt} \def\subfigcapskip{2pt} \subtabletopcaptrue

Anyhow I think I solved part of the problem. I was able to use the subfig package just removing the code above but it doesn't break the images set at the end of the page. I wrote the following:

\usepackage[]{subfig}
\usepackage{float}

At the point of the multi-page figure:

\begin{figure}[htb!]
\ContinuedFloat
 \begin{center}
\subfloat[abcd]{{{\includegraphics[height=5.5 cm]{IMG/Foto1bis.jpg}}}} \hspace{0.1 cm}
    \subfloat{{{\includegraphics[height=5.5 cm]{IMG/Foto2.png}}}} \hspace{0.1 cm}
\subfloat[abcd]{{{\includegraphics[height=5.5 cm]{IMG/Foto1bis.jpg}}}} \hspace{0.1 cm}
\subfloat{{{\includegraphics[height=5.5 cm]{IMG/Foto2.png}}}} \hspace{0.1 cm}

\subfloat[abcd]{{{\includegraphics[height=5.5 cm]{IMG/Foto1bis.jpg}}}} \hspace{0.1 cm}
\subfloat{{{\includegraphics[height=5.5 cm]{IMG/Foto2.png}}}} \hspace{0.1 cm}

\subfloat[abcd]{{{\includegraphics[height=5.5 cm]{IMG/Foto1bis.jpg}}}} \hspace{0.1 cm}
\subfloat{{{\includegraphics[height=5.5 cm]{IMG/Foto2.png}}}} \hspace{0.1 cm}

\subfloat[abcd]{{{\includegraphics[height=5.5 cm]{IMG/Foto1bis.jpg}}}} \hspace{0.1 cm}
\subfloat{{{\includegraphics[height=5.5 cm]{IMG/Foto2.png}}}} \hspace{0.1 cm}

% \hspace{0.5 cm}% \end{center}% \caption{Images received, showing the adhesive failure.}% \label{DamagePicture} \end{figure}

It puts the pictures below the page without shifting to a new one.

GiacomoDB
  • 177
  • 2
    Please elaborate on the "practical reasons" that make use use the deprecated (not just obsolete, but deprecated) subfigure package instead of either the subfig or the subcaption package. – Mico Oct 09 '20 at 17:14
  • Try the captcont package which "fully supports the subfigure package" according to https://ctan.org/pkg/captcont . –  Oct 09 '20 at 17:43
  • 1
    See https://tex.stackexchange.com/questions/278727/split-subfigures-over-multiple-pages/278748#278748, it may help you (however it use subcaption for sub images) – Zarko Oct 09 '20 at 18:07
  • You could put each row of subfigures (subcaption package) in a separate float [hp] and they will "break" automatically. You might need to play with totalnumber and \textfraction. – John Kormylo Oct 10 '20 at 02:04
  • Thanks for your suggestion, I tried with the package subfig and also subcaption but the result is the same. subcaption even puts the subfigures only one at row and not two. @Mico I changed the question and I put into some code to make it a little bit more clear. – GiacomoDB Oct 10 '20 at 20:08
  • Please extend provided code fragment to complete document which begin with \documentclass and end with \end{document}. – Zarko Oct 10 '20 at 21:06

1 Answers1

1

Based on my answer you can write an MWE on the following way:

\documentclass{article}
%--------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%
\usepackage{lipsum}                             % for dummy text
%---------------------------------------------------------------%

\usepackage[demo]{graphicx} \usepackage{subfig}

\begin{document} \begingroup \setkeys{Gin}{height=55mm} \begin{figure}[htb!] \centering \subfloat[abcd]{\includegraphics{IMG/Foto1bis.jpg}} \hfil \subfloat[]{\includegraphics{IMG/Foto2.png}}

\subfloat[abcd]{\includegraphics{IMG/Foto1bis.jpg}} 

\hfil \subfloat{\includegraphics{IMG/Foto2.png}}

\subfloat[abcd]{\includegraphics{IMG/Foto1bis.jpg}}

\hfil \subfloat[]{\includegraphics{IMG/Foto2.png}} \caption{Images received, showing the adhesive failure.}% \label{DamagePicture} \end{figure} \begin{figure}[htb!] \ContinuedFloat \centering \subfloat[abcd]{\includegraphics{IMG/Foto1bis.jpg}} \hfil \subfloat[]{\includegraphics{IMG/Foto2.png}}

\subfloat[abcd]{\includegraphics{IMG/Foto1bis.jpg}}

\hfil \subfloat[]{\includegraphics{IMG/Foto2.png}}

\subfloat[abcd]{\includegraphics{IMG/Foto1bis.jpg}} 

\hfil \subfloat[]{\includegraphics{IMG/Foto2.png}} \caption{Images received, showing the adhesive failure.}% \end{figure} \begin{figure}[htb!] \ContinuedFloat \centering \subfloat[abcd]{\includegraphics{IMG/Foto1bis.jpg}} \hfil \subfloat[]{\includegraphics{IMG/Foto2.png}}

\subfloat[abcd]{\includegraphics{IMG/Foto1bis.jpg}} 

\hfil \subfloat[]{\includegraphics{IMG/Foto2.png}}

\subfloat[abcd]{\includegraphics{IMG/Foto1bis.jpg}}

\hfil \subfloat[]{\includegraphics{IMG/Foto2.png}} \caption{Images received, showing the adhesive failure.}% \end{figure} \endgroup \end{document}

Is this what you looking for?

From your code fragment is not clear, if you like that images in the second column are not numbered. In this case you need in the above MWE remove [] from \subfloat in the second column.

enter image description here

Zarko
  • 296,517