I am writing an article for the first time with Latex, I am using Overleaf as an online editor. I want to avoid unecessary spaces in my article which are the result of figures and adjustment. For example:
We can see how there are many vertical space between the figure and the text, for the next page is the output also in this way:
Solution that I've tried:
- Reduce the size of the image: not optimal because it won't be readable
- Change the float position of the figure from [H] to [h]: it didn't fix the problem, spaces still persist The code used for the first figure and text is :
\begin{figure}[H]
\begin{center}
\setlength{\belowcaptionskip}{0pt}
\includegraphics[scale=0.8]{images/comparison2.png}
\centering
\caption{ORKG Interface for comparison between contribution}
\vspace{-1.5em}
\label{fig18}
\end{center}
\end{figure}
\noindent{ORKG allows users to specify the structure of type's composition to describe research contributions. Templates are used to facilitate the organization of data by adding, editing or deleting attributes and their allocated information. For example, \autoref{fig19} highlights the specification of the features of describing a dataset:}


\raggedbottom? – Markus G. Apr 05 '21 at 12:14\flushbottomoption, if I'm not mistaken. It is the default for a few classes and as in your case can cause weirdly empty pages. Using\raggedbottomthe space reserved for the lines is fixed and all pages filled from top to bottom. Which of these you want depends heavily on the use-case. Typically I put\raggedbottomin the line directly after the documentclass. – Markus G. Apr 05 '21 at 12:36\raggedbottomtells TeX to move everything up, so that the vertical space is below the images and text. What material is coming after the image? What outcome are you wanting? – Teepeemm Apr 05 '21 at 12:38[H]which is a request to get bad spacing (to fix manually) rather than let latex avoid bad spaces. – David Carlisle Apr 05 '21 at 12:43\raggedbottomif you want the baselines not to be the same on all pages. It is like using\raggedrightrather than the default justified right margin, but in the vertical direction. Unrelated but you should not need\noindenthere and never need{...}after\noindent– David Carlisle Apr 05 '21 at 12:56[H]. – Mico Apr 05 '21 at 13:06figureis to specify that the content may be moved to help with page breaking so if you use no option or use[htbp]then the figures will be re-inserted at a better place.[H]disables that so you force latex to give the output you show. – David Carlisle Apr 05 '21 at 13:11