Open main menu

Changes

m
I paint modern
</context>
 
<context source=yes>
\setuppapersize[A6][A6]
\setupbackgrounds[state=repeat]
%\showframe
\startuseMPgraphic{MonGraphismeV_MP}
numeric h ; h := \overlayheight ;
numeric w ; w := \overlaywidth ;
numeric n ; n := \number\realpageno ;
numeric m ; m := \number\lastpageno ;
numeric ratio ; ratio := (1-n/(m+1));
numeric e ; e := 0.3mm;
 
picture pa ; pa := textext.raw(btex {\strut\the\realpageno} etex) ;
numeric wpa ; wpa := xpart (urcorner pa - ulcorner pa);
numeric hpa ; hpa := ypart (ulcorner pa - llcorner pa);
 
pa := pa shifted (-wpa/2 + w/2, ratio * (h-hpa));
pair paA ; paA:= ((ulcorner pa) + (urcorner pa)) / 2 ;
pair paB ; paB:= ((llcorner pa) + (lrcorner pa)) / 2 ;
 
draw ((w/2,0)--paB) dashed withdots withpen pencircle scaled e withcolor darkred;
draw ((w/2,h)--paA) dashed withdots withpen pencircle scaled e withcolor darkred;
draw pa withcolor darkred;
\stopuseMPgraphic
 
\startuseMPgraphic{MonGraphismeH_MP}
numeric h ; h := \overlayheight ;
numeric w ; w := \overlaywidth ;
numeric n ; n := \number\realpageno ;
numeric m ; m := \number\lastpageno ;
numeric ratio ; ratio := (n/(m+1));
numeric e ; e := 0.3mm;
 
picture pa ; pa := textext.raw(btex {\strut\the\realpageno} etex) ;
numeric wpa ; wpa := xpart (urcorner pa - ulcorner pa);
numeric hpa ; hpa := ypart (ulcorner pa - llcorner pa);
 
pa := pa shifted (ratio * (w-wpa),-hpa/2 + h/2);
pair paA ; paA:= ((ulcorner pa) + (llcorner pa)) / 2 ;
pair paB ; paB:= ((urcorner pa) + (lrcorner pa)) / 2 ;
 
draw ((0,h/2)--paA) dashed withdots withpen pencircle scaled e withcolor darkred;
draw ((w,h/2)--paB) dashed withdots withpen pencircle scaled e withcolor darkred;
draw pa withcolor darkred;
\stopuseMPgraphic
 
\defineoverlay [MonGraphismeV_OL] [\useMPgraphic{MonGraphismeV_MP}]
\defineoverlay [MonGraphismeH_OL] [\useMPgraphic{MonGraphismeH_MP}]
 
\setupbackgrounds [text] [rightmargin] [background={MonGraphismeV_OL}]
\setupbackgrounds [footer] [text] [background={MonGraphismeH_OL}]
 
\starttext
 
\dorecurse{4}{\input tufte\page}
 
\stoptext
</context>
1,047

edits