17

I am writing one article in which i need to write one image and its caption. I found space after caption seems to be more than normal.

  \begin{figure}[!ht]
  \centering
  \includegraphics[width=0.7\linewidth]{image1.jpg}                   
  \caption{\textcolor{gray}{\footnotesize \textit{ImageCaption}}}
  \end{figure}
   This is first text after caption.

How can i reduce the space between caption and text?

lockstep
  • 250,273
manish
  • 9,111
  • 3
    What other packages are you loading? If you're using caption, perhaps setting \aftercaptionskip would work. Otherwise, \intextsep or \textfloatsep (see the layouts package documentation; section 6.1 Float and text page layout, p 25). – Werner Feb 27 '13 at 07:36
  • 1
    Yes, I am using caption package but \aftercaptionskip does not seem to be working. – manish Feb 27 '13 at 07:51
  • 4
    If you use the caption package the correct command is \captionsetup{belowskip=0pt}. But since this is the default value something is going wrong at your document. But to find out we need an MWE from you. –  Feb 27 '13 at 07:53
  • @AxelSommerfeldt: \captionsetup{belowskip=0pt} does not seem to be working fine. – manish Feb 27 '13 at 07:57
  • 8
  • 2
    Does \raggedbottom help? (put it in your preamble) – JLDiaz Feb 27 '13 at 08:18
  • 2
    am i right: you're worried about the space between the bottom of the figure float and the following text? -- that may not be anything to do with the caption itself (caption package’s \belowcaptionskip is zero by default, iirc). between the bottom of the float and the following text \intextsep is added, which is 12pt by default: try setting that to 0pt and see whether that helps. – wasteofspace Feb 27 '13 at 09:53
  • 3
    I would really suppose that someone who has asked 25 questions before would know how a question should look like and what MWE means. Just a comment: IMHO putting \textcolor, \footnotesize and \textit manually into the caption text shows a lack of concept. The package caption that you claimed you use provides a lot of \caption customization on the document level, so that it applies consistently to all captions. – yo' Feb 27 '13 at 12:58
  • @JLDiaz it does, but why ? consider adding as an answer – Ciprian Tomoiagă Mar 29 '18 at 00:03
  • 2
    @CiprianTomoiagă Apparently I cannot answer. The question was closed as duplicate. The reason \raggedbottom helps is that it allows TeX to use empty space at the end of each page. By default, TeX tries to align the bottom line of all pages to the same point, and this is achieved by inserting extra vertical space among some elements, such as equations, figures, captions, etc. \raggedbottom removes the inter-paragraph spacing and accumulates it at the bottom of the page, instead, much as MS-Word does, for example. – JLDiaz Mar 29 '18 at 20:09

1 Answers1

25

A quick way would be to use \vspace{} with negative length as input. However, this is not the right approach and is not recommended for use.

Without using vspace the output would look like: without vspace

Here is a MWE with vspace and negative length as input followed by the output.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{xcolor} 

\begin{document}

 \begin{figure}[!ht]
  \centering
  \includegraphics[width=0.5\textwidth]{image}                   
  \vspace{-1em}
  \caption{\textcolor{gray}{\footnotesize \textit{ImageCaption}}}
  \vspace{-1.5em}
  \end{figure}
   This is first text after caption.

\end{document}

Note how the use of vspace after the figure and after the caption shrinks the space.

with vpsace

Umar Kalim
  • 1,139
  • 11
    The OP gave no working example, but stated that the problematic extra space was "after [the] caption". Also, it seems bad practice to manually (and possibly multiple times) correct the spacing in the document body instead of looking for a solution applicable (once) in the document's preamble. – lockstep Feb 27 '13 at 10:00
  • Thanks @lockstep. I realize that this may not be the right way to solve the problem. – Umar Kalim Feb 27 '13 at 20:29
  • If \begin{figure*} is used vspace only deletes space from one column not the both – alper Dec 12 '22 at 19:06