# Is there really something wrong with using the caption package for \ContinuedFloat?

In my question How to create an unnumbered algorithm with a caption?, a nice solution was suggested using `\ContinuedFloat`, from the `caption` package. However, when I use it, I get:

``````Package caption Warning: Unsupported document class (or package) detected,
(caption)                usage of the caption package is not recommended.
See the caption package documentation for explanation.
``````

The package documentation says:

Please note: Many document classes already have built-in options and commands for customizing captions. If these possibilities are sufficient for you, there is usually no need for you to use the caption package at all. And if you are just interested in using the command `\captionof`, loading of the very small 'capt-of' package is usually sufficient.

but that's not what I'm after. I'm using a document class I've created as a (thin) wrapper based on `report`; I don't provide any built-ins I can use instead of `\ContinuedFloat`, and neither does `report`, as far as I can tell.

• Is the use of `caption` really not recommended with the `report` class?
• If so, why and what should I do about it?
• If not, how can I 'tell' the package that mine is an 'ok class' to load with?
-
What document class exactly do you use? Is it publicly available? –  lockstep Nov 12 '11 at 15:30
@lockstep: Oh, just a class around `report` for Ph.D. theses at my university. I'm the package author and it's not publicly available yet. But it's just a thin wrapper, nothing fancy or deep. –  einpoklum Nov 12 '11 at 16:25
I don't get a warning if I compile the linked example and use the `report` class. Maybe the problem is caused by your "thin wrapper" -- without a MWE, it's hard to say. –  lockstep Nov 12 '11 at 17:10
Eyal, please take a look at the log file. Right under the warning from the `caption` package you'll find the reason for the warning -- I assume it's a definition of `\@makecaption` unknown to the `caption` package. –  Axel Sommerfeldt Nov 12 '11 at 17:53
Now all you have to do is to find out where this definition of `\@makecaption` is coming from. It does not seem to come from your wrapper class since it does not contain a redefinition of `\@makecaption`. But it's definitely not the definition coming from the `report` document class. To find out build a MWE, see meta.tex.stackexchange.com/questions/228/… –  Axel Sommerfeldt Nov 13 '11 at 18:16

Perhaps not an answer, but it was too long to make it a comment. The documentation of the caption package says:

If you don’t find the document class you use in this section, you usually don’t have to worry: Many document classes (e.g. the `octavo` class) are derived from one of the standard document classes `article`, `report`, or `book`, and behave the same regarding captions. The `caption` package automatically does a compatibility check against the document class used and will give you the clear warning

``````Package caption Warning: Unsupported document class (or package)
detected, (caption) usage of the caption package is not recommended.
See the caption package documentation for explanation.
``````

if such an incompatibility was detected. If you don’t get such warning everything is fine, but if you get it the usage of the `caption` package is not recommended and especially not supported.

If you get such a compatibility warning but decide to use the `caption` package anyway, you should watch carefully what side-effects occur, usually the look and feel of your captions will change by just including the `caption` package without options, meaning they do not look like as intended by the author of the document class. If this is fine for you, you should first specify the option `style=base` via `\usepackage[style=base]{caption}` or `\captionsetup{style=base}` to set the `caption` package into a well-defined state. Afterwards you can start setting your own options additionally and keep your fingers crossed.

Also, according to the documentation, the supported document classes are:

• Standard LaTeX: `book`, `report`, `article`.
• AMS: `amsart`, `amsproc`, `amsbook`.
• `beamer`.
• KOMA-Script: `scrreprt`, `scrartcl`, `scrbook`.
• NTG: `artikel`, `rapport`, `boek`.
• SMF: `smafart`, `smfbook`
• `thesis`.

So, there's no problem using `caption` with the standard `report` document class. Since you are using a derived document class, you should pay attention to the las paragraph of the quote at the beginning of this message.

-
So if I know that my derived document class is essentially the same as one of the officially approved document classes, how can I tell the caption package to hide its warning? –  Tyson Williams Nov 8 '12 at 20:56
Perhaps this is an answer? –  Daniel May 31 '13 at 6:10
I wonder if the `caption` package can't figure out on its own whether it's loaded in a 'safe' context. –  einpoklum May 31 '13 at 10:34

One of your packages tries to load captions twice. I have the same issue because I'm loading the `\subfig` package, this blog post give an elegant solution:

Find the offending package and load it without the caption package.

`\usepackage[caption=false]{subfig}`

This has worked for me. It would really help though if you gave us your header and we could try and spot what was trying to load caption, and reduce the number of packages doing that to one.

-
Unlikely... I load it manually, and if I remove my `\usepackage[style=base]{caption}` my `\ContinuedFloat` doesn't work. –  einpoklum Jan 17 '12 at 19:03

Gonzalo's answer has explained why you can or can not include the `caption` package.

If you are sure you want to use it, and want to get rid of the warning, use

``````\usepackage{silence}
\WarningFilter{caption}{Unsupported document class}
``````
-