1

I want to reduce the padding between figures and text. I know I can achieve this using \setlength{\belowcaptionskip}{-7pt} but this will reduce the padding of all figures. How can I accomplish this only for certain figures?

5
  • 1
    Could you please post a code reproducing your problem?
    – Bernard
    Aug 27, 2019 at 21:17
  • Since you haven't provided the code source, you can simply use ~\\[10pt] (or whatever the appropriate spacing amount) right after your \end{figure}. Aug 27, 2019 at 21:20
  • To locally change the value of \belowcaptionskip use it inside of the figure environment.
    – leandriis
    Aug 27, 2019 at 21:27
  • Add \vspace{<len>} (where <len> is negative) before your \caption.
    – Werner
    Aug 27, 2019 at 21:34
  • Just in case: wouldn't this padding due to using \begin{figure}\begin{center} ... \end{center}\end{figure}, instead of \begin{figure}\centering ... \end{figure}?
    – Bernard
    Aug 27, 2019 at 22:50

1 Answer 1

2

You can insert a negative \vspace at the end of the image insertion - this will result in moving the caption up by the given amount, visually "reducing" the image size.

enter image description here

\documentclass{article}

\usepackage{graphicx,lipsum}

\begin{document}

\begin{figure}[t]
  \centering
  \includegraphics[height=10\baselineskip]{example-image-a}
  \caption{This is a figure caption.}
\end{figure}

\lipsum[1-7]

\begin{figure}[t]
  \centering
  \includegraphics[height=10\baselineskip]{example-image-b}
  \vspace{-5\baselineskip}% Reduce image height
  \caption{This is a figure caption.}
\end{figure}

\end{document}

The same can be achieved with adjustbox using its vspace = <above> <below> option.

\usepackage[export]{adjustbox}
% ...
\includegraphics[vspace=0pt -5\baselineskip,height=10\baselineskip]{example-image-b}

This can be done an a figure-by-figure basis.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .