Reference subpanel without space

Is there some way to get
@fig1 a to render as Figure 1a instead of Figure 1 a ?

i.e., without the space?

I can get it to work like this:

#let figref = (label1, panel) => [#ref(label1)#panel]
#figref(<fig1>,"a")

But maybe there’s a way to put a no-space character that breaks the @ref and doesn’t insert a space in the following text? Feels like I’m missing something obvious, but I don’t know what.

Looks dirty, but works pretty well:

@fig1#[]a

Or a little bit prettier:

@fig1#[a]

But still looks dirty :(

The subpar package probably has everything you’re looking for

2 Likes

Typst has a zero-width space symbol. Without using any other packages, you can use code below:

@fig1#sym.zws;a

But I still recommend you to use the subpar package.