I am new to Latex and trying to use Listings in Overleaf for a conference paper. I have to use LNCS format, so I have imported its template to overleaf.

The reason I am using Listings and not something like Verbatim, is so I can display a caption for my code. I have loaded the package as follows:




But I get this error:

Environment listing undefined! You have created an environment (using \begin{…} and \end{…} commands) which is not recognized. Make sure you have included the required package for that environment in your preamble, and that the environment is spelled correctly.

Why is this happening?

  • 4
    listings doesn't define a listing environment, but lstlisting. Check the documentation. – Ulrike Fischer Mar 31 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.