I use beside captions placed in a large margin area. Sometimes, the caption text is taller than the figure and this causes too much vertical space around the figure.

I'd like the effective height of the figure to ignore the height of the caption text in the margin. Just some vertical space around the figure as if the caption was not present. Because the caption is over in the margin, it's fine if caption text vertically overlaps the body text.

How can this be done? I'd like a way to do this such a that I do not need to hand tune each instance.

[EDIT 1] Fixed example code that only worked under xetex.

[EDIT 2] Updated sample problem PDF and showed fixed version using TH's cool \smashcaption.

Many Thanks!

Here's a really extreme example of the problem:

% Set page layout geometry
% The asymmetric option keeps the margin notes always on the same side of the page which is the way Tufte does it.
    headheight=0.5in, % needs to be big enough for the Intel logo graphic



  \caption{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus
elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum
gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate
a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi
tristique senectus et netus et malesuada fames ac turpis egestas. Mauris.}

Here's what it looks like:

          problem before

Now with TH's \smashcaption fix:

          Fixed version

  • Your example doesn't compile for me.
    – TH.
    Mar 25, 2011 at 22:58
  • Without more info about your problem, this comment is not useful.
    – srking
    Mar 25, 2011 at 23:03
  • When I copy the code into a new document and try to compile it. I get the error ! Package floatrow Error: Undefined float separator 'marginparsep'.
    – TH.
    Mar 25, 2011 at 23:18
  • Yes, I see that too now. Works under xetex (my default), but nothing else. Will correct.
    – srking
    Mar 25, 2011 at 23:24
  • I removed the excessive whitespace from your images. Mar 26, 2011 at 22:27

1 Answer 1


Commenting out the line that causes your example to not compile, here's a solution. Define a new macro \smashcaption as follows.

                \vbox to\z@{%

Now replace \caption in your code with \smashcaption and you get what I believe you want.

  • Works really well! Thanks TH! Your macro will give me something to study as well.
    – srking
    Mar 25, 2011 at 23:35
  • @srking: You can also just make that redefinition globally if you want. Then all \captions will have that effect.
    – TH.
    Mar 26, 2011 at 0:11
  • My example neglected to mention I was using the caption package. I am trying to recreate the formatting like so but it's still not formatted correctly: % {\captionlabelfont ##1}{\space\textendash\space}{\captiontextfont ##2}%
    – srking
    Mar 26, 2011 at 4:31
  • @srking: Does replacing my ##1: ##2 with that not work? I'd expect it to.
    – TH.
    Mar 26, 2011 at 8:08
  • @TH - It seems that the caption package doesn't provide a means to extract the effective caption formatting. For example, \captionlabelfont correctly made the font boldface, but not the correct size. I ended up just rebuilding my simple format from scratch. In my case: \small{\textbf{##1}{\space\textendash\space}##2}. It took me two hours to debug line spacing problems in the paragraph due to \small fontsize inadvertently not being in effect at the end of the statement. I think your smash option would be a nice addition to the caption package. Cheers.
    – srking
    Mar 26, 2011 at 15:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .