GeneralHow to change the 'tabular-foot' legend

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ruski
Posts: 10
Joined: Tue May 12, 2009 8:55 am

How to change the 'tabular-foot' legend

Post by ruski »

Dear all,
I have the following problem. I introduce, for instance, the table:

Code: Select all

\begin{table}
 \begin{tabular}{|c|c|c|c|c|c|}\hline
  EQ & I & B & EX & I & B  \\ \hline
  1 & -0.18 & 0.07 & 1 & 0.72 & 0.21 \\ \hline
  2 & -5.11 & -0.17 & 2 & 0.73 & 0.21 \\ \hline
  3 & -0.36 & 0.07 & 3 & 0.51 & 0.15 \\ \hline
 \end{tabular}
 \caption{Valores de I}\label{tab1}
\end{table}
In the document, I would like to obtain under the table "Tabla 1: Valores de I" and I obtain "Cuadro 1: Valores de I".

So, my question is: How could I change the predefined generic name for the tables from "Cuadro" to "Tabla".

Thanks a lot,
Best Regards,
Ruski

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

barcense
Posts: 10
Joined: Sun Jun 10, 2007 2:16 pm

How to change the 'tabular-foot' legend

Post by barcense »

I suppose you are using spanish option of the babel package, so you are getting Cuadro for the table name. In the manual for the spanish style http://tug.ctan.org/tex-archive/languag ... panish.pdf in section 3.1 is said that you must change the command for spanish \spanishtablename. So you must add the command \renewcommand{\spanishtablename}{Tabla}

Best regards
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to change the 'tabular-foot' legend

Post by localghost »

ruski wrote:[...] In the document, I would like to obtain under the table "Tabla 1: Valores de I" and I obtain "Cuadro 1: Valores de I".

So, my question is: How could I change the predefined generic name for the tables from "Cuadro" to "Tabla". [...]
Build a minimal working example (MWE) that let us see how you set up your document and explain which language you want to use.


Best regards
Thorsten
ruski
Posts: 10
Joined: Tue May 12, 2009 8:55 am

Re: How to change the 'tabular-foot' legend

Post by ruski »

Dear friends,

Thanks a lot for your answers. Sorry for my incomplete explanation of the problem.

In fact, I am using the spanish option of the babel package.
However I have introduced the command

\renewcommand{\spanishtablename}{Tabla}

after the command \usepackage[spanish]{babel} and it doesn't change. My tables are still with "Cuadro".

I tried as well to introduce in the package option
\usepackage[spanish,es-tabla]{babel} without result.

Do you find any razon for the failure?

Best regards,
Ruski
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to change the 'tabular-foot' legend

Post by localghost »

Changing names when using babel works slightly different. The manual explains that in detail. In the following example you can see how to it works.

Code: Select all

\documentclass[11pt,a4paper,spanish]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
\usepackage{booktabs}
\usepackage{siunitx}

\addto{\captionsspanish}{%
  \renewcommand{\tablename}{Tabla}
  \renewcommand{\listtablename}{Índice de Tablas}
}

\begin{document}
  \begin{table}[!ht]
    \caption{Valores de I}\label{tab:tab1}
    \centering
    \begin{tabular}{%
      c
      S[tabnumalign=centre,tabformat=+1.2]
      S[tabnumalign=centre,tabformat=+1.2]
      @{\qquad}
      c
      S[tabnumalign=centre,tabformat=1.2]
      S[tabnumalign=centre,tabformat=1.2]
    }\toprule
      {EQ} & {I} & {B} & {EX} & {I} & {B} \\ \midrule
      1 & -0.18 & 0.07 & 1 & 0.72 & 0.21 \\
      2 & -5.11 & -0.17 & 2 & 0.73 & 0.21 \\
      3 & -0.36 & 0.07 & 3 & 0.51 & 0.15 \\ \bottomrule
    \end{tabular}
  \end{table}
\end{document}
All other possible modifications (\figurename, \listfigurename, ...) go into the according list. Another package for aligning decimal values in tables is dcolumn.
ruski
Posts: 10
Joined: Tue May 12, 2009 8:55 am

Re: How to change the 'tabular-foot' legend

Post by ruski »

Dear friends,

Now It works perfectly.

I had spent several hours to change this word (terribly frustrating).

So thank you wholeheartedly!

Best Regards,

Ruski
Post Reply