Dear list,

with the (almost minimal) example below, I hoped that the frame would
be recalculated at every page. But it is not (they all look the same
in my output pdf). How can I force the frame to be redrawn at every
page?

Btw, If I change the uniqueMPgraphic to useMPgraphic (everywhere) my
file does not compile anymore. I get some lua error.

/Mikael

\setuppapersize[S6][S6]

\setuplayout[
width=fit,
height=fit,
margin=1pt,
topspace=0.5cm,
headerdistance=0.3cm,
footerdistance=0.5cm,
footer=14pt,
backspace=1.5cm,
location=middle,
]

\startuniqueMPgraphic{figram}
path q;
rr:=7mm;
StartPage;
q := lrcorner Field[RightMargin][Header] --
     llcorner Field[LeftMargin][Header] --
     ulcorner Field[LeftMargin][Footer] --
     urcorner Field[RightMargin][Footer] -- cycle;

draw q withcolor 0.7white;
draw (urcorner q)--((urcorner q) xshifted 1bp+(uniformdeviate rr))
withcolor .7white;
draw (urcorner q)--((urcorner q) yshifted 1bp+(uniformdeviate rr))
withcolor .7white;
draw (ulcorner q)--((ulcorner q) xshifted -1bp-(uniformdeviate rr))
withcolor .7white;
draw (ulcorner q)--((ulcorner q) yshifted 1bp+(uniformdeviate rr))
withcolor .7white;
draw (llcorner q)--((llcorner q) xshifted -1bp-(uniformdeviate rr))
withcolor .7white;
draw (llcorner q)--((llcorner q) yshifted -1bp-(uniformdeviate rr))
withcolor .7white;
draw (lrcorner q)--((lrcorner q) xshifted 1bp+(uniformdeviate rr))
withcolor .7white;
draw (lrcorner q)--((lrcorner q) yshifted -1bp-(uniformdeviate rr))
withcolor .7white;
StopPage;
\stopuniqueMPgraphic

\defineoverlay[figram][\uniqueMPgraphic{figram}]
\setupbackgrounds[page][background=figram]

\starttext
\dorecurse{10}{\input knuth}
\stoptext
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to