TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

The following code adds a wrong line to the list of listings

enter image description here




Verbatim line.


\begin{lstlisting}[caption={LaTeX Listings}]
Some text ...



How can I prevent this entry?

share|improve this question
Related Question: Hide listing from listoflistings. – Peter Grill Sep 17 '12 at 9:44
up vote 10 down vote accepted

Use the nolol=true option to remove that entry from the \listoflistings:


This yields:

enter image description here

share|improve this answer
Works, thank you. – Matthias Pospiech Jan 25 '12 at 19:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.