Am 14.11.2008 um 15:06 schrieb Alan STONE:
On Thu, Nov 13, 2008 at 9:48 PM, Wolfgang Schuster
wrote:
Am 13.11.2008 um 20:52 schrieb Alan STONE:
Hi,
With \definelayout[myLayout][...], how do you test whether one of its parameters has a certain value, is greater than 0, etc... ?
\definelayout [mylayout] [backspace=3cm, width=12cm]
\starttext
\doifdimensionelse{\namedlayoutparameter{mylayout}{width}} % width could be 'fit' {\ifdim\namedlayoutparameter{mylayout}{width}<10cm ... \else ... \fi} {\processaction [\namedlayoutparameter{mylayout}{width}] [fit=>..., unknown=>...]}
\stoptext
Re: http://wiki.contextgarden.net/System_Macros/Action_Processing
What is 'fit' ?
You could set the the width of the textarea in three different ways: 1) as absolute value, 2) as remaining space between backspace and cutspace (useful in presentations) and 3) as remaining space between equal margins. \definelayout[1][backspace=4cm,width=12cm] \definelayout[2][backspace=5cm,cutspace=7cm,width=fit] \definelayout[3][backspace=3cm,width=middle] \showframe \starttext \dorecurse{3} {\starttabulate \NC backspace \EQ \PtToCm\backspace \NC\NR \NC textwidth \EQ \PtToCm\textwidth \NC\NR \NC cutspace \EQ \PtToCm\cutspace \NC\NR \stoptabulate \page} \stoptext Regards, Wolfgang