[tex-live] listings.sty Suddenly Broke

Ulrike Fischer news3 at nililand.de
Tue Dec 15 10:24:08 CET 2009

Am Mon, 14 Dec 2009 17:47:31 -0500 schrieb Brian C. Ladd:

> Hash: SHA1
> I am not sure this is a TexLive question. Heck, I am not sure of anything right
> now except that when I built the document 10 days ago listings.sty numbered the
> listings correctly. Today, not so much.
> Sample file: testing.tex
> \documentclass{article}
> \usepackage{listings}[2007/02/22]
> % comment one
> % comment two  --- need to fill out the line count a little bit
> \begin{document}
> Testing
> \lstinputlisting[numbers=left,linerange={3-4,7-8}]{testing.tex}
> \end{document}
> Output: xelatex testing.tex
>      Testing
> 1 % comment one
> 2 % comment two  --- need to fill out the line count a little bit
> 3 Testing
> 4 \lstinputlisting[numbers=left,linerange={3-4,7-8}]{testing.tex}
> The _lines_ are the right lines, extracted from the file. The line numbers, on
> the other hand, are wrong. Using firstnumber=3 it is possible to get the first
> group of numbers right.
> I am using XeLaTeX (the real files are all fontified and such) but this sample
> compiles and produces the same output for latex, pdflatex, and xelatex (didn't
> try any other flavors).
> What has changed in the last week? Nothing that I know of. 

I don't think that anything has changed. _If_ it is possible to get
the output you want the only place where you could have hide the
code is a local listings.cfg. But I doubt that it is actually

Ulrike Fischer 

More information about the tex-live mailing list