Skip to content

Instantly share code, notes, and snippets.

@zr-tex8r
Created April 2, 2024 14:38
Show Gist options
  • Save zr-tex8r/1234c935c646174b842068fce6d8d512 to your computer and use it in GitHub Desktop.
Save zr-tex8r/1234c935c646174b842068fce6d8d512 to your computer and use it in GitHub Desktop.
TeX: To typeset the quadratic formula with iniTeX
\catcode`\{=1 \catcode`\}=2 \catcode`\$=3 \catcode`\^=7
\mathcode`\+="202B \mathcode`\-="2200 \mathcode`\=="303D
\hsize=77mm \vsize=22mm \scriptspace=0.5pt
\parfillskip=0pt plus 1fil \nulldelimiterspace=1.2pt
\delimiterfactor=901 \delimitershortfall=5pt
\thinmuskip=3mu \medmuskip=4mu \thickmuskip=5mu
\font\tt=cmr10 \font\st=cmr7 \tt\fam0
\font\tm=cmmi10 \font\ts=cmsy10 \font\tx=cmex10
\textfont0=\tt \scriptfont0=\st \scriptscriptfont0=\st
\textfont1=\tm \scriptfont1=\tm \scriptscriptfont1=\tm
\textfont2=\ts \scriptfont2=\ts \scriptscriptfont2=\ts
\textfont3=\tx \scriptfont3=\tx \scriptscriptfont3=\tx
\output{\shipout\vbox to\vsize{\vfill\unvbox255}}
$$x={-b\mathchar"2206\radical"270370{b^2-4ac}\over2a}$$
\end
@zr-tex8r
Copy link
Author

zr-tex8r commented Apr 2, 2024

Build with:

tex -ini ini-formula.tex
dvipdfmx -p "128mm,72mm" ini-formula.dvi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment