I have a lstlisting that doesn't fit on one page. It continues correctly on another page but instead of putting the last lines in the beginning of the next page it actually splits into three parts on three pages with other floats in between.

Is there anyway to prevent these floats appearing there in between?

My code is essentially just:


Lots of lines here


\FloatBarrier of package placeins could be put before \begin{lstlisting} to output the pending floats before the long listing that should not be interrupted by floats.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.