I've got table and figure environments, some placed "here" with h and some arranged automatically. But all together I don't like the spacing above and below the figure and table environments.

I searched the internet and found tips to set abovecaptionskip and belowcaptionskip. Well since my tables and figures all have a caption below the actual table/figure belowcaptionskip allows me to set the \vspace between table/figure and the following text. But abovecaptionskip obviously just gives me \vspace between the table/figure and the caption, but not between the above text and the table/figure.

How to set the \vspace above and below table/figure correctly then?


You are probably looking for the length \intextsep (at least). This is the space that is inserted to separate floats from the surrounding text.


One way would be to simply add the desired \vspace before and after:

enter image description here


    \caption{Figure: foo}
  • Also works for a negative space, as I have just found out. – henry Oct 12 '14 at 21:06
  • underrated answer! +1 – Georges Oct 21 '16 at 5:13

etoolbox can be used to add content at the start/end of an environment automatically. The following minimal example adds (up to) 5mm to the top and bottom of the figure environment (via \addvspace{5mm}).

enter image description here

\usepackage[demo]{graphicx}% http://ctan.org/pkg/graphicx
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
  \caption{This is a caption.}
  \caption{This is a caption.}

The advantage with using \addvspace is that it only adds enough, making figures that end up on top of one another not add double the amount of space. See the \addvspace{<len>} documentation.

  • Hm, I get "undefined control sequenc" when I add the etoolbox package and use the AtBeginEnvironment.. – Meinzlein Dec 15 '11 at 18:22
  • @Meinzlein: You need to be a little more specific than that, since etoolbox recently added those patching commands. The most recent version of etoolbox on CTAN is v 2.1 2011/01/03. To see yours, add \listfiles before \documentclass and find the etoolbox entry after **File List** in your .log file. – Werner Dec 15 '11 at 18:33
  • Not working here either, inside a beamer class, probably interference with some other stuff I have... – PatrickT Apr 16 '18 at 19:57
  • @PatrickT: You can probably forego using figures inside a beamer presentation, as no-one would necessarily remember figures numbers associated with a \caption. Instead, name the figures or just use a center environment to place and caption them. – Werner Apr 16 '18 at 20:13
  • @Werner. Thanks. The figure, table and center environments create too much space when they are immediately below the frametitle. I often use the caption (without numbers), typeset in smaller font, so it's more convenient than a center environment. My workaround is adding \vspace{-1em} but I was looking for a more general fix. Your approach looked very promising. I don't really have time to make a MWE and post a question, so I'll stay with negative vspace for now. Thanks! – PatrickT Apr 16 '18 at 20:35

Try adjusting the parameter \intextsep.


Insert \vspace{} above \begin{table}

The example below adds 10mm of space above the table.

\vspace{10 mm} % add some space above the table

\centering % used for centering table
\begin{tabular*}{0.7\textwidth}{ l r } % centered columns (2 columns)
\hline\hline %inserts double horizontal lines
Category & Score \\ [0.5ex] % inserts table heading
\hline % inserts single horizontal line
a & b \\ % inserting body of the table
c & d \\
e & f \\
g &  h \\ [1ex] % [1ex] adds vertical space
\hline %inserts single line
% \caption{What a great table}
% \label{table:scores} % is used to refer this table in the text
  • 4
    Welcome to TeX.SX! While this can work if the float can respect the h option, it will leave an unwanted vertical space if the float must be moved. – egreg Jul 1 '13 at 9:22

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.