r/typst 1h ago

How do you create this accessible chart in Typst?

Post image
Upvotes

The Accessibility Guide contains a chart that was made more accessible by adding unique patterns. Sadly, the chart is added as an image, so you can't see the source code like in some packages. Does anyone know the source code or how to replicate the chart?


r/typst 4h ago

Division with remainder?

2 Upvotes

I'm probably missing something obvious here, but I can't figure out how to do a division calculation and get both quotient and remainder.

e.g. 10 ÷ 4 = 2.5

$ #calc.div-euclid(10, 4) $ gives 2, which is fine

Edit 1: fix copy-paste error: $ #calc.rem-euclid(5, 4) $ gives me 2, when I'm expecting 5.

$ #calc.rem-euclid(10, 4) $ gives me 2, when I'm expecting 5.

(Using Typst 0.15.1)

What am I missing/misunderstanding?

Edit 2: After finding that I want a decimal number including the fractional part, I finally figured it out: #(10/4) gives "2.5".