I have a long LaTeX script for making a document where most of the sections have three figures and they fit the page very good. In some random sections, we have six or nine figures. Therefore, the page will not fit these extra figures and they will overlay at the bottom of the page.
How can I automatically force the last three figures to appear on a separate page without the need to adjust each of these sections manually? (In other words, a way to make the clear page done automatically).
I am looking for something similar to longtable – Allow tables to flow over page boundaries environment to control the flow automatically.
Here is an example of the regular and random cases:
***Regular case***
\begin{figure}[b!]
\centering
\includegraphics[width =\textwidth]{Path/A.png}
\includegraphics[width =\textwidth]{Path/B.png}
\includegraphics[width =\textwidth]{Path/C.png}
\end{figure}
\clearpage
***Random case***
\begin{figure}[b!]
\centering
\includegraphics[width =\textwidth]{Path/E.png}
\includegraphics[width =\textwidth]{Path/F.png}
\includegraphics[width =\textwidth]{Path/G.png}
\includegraphics[width =\textwidth]{Path/H.png}
\includegraphics[width =\textwidth]{Path/I.png}
\includegraphics[width =\textwidth]{Path/J.png}
\includegraphics[width =\textwidth]{Path/K.png}
\includegraphics[width =\textwidth]{Path/L.png}
\end{figure}
\clearpage