Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am completely noobie in LaTeX. I need to change table name in all captions. But when I write \renewcommand\tablename{newname} at the beginning of document, it doesn't do anything. It's still "Table" My code looks like this:

...
\renewcommand\tablename{new}
...
\begin{table}[b]
\centering
\begin{tabular}{|l|}
... your table ...
\end{tabular}
\caption{This table shows some data}
\end{table}
...

What am I doing wrong?

share|improve this question
    
Welcome to TeX.SX! Are you loading the babel package? With what languages? –  egreg May 9 '12 at 15:56
    
\usepackage[slovak,english]{babel} –  peto1234 May 9 '12 at 15:57
1  
It works for me. Can you give a full MWE. What are the class and other package details? –  Harish Kumar May 9 '12 at 16:05
    
@HarishKumar; as soon as you load babel with the options mentioned by the OP in his comment, the redefinition using just \renewcommand... in the preamble will not work. –  Gonzalo Medina May 9 '12 at 16:35
    
@GonzaloMedina: I have given the \renewcommand.. after the \begn{document}` and it works. How come???? –  Harish Kumar May 9 '12 at 16:49
show 2 more comments

1 Answer

up vote 12 down vote accepted

Since you are loading babel, the simple

\renewcommand\tablename{new}

in the preamble, will not work. You can use either of the following options after loading babel:

\AtBeginDocument{%
  \renewcommand\tablename{new}
}

or

\addto\captionsenglish{%
  \renewcommand\tablename{new}
}
share|improve this answer
    
out of votes, but tomorrow I will visit again –  Harish Kumar May 9 '12 at 17:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.