0

I have the following situation.

I am using multicols and inserting figure inside them. I have two of those. However, I want my text to continue appearing after the second multicol but it is always moving to a new page.

Below is the scenario that I now have:

enter image description here

and I want to reach this scenario:

enter image description here

I tried using the

\makeatletter \setlength{\@fptop}{0pt} \makeatother

to push the first figure to the upper part of the page, and I succeeded with that, but the second figure always had a big gap between itself and the first image.

I tried

\makeatletter \setlength{\@fpbot}{500pt} \makeatother

to get the second figure directly under the first one and it worked, but the remaining text continued showing up on the next page.

Below is my code.

\makeatletter
\setlength{\@fptop}{0pt}
\makeatother

\begin{multicols}{3}

\begin{figure*}
\begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[width=\textwidth]{img1.png}
         \caption{caption1}
         \label{fig:}
    \end{subfigure}
    \begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[width=\textwidth]{img2.png}
        \caption{caption2}
        \label{fig:}
    \end{subfigure}
    \begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[width=\textwidth]{img3.png}
        \caption{caption3}
        \label{fig:}
    \end{subfigure}
    \caption{caption4}
    \label{fig:label1}
\end{figure*}
\end{multicols}

\begin{multicols}{3}

\begin{figure*}
\begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[width=\textwidth]{img4.png}
        \caption{caption5}
        \label{fig:}
    \end{subfigure}
    \begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[width=\textwidth]{img5.png}
       \caption{caption6}
        \label{fig:}
    \end{subfigure}
    \begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[width=\textwidth]{img6.png}
        \caption{caption7}
        \label{fig:}
    \end{subfigure}
   \caption{caption8}
   \label{fig:label2}
\end{figure*}
\end{multicols}

\FloatBarrier
1

You didn't provide a test file or show the definition of the syntax you showed, but I guess it is subcaption package syntax. This variant produces the desired format as far as I understand it.

enter image description here

\documentclass{article}

\usepackage{multicol,subcaption,graphicx,lipsum}

\begin{document}



\begin{figure*}
\begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[width=\textwidth]{example-image.png}
         \caption{caption1}
         \label{fig:a}
    \end{subfigure}\hfill
    \begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[width=\textwidth]{example-image.png}
        \caption{caption2}
        \label{fig:aa}
    \end{subfigure}\hfill
    \begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[width=\textwidth]{example-image.png}
        \caption{caption3}
        \label{fig:aaa}
    \end{subfigure}
    \caption{caption4}
    \label{fig:label1}

\begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[width=\textwidth]{example-image.png}
        \caption{caption5}
        \label{fig:b}
    \end{subfigure}\hfill
    \begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[width=\textwidth]{example-image.png}
       \caption{caption6}
        \label{fig:bb}
    \end{subfigure}\hfill
    \begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[width=\textwidth]{example-image.png}
        \caption{caption7}
        \label{fig:bbb}
    \end{subfigure}
   \caption{caption8}
   \label{fig:label2}
\end{figure*}
\begin{multicols}{3}
\lipsum
\end{multicols}


\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.