# Fix unwanted vertical space in subsection after table

So I am pretty new to latex. In my appendix I have a subsection, with a table that needs to be in this section, so I have used the H flag. This looks fine, but the following subsection has a lot of vertical space between the header and the text. As does the next paragraph.

I have tried changing to a h flag.

Removing the table "fixes" the formatting, so I know it is the problem. Thanks in advance.

Sorry for the noob formatting. But this is an accurate depiction of what my (share)latex file looks like.

\subsection{Choice of digital libraries}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\begin{table}[H]
\centering
\begin{tabular}{ |c|c| }
\hline
Source & URL \\
\hline
ACM Digital libary & an url \\
Engineering village & an url \\
Scopus & an url \\
ScienceDirect & an url \\
IEEE Xplore & an url \\
Web of Science & an url \\
\hline
\end{tabular}
\caption{Digital libraries and databases used in the SLR.}
\label{tab:digitalLibrarires}
\end{table}

\subsection{Relevant studies}
\label{sec:search}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

• the point of allowing tables to float is to avoid bad spaces at page breaks, so by disabling floating with [H] you are opting in to worse spacing. presumably (impossible to say as you haven't shown any relevant code) you have \flushbottom in effect so latex has to make the last line of the page go to the bottom, and if the only stretchy space is after the heading that has to stretch. perhaps you want \raggedbottom – David Carlisle Dec 6 '16 at 18:24
• Moved my comment to answer the question :) – MoeRum Dec 7 '16 at 11:01