% Context file
% filename: Postertutorial.tex
% Willi Egger
% 2007-03-18.
% Copyright (c) 2007 BOEDE. All rights reserved.

\usemodule[visual,meta-dum]

\usetypescript[palatino][\defaultencoding] 
\setupbodyfont[palatino,16pt] 
\setupcolors[state=start]
\setuppapersize[A3,landscape,A3,landscape] 
\setuplayout[grid=yes] 
\setuplayout
	[topspace=2.5cm,
	header=42pt,
	backspace=2.5cm,
	margins=0pt,
	width=37cm] 
\setupsystem[random=1234] 
\setuppagenumbering[location=]

\setupfootertexts 
	[\tttf\inputfilename] 
\setuptolerance 
	[verytolerant,stretch] 

\startuniqueMPgraphic{frame} 
	fill OverlayBox withcolor transparent(1,.25,red) ; 
	fill OverlayBox withcolor transparent(1,.25,blue); 
\stopuniqueMPgraphic 

\startuniqueMPgraphic{contrast} 
	fill OverlayBox withcolor white ; 
	fill OverlayBox withcolor transparent(1,.25,red) ; 
	fill OverlayBox withcolor transparent(1,.25,yellow) ; 
\stopuniqueMPgraphic 

\startreusableMPgraphic{Cross}
	pair l[];
	path p;
	l[1] := llcorner OverlayBox;
	l[2] := lrcorner OverlayBox;
	l[3] := ulcorner OverlayBox;
	l[4] := urcorner OverlayBox;
	
	l[10] := .5[l[1],l[2]];
	l[20] := .5[l[3],l[4]];
	l[30] := .5[l[1],l[3]];
	l[40] := .5[l[2],l[4]];

	fill OverlayBox withcolor transparent(1,.25,yellow);
	p := l[30] -- l[40];
	draw p dashed withdots withpen pencircle scaled 3pt withcolor red;
	
	p := l[10] -- l[20];
	draw p dashed withdots withpen pencircle scaled 3pt withcolor red;
\stopreusableMPgraphic

\startreusableMPgraphic{Diagonal}
	pair l[];
	path p;
	l[1] := llcorner OverlayBox;
	l[2] := urcorner OverlayBox;
	
	fill OverlayBox withcolor transparent(1,.25,yellow);
	p := l[1] -- l[2];
	draw p dashed withdots withpen pencircle scaled 3pt withcolor red;
\stopreusableMPgraphic

\defineoverlay[frame] [\useMPgraphic{frame}] 
\defineoverlay[contrast][\useMPgraphic{contrast}] 
\defineoverlay[cross][\useMPgraphic{Cross}]
\defineoverlay[diagonal][\useMPgraphic{Diagonal}]

% simple columnset
\definecolumnset[example][n=3] 
\setupcolumnset[example][distance=2cm]

\definecolumnset[example2][n=4] 
\setupcolumnset[example2][distance=2cm]


% even and odd number of columns
% \definecolumnset[example][nleft=3,nright=2,width=5cm]

%Different length of columns
% \definecolumnset[example][n=2] 
% \setupcolumnsetlines[example][1][1][-2] 
% \setupcolumnsetlines[example][1][2][-4] 
% \setupcolumnsetlines[example][2][1][-6] 
% \setupcolumnsetlines[example][2][2][-6] 
% \setupcolumnsetlines[example][3][1][-4] 
% \setupcolumnsetlines[example][3][2][-2] 
% 
% Columnsetspan
% \definecolumnset[example][n=3] 
% \definecolumnsetspan[wide][n=2,background=contrast] 
%  
% \startcolumnset[example] 
% \startcolumnsetspan[wide] 
% \dorecurse{2}{\fakewords{25}{50}\par} 
% \stopcolumnsetspan 
% \dorecurse{15}{\fakewords{100}{200}\par} 
% \stopcolumnset 

% Areas
% \definecolumnsetarea 
% 	[one][left] %right, both, fixed
% 	[x=1,y=1,nx=2,ny=6,location=depth, 
% 	background=contrast,state=repeat] 
% 


\setupheadertexts[{\switchtobodyfont[36pt]Title and authors}]
\setupbackgrounds[text][background=cross,state=start]
\starttext 
\startcolumnset[example] 
\definecolumnsethsize{example}{1}{1}\One
\placefigure[tblr] {tblr}{\externalfigure[placeholder][width=\One, lines=5]} 
\placefigure[fxtb:2*9]{fxtb}{\externalfigure[fake][width=\One,lines=10]} 
\placefigure[btlr] {btlr}{\externalfigure[fake][width=\One,lines=5]} 
\placefigure[tbrl] {tbrl}{\externalfigure[fake][width=\One,lines=5]}
\placefigure[btrl] {btrl}{\externalfigure[fake][width=\One,lines=5]}
\dorecurse{3}{\fakewords{100}{200}\par} 
\stopcolumnset 

\page
\setupbackgrounds[text][background=diagonal,state=start]
\startcolumnset[example] 
\definecolumnsethsize{example}{1}{1}\One
\placefigure[fxtb:2*10]{fxtb}{\externalfigure[fake][width=\One,lines=10]} 
\placefigure[fxtb:1*21]{fxtb}{\externalfigure[placeholder][width=\One,lines=5]}
\placefigure[fxtb:3*4]{fxtb}{\externalfigure[placeholder][width=\One,lines=5]}
\dorecurse{3}{\fakewords{100}{200}\par} 
\stopcolumnset


\startcolumnset[example] 
\definecolumnsethsize{example}{1}{1}\One
\placefigure[btrl]{btrl}{\externalfigure[fake][width=\One,lines=10]} 
\placefigure[tbrl]{tbrl}{\externalfigure[placeholder][width=\One,lines=5]}
\placefigure[btrl]{btrl}{\externalfigure[placeholder][width=\One,lines=5]}
\dorecurse{3}{\fakewords{100}{200}\par} 
\stopcolumnset

\page
% 4 columns
\setupbackgrounds[text][background=cross,state=start]

\startcolumnset[example2] 
\definecolumnsethsize{example2}{1}{1}\One
\definecolumnsethsize{example2}{1}{2}\Two
\placefigure[tblr] {tblr}{\externalfigure[placeholder][width=\One, lines=5]} 
\placefigure[fxtb:2*9]{fxtb}{\externalfigure[fake][width=\Two,lines=10]} 
\placefigure[btlr] {btlr}{\externalfigure[fake][width=\One,lines=5]} 
\placefigure[tbrl] {tbrl}{\externalfigure[fake][width=\One,lines=5]}
\placefigure[btrl] {btrl}{\externalfigure[fake][width=\One,lines=5]}
\dorecurse{3}{\fakewords{100}{200}\par} 
\stopcolumnset 

\page
\setupbackgrounds[text][background=diagonal,state=start]
\startcolumnset[example2] 
\definecolumnsethsize{example2}{1}{1}\One
\definecolumnsethsize{example2}{1}{2}\Two
\placefigure[btlr]{btlr}{\externalfigure[fake][width=\One,lines=5]}
\placefigure[fxtb:2*16]{fxtb}{\externalfigure[placeholder][width=\One,lines=5]}
\placefigure[fxtb:3*8]{fxtb}{\externalfigure[fake][width=\One,lines=5]} 
\placefigure[tbrl]{tbrl}{\externalfigure[placeholder][width=\One,lines=5]}
\dorecurse{3}{\fakewords{100}{200}\par} 
\stopcolumnset

\stoptext