I'm trying to add a new image to my document but whenever I add an image and there is no enough space for this image I have a white space in the previous text. my code:
Exampel text bla bla bla
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.6\textwidth]{image.JPG}
\caption{Modellierung der Trajektorien \cite{example}}
\label{fig: example}
\end{center}
\end{figure}
figureenvironment is that it is allowed to “float” in order to avoid pagination problems. With[H]you're overriding the mechanism. Don't, use[htp]. And nocenterenvironment, but rather the\centeringdeclaration. – egreg Apr 04 '21 at 15:09centerenv to center inside floats. It add vertical space above and below, as does e.g. thefigureenv. Replace\begin{center}with\centeringand remove\end{center}. Personally I would also recommend not having spaces in labels. – daleif Apr 04 '21 at 15:13[H]is an explicit request to get bad white space rather than allow the float to be floated (moved) – David Carlisle Apr 04 '21 at 15:18\labelyou place. So useSee Figure~\ref{fig: example}. This way the paper is being used most efficiently. – daleif Apr 04 '21 at 15:25