Why is it that, when I insert my figure with \begin{figure}, it is placed at the beginning of the paper ?

Asked
Active
Viewed 1.8k times
1
Sileo
- 307
Hayet Jochebed
- 11
- 1
- 1
- 4
2 Answers
3
You need to specify [H] like the code below
\begin{figure}[H]
\centering
\includegraphics[width=0.95\textwidth]{image.png}
\caption{Caption.}
\label{fig:image1}
\end{figure}
Add \usepackage{float}
Pablo Díaz
- 248
- 1
- 6
-
2You should mention that by default
[H]will give an error! LaTeX Error: Unknown float option \H'.` – David Carlisle May 10 '20 at 16:33 -
1Your answer is misleading. In the case, that ina document preamble you load package
float(which defineH), figure can still appear at the top of page (for example, if on the page is not enough space for figure, it is pushed to the next page and left empty space on the previous). – Zarko Oct 09 '20 at 05:41
0
So, the way i fixed this was by using center instead of figure:
\begin{center}
\centering
\includegraphics[width=0.95\textwidth]{image.png}
\caption{Caption.}
\label{fig:image1}
\end{center}
-
-
What happens with the
\caption? Does it still print correctly as a figure caption? – Werner May 11 '22 at 15:59 -
figureenvironment is to allow the figure to be moved to help with page breaking. – David Carlisle May 09 '20 at 17:31\includegraphicsincludes the image. You haven't shown any code but presumably you wrapped it in\begin{figure}..\end{figure}that environment doesn't do anything to do with including images, it just marks the region as a float that can be moved and re-inserted at another place to help with page breaking. – David Carlisle May 09 '20 at 22:16