# Center float vertically in space at the end of a page

I have half a page of text, followed by a short table under it, followed a large table on the next page. The short table is placed at the bottom of the page under the half page of text which is leaving a large space in the page. Is it possible to align the float in the middle of the space instead so that it looks better?

Since you're interested in particular float placement, the float package's [H]ere placement option can be of help.

Place the table-in-question within a \vfill spacing on both sides:

\documentclass{article}
\usepackage{lipsum,float}

\begin{document}

\lipsum[1-7]

\vfill

\begin{table}[H]% This table will not float
\centering
\rule{.8\textwidth}{7\baselineskip}
\caption{A very small table.}
\end{table}

\vfill

\clearpage

\begin{table}[t]
\centering
\rule{.8\textwidth}{.4\textheight}
\caption{A very large table.}
\end{table}

\lipsum[8-15]

\end{document}


You can adjust LaTeX's bottom float area so that the floats are centred in the space, thanks to Werner for the MWE:-)

\documentclass{article}
\usepackage{lipsum,float}

\makeatletter

\def \@cflb {%
\let\@elt\@comflelt
\setbox\@tempboxa \vbox{}%
\@botlist
\setbox\@outputbox \vbox{%
\unvbox\@outputbox
\vfill
\botfigrule
\unvbox\@tempboxa
\vskip -\floatsep
\vskip0ptplus2fill\relax
}%
\let\@elt\relax
\xdef\@freelist{\@freelist\@botlist}%
\global \let \@botlist\@empty
}

\makeatother

\begin{document}

\lipsum[1-7]

\vfill

\begin{table}[b]% This table will  float
\centering
\rule{.8\textwidth}{7\baselineskip}
\caption{A very small table.}
\end{table}

\vfill

\clearpage

\begin{table}[t]
\centering
\rule{.8\textwidth}{.4\textheight}
\caption{A very large table.}
\end{table}

\lipsum[8-15]

\end{document}