Counters in Typst

When in Typst add a counters, like in a LaTeX ?. To users can show number of papers, lewel or number list e t. c.

There is counter for arbitrary counting.
You can get the number of pages with counter(page).final().first(). Levels and number list, I don’t get what number should represent. Also stuff like counter(figure.where(kind: image)), counter(figure.where(kind: table)), counter(heading).

There is headcount – Typst Universe and rich-counters – Typst Universe for more advanced/inherit counting.

1 Like

I’ll also mention typsy here, which includes “safe” counters (that don’t need you to hope you pick a unique name), and “tree” counters, so that e.g. theorems can be numbered according to the section they’re in.

2 Likes

Hi @Gasap, thanks for your question. It is a bit hard to tell what exactly you’re asking. Should the answers not cover what you needed, you can try e.g. deepl to help translate your question to English.