1

I am using IEEEtran document class.

I want to import a figure and give it caption of table i.e. Table 1

\begin{table}
\caption{Table 1}
\Figure[h!](topskip=0pt, botskip=0pt, midskip=0pt){fig1.png}
\end{table}

Does it possible? Or any other way to do it? Thanks

3
  • 1
    Welcome to TeX.SX! Are you sure about the syntax (and the existence) of \Figure? I can't see it defined in IEEEtran.cls
    – egreg
    Commented Feb 24, 2018 at 15:53
  • table and figure don't care for what are their contents. So you could use \begin{table}\caption{Table 1}\includegraphics{fig1.png}\end{table}.
    – Skillmon
    Commented Feb 24, 2018 at 15:58
  • It looks like \Figure could be from easyfig. But no matter where this command comes from, the [h!] looks like this is a float internally, and if that's the case, your code doesn't work, because you can't include a figure environment inside a table.
    – Skillmon
    Commented Feb 24, 2018 at 16:01

1 Answer 1

2

The caption version is controlled from the environments table and figure. If you have table it will be a table caption. You can include a picture into that, but use the graphicx package.

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{table}[htb]
  \centering
  \caption{Test of table caption}
  \includegraphics[width=0.5\linewidth]{example-image-a}
  \label{tab:MyTable}
\end{table}
\begin{figure}[htb]
  \centering
  \includegraphics[width=0.5\linewidth]{example-image-b}
  \caption{Test of figure caption}
  \label{tab:MyFigure}
\end{figure}
In Table~\ref{tab:MyTable} it is a table caption and in Figure~\ref{tab:MyFigure} it is a figure caption.
\end{document}

enter image description here

You must log in to answer this question.

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