I am having some troubles in using \subfigure in LaTeX template for ASME conference papers, version 1.7. Here's my code:
Figure
% GRAPHICS
\RequirePackage{caption}
\RequirePackage{subcaption}
\usepackage{graphicx}
\usepackage{subfigure}
\begin{figure}[t]
\begin{center}
\subfigure[Main Effect Plot]{
\includegraphics[width=\columnwidth,keepaspectratio]{Figure/Main_Effects_Plot.pdf}
\label{fig:main_eff_plot}}
\subfigure[Interaction Plot]{
\includegraphics[width=\columnwidth,keepaspectratio]{Figure/Interaction_Plot.pdf}
\label{fig:inter_plot}}
\end{center}
\caption{FACTORIAL PLOT}
\end{figure}
Errors in LaTeX source
/usr/local/texlive/2013/texmf-dist/tex/latex/subfigure/subfigure.sty:113: LaTeX Error: No counter 'figure' defined. [\newcounter{subfigure}[figure]]
/usr/local/texlive/2013/texmf-dist/tex/latex/subfigure/subfigure.sty:126: LaTeX Error: No counter 'table' defined. [\newcounter{subtable}[table]]
/usr/local/texlive/2013/texmf-dist/tex/latex/subfigure/subfigure.sty:413: LaTeX Error: Command \subref already defined. [ \ref{sub@#1}}]
./asme2e.tex:360: Undefined control sequence. [\begin{quotation}]
./asme2e.tex:360: Undefined control sequence. [\begin{quotation}]
Any help?
Best Answer
subfigure
is an obsolete package which shouldn't be used anymore; you can usesubfig
orsubcaption
instead.An example with
subcaption
:An example with
subfig
:Notice that loading
caption
orsubcaption
with your class will issue a warning:which indicates that using the
caption
package might not be convenient. In this case, if you want to be sure that caption won't produce any interference with the wayasme2e
handles captions, you can usesubfig
with thecaption=false
option as in my last example.