I've question about the listing environment. I use it to add c source code to a technical paper. I've read that it is possible to show line numbering on left or right, which works pretty well. But because because the listing contains code fragments rather than the whole program I would like to support this fact by increasing the counter within the listing.
Like:
Code: Select all
1 do {// comment3 a = b;...20 } while(true);// more comments...43 return a;
Is there a command or trick to achieve that?
Thanks!