On Mon, Oct 7, 2013 at 10:04 PM, Pablo Rodríguez <oinos@gmx.es> wrote:
On 10/07/2013 07:16 PM, luigi scarso wrote:
> On Mon, Oct 7, 2013 at 5:56 PM, Pablo Rodríguez wrote:
>  Dear list,
>
>  I have the following sample:
>  [...]

Many thanks for your reply, Luigi.

I need to insist on this sample, because the layer doesn’t behave as such:

\definelayer[wrongpositioned][x=5000cm, y=5000cm, state=start]
\setuplayer[wrongpositioned]{\startMPcode draw
(0mm,0mm)--(8mm,0mm)--(8mm,38mm)--(14mm,38mm) ; \stopMPcode}
\setupbackgrounds[page][background={wrongpositioned}]
\starttext
\input knuth
\stoptext

x and y are outside the page in the layer definition (50 meters).

It should be a stupid error, but I cannot say which one.

It is a line that I need for my work.


I don't understand  what exactly you need, but I hope this can help you.

\showlayout
\showframe

\definelayer[wrongpositioned]

\setuplayer[wrongpositioned][x=\backspace, y=\dimexpr \topspace+\headerheight\relax, state=start]

\setlayer[wrongpositioned]{\startMPcode
draw (0mm,0mm)--(TextWidth,0mm)--(TextWidth,TextHeight)--(0mm,TextHeight) -- cycle withpen pencircle scaled 2 withcolor red;
drawarrow (0mm,0mm) -- (TextWidth,TextHeight) withpen pencircle scaled 2 withcolor blue;
drawarrow (0mm,TextHeight) -- (TextWidth,0mm) withpen pencircle scaled 2 withcolor black;
fill (0mm,0mm) -- (0mm,-FooterHeight) -- (TextWidth,-FooterHeight) -- (TextWidth,0mm) -- cycle withcolor blue;
\stopMPcode}

\setupbackgrounds[page][background={wrongpositioned}]

\starttext
\input knuth
\stoptext


--
luigi