重新定义表格标题

重新定义表格标题

我正在用 IEEEtran 双列格式写一篇论文。在论文中放置图片时,我更喜欢使用 Table 环境而不是 Figure 环境。我觉得 Table 环境可以更好地将图片放置在论文中我想要的位置。

问题是,我的所有图片下都写着 TABLE [罗马数字]。有没有办法在标题中重新定义 \caption 命令显示的内容?

我想继续使用表格环境,但我希望它读取图#:

答案1

这应该有效

\renewcommand{\tablename}{Figure.} % in preamble

编辑:我意识到您拥有的任何表格也将被标记为“图”。不知道如何解决这个问题。

更新:正如 Bernard 在下面所建议的那样,我了解到您可以\captionof根据具体情况使用,如果您的文档中同时包含图表和表格,这非常方便。

\documentclass[12pt]{report}
\usepackage{caption}
%\renewcommand{\tablename}{Figure.}

\begin{document}
\captionof{figure}{example}
\vspace{-10pt} %This brings the caption closer to the table
\begin{table}[htp]
\centering
\begin{tabular}{llll} \hline
a & b & c & d \\
a & b & c & d \\
\end{tabular}
\end{table}

\captionof{table}{example}
\begin{table}[htp]
\centering
\begin{tabular}{llll} \hline
a & b & c & d \\
a & b & c & d \\
\end{tabular}
\end{table}
\end{document}

相关内容