Take the 2-minute tour ×
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.

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

I am including graphics into my latex documents as below:

\begin{figure}[abc]
\begin{center}
\includegraphics[width=\textwidth]{abc.eps}
\end{center}
\caption{Same caption}
\label{fig:abc}
\end{figure}

Only the first image is being displayed where I have inserted it. Rest all images are being displayed at the end of the section.

Note: I have designed some images in Dia diagram editor and converted them to PNG. Then I used convert abc.png eps3:abc.eps to convert them to EPS format.

share|improve this question

marked as duplicate by Martin Scharrer Aug 7 '11 at 18:04

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.

    
This is normal. The figure environment is a float and is supposed to float through the text until some suitable place is found. See Keeping tables/figures close to where they are mentioned. Also [abc] is a invalid optional argument of figure. And don't use the center environment, but the \centering macro. –  Martin Scharrer Aug 7 '11 at 18:03

1 Answer 1

Inside a floating environment you shouldn't use an environment like center. You get additional vertical space. It is better to use \centering

\begin{figure}[abc]
\centering
%\begin{center}
\includegraphics[width=\textwidth]{abc.eps}
%\end{center}
\caption{Same caption}
\label{fig:abc}
\end{figure}

The optional argument of a floating environment like figure is the positioning,

h=here
t=top
b=bottom
p=extra page

You use abc which makes no sence. I prefer:

\begin{figure}[!htb]

Some more explanation you can find here: Wikibook LaTeX/Floats, Figures and Captions

share|improve this answer

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