Skip to content

Conversation

@wanenergetic
Copy link

Fixes #2728

Adds a comprehensive list of all elements that implement Locatable and can be used with the counter() function, as requested in the issue.

Changes

  • Add "Countable Elements" section to docs/reference/library/introspection.md
  • List all built-in elements: page, heading, figure, equation, footnote, table, list, enum
  • Include examples for:
    • Built-in element counters
    • Custom string counters
    • Label-based counters
  • Add version note for future reference

Testing

The list is based on the existing test suite and source code analysis.

Fixes typst#2728 by listing all elements that implement Locatable and can be used with counter().

- Add comprehensive list of countable elements to introspection.md
- Include examples for custom counters and labeled elements
- Add version note for future reference
@laurmaedje
Copy link
Member

laurmaedje commented Dec 9, 2025

The PR uses wrong doc syntax, states something about Typst 0.10 (which is very out of date), and the edits are made in a suboptimal place. Overall, it is not up to our standards, so I'll close this.

@laurmaedje laurmaedje closed this Dec 9, 2025
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

Successfully merging this pull request may close these issues.

List all elements that can be used in counter constructor in documentation

2 participants