I'm just writing on my master thesis and have a (specific) problem with lstlisting package in LaTeX.
I'm referring to the Random.class-file in Java and only want to print some specific line-ranges, which is working fine with following lines for Latex:
\lstinputlisting[linerange={62-62,78-81,475-479},breaklines=true,language=Java, caption=Excerpt of Source Code of \texttt{Random}-class, label=list:excerptRandomCode, basicstyle=\ttfamily\tiny, captionpos=b,numbers=left,tabsize=2,float=t]{RandomClass.java}
The only problem is now, that this doesn't print the actual line numbers. It's starts with line number 1 and stops with line number 10 (thus as many lines I refer to).
How can I say, that he also prints the lines as I mentioned in the linerange?
And it would be nice, if I could add one empty line without any reference between my three excerpts of the code.

linerangeand in that way insert it consequitively. – nickpapior Mar 17 '12 at 11:03