> i have no time to explain the details so it's up to you to wikify this ...
>
> \showframe
>
> \newcounter\WhateverCounter
>
> % quick and dirty, each text + figure gets half a page and the
> % graphic fills the available area
>
> \long\def\StartWhatever[#1]#2\StopWhatever
> {\blank
> #2
> \blank
> \doglobal\increment\WhateverCounter
> \startlinecorrection
> \ifodd\WhateverCounter\relax
> % first on page
> \scratchdimen\dimexpr.5\textheight-\pagetotal-\lineheight\relax
> \expanded{\externalfigure[#1][frame=on,height=\the\scratchdimen]}
> \else
> % second on page
> \scratchdimen\dimexpr\pagegoal-\pagetotal-\lineheight\relax
> \expanded{\externalfigure[#1][frame=on,height=\the\scratchdimen]}
> \fi
> \stoplinecorrection}
>
> % distribute the graphics over the page
>
> \long\def\StartWhatever[#1]#2\StopWhatever
> {\blank
> #2
> \blank
> \doglobal\increment\WhateverCounter
> \hpos{b:\WhateverCounter}{\strut}
> \vfill
> \scratchdimen\dimexpr\MPy{b:\WhateverCounter}-\MPy{e:\WhateverCounter}+\lineheight\relax
> \setbox\scratchbox\hbox{\expanded{\externalfigure[#1][frame=on,height=\the\scratchdimen]}}
> \ht\scratchbox\strutheight
> \hpos{e:\WhateverCounter}{\strut\box\scratchbox}
> \ifodd\WhateverCounter\relax
> \else
> \page
> \fi}
>
> \starttext
>
> \dorecurse{20} {
> \StartWhatever[cow.pdf]
> \getrandomcount\scratchcounter{1}{3}
> \input \ifcase\scratchcounter tufte \or davis \or ward \or zapf \else bryson \fi \relax
> \StopWhatever
> }
>
> \stoptext
>
> implementing solutions is not that hard; it mostly depends on preferences and boundary conditions
>
> Hans
That's superb! Certainly worth wikifying, maybe someone better versed
in ConTeXt than me cared also to explain what's going on in here.
Great thanks!!!
Piotr
_______________________________________________
ntg-context mailing list
ntg-context@???
http://www.ntg.nl/mailman/listinfo/ntg-context