0

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.
  • 2
    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
1

Ok, so after reading David Carlisle comment i realized that the table above \subsection{Relevant studies} wasn't the real problem. The problem is another table i did not include in the example (using the H flag). It is located under the last Lorem ipsum. It was to lage to fit on the page with relevant studies. This, as you said forces the text to stretch the page. \raggedbottom fixed this, but of course it left blank space at the bottom of the page. What worked better for me was to insert the table i did not include, in between the two Lorem ipsum. Thanks for the help :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.