I have prepared an example -- do you think that the white space is too big here?
Example: http://www.bipede.de/Downloads/floating.pdf
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage[demo]{graphicx}
% privides the H option
\usepackage{float}
% produces random text for testing
\usepackage{blindtext}
\begin{document}
\blindtext[2]
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\blindtext[2]
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\blindtext[2]
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\blindtext[2]
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\blindtext[2]
\end{document}
Hello again. I prepared another example. The result can be found here
http://www.bipede.de/Downloads/floating_2.pdf
\documentclass[11pt,a4paper,twoside,openany]{book}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage[demo]{graphicx}
% privides the H option
\usepackage{float}
% produces random text for testing
\usepackage{blindtext}
% Parameters for floating objects in LaTeX
% An overview can be found in the book
% The Latex Companions Chapter 6.1
% A good start is
% http://robjhyndman.com/researchtips/latex-floats/
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.85}
\renewcommand{\textfraction}{0.15}
\renewcommand{\floatpagefraction}{0.8}
\renewcommand{\textfraction}{0.1}
\setlength{\floatsep}{5pt plus 2pt minus 2pt}
\setlength{\textfloatsep}{5pt plus 2pt minus 2pt}
\setlength{\intextsep}{5pt plus 2pt minus 2pt}
\begin{document}
\chapter{Test}
\blindtext[2]
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\section{Test}
\blindtext[2]
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\blindtext[2]
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\section{Test}
\blindtext[2]
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\blindtext[2]
\end{document}
In the example I just used the standard placement option and did not use the H option. You can still use it if necessary. An overview can be found in the book The Latex Companions Chapter 6.1. A good start can also be found here. Also very good - but you have to read a lot - here to be found.
There is also a ! operator: \begin{figure}[!htb]
. It is stronger than [htb]
but weaker than [H]
.
In the example I changed some of the parameters:
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.85}
\renewcommand{\textfraction}{0.15}
\renewcommand{\floatpagefraction}{0.8}
\renewcommand{\textfraction}{0.1}
\setlength{\floatsep}{5pt plus 2pt minus 2pt}
\setlength{\textfloatsep}{5pt plus 2pt minus 2pt}
\setlength{\intextsep}{5pt plus 2pt minus 2pt}
It is a bit of work to understand what each of these parameters mean. You can use my suggestion as a start.
In general, I would worry about the placement when you are near the end and want to 'tidy up'.
Floats can not go backwards, once a page is output it has gone from TeX's memory, a float found on the next page can not affect it, in order to move a float to a previous page you need to make sure the environment is seen by TeX in the source file before the page is shipped out. TeX does not hold the whole document in memory, or even read the whole input file, it reads the file line by line and ships out pages as soon as possible.
Best Answer
The reason LaTeX has floating environments such as
figure
andtable
is to avoid large white space gaps at page breaks by moving the figure to a position which produces a better page break.By using
[H]
you disable the float mechanism so you get the bad page break that latex would have avoided by floating the figure.Depending on the use case and reasons why you used
[H]
you need to accept the space, or move the figure in the source file, rearranging the text so there is more text on the page, or use the float mechanism[htbp]
.If you decide to accept the space, you may prefer
\raggedbottom
so all the excess space comes at the bottom of the page.