Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable access to counters with identifier #29

Open
kunzaatko opened this issue May 16, 2024 · 0 comments
Open

Enable access to counters with identifier #29

kunzaatko opened this issue May 16, 2024 · 0 comments

Comments

@kunzaatko
Copy link

Currently, there is no clear way to update a counter manually.
An example of the desired usage:

#import "@preview/ctheorems:1.1.2": *
#show: thmrules

#let theorem = thmbox(
  "theorem",
  "Theorem",
  base_level: 0,
)

#theorem("Number 1")[This is a theorem]

#counter("theorem").update(6)

#counter("theorem").display()

#theorem("Number 7")[This is a theorem]

The outcome:
image

This should instead result with the second theorem be "Theorem 7". At the moment, I think the counters are only accessible via looking them up in the state and updating them manually with the knowledge of the data structure of the package. If there is no way around this, it should be at least documented, since it is a feature that is quite common in practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant