0

I have a double column tex file, I wanted to put to figures in continuous figures. But I am getting gaps. How to fill these gaps with my figure. If it won't fit, try to put in another page. but should hold a common caption for al figure. how to do this?

\documentclass[a4paper]{article}
\usepackage{subcaption}
\usepackage{lipsum}
\usepackage[top=2.5cm,bottom=2.5cm,left=2cm,right=2cm]{geometry}
\usepackage[demo]{graphicx}
\begin{document}
  \twocolumn
  \section{Haha}
  \lipsum[1-5]

  \begin{figure}[!htb]
  \setkeys{Gin}{width=\linewidth, height=0.25\textheight}
    \begin{subfigure}{\columnwidth}
      \includegraphics[width=\columnwidth]{example-image}
          \caption{Mode 1}
          \label{fig:trans surface mode 1}
    \end{subfigure}
     \begin{subfigure}{\columnwidth}
      \includegraphics[width=\columnwidth]{example-image}
          \caption{Mode 2}
          \label{fig:trans surface mode 2}
    \end{subfigure}
    \begin{subfigure}{\columnwidth}
      \includegraphics[width=\columnwidth]{example-image}
          \caption{Mode 3 }
          \label{fig:trans surface mode 3}
    \end{subfigure}
    \begin{subfigure}{\columnwidth}
    \includegraphics[width=\columnwidth]{example-image}
         \caption{Mode 4 }
         \label{fig:trans surface mode 4}
    \end{subfigure}
    \end{figure}
    \end{document}
vijay
  • 315
  • 7
    A figure is not automatically broken in pages. You will have to do it and use a continuation caption. – Ignasi Feb 17 '19 at 11:10
  • 3
    Some examples in https://tex.stackexchange.com/a/161076/1952 – Ignasi Feb 17 '19 at 11:13
  • 1
    You could use \end{subfigure} \caption{your caption for all 4 images} \end{figure} \begin{figure} \ContinuedFloat instead of the \end{subfigure} command of your second image. This way, the first two images can be placed on the first page while the third and fourth image are placed at the second page. Numbering of the images will stay continuous from a to d. – leandriis Feb 17 '19 at 12:03

0 Answers0