[Tex/LaTex] Avoid vertical spaces before figure to fill the page

floatsspacingvertical

I'm writing a latex document which contains a table. This table is doesn't fit the actual page so it's placed in the next page.

The problem is that vertical spaces are added automatically in the previous page in order to fill the page and I want to avoid that from happening.

I use H in order to add the table figure.

My problem

Best Answer

The reason LaTeX has floating environments such as figure and table 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.

Related Question