# How to place a figure exactly where I would like to? [duplicate]

I have downloaded the package float in order to help in placing figures where I would like them. At the moment, 'All' figures are placed at the 'end' of document.

I have run the script 'float.dtx.

Subsequently, the [H] option has been inserted as seen below example; however, nothing has changed and the figures still appear at the end of document.

Does any one have an idea as to what is needed to activate the float programs appropriately or as to how to implement them?

Thank you.

%%%%% Inserting figure %%%%%%%%%%%%%%

\begin{figure}[H]
\begin{center}
\maketitle {\bf Title}
\includegraphics[scale=0.9]{Figure}
\caption{Explanatory statement}
\label{}
\end{center}
\end{figure}


## marked as duplicate by user13907, Mico, Paul Gaborit, Zarko, Tom BombadilNov 22 '15 at 11:34

• Hi and welcome! Please provide a minimal working example (MWE). – MattAllegro Nov 22 '15 at 8:18
• Welcome Anna, what is \maketitle supposed to do in the figure environment? It usually typesets the dcuments title including your name and the date. – Johannes_B Nov 22 '15 at 8:42
• Apart from that, the command \bf is obsolete and should be replaced by \bfseries. The center environment adds extra vertical space, that you most likely not want. You can replace it by \centering. – Johannes_B Nov 22 '15 at 8:43
• Did you put \usepackage{float} after documentclass? – Johannes_B Nov 22 '15 at 8:45
• @Johannes_B no:-) – David Carlisle Nov 22 '15 at 10:52

Why do you need the float package ?

\documentclass{article}
\usepackage{graphicx}

\begin{document}

\begin{figure}[!htbp]
\centering
\includegraphics[width=.5\textwidth]{fig}
\caption{Explanatory statement \label{fig:fig1}}
\end{figure}

\end{document}

• that does not ensure that the figure is placed exactly here. – Johannes_B Nov 22 '15 at 8:44
• Yes, but the main problem here was I quote: "All' figures are placed at the 'end' of document", therefore it preferably not advised to use H ... if 'exactly here' is needed then why use a floating env ? see here: tex.stackexchange.com/a/8631/75098 – neok Nov 22 '15 at 9:19
• @neok H floats wil never go to the end of the document if H is defined. So the OP had not loaded the float package. – David Carlisle Nov 22 '15 at 10:52

Your demand is against to basic rule of TeX/LaTeX: figures and tables (and similar object) should be in float environments that can be moved to place, where the best fit into the text ...

To achieve, what you like, is the simplest way not to use floats. Just put figure directly in text and for caption use \captionof from package caption or small package captionof when you like to use caption formatting facility of used document class:

\documentclass{article}
\usepackage{graphicx}
\usepackage{capt-of}

\usepackage{lipsum}

\begin{document}
\lipsum[1]
\begin{center}
\includegraphics[width=0.5\textwidth]{example-image}
\captionof{figure}{My caption}
\label{fig:mc-1}
\end{center}
See Fig.~\ref{fig:mc-1} ...
\lipsum[2]
\end{document}


• s/captionof/capt-of/ in the middle of the text ;-) – Johannes_B Nov 22 '15 at 10:10

You can use the [!h] instead of [H] to make it better,

  \begin{figure}[!h]
\centering
\includegraphics[width=\textwidth]{pictures/mypicture.png}
\caption{mypicture}
\label{fig:mypicture}
\end{figure}