TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Keeping tables/figures close to where they are mentioned

I'm having troubles positioning some images. Some appear where i want them to, others appear right at the end of the document.

 \caption{Rapid Application Development (RAD) Model}\label{fig:sift_ex}

I have a bunch of subheadings and my bibliography after this code, but the image appears after. What am i doing wrong?

share|improve this question

marked as duplicate by cmhughes, Ian Thompson, lockstep, egreg, Jake Apr 5 '12 at 20:21

This question was marked as an exact duplicate of an existing question.

It may be that your image is actually too big to fit within the text block. Issue \clearpage to flush any existing (backed-up) floats. Also, float placement is not always as simple as specifying [h] for here. See How to influence the position of float environments like figure and table in LaTeX? – Werner Apr 3 '12 at 16:59
using [h] on its own almost always results in the floats going to the end of the document as its main effect is to not allow latex to put the float in the t or p positions, use [htp] unless you have really good reason not to. – David Carlisle Apr 3 '12 at 17:18

Figures float - LaTeX puts them where it thinks best. The [h] directive for "here" is only your suggestion, In this case it won't fit and can't go anywhere else, so LaTeX put it at the end of the document. (See comment below.)

You can force the image to be "here" if you just include it, centered, followed by its caption - but then it won't appear in the List of Figures, and it may leave lots of white space on the page or the next page. If you have to have the caption, a possible hack would be to include the image just centered, then create a Figure with just a caption. That might be small enough so that LaTeX would put it where you want it. A better TeX wizard than I might well have a better answer.

See this wikibooks page

share|improve this answer
@Werner I should have waited for your comment above. – Ethan Bolker Apr 3 '12 at 17:19
saying that latex thinks the end of document is best is misleading. It goes to the end of the document as [h] prevents the float being placed at the top of any page [t] or on a float page [p] so most of the time it won;t fit "here" (because that point is too far down the page) so the float can not be placed anywhere so is dumped at the end as emergency error recovery. – David Carlisle Apr 3 '12 at 17:21
@DavidCarlisle Thanks. You taught me more about the position specifiers, and have edited the answer appropriately. – Ethan Bolker Apr 3 '12 at 18:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.