

A PDF that contains its own TeX source - 2510c39011c5
https://code.google.com/p/corkami/source/detail?r=1907

======
dbaupp
Link to the actual PDF: [https://corkami.googlecode.com/svn-
history/r1907/trunk/src/p...](https://corkami.googlecode.com/svn-
history/r1907/trunk/src/pdf/quine.pdf)

------
whitten
So this is kind of like a quine ? (i.e.
[http://en.wikipedia.org/wiki/Quine_%28computing%29](http://en.wikipedia.org/wiki/Quine_%28computing%29)
) i.e. since PDFs are based on Postscript, they are effectively a program that
produces certain visual effects in a PDF viewer. The source code in PDF is
generated from TeX code which also has itself in the output of the program.

------
ange4771_
(I'm the author) it's a polyglot PDF/TeX, and you can generate the PDF by
directly running PDFLaTeX on it (so you distribute the source with the
viewable result)

the 2 tricks: \- include the source unmodified in the PDF itself \- modify the
PDF so that it's parsed by PDFLaTeX itself.

------
debe
[http://ideology.com.au/polyglot/](http://ideology.com.au/polyglot/)

~~~
taeric
While ridiculously awesome, that isn't really the same thing. It would be more
similar to consider programs that print themselves, such as [1]. Though, even
that isn't quite the same. Since I doubt you could point a compiler back at
the .pdf. (Edit: Well, looks like I was wrong on that point...)

[1] [http://stackoverflow.com/questions/7690862/program-that-
prin...](http://stackoverflow.com/questions/7690862/program-that-prints-
itself-how-does-it-work)

~~~
hjek
[https://en.wikipedia.org/wiki/Quine_%28computing%29](https://en.wikipedia.org/wiki/Quine_%28computing%29)

