[NTG-context] Leave out reference to page if on the same page?

Wolfgang Schuster schuster.wolfgang at gmail.com
Thu Jul 24 13:38:28 CEST 2014

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

> On Thu, Jul 24, 2014 at 1:20 PM, Otared Kavian <otared at 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).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140724/396e47d4/attachment-0001.html>

More information about the ntg-context mailing list