Created
December 12, 2023 15:07
-
-
Save zr-tex8r/2252cf6472704c385801544f38f2ba22 to your computer and use it in GitHub Desktop.
A document source that can be compiled both as plain TeX and Typst (polyglot)
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
// \begingroup \catcode`\#=12 | |
#let s = ``` | |
\endgroup \newdimen\pwd \newdimen\pht | |
\pwd=160bp \pht=90bp | |
\ifnum\ifx\pdfoutput\unDef0\else\pdfoutput\fi>0 | |
\pdfpagewidth=\pwd \pdfpageheight=\pht \let\os\relax | |
\else \def\os{\special{papersize=\the\pwd,\the\pht}}\fi | |
\shipout\vbox to\pht{\os \font\ff=cmr10 at 36bp \vskip-1inplus1fil | |
\moveleft1in\hbox to\pwd{\hfil\ff \TeX!!\hfil}\vskip1inplus1fil} | |
\output{\setbox0\box255\deadcycles=0}\bye | |
``` | |
#page(width: 160pt, height: 90pt, { | |
v(18pt); | |
align(center, text(size: 36pt)[Typst]); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment