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

I have the following figure code :

   \includegraphics[scale=.7,bb=0 0 804 401]{f5.png}
   \caption{Case Adaptation \cite{16} }

Even though this figure is not at the end of the document, it is not appear as it supposed to be. Instead, it comes at the end of the document!

One more thing, why do I have to use the bb parameters for the PNG images? Is there any work around?

share|improve this question
Have you tried [!h]? The placeins package provides the command \FloatBarrier which can also be helpful. Keeping tables and figures close to where they are mentioned is a pretty definitive guide – cmhughes Feb 6 '12 at 2:31
What happens if you just leave the bb parameter? – Jake Feb 6 '12 at 2:35
I assume your choice of scale=.7 is because the resulting image seems to fit within the text block. Is this in fact the case? Do you have any "Overfull \hbox" warnings in your .log? I would suggest using width=\textwidth instead, rather than guessing the scaling factor. – Werner Feb 6 '12 at 5:16
Have a look at: tex.stackexchange.com/questions/39017/… – Marco Daniel Feb 6 '12 at 9:54
!htbp works fine , but it makes a gap ~4 lines before the figure !! – M.M Feb 6 '12 at 10:19
up vote 2 down vote accepted

[h] in floats almost always means "take to end of document" as putting just h there stops LaTeX putting the float in any of its normal places (t p b), and typically the actual position of the float in the document is unsuitable (too close to bottom of page to fit for example).

on why you need bb (or one of the equivalent options) LaTeX needs to know how big the image is to know how much space to leave. pdftex can read the png file and get the natural size from that, but classic TeX can not read the png so needs to be told.

share|improve this answer
@DavidCarliste: Have you seen the (great) answer of Frank Mittelbach: tex.stackexchange.com/questions/39017/… – Marco Daniel Feb 6 '12 at 9:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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