# Listings caption [duplicate]

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!

-

## migrated from stackoverflow.comMay 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, ThorstenMar 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.

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

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.

-