This question already has an answer here:
I'm writing a LaTeX document and want to include several listings for source code examples.
Is there a way to disable the selection of line-numbers when selecting the source code?
My prof just wants to copy/paste the source code from the final pdf-file without manually removing all the line numbers afterwards. Does anyone know how to fix this problem?