I would like to make it harder for students to just copy/paste code listings from the PDF.
How to achieve this? I want them to actually understand the code, close the book, and write from their minds.
Currently, lstlisting is setup like this
\lstset{%
basicstyle=\footnotesize\ttfamily, % Standardschrift
numbers=left, % Ort der Zeilennummern
numberstyle=\tiny, % Stil der Zeilennummern
numbersep=5pt, % Abstand der Nummern zum Text
tabsize=4, % Groesse von Tabs
extendedchars=true, %
breaklines=true, % Zeilen werden Umgebrochen
frame=b,
showspaces=false, % Leerzeichen anzeigen ?
showtabs=false, % Tabs anzeigen ?
xleftmargin=17pt,
showstringspaces=false % Leerzeichen in Strings anzeigen ?
keywordstyle=\color{Red},
stringstyle=\color{OliveGreen},
identifierstyle=\color{Blue},
frame=shadowbox,
rulesepcolor=\color{Gray},
escapeinside={\%*}{*)}, % if you want to add a comment within your code
mathescape=false,
columns=flexible
}