如何重命名表?

How to rename tables?

我正在用西班牙语写一篇论文,我需要 table 的名字是 "Tabla," 而不是 "Cuadro",这是当前的名字。 我使用了命令:

\renewcommand{\tablename}{Tabla} 

但是它不起作用,因为没有任何变化。我编译的时候没有报错,我的table的名字还是"Cuadro".

\documentclass[journal]{IEEEtran}
\usepackage[utf8]{inputenc}
\usepackage[spanish, english]{babel}
\usepackage{graphicx}
\usepackage{amsmath}
\spanishdecimal{.}

\begin{document}
\renewcommand{\tablename}{Tabla} 
\newcommand\Tstrut{\rule{0pt}{2.6ex}}        
\newcommand\Bstrut{\rule[-0.9ex]{0pt}{0pt}}  

    \begin{table}[h!]
    \begin{center}
    \caption{Title}
        \label{label1}
        \centering
        \begin{tabular}{c}
            \hline \rule[-1ex]{0pt}{2.5ex}something A \Tstrut\Bstrut\ 
             \rule[-1ex]{0pt}{2.5ex} Something B \Tstrut\Bstrut \ 
            \rule[-1ex]{0pt}{2.5ex}Something C\Tstrut\Bstrut  \ 
            \hline 
        \end{tabular}
    \end{center}
\end{table} 
\end{document}

babel 包有一个特殊选项es-tabla

其他几点:

  • 如果您文档的主要语言是西班牙语,这应该是在 babel 包的选项中加载的最后一种语言,例如在 english

  • 之后
  • 浮动说明符 [h!] 几乎是图像放置不当的保证,最好使用 [htbp]

\documentclass[journal]{IEEEtran}
\usepackage[utf8]{inputenc}
\usepackage[english,spanish,es-tabla]{babel}
\usepackage{graphicx}
\usepackage{amsmath}
\spanishdecimal{.}

\newcommand\Tstrut{\rule{0pt}{2.6ex}}        
\newcommand\Bstrut{\rule[-0.9ex]{0pt}{0pt}}  

\begin{document}





    \begin{table}[htbp]
    \begin{center}
    \caption{Title}
        \label{label1}
        \centering
        \begin{tabular}{c}
            \hline \rule[-1ex]{0pt}{2.5ex}something A \Tstrut\Bstrut\ 
             \rule[-1ex]{0pt}{2.5ex} Something B \Tstrut\Bstrut \ 
            \rule[-1ex]{0pt}{2.5ex}Something C\Tstrut\Bstrut  \ 
            \hline 
        \end{tabular}
    \end{center}
\end{table} 
\end{document}