I’ve been using Typst to typeset a family history, and it turned into a tool other people can use, so I’ve open-sourced it.
The book it was built for is 1,123 pages, with about 3,000 footnotes and a two-column name index. A Python script reads the family tree (a GEDCOM file) and writes one big .typ file, then Typst compiles it. The stories use a small subset of Typst markup, with a #src("key") function for citations that turns into footnotes. After compiling, it runs typst query to check that footnotes land where they should.
If you pin SOURCE_DATE_EPOCH, the PDF comes out byte-for-byte the same every time.
Sample book (a made-up family, 57 pages): https://flyleaf.family/sample-book.pdf
Code: GitHub - ian-c-leonard/flyleaf: Turn a family tree (GEDCOM) into a printed family history and a family website. · GitHub
Happy to answer questions about the templates.