# Mismatch between code and position of figures with LATEX [duplicate]

I use the following code to add figures:

\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{orig.png}
\caption{pic}
%\label{fig:awesome_image}
\end{figure}


However the figure doesn't appear where it should. For example:

\subsection{A}

\subsubsection{a}

text

[the figure code]

\subsubsection{b}

text

[This is where the figure shows up]

\subsection{B}


What could be the problem? Thanks.

## marked as duplicate by Werner, Adam Liter, Masroor, user31729, David CarlisleJun 27 '14 at 16:22

• try using \begin{figure}[htp] instead. The h part is missing in the default (which is the same as tbp). – daleif Jun 27 '14 at 15:18