Peter Münster wrote:
On Mon, 14 Feb 2005, Randall Skelton wrote:
Is it possible to determine if texexec is being run on a product or a
component and have optional processing similar to different modes?
\ifx\currentproduct\empty
no product defined
\else
the product is \currentproduct
\fi
ah, that's indeed an option,
\doifelsenothing\currentproduct
{no product defined}
{the product is \currentproduct}
is a bit more robust (esp if currentproduct is something {bla\macro bla}
in that case, a quite readable approach is:
\startsetups todo:product:nop
....
\stopsetups
\startsetups todo:product:yes
....
\stopsetups
\doifelsenothing\currentproduct
{\setups[todo:product:nop]}
{\setups[todo:product:yes]}
or as variant on your ifx, a one-liner:
\setups[todo:product:\ifx\currentproduct\empty nop\else yes\fi]
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context