I am writing a thesis and I would like to add an image in a specific place in a chapter.
\begin{figure}
\begin{center}
\includegraphics[scale=0.7]{MC}
\caption[Diagram.]{\label{mc_label}Diagram.}
\end{center}
\end{figure}
Generally the code above works, but the problem is that the compiler adds this image at place, "where he wants to add it" (I think it is associated with the formatting), not at that place, where I would like to add it. I was looking for the solution in the Internet and I founded that I can add something like this:
\begin{figure}[!h]
\begin{center}
\includegraphics[scale=0.7]{MC}
\caption[Diagram.]{\label{mc_label}Diagram.}
\end{center}
\end{figure}
"[!h]" -> I thought that it should work, but it didn't. Thanks for help.
This is the template, which I am using:
https://drive.google.com/file/d/0BwyOySLlDTB_a3R5aFZQNzVFRG8/edit?usp=sharing

figureenvironment, and use the command\captionof{figure}{...}instead of\caption{...}. You need the\usepackage{caption}in your preamble. This prevents floating figures. It will however be shifted to the next page anyway, if there's too few space on the current one – Aug 17 '14 at 10:19\documentclass{...}and ending with\end{document}. – Aug 17 '14 at 10:21