Am 06.02.10 23:17, schrieb Peter Münster:
Hello,
How can I place an element as background at a previously defined position?
Here a test-file to show what I'm looking for:
\definelayer[graphics][position=yes] \setupbackgrounds[page][background=graphics] \starttext Here is some text. I would like to appear a graphics exactly behind \hpos{XXX}{HERE}. How can I do this, without measuring by hand the x- and y-offsets, and perhaps also without using metapost?
untested: \newcounter\BackgroundPictures \definelayer[BackgroundPicture][width=\paperwidth,height=\paperheight] \def\FixedPicture {\dodoubleempty\doFixedPicture} \def\doFixedPicture[#1][#2]% {\doglobal\increment\BackgroundPictures \xypos{fixedpicture:\BackgroundPictures}% \doifnotmode{first} {\setlayer [BackgroundPicture] [x=\MPx{fixedpicture:\BackgroundPictures}, y=\MPy{fixedpicture:\BackgroundPictures}] {\externalfigure[#1][#2]}}} \setupbackgrounds[page][background=BackgroundPicture] \starttext ... \FixedPicture[...] ... \stoptext Wolfgang