TransWikia.com

Is it possible to have multiple pages subfigures set by using the deprecated package subfigure?

TeX - LaTeX Asked by GiacomoDB on May 10, 2021

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
defsubfigtopskip{4pt}
defsubfigbottomskip{4pt}
defsubfigcapskip{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.

One Answer

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}
renewcommandShowFrameLinethickness{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

Correct answer by Zarko on May 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP