Hi all,
For my chess publishing I wanted more than “just boards”,
so I built staunton, and it’s now on Typst Universe. ![]()
The idea: you hand it a position or a whole game, and it hands you a proper,
referenceable #figure. FEN and PGN both work, and there’s a small pure-Typst
legal-move engine underneath, so you can play a game forward and ask for "the board
after White’s 7th move" without pre-computing anything. It also does localized move
notation (with variations, figurines, NAGs), tournament tables with the usual
tie-breaks, and diagram/table outlines — all in seven languages.
Parse a game, then drop in the position after a given move:
#import "@preview/staunton:0.1.0": parse-pgn, diagram-after
#let opera = parse-pgn(```
[White "Morphy"] [Black "Duke & Count"] [Result "1-0"]
1. e4 e5 2. Nf3 d6 3. d4 Bg4 4. dxe5 Bxf3 5. Qxf3 dxe5 6. Bc4 Nf6 7. Qb3 Qe7 *
```).first()
// A captioned figure of the position after Black's 7th move — you can @ref it.
#diagram-after(opera, "7b")
Just say what you mean, get a figure you can cross-refer. Everything else — themes,
board flip, highlights and arrows, custom piece sets, “what-if” variation play,
FEN export, HTML output — is in the manual rather than this post, so I’ll just point you there.
The package on Typst Universe:
Source + manual are on GitHub, grab the PDF from the latest release):
It’s just a start, so I genuinely would love your feedback — rough edges, missing chess things
or notation quirks in your language. I also want to acknowledge boards-n-pieces
(board-n-pieces – Typst Universe) that was an inspiration for
some of the features.
— Frank
