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?)
\documentclass{article}
\usepackage{listings}
\begin{document}
\lstlistoflistings
\renewcommand{\lstlistingname}{Code}
\section{foo}
\begin{lstlisting}[caption={A listing}]
Some source code
\end{lstlisting}
\end{document}