The packages listings and minted present source code inline.
My publication target is PDF. From my own documents as well as from the documentation for those two packages, copying and pasting the source code listings omits all indentation. My students are not happy to have to fix the indentation to try a sample snippet of Python.
I suspect this is down to an inherent limitation in PDF, which places characters (not whitespace) on the page. Is there any way to make a TeX source code listing published in PDF whose indentation can be copied and pasted?