I'm trying to put a background image on all pages across a Context document, but adding repeat=yes
to \definelayer
and state=repeat
to \setupbackgrounds
doesn't seem to work.
I'd also like to know whether I can turn on/off the defined background in the middle of the text.
\setupcolors[state=start]
\setuppagenumbering[state=stop]
\definelayer[mybg] % name of the layer
[repeat=yes % all pages of the document
x=0mm, y=0mm, % from upper left corner of paper
width=\paperwidth, height=\paperheight, % let the layer cover the full paper
repeat=yes
]
\setlayer[mybg] % name of the layer
%[hoffset=1cm, voffset=1cm] % placement (from upper left corner of the layer)
{\externalfigure[cow][width=\paperwidth,height=\paperheight]} % the actual contents of the layer
\setupbackgrounds[page][background=mybg,state=repeat % repeat each page
]
\setupindenting[yes,small]
\starttext
asdf
\page
asdf
\page
asdf
\stoptext
repeat=yes
. You could use\setupbackgrounds[page][background=<newbackground>]
and\setupbackgrounds[page][background=<oldbackground>]
when needed.state=repeat
) or just in this particular case? Anyways, if you turn your comment into an answer I'll accept it, thanks a lot.repeat=yes
twice in\definelayer
and the first instance lacks a comma so it's possibly the reason your example didn't work.