If I create a code include as follows:
\lstinputlisting[linerange=39-46, firstnumber=39]{./Matlab/script.m}
And set the stepnumber to 5 in the lstset:
\lstset{...,stepnumber = 5, ...}
Line 40, 45 and 39 are numbered but I only want to number line 1, 5, 10 etc. So in this example 39 should not be displayed. Firstnumber=auto starts not at the true line number.


matlab-prettifierpackage; see this answer. – jub0bs Apr 28 '14 at 17:14