I have a problem with floats and listings. Sometimes it happens that a listing is split over two pages and when a figure is near the listing it happens that the listing starts on the first page, on the next page the figure is on top of the second page and below the figure the listing continues. Is it possible to let the remainder of the listing be on the top of the second page and the figure start below the listing or on top of the third page?
closed as unclear what you're asking by Jubobs, Martin Schröder, Jesse, T. Verron, Sean Allred Mar 2 at 16:49
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.
Without a supplied example, this is untested but you can place
after the listings environment to prevent top floats on that page (or more exactly prevent top floats on a page near there, without a forced page break the timing is a bit delicate).