# Subfigures With Captions for IEEE Conf

I am creating a latex project with the document class ieeeconf:

\documentclass[letterpaper, 10 pt, conference]{ieeeconf}


I need to include some a figure with some subfigures, similar to what is shown in this article on positioning images (i.e. a figure with multiple subfigure images that each get there own caption numbering a,b,etc.) and another caption for the entire image:

However, since I ham using the ieeeconf documentclass, I get warning errors if I try to use either the subcaption package (as recommended in the link above) or the subfig package (as I saw recommended elsewhere).

What is the correct package to use here?

• Probably interesing: tex.stackexchange.com/a/305492/134144 Jan 6 '20 at 20:40
• You could give \usepackage[caption=false]{subfig} a try. (caption=false is the important part.)
– user2574
Jan 6 '20 at 21:48
• Thanks for the suggestion @leandriis I tried using the code there (the part with \ifCLASSOPTIONcompsoc but still got a bunch of errors, including: "\ifCLASSOPTIONcompsoc The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., \hobx'), type I' and the correct spelling (e.g., I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.) Jan 6 '20 at 22:19
• Thanks for the suggestion @AxelSommerfeldt Unfortunately, when I tried that, I got a 2 warning messages. 1. that my document class has a bad definition of \endfigure, 2. my document class has a bad definition of \endtable Jan 6 '20 at 22:24

Set the images inside a tabular

\documentclass{IEEEconf}

\usepackage{lipsum,graphicx}

\begin{document}

\lipsum[1]

\begin{figure}
\centering
\begin{tabular}{ c @{\hspace{20pt}} c }
\includegraphics[width=.3\columnwidth]{example-image-a} &
\includegraphics[width=.3\columnwidth]{example-image-b} \\
\small (a) &
\small (b)
\end{tabular}

\medskip

\caption{A figure caption}
\end{figure}

\end{document}


The space between the images is set using \hspace{20pt} in the tabular column specification. Also, the subfigure numbering is set using \small, with a skip between the images and the main figure caption using \medskip (a vertical skip of size \medskipamount`).