# force figures to follow each other

Consider this example that involves two figures forming a continued float:

\documentclass{report}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{caption}
%\usepackage{float}

\begin{document}
\lipsum[1-6]
\lipsum[4][1-2]
\begin{figure}[h!p]
\includegraphics[height=0.6\textheight, width =0.5\textwidth]{example-image-a}
\caption{Examples}
\end{figure}
\begin{figure}[h!p]
\ContinuedFloat
\includegraphics[width=0.8\textheight]{example-image-b}
\end{figure}
\lipsum[1][1-2]
\lipsum[1]
\end{document}


The output is

It is not a good idea to have text inserted among a continued float after all. How to expel anything that gets between two figures?

• You are looking for subfigure? – user156344 Apr 8 at 8:51
• @JouleV No. I am dealing with a continuous float that spans several pages. – Viesturs Apr 8 at 8:53
• Your're probably looking for the placeins package and its \FloatBarrier – daleif Apr 8 at 8:59
• Or use [b!p] for the first float. – Ulrike Fischer Apr 8 at 9:01
• you don't need a float for that: you could use the (one line) capt-of package, or use [H] to stop floating or several other options. – David Carlisle Apr 8 at 10:35