Firstly I apologize if this had been answered before. I have tried looking for it anywhere but I couldn't find any solution.
Anyway, I have a trouble with the caption of my table when I included the subcaption package.
This is the excerpt of the code:
\documentclass{ifacconf}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{table}[hb]
\centering
\caption{Test eheh blah}
\begin{tabular}{|c|c|c|c|} \hline
\multicolumn{4}{|c|}{Margin settings} \\
\hline
Page & Top & Bottom & Left/Right \\ \hline
First & 3.5 & 2.5 & 1.5 \\ \hline
Rest & 2.5 & 2.5 & 1.5 \\ \hline
\end{tabular}
\end{table}
\end{document}
And the output is
withSubcaption http://imageshack.com/scaled/800×600/513/0o0l.jpg
However, if I removed the subcaption package, the output is as expected
withoutSubcaption http://imageshack.com/scaled/800×600/513/75c3.jpg
So, I would really appreciate any help. Thanks.
Cheers.
EDITED:
Following Harish Kumar answer, although it does solve the caption issue in my table, it causes problem in the captions of my other subfigure. Here is the code of the subfigure.
\usepackage{epstopdf}
\begin{figure}[htb!]
\centering
\begin{subfigure}{0.38\textwidth}
\centering
\includegraphics[width=\textwidth]{pic1.eps}
\caption{test caption}
\label{fig:pic1}
\end{subfigure}
\\
\begin{subfigure}{0.38\textwidth}
\centering
\includegraphics[width=\textwidth]{pic2.eps}
\caption{test caption}
\label{fig:pic2}
\end{subfigure}
\caption{Long caption Long caption.}
\label{fig:pictures}
\end{figure}
And the output
Best Answer
The
ifacconf
class is not compatible withcaption
, as the warningtells you. This means that also
subcaption
cannot be used.In these cases, the good old
subfig
package usually comes to the rescue, but there's a catch: the class defines\captionwidth
as a command, whereassubfig
defines it as a dimension register. Moreover, the class wrongly doesThis makes the class incompatible with
subfig
too.Workaround:
So long as you don't use
subfig
options to change the appearance of the subcaptions, this should be sufficient.A perhaps better workaround might be
but my advice is “don't use subfloats with this class”.