3

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.

Dominik
  • 153
  • Sorry, stackexchange doesn't seem to have a way to cancel my vote, but please consider the my reopen vote cancelled. – Dan Dec 03 '13 at 18:40

0 Answers0