# subfigure and subfig packages deprecated

I was using the subfigure package to align multiple small images in a document. However, WikiBooks states that "the subfigure and subfig packages are deprecated and shouldn't be used any more" (WikiBooks Floats, Figures and Captions).

What is the alternative/proper option to achieve the same result?

• Afaik, only subfigure is deprecated and subfig is the way to go instead. Nov 13, 2013 at 11:52
• subfig isn't deprecated!. You can also use subcaption which provides subfigure.
– user11232
Nov 13, 2013 at 11:53
• I've written tens of times that subfig is only deprecated by one (albeit respectable) guide. The package subcaption has better features, perhaps, but subfig remains invaluable with classes such as RevTeX4 that are not compatible with caption (which is required by subcaption). Nov 13, 2013 at 11:57
• @egreg Can you post up an answer explaining this and what the updsides of each are? As I recall, you explained this to me less then a week ago. Nov 14, 2013 at 5:34
• @egreg, also I couldn't make subcaption work with Beamer, although subfig works.
– alfC
Mar 17, 2014 at 1:54

There are at least four classes that aren't compatible with caption (hence with subcaption), whereas subfig is a substitute when called as

\usepackage[caption=false]{subfig}

1. The ws-proc9x6 class (and related ones by the same publisher), see how to get the ws-procs9x6 document class to work with subcaption package?

2. tufte-book and the other similar classes, see Problem with tufte-book and subfigure

3. IEEEtran, see 2-col floats and citation order problem

4. REVTeX, see subfigures with revtex?

It's true that subfig doesn't cooperate well with hyperref, but when the alternative is no subfloats at all …

Related subfloat discussion is also given in subcaption vs. subfig: Best package for referencing a subfigure

• subfig is simpler, I find. If you don't need what caption offers or the complexities and sophistication of subcaption, subfig often works well.
– cfr
Jul 16, 2016 at 2:17
• @cfr What do you mean by "simpler"? "Simpler to use"? The syntax of \subcaptionbox (by subcaption) is similar to \subfloat (by subfig). "Simpler implementation"? No, the major part of the caption package is inside caption3.sty and this is loaded by subfig, too, even when using caption=false. The rest of subfig is handling the counters and duplicated code while the (sub)caption package tries to use as much code as possible for both, captions and sub-captions. So if you want a real lightweight solution without all the caption stuff, you need to use subfigure.
– user2574
Jul 17, 2016 at 10:46
• @AxelSommerfeldt Simpler to understand and to use. subcaption's documentation requires more effort to navigate. Not necessarily more difficult, but certainly trickier and more time-consuming. subfig is relatively straightforward to figure out and utilise. This is not a criticism of subcaption. It is pretty much to be expected given that subcaption is more powerful/flexible than subfig. But if you don't need that power and flexibility, subfig is often easier.
– cfr
Jul 17, 2016 at 18:14
• @cfr Thanks for the feedback. I'm not really happy with the documentation either, and am currently rewriting the caption bundle doc., but unfortunately progress is rather slow...
– user2574
Jul 19, 2016 at 15:14
• @AxelSommerfeldt Documentation is hard. Really hard.
– cfr
Jul 19, 2016 at 15:28

I was able to avoid subfig completely. Used The Subﬁg Package documentation: "Do You Need This Package?"

\begin{figure}%
\centering
\parbox{1.2in}{...figure code...}%
\begin{minipage}{1.2in}%
...figure code...
\end{minipage}%
\caption{Here are two figures side-by-side.}%
\label{fig:1figs}%
\end{figure}


Thanks for the info! I'm sure it will be even more useful as I dig into the package more.

• I realize that I'm not very knowledgable in (La)TeX, but I am really confused now. You avoided subfig by using subfig?? Apr 5, 2014 at 15:41
• Add the word "documentation". =) Used the subfig docs.
– PLG
Apr 6, 2014 at 16:41
• However, this does not add captions, which might be desired.
– Scz
Nov 6, 2014 at 8:26