RaNiK
1
Hi,
I have this piece of code that works in typst 0.13 but doesn’t work anymore in typst 0.14.
#heading("Title", level: 2, numbering: (a,b) => [#b.#a− ])
The code
#heading("Title", level: 2, numbering: (..a) => [#a− ])
print an arguments(0,1) but it doesn’t respond to pos() or at()
What is the expected syntax ?
Y.D.X
2
Sorry this is a known bug in v0.14.0. The cause is that our numbering functions get ghost calls.
Here’s a workaround:
#heading("Title", level: 2, numbering: (..nums) => if nums.pos().len() >= 2 {
let (a, b) = nums.pos()
[#b.#a− ]
})
1 Like
RaNiK
3
Thank’s, I missed this information.
1 Like