I need to report every chapter that a particular macro appeared. I would do this by placing `\pagereference[sample]` inside the macro definition, so whenever it is called, it marks the reference info. But I can't seem to get references to work with multiple reference locations marked, example:

\starttext

    You can find it at \at{page}[sample] in \at{chapter}[sample].

\chapter{Fish}

\pagereference[sample]

\input knuth

\input knuth

\pagebreak

\chapter{Whales}

\input knuth

\pagereference[sample]

\stoptext

(you can see in this example, it only finds `\pagereference[sample]` on page 1 and ignores the second appearance.



Ideally, I need to be able to output something like, "See examples in Chapter 3, 8, 19" (because those chapters contain a particular macro that I marked with \pagereference. Or, if even possible, see chapters 3 (p. 22), 8 (p. 40), and 20 (though the first example is fine.

Is there a way to place a page reference multiple times, so multiple pages or chapter details will appear?

--Joel