I use listings that way:


and I want to change Listing name to another but when I use this command \renewcommand{\lstlistingname}{Another name} it doesn't work. How to change it correctly?

  • Welcome to TeX.SX! The chances to get an answer, quick and to the point, considerably increase if you post a complete example, ready to run: A TeX document starting with \documentclass and ending with \end{document}, and a tiny sample Python file. Often, the correct answer depends on the document class and the packages loaded, so the sooner you include the info, the faster people can give advice.
    – gernot
    Jan 7, 2022 at 13:47
  • As you are using the minted package check its manual section 4 (Floating listings). It describes several options depending on the other packages loaded (caption, float, newfloat, …)
    – cgnieder
    Jan 7, 2022 at 14:38

1 Answer 1


You need to change the meaning of \listingscaption.






I used the same file for the listing, just for the sake of brevity.

enter image description here

You must log in to answer this question.

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