Here comes another one that works with the switch --luatex but not in lmtx:

\setuppapersize[A6,landscape][A6,landscape]

\startuseMPgraphic{ornament}
StartPage ;

save diff ;numeric diff;
diff = .3cm ;

save w; numeric w;
w = xpart (lrcorner Field[Text][Text] - llcorner Field[Text][Text]) - diff ;

save factor; numeric factor;
if NOfPages <= 1 :
  factor = w ;
else :
  factor = w/(NOfPages - 1) ;
fi ;

save p; path p ;
p = unitsquare xyscaled (diff,diff)
               shifted (xpart llcorner Field[Text][Text],0.85cm) ;

for i = 1 upto NOfPages:
  if RealPageNumber = i:
    fill p xyscaled (0,2) shifted ( (i-1)*factor,-diff-0.85cm)
         withcolor blue ;
  else :
    fill p shifted ( (i-1)*factor, 0)
         withcolor red ;
  fi ;
endfor ;
StopPage ;
\stopuseMPgraphic

\defineoverlay
  [Ornament]
  [\useMPgraphic{ornament}]

\setupbackgrounds[page]
                 [state=repeat,
                  background={Ornament}]

\starttext

\dorecurse {10} {Test \page}

\stoptext

All best

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

Reply via email to