A very easily editable blog, with typst

#meta #typst

I’ve been wanting to have a personal site for a long time. I’ve always been very particular in my choice of tech stack, and I had never found anything that felt perfect, until now! This site ticks every box.

Every equation on this page is written in Typst and exported as native MathML. No JavaScript renders it; the browser does, using the same New Computer Modern Math font Typst uses for PDF.1 Firefox has rendered MathML for years; Chromium caught up in version 109, and Safari follows its own WebKit implementation.

Inline and display

The Gaussian integral ∫−∞∞𝑒−𝑥2d𝑥=𝜋 sits inline, and its 𝑛-dimensional cousin2 Valid for symmetric positive-definite 𝐴: diagonalise it and the integral factorises into 𝑛 one-dimensional Gaussians. gets its own line:

∫ℝ𝑛𝑒−12𝑥𝑇𝐴𝑥+𝐽𝑇𝑥d𝑛𝑥=(2𝜋)𝑛det𝐴𝑒12𝐽𝑇𝐴−1𝐽

Aligned systems

Maxwell’s equations in differential form:3 In SI units. In Gaussian units the factors of 𝜀0 and 𝜇0 give way to powers of 𝑐.

∇⋅𝑬=𝜌𝜀0∇⋅𝑩=0∇×𝑬=−𝜕𝑩𝜕𝑡∇×𝑩=𝜇0𝑱+𝜇0𝜀0𝜕𝑬𝜕𝑡

Matrices, cases and Dirac notation

𝜎𝑥=(0110),𝜎𝑦=(0−𝑖𝑖0),𝜎𝑧=(100−1)𝜃(𝑥)={1if𝑥>00otherwise⟨𝜓𝑓|𝑒−𝑖𝐻𝑡ℏ|𝜓𝑖⟩=∫𝒟︀𝑞𝑒𝑖𝑆[𝑞]ℏ

The geometric phase picked up around a closed loop is treated in the note on the Berry phase.

A plot drawn with plain Typst

Figure 1: sin(𝑥)/𝑥 on [−20,20], drawn with curve and exported as SVG.

The escape hatch

If a browser ever draws an equation badly, svg-math renders that one as SVG:

and now this is neat! This is really cool!!