# Why are my images not shown where I've inserted them in my .tex file? [duplicate]

Possible Duplicates:

This is my document:

\documentclass[letterpaper]{article}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{times}
\usepackage{helvet}
\usepackage{courier}
\title{This is my title}
\author{elcodedocle}
\setcounter{secnumdepth}{0}

\begin{document}
\setlength{\parskip}{10pt}
\maketitle
\section{This is my section}

\paragraph{Hello}

\lipsum

\begin{figure}[h!]
\centering
\includegraphics[width=0.50\textwidth]{thisismyimage.jpeg}
\label{fig:Fig 1}
\caption{This is my image.}
\end{figure}

\lipsum

\begin{figure}[h!]
\centering
\includegraphics[width=0.50\textwidth]{thisisanotherimage.jpeg}
\label{fig:Fig 2}
\caption{This is another image.}
\end{figure}

\lipsum

\begin{figure}[h!]
\centering
\includegraphics[width=0.50\textwidth]{thisisanotherimage2.jpeg}
\label{fig:Fig 3}
\caption{This is another image 2.}
\end{figure}


Can you tell me why my images don't show right after the first paragraph?

-

## marked as duplicate by Roelof Spijker, Martin Scharrer♦Jan 31 '12 at 11:28

Please add an \end{document} to your MWE, and add a whole paragraph or use lipsum since your inquiry is concerning paragraphs; not single lines. –  Ayman Elmasry Jan 31 '12 at 10:31
Welcome to TeX.SX! There is no \parindent and no \paragraph in your code and so the question is not clear. –  egreg Jan 31 '12 at 10:33
Welcome to TeX.sx! This is the most frequent asked LaTeX question ever. Please use the search function next time before asking a question. See the above linked questions which should help you. Also have a look at the questions linked to this listed there at the right sidebar. –  Martin Scharrer Jan 31 '12 at 11:31
Thank you! None of the answers I found to this topic helped me, so I decided to post it anyway. Anyway I've solved my problem by myself: It was some of the specified sizes where bigger than the actual page width, so appart from auto shrinking them they were wrongly positioned. I should've pay attention to those bad boxes the compiler was complaining about... –  elcodedocle Feb 6 '12 at 11:43

Use \usepackage{float} in your preamble, and use [H] option in float/figure environment

\documentclass[letterpaper,draft]{article}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{times}
\usepackage{helvet}
\usepackage{courier}
\usepackage{lipsum}
\usepackage{float}
\title{This is my title}
\author{elcodedocle}
\setcounter{secnumdepth}{0}

\begin{document}
\setlength{\parskip}{10pt}
\setlength{\parindent}{10pt}
\maketitle

\section{This is my section}

\paragraph{Hello}

\lipsum

\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{thisismyimage}
\end{figure}

\lipsum

\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{thisismyimage}
\end{figure}

\lipsum

\end{document}

-
I added \parindent and \paragraph as you specified, but same results: images are shown one after another in the next page instead of between paragraphs. –  elcodedocle Jan 31 '12 at 10:56
OK, so you did add a proper tag, but your question is completely vague. Please see my answer edit. –  Ayman Elmasry Jan 31 '12 at 10:59
@elcodedocle images in figure environments "float" to where TeX thinks they look best. That's what's supposed to happen… –  Seamus Jan 31 '12 at 11:00
@Ayman Elmasry My problem is the images are wrongly positioned. They should appear between paragraphs and instead they appear in the next page after all the paragraphs. You have the exact code I'm using, I cannot be more specific. –  elcodedocle Jan 31 '12 at 11:02
@elcodedocle what I meant is that your original question was not clear. Please modify it to something along the line of "Why are my images not positioned correctly?" and indicate that you want them exactly where the environment is added within the code file. See my answer edit. –  Ayman Elmasry Jan 31 '12 at 11:14