# Problems with captions in the environment wrapfigure

I'm dealing with a rather weird issue. Using the enviroment `\wrapfigure`, I receive an error message

``````undefined control sequence \float@caption ... oxrestore ...
\normalize @fs@capt ...
``````

let alone the caption doesn't show up the .pdf; while `caption` is working in any other environments (`figure`, `subfigure`, `tabular`). What is wrong?

-
Welcome. Please provide a minimal example. –  Marco Daniel Sep 2 '11 at 18:37
@Thanos You are lucky since I just got my crystal ball back from repair ;-) (See my answer below) –  Axel Sommerfeldt Sep 3 '11 at 7:04

Remove `\restylefloat{figure}` (and `\restylefloat{table}`) from your document preamble. In most cases it is simply not needed and it is only in the preamble because it was copied from another LaTeX document given by a friend or colleague (who did not know what `\restylefloat` does either).

But if you really need it (and really know what's good for and why you need it), you can try the following load order of packages:

``````...
\usepackage{float}
\usepackage{wrapfig}
...
\floatstyle{boxed} % or whatever
\restylefloat{figure}
...
``````

This should fix the issue, too.

-
You are a God!!! And you are a crystall ball fortune teller!!! You couldn't have been more precise. Indeed, the preable was from a mix from net/friend. Thank you sooooooooooooooo much!!!!!!!!!!! –  Thanos Sep 3 '11 at 7:08
@Thanos: Please upvote the answer, and accept it - this is the best way to give thanks here. –  Joseph Wright Sep 3 '11 at 8:04
@Joseph: Thanos has not enough reputation yet to upvote. –  lockstep Sep 3 '11 at 8:30