% Context file
% Filename: 2SIDE.tex
% Willi Egger
% 17-01-2010
% Copyright (c) 2010 BOEDE. All rights reserved.

\input figures-base-file
%\showframe

\starttext
\showframe
\setvariables
	[Arranging]
	[Arrangement={XY},
	Pages=8,
	x=2,
	y=4]

\definepapersize
	[Printpaper]
	[width=\dimexpr37mm*\getvariable{Arranging}{x},height=\dimexpr52mm*\getvariable{Arranging}{y}]
\setuppaper
    [paper=Printpaper,
	topspace=16mm,
	backspace=16mm,
    dx=5pt,
    dy=5pt,
    nx=2,
    ny=4,
    margin=0pt,
    width=\dimexpr37mm*\getvariable{Arranging}{x},
    height=\dimexpr52mm*\getvariable{Arranging}{y}]
\setuplayout
   [location=middle,
	marking=on]  
\setuparranging[\getvariable{Arranging}{Arrangement}]
\setuppapersize[A9][Printpaper]	
\dorecurse{\getvariable{Arranging}{Pages}}{\getbuffer[Fakepage]\page}
\stoptext