I'm using the package listings for the code snippets in my document. But I want them to be named "Code" rather than "listings". I already got that in my document, but when I create a \lstlistoflistings, it still is titled with "Listings".

How can I change the topic to "Code fragments"? (or anything else?)






\begin{lstlisting}[caption={A listing}]
    Some source code


1 Answer 1


While \lstlistingname gives the name of a single listing, the name for the list of listings is given by \lstlistlistingname. So just do:

\renewcommand{\lstlistlistingname}{Code fragments}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .