![](https://secure.gravatar.com/avatar/c83fb4134167a11422c23048fb8a85e3.jpg?s=120&d=mm&r=g)
Thanks all for the discussion. As a simple user, I think I must pass. All this complexity in my document text and setup is too much trouble and it seems risky (wjhat am I going to break?). Far less work to do a small check at the end.
What I was looking for was something simple that made for instance \at{page][foo] conditional, e.g.
\conditionalat[when]{page}[foo]
with ‘when’ is something like
always
onpage
offpage
onspread
offspread
never
Typing \conditionalat instead of \at is what I as a simpleton user can handle…
G
On 25 Jul 2014, at 13:06, Hans Hagen
On 7/24/2014 2:03 PM, Otared Kavian wrote:
Hi,
Thanks for your attention, Wolfgang: indeed removing \analyzecurrentreference from your example allows mkiv to typeset correctly and obtain the expected result.
....
yet another sparsely documented feature ... in beta:
% tests/mkiv/pagestate-001.tex
\useMPlibrary[dum]
\setuppagenumbering [alternative=doublesided]
% new: \setupreferencing[doublesided=no]
% old: \somewhere{backward}{foreward}[label] % new: \someplace{preceding}{backward}{current}{foreward}{following}[label] % old: \atpage[#label] % new: \doifcheckedpagestate{label}{preceding}{backward}{current}{foreward}{following}{otherwise}
\starttext
\dorecurse {20} { \placefigure [here] [fig:#1] {} {\externalfigure[dummy]} \dorecurse {20} { ##1: \atpage[fig:##1] / \doifcheckedpagestate{fig:##1} {preceding} {backward} {current} {foreward} {following} {otherwise} } }
\stoptext
if okay, then it's something to wikify ... should \setupreferencing[doublesided=no] be default? (currently yes i.e. spread aware)
keep in mind that this kind of functionality once it kicks in (is used) can result in a few more runs to get thing right and that there's always the danger of oscillation as the text injected is dependent on the situation
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________