title: Figures to flow/distribute automatically over pages in LateX
body: <p>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.</p>
  <p>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).</p>
  <p>I am looking for something similar to <a href="https://ctan.org/pkg/longtable?lang=en" rel="nofollow noreferrer">longtable – Allow tables to flow over page boundaries</a> environment to control the flow automatically.</p>
  <p>Here is an example of the regular and random cases:</p>
  <pre><code>***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
  </code></pre>