TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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:
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}


share|improve this question

marked as duplicate by Marco Daniel, egreg, N.N., Jake, Martin Scharrer Dec 21 '11 at 12:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Other examples can also be found using the search function. – Marco Daniel Dec 21 '11 at 10:09
Where is the \insertgraphics command defined? Please add a minimal working example (MWE) that illustrates your problem. – egreg Dec 21 '11 at 10:09
Also have a look at How do I ensure that figures appear in the section they're associated with?, which seems to be you use-case. – Martin Scharrer Dec 21 '11 at 10:49
@egreg \usepackage[pdftex]{graphicx} is at the top with all the other packages – Samantha Catania Dec 21 '11 at 11:11
It doesn't provide \insertgraphics. Please, try and provide a minimal example. – egreg Dec 21 '11 at 11:13

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.

share|improve this answer

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