# Table spacing problem with {caption} package

I use the caption package for its possibility to reduce the figure and table caption margin and was happy with it. However, I just found out that it also causes some unwanted changes to the caption spacing.

My problem is best described with pictures. Here you can see the spacing of the caption with the caption package:

and

And now without the caption package:

and

As you can see in the images, the package either messes up the spacing of the figure or table, depending if I use it or not.

This is the code that I use:

``````\usepackage[margin=1cm]{caption}
``````

Any ideas how I can prevent this inconsistency?

It doesn't mess up any spacing. It simply does what basic LaTeX should (and doesn't) do. Here is an explanation: two skips are associated to `\caption`: `\abovecaptionskip` and `\belowcaptionskip`. When the caption is below the float, \abovecaptionskip has some value (`10pt`, if I remember well, in standard classes) and \belowcaptionskip is `0pt`. When the caption is above the float (normal position for tables), these values should be exchanged.

Thus `caption` sets the normal behaviour: a small vertical skip between caption and float. Of course, if you think the skip is too large, you can set it to another values, with

``````\captionsetup[table]{skip=6pt}
``````

for instance.

• Thank you for your answer @Bernard - I really like what the caption package does to the spacing in tables, but I don't like the reduced spacing in figures. So after reading your answer, what I want to do is to restore the default spacing for figures only. Do you know what the equivalent `{skip=Xpt}` is? Dec 28, 2016 at 15:41
• To add on my previous answer: You say `10pt` is the default. I presume this is with the caption package, because without it the spacing looks a bit larger. Dec 28, 2016 at 16:02
• No, it is the default values in the `article`, `report` and `book` classes. In the case of figures, it may happen there's white spaces around the figure, and you may think this white space is part of the skip. To check, add a frame to your figure (e.g. with a simple `\fbox`) and measure the distance between frame and caption (most pdf viewers have a tool for that). Dec 28, 2016 at 19:15
• Here an image. I think one can see the difference in spacing with the bare eye (upper one is with caption package, lower one without). If I understand correctly, you're saying that in the lower one, some white space is part of the skip and with `\capture` this extra space is removed? Dec 29, 2016 at 3:43