Changelog
All notable changes to this package are recorded here. The format follows Keep a Changelog, and the versions follow Semantic Versioning — with the caveat that this is pre-1.0, so a 0.x bump may break anything. A Typst import names an exact version, so nothing breaks under you: upgrading is always a deliberate edit.
Unreleased
The vertical release: a diagram is no longer bound to run left to right.
Added
orientationonlamport-diagram, which says which way logical time runs:rightwards,leftwards,downwardsorupwards, withhorizontalandverticalas shorter names for the first and third. The horizontal pair lays the timelines out as rows and stacks the replicas downwards; the vertical pair lays them out as columns and stacks the replicas rightwards. These are plain strings, soorientation: "vertical"works without importing anything.leftandright, re-exported alongsideaboveandbelow, so one import line covers every side a diagram may ask for. They are the built-in alignments of those names, so either spelling works. A vertical diagram puts a label on therightby default; a horizontal one keeps 0.1.0’sabove.gallery/vertical.typ, the gorgeous example drawn downwards.
Changed
- Which sides a label may sit on now follows from the orientation:
above/belowfor the horizontal pair,left/rightfor the vertical one. A side the orientation has no room for is not an error — it is dropped back to that orientation’s default and otherwise ignored, so flipping a finished diagram from horizontal to vertical stays one edit rather than a compile error on every lane that named a side. It passes in silence for want of anywhere to complain: Typst gives user code no way to raise a compiler warning, and printing one into the document would put it in front of the reader rather than the author. - A ratio
displacementis now taken against the label’s extent along its timeline — its width when the timelines are rows, its height when they are columns. On a horizontal diagram this is what it always was. - The drawing works in two abstract axes, one along the timelines and one across them, which a single mapping turns into page coordinates per orientation. Horizontal output is unchanged by this.
Fixed
gapandidlecarried a label side they never use, which would have drawn a spurious warning on every vertical diagram. Neither draws a label, so neither states a side any more.
0.1.0 — 2026-08-06
Initial release.
lamport-diagram, with columns solved rather than authored: every event lands in the earliest column that keeps it after its predecessor on the same replica and after the send of every message it receives, and a receive that would precede its own send fails compilation instead of drawing a backwards arrow.replicafor a lane and its event defaults,eventfor a local step,send/recvfor a one-way message,syncfor a two-way exchange,gapfor elided time andidlefor time in which nothing happened.aboveandbelowfor label sides, anddefault-palettefor the lane colours.