For some reason, my figures get pushed to the end of the document. I tried
[h] and other options, but none helped. Any ideas how to get the figures to appear much earlier in the document, where they are approximately first mentioned in the .tex file?
Note that this has been mentioned in a few places already. Here is a summary:
However, I think that the most accepted method is to use the placeins package to have your floats placed in the section they appear in. You can also define
Playing with the size of the figure, even for a couple of points, can also make a great difference in the placement while not changing much of the visual aspect.
Your figures are most likely too large and/or you tell LaTeX to place them at a position where they don't fit. So they are are pushed to the last position were they finally do: the end of the document.
Adding restrictions like
To fix this
you can allow more space for floats (
I wouldn't recommend to change your figures to non-floating ones because this gives bad layout.
Start with appropriate placement parameters for your float objects.
The exclamation mark overwrites the internal values introduced by Martin and makes LaTeX "try harder" to place the float at the earliest possible place. It is documented in Appendix C.9 of the Lamport book.