[NTG-context] math: command for absolute value: `\define\abs[1]{\lvert #1 \rvert}` throws `\lvert -\Udelimiter`.

2011-06-04 Thread Paul Menzel
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.

Re: [NTG-context] math: command for absolute value: `\define\abs[1]{\lvert #1 \rvert}` throws `\lvert -\Udelimiter`.

2011-06-04 Thread Peter Münster
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:

Re: [NTG-context] math: command for absolute value: `\define\abs[1]{\lvert #1 \rvert}` throws `\lvert -\Udelimiter`.

2011-06-04 Thread Otared Kavian
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