On 8/13/25 9:49 PM, Denis Maier via ntg-context wrote:
I'm not sure you need this. I've recently had a project where I've processed a 
single source XML multiple times. Each environment contains a set of xmlsetups 
that work for the relevant node.

Hmm, I have to think about this. I don't think this the same use case. If I want to refer to page numbers, I need to process everything in the same ConTeXt run to preserve the tuc file. But perhaps I'm on the wrong track and this is possible.

Also, it might be useful to take xml out of the equation here and rephrase the 
question.

Can you add backlinks to the page where an endnote was inserted?

Yes, of course. \endnote and \footnote take an optional argument "reference" that will end up in the tuc file. So if you write

\endnote [endnote:1] {Endnote 1.}

you will find in your tuc file (simplified)

   ["realpage"]=123,
   ["reference"]="endnote:1",

which you can access from the TeX end as

\at [endote:1]

and from the Lua end as

structures.references.collected[""]["endnote:1"].references.realpage

(see https://www.mail-archive.com/ntg-context@ntg.nl/msg107295.html)

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to