I have the code for a table between two blocks of texts (of multiple paragraphs). When the text is single-spaced, there is no problem; however, when I doublespace the text using setspace
and singlespace the table, a longer gap is evident between the paragraphs where the code for the table is in the .tex file (the table is printed on the following page):
\documentclass[12pt]{article}
\usepackage{lipsum}
\usepackage{setspace}
\begin{document}
\begin{doublespace}
\lipsum[1-2]
\begin{singlespace}
\begin{table}[t]
\begin{center}
\begin{tabular}{|c|c|}
Left & Right\\
Hello & Goodbye\\
\end{tabular}
\end{center}
\end{table}
\end{singlespace}
\lipsum[1-2]
\end{doublespace}
\end{document}
Below you can see the longer (slightly, though noticeable) gap preceding the "Lorem ipsum..." paragraph, which is where the code for the table is:
\raggedbottom
. Random unwanted space between paragraphs – Johannes_B Oct 22 '14 at 14:30singlespace
environment itself places some whitespace. Put the invironment inside thetable
. – Johannes_B Oct 22 '14 at 14:36