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'm having difficulty getting the list-of-listings section to display the proper title, it simply says "Contents" no matter what sort of changes I make. Here is the command I put in the preamble at a suggestion:

Relevant preamble portion

here is where I include the list of listings

list of listings code

but here is the listings page title...

enter image description here

and if it's relevant here is the output of a sample listing in my document:

enter image description here

to input the listings I am using insert-->Program Listing. I've googled a bit and searched around here but couldn't find anyone with a similar problem.. Any help is appreciated.

Edit: An attempt at a minimum nonworking example.

I'll do my best to make this helpful, but as I assume that I'm simply using the package incorrectly I'm not sure if this example is properly called 'nonworking'

Screencap of example (here I have made no changes to the preamble, everything is defaults)

enter image description here

and its output:

enter image description here

Now when I add the suggested line to preamble:

\renewcommand{\lstlistingname}{Matlab Code}

the output is identical.

share|improve this question

closed as too localized by lockstep, Kurt, Paul Gaborit, diabonas, Werner Feb 19 '13 at 23:15

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Hi. Can you give a minimal working or nonworking example (MWE) that exhibits this problem? – hpesoj626 Feb 19 '13 at 3:40
How about exporting the .lyx code to .tex and posting it on PastBin. That way community members could import it again and try to duplicate your problem. – Werner Feb 19 '13 at 18:45
You might be interested in the matlab-prettifier package; see this answer. – Jubobs Apr 28 '14 at 15:46

Ok, answering my own question here. It appears that this has something to do with older versions of listings, I found others with similar issues on a German message board and they linked to the following page with a few workaround scripts:


I don't fully understand what's going on with the scripts, but for now I'm getting the correct title of the list of listings page.

share|improve this answer

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