tags:

views:

69

answers:

1

I am using the listing (NOT listings) package and have been trying to use

\renewcommand{\listlistingname}{Índice de código}
\renewcommand{\listingname}{Código}

in order to change the "List of listings" and "Listing" text which appear in the document, since I'm writing in Spanish.

However only \listlistingname seems to work, \listingname makes no change.

Following Vivi's suggestions I have even edited the listing.sty under \tex\latex\ltxmisc, but still the same problem. Editing \listlistingname works, editing \listingname does not. It seems like it was picking the "Listing" text from some other file.

I really don't know what I'm doing wrong, any suggestions?

EDIT: Not even copying the listing.sty into the directory where I have the tex files works, so I guess it has to be picking up the text from some other file, but which one? Here's a list of packages I'm including in my project, just in case:

\usepackage[spanish]{babel}
\usepackage[latin1]{inputenc}
\usepackage{listing}
\usepackage{graphicx}
\usepackage{makeidx}
\usepackage{color}
\usepackage{url}
\usepackage{float}
\usepackage{hyperref}
\usepackage{minted}
\usepackage[toc]{glossaries}

Thank you!

A: 

Have you tried using the babel package? It converts many captions to whatever language you select when loading the package.

zvrba
Yes I'm using it, but it seems it doesn't convert these ones.
carlos.perezb
Ok, then there's an easy workaround: copy listing.sty to the directory where your tex sources are and directly change captions there (look for \newcommand defining \listingname and \listlistingname commands)
zvrba
Well...It doesn't work work either. So I guess it has to be picking up the text from some other file, but which one? I've edited the question with more info. Thank you.
carlos.perezb