[Tex/LaTex] How to plot subfigure in IET template

floatssubfloatstemplates

I have stated my code below. The same code is working with IEEE class file but not working with IET class file. It is showing error "No counter 'subfigure@save'defined"
Thank you in advance.

\documentclass{IET}%%%%where IET is the template name
\usepackage{subfig}

\begin{document}


\begin{figure*}
\centering
\graphicspath{{},{},{},{}}
\subfloat[x=3]{\includegraphics[width=2.6in,height=2in]{X3}
\label{x3}}
\hfil
\subfloat[x=4]{\includegraphics[width=2.6in,height=2in]{IIX4}
\label{x4}}
\hfil \\
\subfloat[x=5]{\includegraphics[width=2.6in,height=2in]{IIX5}
\label{x5}}
\hfil
\subfloat[x=6]{\includegraphics[width=2.6in,height=2in]{IIX6}
\label{x6}}
\caption{Block}
\label{blocks}
\end{figure*}


\end{document}

Best Answer

The class IET.cls, 2015/11/07 v1.0 loads the package subfigure (without actually using it), which is incompatible with subfig. You have two options:

  • Rename IET.cls to myIET.cls, edit the latter file by replacing the line

    \usepackage{xspace,amscd,rotating,latexsym,multicol,array,algorithm,subfigure}
    

    by

    \usepackage{xspace,amscd,rotating,latexsym,multicol,array,algorithm}
    

    and start your document with \documentclass{myIET}.

  • Don't load the subfig package in your document and use the command \subfigure instead of \subfloat to add captions to your subfigures.