On 12/6/2022 10:04 PM, Rik Kabel via ntg-context wrote:
On 2022-12-06 15:32, Hans Hagen via ntg-context wrote:
On 12/6/2022 9:06 PM, Rik Kabel via ntg-context wrote:
\definelabel[X][text=] \startTEXpage[offset=1cm] \X\X[a]\X[b]\X\par \convertnumber{R}{\ref[number][a]} \convertnumber{G}{\ref[number][b]} \stopTEXpage
maybe like this:
\definelabel[X][text=]
\startTEXpage[offset=1cm] (\X) (\X[a]) (\X[b]) (\X) \par \doifelsereferencefound {a} {\convertnumber{number}{\currentreferencenumber}} {} \par \doifelsereferencefound {a} {\convertnumber{R}{\currentreferencenumber}} {} \par \doifelsereferencefound {b} {\convertnumber{G}{\currentreferencenumber}} {} \stopTEXpage
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE
Perfect! Thank you.
It looks like \currentreference number is initially empty, and when \doifelsereferencefound succeeds it is set to that value, and remains set to that value until another \doifelsereferencefound is encountered. If \doifelsereferencefound fails, \currentreference is again empty. Is that correct?
yes, btw, there are some more \currentreference* available Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------