Re:A PDF that contains its own TeX source
by whitten on Wednesday October 01, 2014 @04:07PM
(#8397349)
So this is kind of like a quine ? (i.e. 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.
Re:A PDF that contains its own TeX source
by ange4771_ on Wednesday October 01, 2014 @09:18AM
(#8394107)
(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.
Re:A PDF that contains its own TeX source
by taeric on Wednesday October 01, 2014 @07:22AM
(#8393752)
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...)
the 2 tricks: - include the source unmodified in the PDF itself - modify the PDF so that it's parsed by PDFLaTeX itself.
[1] http://stackoverflow.com/questions/7690862/program-that-prin...