[Tex/LaTex] How to use \abovetopsep (to add space between a table’s caption and tabular part)

booktabscaptionsspacingtables

I read in the documentation of the booktabs package that \abovetopsep can be used to add some space between a table and its caption (instead of the lower-level \vspace{}). However, the exact placement of that option is not clear (at least to me). Is it standalone? Is it an attribute of toprule?

After a few attempts, all failing with "Missing number, treated as zero" it's clear I don't know where to put it. I'm not going to list them as they are obviously incorrect.

Best Answer

\abovetopsep is a length macro. Use \setlength to modify it, place that in your preamble. For example:

\setlength{\abovetopsep}{1ex}

This space would be added above the line made with \toprule. If you specify the length in your preamble, no change within a table environment is required. Jut put the caption above, the space by \abovetopsep will follow automatically, then comes the toprule. A \midrule, also if placed at the top, would ignore this space.