67
\documentclass{mwrep}

\usepackage[draft]{graphicx}
\usepackage{hyperref}
\usepackage[all]{hypcap}

\makeatletter
\g@addto@macro\@floatboxreset\centering
\makeatother
I use figures with captions.

\begin{document}

\listoffigures

\chapter{foo}

First paragraph (previous).

\begin{figure}[h]
  \includegraphics{a.jpg}
  \caption{Opis}
\end{figure}

Second paragraph (following).

\end{document}

How can I change vertical space (padding?) between caption and following paragraph? Also, I want to change (increase a little) space between previous paragraph and top of image.

68

You could change \belowcaptionskip, for example:

\setlength{\belowcaptionskip}{-10pt}

For further customizations I recommend using the caption package. It provides a lot of features and is very well documented. If you're using the caption package, you can set the spacing as:

\captionsetup{belowskip=0pt}
  • Thanks to yours and Mikael's answer I was able to set caption spacing to my needs. But still I don't know how can I increase space between paragraph and figure that is below it. – Ichibann Jul 17 '11 at 20:28
  • 2
    You can raise the length \intextsep by \addtolength or \setlength. – Stefan Kottwitz Jul 17 '11 at 20:32
  • 2
    Where should this command go? Inside the figure environment? – Royi Jun 4 '17 at 21:05
  • 1
    Yes. You can place it right before the \caption{} line. For eg: \begin{figure} \centering\includegraphics[]{my_figure.png} \setlength{\belowcaptionskip}{-8pt} \caption{my_caption} \label{my_label} \end{figure} – Benny Nov 18 '17 at 18:14
  • I'm getting ! Undefined control sequence. <argument> \belowcaptionskip Do I need to include some package? – Alec Jacobson Jun 7 at 19:04
98

You can modify the following lengths, which affect all floats.;

  • \floatsep: space left between floats (12.0pt plus 2.0pt minus 2.0pt).
  • \textfloatsep: space between last top float or first bottom float and the text (20.0pt plus 2.0pt minus 4.0pt).
  • \intextsep : space left on top and bottom of an in-text float (12.0pt plus 2.0pt minus 2.0pt).
  • \dbltextfloatsep is \textfloatsep for 2 column output (20.0pt plus 2.0pt minus 4.0pt).
  • \dblfloatsep is \floatsep for 2 column output (12.0pt plus 2.0pt minus 2.0pt).
  • \abovecaptionskip: space above caption (10.0pt).
  • \belowcaptionskip: space below caption (0.0pt).

Source

  • 7
    +1, but it would be handy if you added the default values of these lengths to your answer. – lockstep Jul 17 '11 at 20:11
  • 4
    @lockstep: Done, (at least for article class). – Mikael Öhman Jul 17 '11 at 22:04
  • \addtolength{\textfloatsep}{-0.2in} is the correct answer as you rightfully mentioned. – Amir Nov 2 '18 at 19:17

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.