I’ve made a function to create crosswords with typst (thanks a lot to PgBiel for the improved tables). My code is a mess so I won’t share it right now, but I wanted some opinions on the API.
x and y are the coordinates in a grid of the first letter of the word, d is the direction of the word. Manually setting the coordinates isn’t convenient at all, but I don’t know what would be a better interface.
Sounds like a cool project, and the results so far are good.
Instead of specifying locations (x, y) for words it would be really cool (and likely really hard) to just give it the words and have the template/package figure out how to lay them out. Or if you specify a shared letter between pairs of words. There could be existing algorithms for the problem of laying out crosswords.
One omission that I see though is the hints. I think each word should also have a hint, then that will be used to create the table.2.
#crossword(
(x: 9, y: 2, d: ttb, w: "text", h:"what you type"),
//etc...
)
//Which would result in a list like this
= Down
1. what you type
= Across
//...