0

I have a similar question as in Avoid page breaks in lstlistings. In my case, it's not a problem to have page breaks in a listing (some of them are too long anyways). But LaTeX sometimes constructs things like:

  • First part of listing
  • Page break
  • Figure
  • Second part of listing

If it has to page break a listing, then I would at least expect that it will break the listing right at the end of the page and continue at the beginning of the next page. Not inserting figures and stuff in between.

How can I achieve that?

1

Just after the listing put \suppressfloats[t] to stop top floats being added to the top of that page.

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.