The very recent version of the subcaption
package will even issue an error:
! Package caption Error: The `subcaption' package does not work correctly
(caption) in compatibility mode.
The only way to get around this is to specify the option compatibility=false
to the caption
package:
\documentclass{cifa}
\usepackage{subcaption}
\captionsetup{compatibility=false}
\begin{document}
\begin{figure}
\parbox{4cm}{\subcaption{This is a subcaption}\label{sub}}
\caption{nothing}
\label{nothing}
\end{figure}
See figure \ref{nothing}: there is \ref{sub} inside...
\end{document}
PLEASE NOTE: This way the customization of the captions done by the cifa
document class will be overwritten by the caption
package in a brute-force manner. In best case the output of the captions will look different (and some caption-related stuff offered by the cifa
document class will not work anymore), in worst case you'll get error messages and weird output. So please also take a look at the caption
package documentation, section "6 Package Support". Since this is a perfect method to shoot oneself in the foot, an extra warning is always issued when using the compatibility=false
option:
Package caption Warning: Forced redefinition of \caption since the
(caption) unsupported(!) package option `compatibility=false'
(caption) was given.
See the caption package documentation for explanation.
If you do not want this (or it does not work anyway) then the only solution left is not-using the subcaption
package. Use the subfig
package with option caption=false
(which prevents loading of the caption
package) instead:
\documentclass{cifa}
\usepackage[caption=false]{subfig}
\begin{document}
\begin{figure}
\subfloat[This is a subcaption\label{sub}]{............}
\caption{nothing}
\label{nothing}
\end{figure}
See figure \ref{nothing}: there is \ref{sub} inside...
\end{document}
The caption
package is not compatible with the ws-procs9x6
class, which defines its own caption style; since the class is required for submissions to a publisher, it's highly recommended not to tamper with their style.
However, the subfig
package turns out to be compatible with the class, provided it's loaded without caption:
\usepackage[caption=false]{subfig}
An example:
\documentclass{ws-procs9x6}
\usepackage[caption=false]{subfig}
\begin{document}
\begin{figure}
\centering
\subfloat[abc]{xxxxxxxxxxxxxx}\quad
\subfloat[abc]{xxxxxxxxxxxxxx}
\caption{Coucou}
\label{fig:coucou}
\end{figure}
\end{document}
Best Answer
The
spconf.sty
package uses deprecated and obsolete constructions, so it's not very surprising it is not compatible withcaption
.You can use
subfig
, though. Of course, the template file does ridiculous things, like loadingepsfig
and using\def
with silly replacement texts. Please, fix them.