TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A PDF that contains its own TeX source

27 pointsby 2510c39011c5over 10 years ago

4 comments

dbauppover 10 years ago
Link to the actual PDF: <a href="https://corkami.googlecode.com/svn-history/r1907/trunk/src/pdf/quine.pdf" rel="nofollow">https:&#x2F;&#x2F;corkami.googlecode.com&#x2F;svn-history&#x2F;r1907&#x2F;trunk&#x2F;src&#x2F;p...</a>
whittenover 10 years ago
So this is kind of like a quine ? (i.e. <a href="http://en.wikipedia.org/wiki/Quine_%28computing%29" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Quine_%28computing%29</a> ) 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_over 10 years ago
(I&#x27;m the author) it&#x27;s a polyglot PDF&#x2F;TeX, and you can generate the PDF by directly running PDFLaTeX on it (so you distribute the source with the viewable result)<p>the 2 tricks: - include the source unmodified in the PDF itself - modify the PDF so that it&#x27;s parsed by PDFLaTeX itself.
debeover 10 years ago
<a href="http://ideology.com.au/polyglot/" rel="nofollow">http:&#x2F;&#x2F;ideology.com.au&#x2F;polyglot&#x2F;</a>
评论 #8393752 未加载