Hi, Some futher information: One empty line is "a feature, not a bug"® according to the docs, but it seems that the use of \lstinline interferes with the counting. see attached minimal working example.
Joachim -- Joachim "nomeata" Breitner Debian Developer [EMAIL PROTECTED] | ICQ# 74513189 | GPG-Keyid: 4743206C JID: [EMAIL PROTECTED] | http://people.debian.org/~nomeata
\documentclass[a4paper]{article} \usepackage[latin1]{inputenc} \usepackage[german]{babel} \usepackage{listings} \begin{document} \lstset{numbers=left, firstnumber=last} \begin{lstlisting} rueber (x,y) = (x+1,y) runter (x,y) = (x,y+1) ruerunter (x,y) = (x+1,y+1) hoch (x,y) = (x,y-1) links (x,y) = (x-1,y) \end{lstlisting} Maybe the problem is the use of lstinline in \lstinline.doeach. as one empty line is documented, but several should not be needed. But it seems that every \lstinline-lstinline- reduces the count\ldots \begin{lstlisting} doeach f [] = [] doeach f (x:xs) = ((f x):xs) : (map (x:) (doeach f xs)) \end{lstlisting} \end{document}