Hello,
I have two different kinds of figures, and I want to count them the same way. In the code below, you can see that even though I am trying to reset the counters for both “raw” and “raw2” figures, it doesn’t work exactly as it should, because “Fig 2.4” is being listed as Listing 2.3 and “Fig 2.3” as Listing 2.2. Is there any way to make this numbering work using two different kinds of figures?
Test output can also be seen here: Test
#set figure(numbering: it => {
let count = counter(heading).get()
numbering("1.1.", count.at(0), it)
})
#set heading(numbering: "1.1.1")
#show heading.where(level: 1): it => {
counter(figure.where(kind: image)).update(0)
counter(figure.where(kind: table)).update(0)
counter(figure.where(kind: raw).or(figure.where(kind: "raw2"))).update(0)
counter(math.equation).update(0)
it
}
= Heading1
#figure(
raw("Fig 1.1"),
caption: [What]
)
= Heading2
#figure(
raw("Fig 2.1"),
caption: [What],
kind: "raw2",
supplement: "Listing",
)
#figure(
raw("Fig 2.2"),
caption: [What],
kind: "raw2",
supplement: "Listing",
)
#figure(
raw("Fig 2.3"),
caption: [What],
supplement: "Listing",
)
#figure(
raw("Fig 2.4"),
caption: [What],
supplement: "Listing",
kind: "raw2",
)
= Heading3
#figure(
raw("Fig 3.1"),
caption: [What]
)
#figure(
raw("Fig 3.2"),
caption: [What],
supplement: "Listing",
kind: "raw2",
)
#outline(title: [List of listings], target: figure.where(kind: raw).or(figure.where(kind: "raw2")))
Thank you for your time and help in advance.

