0

How can I place figures below each other when the figures have subfloats and I don't want the figures, that I want to be below each other, to be the same figure? So I've got two figure wich each consits of two picture that are next to each other and I want the second one to be below the first one and I don't want the text to be between or above the pictures.

\usepackage{graphicx}
\usepackage{subfig}

\begin{document}

\begin{figure}
  \centering
  \subfloat[pic 1 a]{\includegraphics[width=0.6\textwidth]{pic1a.png}} 
  \hfill
  \subfloat[pic 1 b]{\includegraphics[width=0.4\textwidth]{pic1b.png}}
  \caption{figure 1}
\end{figure}

\begin{figure}
  \centering
  \subfloat[pic 2 a]{\includegraphics[width=0.6\textwidth]{pic2a.png}} 
  \hfill
  \subfloat[pic 2 b]{\includegraphics[width=0.4\textwidth]{pic2b.png}}
  \caption{figure 2}
\end{figure}


text text text which should all be below the pictures and not above nor beetwenn text text text text text text 
\end{document}
2
  • I honestly just can't understand, sorry. So, 1) please provide a MWE (minimal working example) following the demands you find here: tex.meta.stackexchange.com/q/228/231952, so that we can better understand the problem you are encountering. 2) Try to explain better what the problem is.
    – Ivan
    Commented Apr 25, 2021 at 14:54
  • I'm sorry that I didn't ask my question properly. But I updated it and I hope that it's clear now.
    – lea
    Commented Apr 25, 2021 at 15:51

1 Answer 1

1

Include both constructions inside the same figure environment. That way they'll stay together without anything between them.

enter image description here

\documentclass{article}

\usepackage{graphicx,subfig}

\begin{document}

\begin{figure}
  \centering
  \subfloat[pic 1 a]{\includegraphics[width=0.6\textwidth]{example-image-a}}
  \hfill
  \subfloat[pic 1 b]{\includegraphics[width=0.4\textwidth]{example-image-a}}
  \caption{figure 1}

  \vspace{\intextsep}

  \subfloat[pic 2 a]{\includegraphics[width=0.6\textwidth]{example-image-b}}
  \hfill
  \subfloat[pic 2 b]{\includegraphics[width=0.4\textwidth]{example-image-b}}
  \caption{figure 2}
\end{figure}

text text text which should all be below the pictures and not above nor beetwenn text text text text text text 
\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .