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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the caption package and have a relatively small table with a caption above with a short final line. In the the case of the equation environment, it will spot this and move the equation up if it detects no overlap between the bottom line of the text above and the equation. I'm hoping there is some similar setting or package to make this happen for floats (specifically tables). I can apply a correction manually with \vspace{-0.3cm} but this seems rather ugly.

I'm using the caption package here, here is some code to demonstrate



    \caption{Hello how are you today, wibble wobble, words, more words and stuff'n stuff.}
    \begin{tabular}{c c}
        wib & wob \\
        1   &  2  \\
        8   &  7  \\


Many thank for any help!

share|improve this question

It is a built-in feature of TeX that the vertical spacing before (and after) displayed equations depends on wheter or not these equations overlap the last line of the preceding paragraph. (For details see The TeXbook, p. 189.) As far as I know, no comparable spacing distinction has been implemented in LaTeX for float captions or other document elements. Some evidence (obviously not conclusive):

  • The description of the skip option of the caption package (p. 13 of the documentation) doesn't mention such a spacing distinction.

  • On p. 684 of With LaTeX into the Nineties, Frank Mittelbach talks about a "design limitation" for the list environment:

    The vertical space preceding the first item does not depend on the length of the last line of the preceding paragraph (as is the case for displayed equations).

Although I personally prefer fixed vertical spacing between float caption and float content proper, I agree that a package that implements an equation-like spacing solution would come in handy.

share|improve this answer
Based on an online version of the TeXbook, possibly you intended to say p. 198. At least this is where the relevant materials appears to be in my version. – aghsmith Jun 3 '11 at 10:50
@aghsmith: I re-checked, but it is p. 189 in my printed version. – lockstep Jun 3 '11 at 11:03

Your Answer


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.