# Spacing between caption and section title [duplicate]

this is my first question, I hope I am right here. My problem is, that I have a float that is placed on a new page above a new section, as I want it by using the placeins package. However the spacing between the caption of the figure and the new section is less than the spacing between normal text and a new section, like in this example:

\documentclass{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\usepackage[draft]{graphicx}
\usepackage[section]{placeins}
\usepackage[onehalfspacing]{setspace}
\usepackage{parskip}
\setlength{\parindent}{0cm}

\begin{document}

\section{This is a test}
\blindtext\par
\blindtext
\section{This section has normal spacing above it}
\blindtext
\begin{figure}[htb]
\centering
\includegraphics[width = \textwidth]{test.png}
\caption{This is a caption with a somewhat longer text, therefore I write stuff untill at least one line is full.}
\label{fig:my_label}
\end{figure}
\section{This section has less spacing above it}

\end{document}



How do I change the space between the caption and the section to be the same as between normal text and a section? I already tried adding \vslace, but it didn't work, probably because the float gets set behind the vspace and even if it worked, I wouldn't know, how much space was right. Thank you and best wishes, Jannik

• Welcome to TeX.SE.
– Mico
Sep 3 '20 at 19:41
• Leaving aside that your MWE produce a float in a separate page (add a screenshot of what is supposed to do is always a good idea), what you are looking for is change \textfloatsep.
– Fran
Sep 3 '20 at 19:45
• I think this is not quite what I am looking for. I don't want to change the spacing between all my other figures. It is just in this case, when the float gets set on a new page, the spacing is seemingly just the space, that is always after a caption, but not the space that is normally above a section title. Sep 3 '20 at 20:15
• "I don't want to change the spacing between all my other figures." You can set also \textfloatsep only for a figure or a group of figures (e.g.: {\textfloatsep10em <your float here>}. It s not mandatory change it in the preamble. Although for a single figure some like \vspace{10em} just after the caption or \belowcaptionskip10em` just before the caption also do the job and it is simpler. What else?
– Fran
Sep 3 '20 at 22:00
• Thank you very much, this helped a lot! Sorry if it was just a stupid question. Sep 4 '20 at 2:26