I'm using wrapfig for the first time, and having a problem with its alignment of captions. As far as I can figure, what seems to happen is: if a caption is short enough that it fits it a single line of the figure, then instead of getting horizontally centered within the figure, it gets horizontally centred within a full \textwidth, starting at the left-hand edge of the figure, so it ends up way too far to the right (even off the page, if the figure is narrow). Below is a minimal counterexample.

Am I doing something silly that I should fix? Or if not, is there a good workaround?


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam congue, turpis nec dignissim condimentum, lorem elit sodales justo, ut feugiat erat libero mollis diam. Phasellus ac dolor vel quam vehicula pellentesque quis vel purus. 

No problem.
\caption{Long captions align correctly.}

In scelerisque, metus in convallis pulvinar, massa lacus condimentum tortor, ut mattis sapien libero quis diam. In eu diam pulvinar quam tempor suscipit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

\caption{But not short!}

Duis luctus est ligula. Proin fermentum risus id mauris rhoncus vestibulum. Pellentesque vel leo elit. Cras tempus rutrum dui, vitae lobortis lorem egestas a. Vivamus suscipit commodo lectus vel aliquet. Proin molestie ullamcorper est, sed hendrerit leo pellentesque et. Nunc odio massa, sodales nec elementum at, vehicula quis enim.


You are not going crazy!

\documentclass{amsart} is the culprit.

With standard article class everything works fine.

Can you change the class? Maybe updating ams packages helps? Somebody more involved with ams classes should help.

| improve this answer | |
  • Ah, thanks very much! Changing document class is more than an option: it's something I'll be doing anyway, since the article is actually an individual chapter which will soon become one of several in a \documentclass{amsbook}. But it's still an ams class, so I guess that may not help. But it's good to know that that's the culprit, in any case, and I guess I can try other book classes too — as long as they play nicely with amsthm, that's all I really need. – Peter LeFanu Lumsdaine Nov 5 '10 at 3:01

I'm using acmart, which behaves similarly. Here's how I've adjusted things, something along these lines should work for you.


Credit where credit is due, the top answer here gives the main clue: How to change spacing between caption numbering and text?

| improve this answer | |

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.