[NTG-context] layout parameter testing
Alan STONE
software.list.1es9s at gmail.com
Sun Nov 16 15:15:43 CET 2008
Hi,
It doesn't work with the width=fit and width=middle options...
%\definelayout[mylayout][backspace=4cm,width=11cm]
%\definelayout[mylayout][backspace=4cm,width=9cm]
\definelayout[mylayout][backspace=5cm,cutspace=7cm,width=fit]
%\definelayout[mylayout][backspace=3cm,width=middle]
\setuplayout[mylayout]
\starttext
\doifdimensionelse{\namedlayoutparameter{mylayout}{width}}
{\ifdim\namedlayoutparameter{mylayout}{width}>10cm
width > 10cm
\else
width < 10cm
\fi}
{\processaction
[\namedlayoutparameter{mylayout}{width}]
[fit=>fit,
middle=>middle,
unknown=>unknown width]}
\stoptext
----------------------------------------------------------
width=fit
->
! Missing number, treated as zero.
<to be read again>
f
\@@lymylayoutwidth ->f
it
\doifdimensionelse ...mensionelse \scratchdimen #1
pt\relax
l.11 ...se{\namedlayoutparameter{mylayout}{width}}
----------------------------------------------------------
width=middle
->
! Missing number, treated as zero.
<to be read again>
m
\@@lymylayoutwidth ->m
iddle
\doifdimensionelse ...mensionelse \scratchdimen #1
pt\relax
l.11 ...se{\namedlayoutparameter{mylayout}{width}}
----------------------------------------------------------
Best,
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ntg.nl/pipermail/ntg-context/attachments/20081116/f75e77a3/attachment.html
More information about the ntg-context
mailing list