#Tagging and referencing custom counters

4 messages · Page 1 of 1 (latest)

sick shore
#

Hello! I want to make a custom counter and reference it later (with a link or something). The following works for the counter (following the docs):

#let p_count = counter("principle")
#let principle() = [
  #p_count.step()
  Principle #p_count.display("A")
]

I use it in text with bla bla bla #principle() bla bla and it correctly renders as "bla bla bla Principle A bla bla". Now i want to reference to the same position in the text with something like #principle()<myprinciple> followed by @myprinciple, but the engine complains that you "cannot reference sequence".

Thanks for any help!

minor blaze
sick shore
#

Oh - right. That is indeed annoying. I'll try with the workaround. Thanks!

sick shore
#

I can't seem to make it work... Could you provide an example?