I'm creating an exam using the exam class which I think uses redefine list environments.
Anyway, I want to include a figure in one of my problems, but I want to ensure that the figure appears under the first line of text in the problem, and if there isn't space for it on the page, I want the text to move with the figure.
Using just the figure environment moves the figure to the next page but leaves the text behind. How do I force them together?
General ⇒ keeping text with a figure
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
keeping text with a figure
Hi dmt,
you probably don't need the figure environment, because the figure doesn't need to be able to float. Have a look here for possible solutions: Prevent floating of figures or tables. Further you could put the figure and the text together into one minipage environment.
Stefan
you probably don't need the figure environment, because the figure doesn't need to be able to float. Have a look here for possible solutions: Prevent floating of figures or tables. Further you could put the figure and the text together into one minipage environment.
Stefan
LaTeX.org admin
Re: keeping text with a figure
Thanks, that was really helpful. The float package had a nice option H that works well here.