Joel via ntg-context schrieb am 15.03.2024 um 20:50:
When I run this code, \at{page}[xyz] is unable to find the cross reference:
\starttext %\reference[xyz]{} \starttabulate[|lp(.33333\textwidth)|lp(.6666\textwidth)|] \NC \reference[xyz]{} \NC \NC\NR
\NC \doifnotmode{*trialtypesetting}{\pagereference[xyz]} \NC \NC\NR
\stoptabulate
\pagebreak
\at{page}[xyz]
\stoptext
The code does work when I uncomment line #2, revealing the cross-references work find when outside of a table.
I also tried using a TABLE environment instead and the result was similar, it wouldn't show the page number.
What am I doing wrong?
Tabulate and natural tables process the table content multiple times and therefore you're setting the reference multiple times, to avoid this check for trialtypesetting mode and set the reference only when you're out of the mode. @Hans: Can we add the check trialtypesetting check to \reference etc.? \protected\def\strc_references_set_named_reference - {\ifreferencing + {\iftrialtypesetting + \expandafter\gobblefourarguments + \orelse\ifreferencing \expandafter\strc_references_set_named_reference_indeed \else \expandafter\gobblefourarguments \fi} Wolfgang