I've managed to put double-sided page numbers -- but numbers are restarting after two, though. What's going on?



====

\setuppagenumbering[location=,alternative=doublesided]


%https://tex.stackexchange.com/questions/128854/context-eliminate-topspace-and-bottomspace?rq=1

\definelayer

[pagenumber]

[

width=\paperwidth,

height=\paperheight,

% preset=rightbottom,

voffset=.3\paperheight

]


%\setupbackgrounds[page][background=pagenumber, setups=setpagenumber]

\setupbackgrounds[text] [rightmargin] [background=pagenumber, setups=setpagenumber]

%isso aqui é o que funciona para doublesided (frente e verso)


\startsetups setpagenumber

% Set the page number to be (2em, \lineheight) from the bottom right corner

% Note the `preset=rightbottom` above.

%

% The 2nd set of optional arguments are for the frame. For illustration I change

% the color and font of the page number

\setlayerframed

[pagenumber]

[

x=3em,

y=2em,

]

[

frame=on,

foregroundcolor=red,

foregroundstyle=bold,

]

{\pagenumber}

\stopsetups


% Disable default page numbering



\starttext


Page 1


\page


Page 2


\page


Page 3


\page


Page 4


\dorecurse{15}{\input knuth}


\stoptext

=====================




Thanks a lot for any help!