Is there some way to let Latex set the figure position together with inserting page breaks in order to have the image in close proximity to where it is referenced?
I am writing a large document with multiple figures and when I place them using \usepackage{float} with [H], Latex inserts a lot of ugly large white spaces between paragraphs all through the document.
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{figures/example_fig.png};
\caption{Example fig.}
\label{fig:example}
\end{figure}
When I instead of using [H] use [!htbp], as there are multiple figures, the figures are located in strange locations, far away from where they are referenced in the text.
I am wondering if there is some command to let Latex insert a few page breaks with instead of MANY large white spaces between paragraphs as with \usepackage{float} with [H].
I understand that the work around is to manually insert \newpage together with [H]. However, this implies a lot of manual work and many re-compilations.
\begin{figure}, ignore how they are placed and ignore also ugly spaces. Worry about this when the text is finished to avoid to spent lots of time for an optimization that is lost at the next change of text. – Ulrike Fischer Sep 04 '22 at 14:08[H]is an explicit request to use ugly white space, only use it if you intend to move text by hand to get good page breaks. – David Carlisle Sep 04 '22 at 16:38!it is useful in special cases to over-ride the constraints, but it makes no sense to set constraints to ensure good output then ignore them in all cases by using!every time. – David Carlisle Sep 04 '22 at 16:43