← All posts

Hello Typst: Math-Heavy Posts, Natively

Why Typst?

LaTeX is a 40-year-old toolchain held together by duct tape and prayer. Typst compiles in milliseconds, has sane syntax, and its math notation is actually readable. This entire post is a .typ file compiled to HTML at build time.

The dispersion relation

For a chalcogenide waveguide, the propagation constant expands as:

𝛽(𝜔)=𝛽0+𝛽1(𝜔−𝜔0)+𝛽22(𝜔−𝜔0)2+…

where 𝛽2=d2𝛽d𝜔2|𝜔0 is the group-velocity dispersion parameter, usually quoted in ps^2/m.

Generalized nonlinear Schrödinger equation

Supercontinuum evolution obeys (broken across lines for readability):

d𝐴d𝑧=𝑖∑𝑘≥2𝑖𝑘+1𝛽𝑘𝑘!d𝑘𝐴d𝑇𝑘+𝑖𝛾(1+𝑖𝜔0dd𝑇)𝐴(𝑧,𝑇)∫−∞∞𝑅(𝑇′)|𝐴(𝑇−𝑇′)|2d𝑇′

Yes, that fits on one line. Try that in Word.

A quick table

Material𝛽2 @ 1550 nmNonlinear index 𝑛2
SiO2+0.026 ps^2/m2.6×10−20 m^2/W
As2S3−0.010 ps^2/m3.0×10−18 m^2/W
As2Se3−0.049 ps^2/m1.2×10−17 m^2/W

And code blocks work too

import numpy as np

def gvd(beta2: float, L: float) -> float:
    """Accumulated GVD over length L."""
    return beta2 * L

Closing thought

Expect more equation-dense posts in this format. The markdown pipeline isn’t going anywhere. Now there are simply two ways to write here.