There is a compatibility problem between the CIFA document class
and the subcaption package.
When I compile the following example (with PDFLaTex):
\documentclass{cifa}
\usepackage{subcaption}
\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}
These warnings are displayed:
Package caption Warning: Unsupported document class (or package)
detected,Package caption Warning: \caption will not be redefined since it's
already
In addition the words "figure" and "subfigure" are displayed
AFTER the captions.
How to fix this issue?
Best Answer
The very recent version of the
subcaption
package will even issue an error:The only way to get around this is to specify the option
compatibility=false
to thecaption
package:PLEASE NOTE: This way the customization of the captions done by the
cifa
document class will be overwritten by thecaption
package in a brute-force manner. In best case the output of the captions will look different (and some caption-related stuff offered by thecifa
document class will not work anymore), in worst case you'll get error messages and weird output. So please also take a look at thecaption
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 thecompatibility=false
option:If you do not want this (or it does not work anyway) then the only solution left is not-using the
subcaption
package. Use thesubfig
package with optioncaption=false
(which prevents loading of thecaption
package) instead: