Hey
When I first started using Typst (which was a while ago), I tried to draw clock faces to teach my kids about clock faces.
Since this package lies around in my web app, i thought probably itโs of interest for other people as well?
So here is clocks:
// You can draw "empty" clock faces
#clocks.clock()
// Clock with hour hand only.
#clocks.clock(hours: 1)
// Clock with minute hand only.
#clocks.clock(minutes: 30)
// Clock with hour and minute hands.
#clocks.clock(hours: 3, minutes: 30)
// You may adjust the default diameter of 3em.
#clocks.clock(diameter: 5em, hours: 3, minutes: 30)
// And you may adjust the stroke.
#clocks.clock(diameter: 5em, hours: 3, minutes: 30, stroke: (thickness: 2pt, cap: "round", paint: blue))
Adding a clock "inline" is also possible, just set the
`diameter` attribute as small as `0.7em`. As you can see,
the readability requires an adjustment of the stroke to
`0.6pt` as well. #clocks.clock(diameter: 0.7em, hours: 11, minutes: 55, stroke: (0.6pt))
The source code can be found here: typst-clocks/clocks.typ at main ยท florianb/typst-clocks ยท GitHub
Let me know what you think. What could be better? And would it be a good fit for the universe?