1

I'm looking for a solution where I can put a figure and a table next to one another in the IEEEtrans document class (2 columns). Each should have its own caption, so subfloat can't be used and, the table needs to have its specific IEEE caption style.

Thank you for your help!

enter image description here

3
  • Welcome to TeX.SE! Are you sure it will fit in a single column? Or you want it to span two columns? In that case tex.stackexchange.com/questions/271347/… is related, maybe even a duplicate.
    – Marijn
    Jun 25, 2019 at 11:40
  • Thanks for your quick reply! It should be in a single column. It is mainly the captions that are the issue as the caption length should be limited to a fraction of the columnwidth and should be in the specific IEEE style. Jun 25, 2019 at 12:07
  • image and table include into the same float. table, for figure caption use capt-of package: \captionof{figure}{ figure caption}. Of course youre image as wel table should be small enough.
    – Zarko
    Jun 25, 2019 at 12:15

1 Answer 1

1

You can use two minipages of 0.45 columnwidth side by side.

Because inside a minipage floating environments (such as table or figure) are not allowed, the tabular and includegraphics commands should be used without the surrounding environments.

To indicate which type of float it is and to provide captions and labels, you can use \captionof from the capt-of package (note that the caption package also provides captionof, but that package is incompatible with IEEEtran).

Finally, you can put both minipages together in a float without a caption (for example a figure), to float to the top and provide some vertical space as specified by the IEEE style.

MWE:

\documentclass[conference]{IEEEtran}
\usepackage{lipsum}
\usepackage{capt-of}
\begin{document}
\setcounter{table}{1}
\setcounter{figure}{1}
See Figure \ref{fig:redundant} and Table \ref{tab:states}.
\lipsum[1]
\begin{figure}
\begin{minipage}{0.45\columnwidth}
\centering\fbox{this is a figure}
\captionof{figure}{Redundant system $s_t$ with a redundant caption that spans multiple lines}
\label{fig:redundant}
\end{minipage}
\begin{minipage}{0.45\columnwidth}
\centering\fbox{this is a table}
\captionof{table}{Redundancy states of $o_2 \in \mathcal{O}^{\psi_1}_{\phi_1}$}
\label{tab:states}
\end{minipage}
\end{figure}
\lipsum[1-10]
\end{document}

Result:

enter image description here

3
  • Works like a charm!!! Thanks a lot! Jun 25, 2019 at 16:40
  • when I try this, the text in the tabular environment shows up larger than the default article text. How can this be fixed?
    – Daniel V
    Apr 14, 2020 at 20:57
  • @DanielV that could be caused by many things. You could try putting \small at the start of the minipage, or one of the other size commands. If that doesn't work then it is best to ask a new question with a small example document that reproduces your issue.
    – Marijn
    Apr 14, 2020 at 21:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .