Tips & tricks

Conditional output

Use calepin-target when a small piece of Typst should change between HTML and paged output:

#let target = sys.inputs.at("calepin-target", default: "paged")

#if target == "html" [
  This appears only in HTML.
] else [
  This appears in PDF, SVG, and PNG output.
]