TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

I would not add to list of listing some of my listings. For example I import my matlab file through \lstinputlisting. What command I should use to not add that code to list of listing?

share|improve this question
You might be interested in the matlab-prettifier package; see this answer. – Jubobs Apr 28 '14 at 15:53
up vote 6 down vote accepted

Option nol, see "4.7 Captions" of listings' documentation.

share|improve this answer
yeah...thanks it works...thanks so much!!! – Mazzy Dec 8 '12 at 1:53

If I understand you right, you want a special listing not listed in the list of listings. Just use the option nolol for \lstinputlisting. I used a fictive file Test.pas. Please change to what you need.

A short MWE:


\lstlistoflistings                                % Table of listings
\lstinputlisting[language=Pascal]{Test.pas}       % listed!
\lstinputlisting[language=Pascal,nolol]{Test.pas} % not listed!   
share|improve this answer

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.