-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
bugSomething isn't workingSomething isn't workingintrospectionRelated to the introspection categoryRelated to the introspection category
Description
Description
Take a look at the following snippet:
#let number = counter("part-number")
#part_number.update(10)
#page[#number.display()]The resulting document has only one page and the number is 0, when it should be 10. The same also happens with states.
My guess is that typst removes the first page if it only contains whitespace to not have an empty page before the first page it the document starts with an explicit #page call, though I have not verified if this is really what's happening.
If this is the reason possible solutions would be to either not threat state/counter updates as whitespace in this context (so the above snippet would start with an "empty" page containing only the update) or to automatically move the update into the page.
Reproduction URL
No response
Operating system
Linux
Typst version
- I am using the latest version of Typst
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingintrospectionRelated to the introspection categoryRelated to the introspection category