Last active
January 9, 2016 10:36
-
-
Save zr-tex8r/150f826f564bd875c3c9 to your computer and use it in GitHub Desktop.
TeX: Yet Another Quine on TeX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xf7 0x25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! | |
\catcode13=12! | |
\toks0{\output{\setbox0\box255 \shipout\hbox{% | |
\special{ps::(! | |
\catcode13=12! | |
\toks0{\the\toks0}% | |
\noexpand\the\toks0\end)pop}}}}% | |
\the\toks0\end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The file
teqgen.tex
is the quine generator. First run:and then rename the output file
teqgen.dvi
toteq.tex
.This is the Quine source file.
When
teq.tex
is compiled with the command:it will output the DVI file
teq.dvi
which completely coincides withteq.tex
.