Am 24.07.2014 um 13:26 schrieb luigi scarso <luigi.scarso@gmail.com>:




On Thu, Jul 24, 2014 at 1:20 PM, Otared Kavian <otared@gmail.com> wrote:
Hi Rik,

As a matter of fact the example given by Wolfgang works despite mkiv complaining about
\analyzecurrentreference
being unknown… Whent the typesetting stops because of this command, saying « run » or rather « r » continues the typesetting.
I didn’t send the example module of Marco Patzer since it doesn’t seem to work anymore with recent versions of mkiv.

Maybe Marco has a solution for his module?


also this one should work
\starttext
is shown in \in{figure}[FOO]%
\doifreferencefoundelse{FOO}{\ifnum\realfolio=\currentreferencepage\else\at{page}[FOO]\fi}{}% 
\placefigure[none][FOO]{FOO}{\externalfigure[cow.pdf][width=1cm]}

\page

is shown in \in{figure}[FOO1]%
\doifreferencefoundelse{FOO1}{\ifnum\realfolio=\currentreferencepage\else\at{page}[FOO1]\fi}{}\page%
\placefigure[none][FOO1]{FOO1}{\externalfigure[cow.pdf][width=1cm]}

\stoptext

I won’t trust this pagenumber check because when a reference appears at the begin of a page
it can sometimes use the pagenumber of the previous page (hard to notice when you use \page
in your examples to force a page break).

Wolfgang