On Thu, Nov 13, 2008 at 9:48 PM, Wolfgang Schuster <schuster.wolfgang@googlemail.com> 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

Wolfgang

Whoopie... way cool! Thanks Wolfgang.

Seems there are "a few" system macros hiding in the source code.

--
Best,
Alan

* TeX engine = LuaTeX
* ConTeXt  minimals ver: 2008.56.06 19:11 MKIV  fmt: 2008.11.10  int: english/english
* Ubuntu 8.04 Hardy Heron