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'm using the listings package with this \begin command:

\begin{lstlisting}[caption=blabla, label=amb]

This yields a nice code listing with a caption like "Listing 1.1 blabla". Is there a way to change the caption and have something like "Code 1.1 blabla"?

I saw the title command but it doesn't use a numbering system. Any hint will be greatly appreciated!

share|improve this question

migrated from stackoverflow.com May 7 '12 at 18:22

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Jubobs, Svend Tveskæg, Werner, Heiko Oberdiek, Thorsten Mar 18 at 16:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. –  Werner May 7 '12 at 18:28

1 Answer 1

The caption name is defined with \lstlistingname command. You should add a line that reads

\renewcommand{\lstlistingname}{Code}

to change it the way you wanted. For more tricks you should check the manual for package listings.

share|improve this answer