TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 '14 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

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


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

share|improve this answer