How to reference list items?

If you have a list with items in it, can you label individual items and reference them? e.g.

#set enum(numbering: "(a)")
+ foo
+ bar <label>

@label is a reference to a list item.
// desired output: (b) is a reference to a list item.

Furthermore, if the list is nested, is there a way to accumulate the reference? e.g.

#set enum(numbering: "(a)")
1. foo
2. bar
  + foobar
  + foofoo <label>

@label is a reference to a list item.
// desired output: 2(b) is a reference to a nested list item.
1 Like

Take a look at this Github issue.

hmm i see. far from ideal but I guess it’s better than nothing.

Is this feature available in Typst now, or on a roadmap somewhere?

no, not yet build in. The itemize package provides this functionality.

Not on the official roadmap, but an open GitHub issue exists (linked above by @ParaN3xus).

It seems strange to me that this functionality isn’t natively available, given that it is a straightforward thing that people do in LaTeX. Not that this is definitive, but ChatGPT definitely assumed it would be the way to do things.

Can I confirm that referencing list items is still not on any roadmap?

Yeah, I agree that it’s a nice to have feature, and I think it is highly likely that it will be implemented at some point. I don’t think it’s strange at all that it isn’t implemented yet, the core team is tiny and this and 1200 other issues compete for attention.

To answer your question, no, at least not on the official public roadmap (but I think no new items were added after it was initially published).

The itemize package still works and provides the feature :).