Possible Duplicate:
Force figure placement in text

I have a a document and I'm inserting .png images but they are not shown where I want them. How do I fix this?


\section{Section 1}
\includegraphics[scale  = 0.5]{Andromeda Galaxy.jpg}
\section{Section 2}



1 Answer 1


You are not stating where you want them to be placed instead, but I presume that you want to ensure that a figure for section 1 will not appear visually before section 1 starts. If so the standard LaTeX command to use is \suppressfloatsin your case probably with the optional argument [t]to prevent it only from appearing at the top. You can also (additionally) add an optional argument to the figureenvironment to allow it to appear at the place it was specified if possible. So a solution would look like this:

\section{Section 1}
\begin{figure}[tbh] ...

If you also want to ensure that floats belonging to one section stay within the section you could make use of the placeins package which provides a command called \FloatBarrier.

Not the answer you're looking for? Browse other questions tagged .