Hi
I think the error comes from your way of using \define: you use
\define\abs[1]{\lvert #1 \rvert}
instead of
\define[1]\abs{\lvert#1\rvert}
the following works fine for me:
\starttext
%\define[1]\abs{|#1|} % this works
\define[1]\abs{\lvert#1\rvert} % this works too
$\abs
On Sat, Jun 04 2011, Paul Menzel wrote:
> I want to define `\abs` as the command for the absolute value. The
> following minimal example is also attached.
>
> \define\abs[1]{\lvert #1 \rvert}
Don't ask me why "\define" doesn't work (certainly related to
expansion), but "\def" does the job
Dear ConTeXt folks,
I want to define `\abs` as the command for the absolute value. The
following minimal example is also attached.
\define\abs[1]{\lvert #1 \rvert}
\starttext
$\lvert 2 \rvert$
$\abs{2}$
\stoptext
This does not work though.