How to refer subfigures using subpar and custom numbering

Hi, the mentioned numbering-sub-ref parameter is correct, but because the sub figure has two levels your custom numbering doesn’t work. You have to capture both levels with a sink ..n:

...
numbering-sub-ref: (..n) => {
  let h1 = counter(heading).get().first()
  numbering("1.1a", h1, ..n)
}
...

I think the easiest is to use .with(…) to create and use a custom variable with the arguments preapplied.

#let mysubpar = subpar.grid.with(numbering: ..., numbering-sub-ref:...)