I used the code from here to get text to wrap around images, but whenever I have a long image near the end of the page, it runs off the page and gets cut off. How do I fix this?
When positioning the wrapped float, you can specify uppercase
You could add the following to your document preamble:
and then use
to check whether the image will fit on the page or not. If it does/will fit, nothing will happen. If it does/will not fit, a break (page or column) is issued, so the next paragraph will start on a new page.
The above code was taken from the minimal