Figures three spaces after and before text

floatsspacing

For my dissertation I'm required to place the floats with a space of three lines after and three lines before the text. Is there a way to do this other than manually inserting the paragraph breaks before and after?

Best Answer

Here are the lengths associated with vertical spacing around floats (from the layouts package, section 6.2 Detailed float layout):

enter image description here

You should be able to set the lengths \textfloatsep and \intextsep (possibly also \floatsep) to 3\baselineskip - the equivalent of three lines of text:

enter image description here

\documentclass{article}

\usepackage[margin=0.5in]{geometry}% Just for this example
\usepackage{lipsum}

% For reference, here are the defaults, from the LaTeX kernel:
%  https://www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/base/latex.ltx?view=co
% \setlength\floatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
% \setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
% \setlength\intextsep   {12\p@ \@plus 2\p@ \@minus 2\p@}

% Adjust vertical separation between floats and...
\setlength{\floatsep}{3\baselineskip}% ...other floats
\setlength{\textfloatsep}{3\baselineskip}% ...text above or below
\setlength{\intextsep}{3\baselineskip}% ...text above and below

\begin{document}

\begin{figure}[!thb]
  \caption{A top figure}
\end{figure}

\lipsum[1-3]

\begin{figure}[!htb]
  \caption{An in-text figure}
\end{figure}

\lipsum[4-5]

\begin{figure}[!b]
  \caption{A bottom figure}
\end{figure}

\lipsum[6-9]

\end{document}

Note that the default lengths for these have some shrink/stretch to accommodate for the vertical page construction to have some flexibility. You may consider adding those back, although it may reduce your three lines of space slightly on some pages.

Related Question