![](https://secure.gravatar.com/avatar/bc68bd7791a2261e6e59722afea6a5d0.jpg?s=120&d=mm&r=g)
On 2014-07-23 14:01, Otared Kavian wrote:
In my ConTeXt archives I found the following example from a discussion on the mailing list: Wolfgang S. gave an answer which may help you: Best regards: OK
...some text elided...
one can set conditional texts but these are internal macros (which can change) and meant for users.
Wolfgang %%%% end test-ref.tex
I suspect that Wolfgang meant to warn: ... internal macros (which can change) and /are not/ meant for users because that certainly appears to be the case. More specifically, the example (from 2011) fails, complaining about an undefined control sequence with \analyzecurrentreference. As others pointed out in related discussions, there is another serious shortcoming with this. References should be relative to the current page spread, which on doublesided layouts includes two pages, verso and recto. A reference to something on either of these pages is traditionally considered to be current, and above and below refer to previous and subsequent page spreads. There is a module, smartref, by Marco Patzer, that may address the needs of the original poster. It has some limitations, but generally addresses the issue quite well. See the list message at http://www.mail-archive.com/ntg-context%40ntg.nl/msg71889.html for more on smartref. (The primary limitation in my use is that it assumes that a following argument, as in \smartref{preceding}{following}[label], should follow the /at page number/ text, thus disabling the use of the following text to provide a subfigure label. Thus, one ends up with "see figure 6.4 at page 73a" instead of "see figure 6.4a at page 73".) -- Rik Kabel