I'm writing a document in Spanish (with babel), but the name of \tableofcontents is still "Contents". I've tried with \renewcommand{\contentsname}, \addto\captionsspanish and a lot of different combinations but it doesn't work.

I don't know what is happening, because the name of the bibliography is in Spanish, so babel is working properly there.

This is the code I'm using:

\usepackage{geometry}\geometry{a4paper, total={160mm,247mm}, left=25mm, top=25mm, }


\hspace{1em}{\bf Autor:}\\
\hspace{1em}NAME $^\ddagger$\\
{\it Universidad}\vspace{2em}
{\bf Abstract:} \vspace{-0.5em}
\small{...}\vspace{2em}\hline \vspace{1em}
\scriptsize{$^\ddagger$  E-mail: \texttt{...}






Thank you.

  • I've already tried that, but it doesn't work, no variation of \renewcommand{\contentsname} seems to change the name in my document. – TsuKi Jan 8 '17 at 10:16
  • Alright, I've a look. Please wrap that long lines with \usepackage{...} at the beginning, that's awful.... You're loading some packages, epsfig is outdated and why manipulating layout parameters whereas you use geometry already? – user31729 Jan 8 '17 at 10:16
  • Sorry, I'm new here ... How do I wrap lines? – TsuKi Jan 8 '17 at 10:19
  • 1
    Using the newline 'enter' key on your keyboard? – user31729 Jan 8 '17 at 10:20
  • 2
    note size change commands like \small and huge do not take an argument so \small ... not \small{...} commands \bf and \it are deprecated and don't load epsfig unless you need to emulate a document using a package from 1990. – David Carlisle Jan 8 '17 at 10:25

The name of the ToC is stored in \tocname.



instead of \renewcommand{\contentsname}{Índice}}




I kicked all unnecessary (and wrong content) out of the preamble

enter image description here

  • Ok, it is working now! The name apperas properly adding that command line. Thank you very much! @Christian Hupfer Do I need to erase all the other packages? Some of them are needed for math equations... – TsuKi Jan 8 '17 at 10:28
  • @TsuKi: Just for shortness. Your document was not compilable at all. – user31729 Jan 8 '17 at 10:29
  • 1
    @TsuKi but only put back the packages that you actually use. It makes no sense at all to have lipsum, blindtext, epsfig in a current math paper and probably not shapepar, stackengine, better to use utf8 than utf8x and only load chemmacros if you are using that chemistry package, etc. – David Carlisle Jan 8 '17 at 11:33
  • 1
    Belated congratulations on passing the 100k rep mark!! – Mico Jan 10 '17 at 15:21
  • Please consider to accept this answer since it was the solution – user31729 Jan 15 '17 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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