# personal caption name [duplicate]

I have a table that I would like to insert like a figure, and I want that in the caption appears "Table 1" instead of "Figure 1". This in one example of what I did:

  \documentclass[12pt,a4paper,oneside]{book}
\usepackage{graphicx}
\usepackage{caption}

\begin{document}
\begin{figure}[htbp]
\centering
\includegraphics[width=16.6cm]{table.png}
def\tablename{Table 1}{My caption}
\end{figure}
\end{document}


But it doesn't work...

-
As far as I can see, there is nothing which prevents you to use the table environment instead of the figure environment. –  Corentin Feb 19 '13 at 23:08

## marked as duplicate by Werner, egreg, hpesoj626, Kurt, Paul GaboritFeb 19 '13 at 23:42

You can use \includegraphics inside table environment.

  \documentclass[12pt,a4paper,oneside]{book}
\usepackage{graphicx}
\usepackage{caption}

\begin{document}
\begin{table}[htbp]
\centering
\includegraphics[width=16.6cm]{table.png}
\caption{My caption}
\end{table}
\end{document}

-

As Corentin wrote just above, just use the table environment in place of the figure one:

\begin{table}[htbp]
\centering%
\includegraphics[width=16.6cm]{table.png}
\caption{My caption}
\end{figure}


Not only will this yield "Table 1" instead of "Figure 1", but it will also make sure that the numbering of your tables and figures are separate and consistent and that you can produce lists of them (with \listoftables and \listoffigures).

-