Just out of curiosity, I was wondering how it is possible to write a LaTeX document which, when compiled, generates a document that contains exactly its own source code (i. e. a quine).
Since LaTeX is Turing-complete, there's an argument from theoretical computer science which ensures the existence of such a document, but it seems rather hard to actually construct such a program.
I hope that someone is able to come up with a nice solution to this brainteaser.