2

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: image with 2 subfigures that have subcaptions and a caption for the whole 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 – leandriis Jan 6 at 20:40
  • You could give \usepackage[caption=false]{subfig} a try. (caption=false is the important part.) – user2574 Jan 6 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.) – Ariella Jan 6 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 – Ariella Jan 6 at 22:24
0

Set the images inside a tabular

enter image description here

\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).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.