From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68924 Path: news.gmane.org!not-for-mail From: Paul Menzel Newsgroups: gmane.comp.tex.context Subject: math: command for absolute value: `\define\abs[1]{\lvert #1 \rvert}` throws `\lvert ->\Udelimiter`. Date: Sat, 04 Jun 2011 22:40:33 +0200 Message-ID: <1307220033.4456.44.camel@mattotaupa> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1460595534==" X-Trace: dough.gmane.org 1307220046 18598 80.91.229.12 (4 Jun 2011 20:40:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Jun 2011 20:40:46 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat Jun 04 22:40:43 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QSxeE-0007UI-DK for gctc-ntg-context-518@m.gmane.org; Sat, 04 Jun 2011 22:40:42 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AE351CAD8D; Sat, 4 Jun 2011 22:40:41 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GzJHRX1afNeN; Sat, 4 Jun 2011 22:40:39 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E2F19CAD7F; Sat, 4 Jun 2011 22:40:38 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B2FDECAD7F for ; Sat, 4 Jun 2011 22:40:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XsN7KmVqacEN for ; Sat, 4 Jun 2011 22:40:35 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id E036FCAD5D for ; Sat, 4 Jun 2011 22:40:35 +0200 (CEST) Original-Received: from mail.gw90.de (mail.gw90.de [188.40.100.199]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p54KeY5I029509 for ; Sat, 4 Jun 2011 22:40:35 +0200 Original-Received: from f053045003.adsl.alicedsl.de ([78.53.45.3] helo=[192.168.178.21]) by mail.gw90.de with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1QSxem-0007J7-V9 for ntg-context@ntg.nl; Sat, 04 Jun 2011 20:41:17 +0000 X-Mailer: Evolution 2.32.3 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=188.40.100.199; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0xEPUEyPX - 5f3028dd4ec5 - 20110604 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:68924 Archived-At: --===============1460595534== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-wX2cw4lwnkXmVjH0VZ4K" --=-wX2cw4lwnkXmVjH0VZ4K Content-Type: multipart/mixed; boundary="=-0C4rXeHCeUKRnY24/ZwL" --=-0C4rXeHCeUKRnY24/ZwL Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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$ =20 $\abs{2}$ \stoptext This does not work though. $ context abs [=E2=80=A6] This is LuaTeX, Version beta-0.70.1-2011051923 (rev 4277)=20 \write18 enabled. (abs.tex =20 ConTeXt ver: 2011.05.18 22:26 MKIV fmt: 2011.5.27 int: english/e= nglish [=E2=80=A6] ! Missing $ inserted. =20 system > tex > error on line 1 in file abs.tex: Missing $ = inserted ... =20 1 >> \define\abs[1]{\lvert #1 \rvert} 2 \starttext 3 $\lvert 2 \rvert$ 4 =20 5 $\abs{2}$ 6 \stoptext 7 =20 =20 =20 $ =20 \Udelimiter=20 \lvert ->\Udelimiter=20 "4 "0 "7C=20 l.1 \define\abs[1]{\lvert #1 \rvert} ? How should I do that correctly? I took that example from the user=E2=80=99s guide of the amsmath package (`texdoc amsldoc`). Thanks, Paul --=-0C4rXeHCeUKRnY24/ZwL Content-Disposition: attachment; filename="abs.tex" Content-Type: text/x-tex; name="abs.tex"; charset="UTF-8" Content-Transfer-Encoding: base64 XGRlZmluZVxhYnNbMV17XGx2ZXJ0ICMxIFxydmVydH0NClxzdGFydHRleHQNCiRcbHZlcnQgMiBc cnZlcnQkDQoNCiRcYWJzezJ9JA0KXHN0b3B0ZXh0DQo= --=-0C4rXeHCeUKRnY24/ZwL-- --=-wX2cw4lwnkXmVjH0VZ4K Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk3qmEEACgkQPX1aK2wOHVilWACfQtbMAC0BCOLHfUN7tskl8OBX 3CEAn3/aA6NaeN7M7UfryVvluZo5iqt1 =qnHW -----END PGP SIGNATURE----- --=-wX2cw4lwnkXmVjH0VZ4K-- --===============1460595534== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1460595534==--