Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Both \abovetopsep and \belowbottomsep are 0.0pt. But for some reason there's extra space between the bottom rule and "my second caption" in the table below.

Q: What is that space? Where does it come from?

Ultimately, I'd like to do the following:

\setlength{\abovetopsep}{<the width between the bottom rule and "my second caption">}

so that there's some uniformity in the vertical placement of captions above and below tabulars.

Q: Is there another, maybe more standard, method for doing this?

\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{table}
  \centering
  \caption{my first caption}
  \begin{tabular}{ll}
    \toprule
    foo & bar \\
    \midrule
    baz & bog \\
    \bottomrule 
  \end{tabular}
  \caption{my second caption}
\end{table}
\end{document} 

tab1

share|improve this question
    
booktabs has nothing to do with captions. –  egreg Jan 22 '12 at 20:12
    
Your code features something that's quite unusual: you have only one tabular environment (and one table environment) but two captions. What are you trying to achieve? One can assign labels to LaTeX captions, which can then be cross-referenced; are you trying to be able to create separate cross-references (e.g., Table 1 and Table 2) to the same floating object? Separately, you may want to develop a style for your paper(s) such that table captions are located either all above or all below the tabular material. –  Mico Jan 23 '12 at 2:03
    
@Mico. I only did that to demonstrate the difference in spacing between captions above and below a tabular. I only intend to have my captions above the tabular. Sorry for the confusion. –  lowndrul Jan 23 '12 at 16:34
add comment

1 Answer

up vote 6 down vote accepted

Ad 1: As egreg has commented, booktabs has nothing to do with captions. The standard document classes article, book, and report define the lengths \abovecaptionskip (default value: 10pt) and \belowcaptionskip (default value: 0pt). \abovecaptionskip is responsible for the space in your example.

Ad 2 : Have a look at the caption package, especially at section 2.6 "Skips" of its manual.

share|improve this answer
    
There are two lengths in booktabs, \abovetopsep and \belowbottomsep that can change the caption spacing. Their default values are zero, but \abovetopsep can be set to the same value as \abovecaptionskip resulting in the same space for captions above and below a table. –  Danie Els Jan 23 '12 at 7:46
    
@lockstep: great suggestion. I'm now using \usepackage[tableposition=top]{caption} to get the desired result. –  lowndrul Jan 24 '12 at 2:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.