LaTex “too many unprocessed floats” problem and solution

After adding about 30 scanned images into an appendix, I started getting “too many unprocessed floats” errors.  Doing a little digging, I found that many of the images were starting to back up on each other.  LaTeX was getting plugged up and was barfing.

The solution:

Add this to your top-level file:

\usepackage[section] {placeins}

By using the placeins package with the section option selected, LaTeX is forced to dump all of the unprocessed floats at the end of each section.  There are a few other ways to do it with that package but this way made the most sense to me.  Doing that, I get no more errors!  Well, at least from that problem.

112 Replies to “LaTex “too many unprocessed floats” problem and solution”

  1. You just saved my day! Love you! Had the same problem and didn’t find a solution until I read your entry! Thanks very much!

      1. awesome! I had been stuck on this for 3 hours, till I put this simple command on the top of my file. Then all worked out fine. Thanks a lot!

  2. Thanks for the tip! This was one of the top search results in Google (and only one which had a short and easy answer :). I was separating all my float images into separate chapters before I though of searching for this error.

      1. Unfortunately, this is not working for me. I have about 100 figures at the end of each Chapter. I added
        \usepackage[section] {placeins} to my preamble…didn’t work. Then I changed it to \usepackage[chapter] {placeins}…didn’t work. Any other solutions?? As a work around I do \clearpage but this creates blank pages.. Help!!??

        1. At that point you might be better off putting all of the figures into appendices… Otherwise I don’t know how you’d force that many figures to fall where you place them in the text.

        2. if you have so many figures “\userpackage[section]{placeins}” won’t be enough , you have to manually insert a point beyond which floats may not pass. To do this insert a \FloatBarrier every 20 figures or so. That should be enough to fix your problem

  3. Ok. That is unfortunate. Ummm so for each chapter I guess I can have a designated appendix. Is that how you do this?? And then just place the figures into each appendix sectio with the \usepackage[section] {placeins} within the preamble and everything should be set??? I just want to understand how exactly you did this. Thanks so much for this blog!!

  4. Many thanks for posting this solution. Took me quite a while to figure that it was not a mistake in one of the many files included. Then I fortunately quickly found your post. Solved the problem 🙂

  5. You are a genius!
    All other solutions I found googling are asking to put \clearpage arbitrarily which, to me is not so neat solution like yours. Thanks a lot!

  6. Thanks!! This solved my problem. Found your page via Google search near the top so I got things working quickly because of your advice!

  7. no how is it done.
    actually i am using subfloats

    \begin{figure}
    \centering
    \subfloat[auto loop3 sig314]{\includegraphics[width=0.4\textwidth]{auto_loop3_sig314.png}}
    \subfloat[auto loop3 sig316]{\includegraphics[width=0.4\textwidth]{auto_loop3_sig316.png}}
    \subfloat[auto loop3 sig318]{\includegraphics[width=0.4\textwidth]{auto_loop3_sig318.png}}
    \end{figure}

  8. .

    I’ve tried everything that has been mentioned here on the blog and as you can see from the photo…
    float remains unprocessed.

    Perhaps if I were to mate it with a sloppy joe and an order of crinkle fries it would then allow me to process it? It certainly is worth a try!

    .

  9. .

    See what I mean? Totally obstinate float. Always trying to get a scoop up on me!

    Maybe if I give it an icy growl? Brrr Grrr! Look at that… to see if it can be processed properly.

    .

  10. use the package morefloats. It solve my problem that wasn’t solved using \usepackage[section] {placeins}…

  11. Right on the SPOT! 😀
    I am sitting on my 14th hour of work. Handing in my thesis in another ~12h. You just saved my work!
    Thanks alot! 🙂

    Best, Ulrik.

  12. Thank you sooooooo much!!!!!
    You saved my life, and finally I could make my thesis to the deadline. I had many tables and graphs that Latex seems to not process them at all. I check the every line and still it just does not work.
    I have been struggling with this problem, and got soooo frustrated until I see your solution.
    I put both commands in my paper, \FloatBarrier and \usepackage[section] {placeins}, and they work like magics.
    More than 300 error message now are all gone!!!!

    Thank you, thank you 🙂
    Ying

  13. Wow! Thank god! You saved me some hours! ^^
    I would never imagine that solution… And I have to finish this in some hours.. 😛

  14. Great command. Could it be even better?
    Can it work with section AND SUBSECTION?
    Something like:
    \usepackage[subsection,section] {placeins}

    and subsubsection etc?

    1. Hi Filpe,

      You can achieve that and more by doing this:


      usepackage{placeins}

      blah blah whatever
      FloatBarrier %this command dictates to the placeins package where the boundaries are for the floats. Any floats from the previous block of your tex file will go no further than where FloatBarrier has been placed. You can place FloatBarrier anywhere within a document -- not just at section or subsection breaks.

  15. Thanks Douglas. I’m actually already using \FloatBarrier and it works fine.
    But I was wondering if it could do it automaticaly with SUBSECTION, the same way it does with section, using something similar to
    \usepackage[section] {placeins}

    1. I don’t think that you can easily, Filpe. The documentation for the package only mentions SECTION. My semi-educated guess is that you could do it if you redefined what “section” means in terms of the placeins package.

  16. I’m using both: \usepackage[section] {placeins} at the begining of the document and \FloatBarrier before each subsection. Everything was fine until about page onehundred (100). After this page, some sections begin on the next page, leaving a lot of blanck space on the page before.

    Could this be caused by those commands?
    What would be the solution?

    In my book I have lots of sections and about 2 or 3 \begin{figure}… \end{figure} in each section.

    1. Hi Filipe,

      What are the placement specifiers that you’re using with your figures? I’ve had some strange behavior like that before when I was using the wrong placement locations. Check out this link for more details on that.

      Regards,

      Douglas

    1. Hi Filipe,

      Did you try playing around with the placement specifiers on the figures that are giving you problems? Aside from that, I don’t know why you would be encountering the errors that you are.

      Cheers!

      Douglas

  17. Hi Douglas.
    What really worked (with little problem) was to place a
    \clearpage
    some 2 or 3 pages before the problem, in a place where there was not much page to be left blanc.
    It seems that somehow this cleared the memory or something of latex and after that things seems to be working fine.

  18. To solve the problem I removed
    \usepackage[section]{placeins}
    and replaced by
    \usepackage{placeins}
    and then I used
    \FloatBarrierat
    whenever I need.

    This actualy didn’t make any difference, but sundely the problem disappeared by itself. I have to make some tests about that, but I think the problem was happening because of a section I’ve just started writing and there was no text there, just a figure. I didn’t make a scientifc test, but I think the problem disappeared the moment I wrote some text just between the \section{…} and the figure.
    So thanks, this packge really works.

    1. Ah yes by removing [section] from the command, it will only force floats wherever you use FloatBarrier. It’s interesting that text was required to cause the floats to force correctly.

  19. Thank you very much from Brazil. I wish all my latex doubts were solved in matter of minutes, with simple and effective answers like yours.

  20. Hi!
    I didn’t read all the previous comments, so sorry if that was already exposed. Here’s my experience:

    I have a document with all its figures placed where I want them to be. After trying to add an appendix with a table, sudden “too many un processed floats”.

    What was the problem? I had added a new figure on the first pages. I forgot to resize, so it was a sent to a page at the end of the document. All the floating figures after the new one were now placed at the end of the document. Yes, there really were “too many unprocessed floats”.

    Solution? Make the big image smaller so it fits where it is intended to be. All the other figures were replaced to their original places and I was able to add the appendix.

    I feel a little dumb now, but it may be useful to someone

    1. Hi PBR!

      For cases where image sizes can’t be reduced enough to get rid of the “too many unprocessed floats” error, proper use of the placeins package will make sure that your figures will not end up at the very bottom of the document. Placeins allow you to precisely place where the unprocessed floats will end up in each section.

      Otherwise if you can reduce the dimensions of figures, go for it! 🙂

      Cheers!

      Douglas

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.