Skip to content

Add exception for figures without numbering#89

Open
rkunnema wants to merge 1 commit into
typst:mainfrom
rkunnema:main
Open

Add exception for figures without numbering#89
rkunnema wants to merge 1 commit into
typst:mainfrom
rkunnema:main

Conversation

@rkunnema

@rkunnema rkunnema commented Jun 2, 2026

Copy link
Copy Markdown

When combining with ctheorems, I've gotten the following error:

error: expected string or function, found none
   ┌─ @preview/charged-ieee:0.1.4/lib.typ:62:28
   │
62 │     let numbers = numbering(fig.numbering, ..fig.counter.at(fig.location()))
   │                             ^^^^^^^^^^^^^

help: error occurred while applying show rule to this figure
   ┌─ @preview/ctheorems:1.1.3/lib.typ:85:11
   │
85 │       return figure(
   │ ╭────────────^
86 │ │       result +  // hacky!
87 │ │       fmt(name, number, body, ..args.named()) +
88 │ │       [#metadata(identifier) <meta:thmenvcounter>],
   · │
93 │ │       numbering: refnumbering,
94 │ │     )

This can be fixed by handling the case where a figure has no numbering. This PR adds that.

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.

1 participant