From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68926 Path: news.gmane.org!not-for-mail From: Otared Kavian Newsgroups: gmane.comp.tex.context Subject: Re: math: command for absolute value: `\define\abs[1]{\lvert #1 \rvert}` throws `\lvert ->\Udelimiter`. Date: Sat, 4 Jun 2011 23:59:42 +0200 Message-ID: References: <1307220033.4456.44.camel@mattotaupa> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1307224815 8339 80.91.229.12 (4 Jun 2011 22:00:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Jun 2011 22:00:15 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Jun 05 00:00:06 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 1QSyt3-00087p-SE for gctc-ntg-context-518@m.gmane.org; Sun, 05 Jun 2011 00:00:05 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CAF56CAD90; Sun, 5 Jun 2011 00:00:04 +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 AO9YGJSiVoP5; Sun, 5 Jun 2011 00:00:04 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1F39ECAD7F; Sun, 5 Jun 2011 00:00:02 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A7EB7CAD7F for ; Sun, 5 Jun 2011 00:00:00 +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 S0X7exOSXw0k for ; Sat, 4 Jun 2011 23:59:49 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 17E88CAD5D for ; Sat, 4 Jun 2011 23:59:49 +0200 (CEST) Original-Received: from mail-wy0-f169.google.com (mail-wy0-f169.google.com [74.125.82.169]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p54Lxmug032404 for ; Sat, 4 Jun 2011 23:59:48 +0200 Original-Received: by wyf19 with SMTP id 19so2771284wyf.14 for ; Sat, 04 Jun 2011 14:59:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to :x-mailer; bh=UKSHETAeUFaA/QDV52g5JZAtP5HBzVDng98EKDuV+DU=; b=KNrYFlU9WMj1iMsTFYvolaQdoZIo2JR+SsFfJ2/wYr0rgY0ZxKxEthjOfQFFGua6pV gwmYZymq/W0easCTI0wApCBr1p5jht07zUmxk3W8SH/HD8YSh95ZaPLXErEE1jMdcmJ+ q9O2S0J00JdsBCpfZRjaMYKR8It8LpuZU5C90= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=CrcAVLeW/YjyozwBETtShVItF/fknztfpFAyu77hC55O5aeKPgFbunmTEZfg2dqCfV 9HzFc8Tg4YhF2wgA/IeSAVDiAko0WBJFS9Qzm+s6pq/QY0+ECszHFAQf3Swtq+Zo1DOk bXdDM2r33iosd6Hw0l8kbwGwoRe9WO8BFGTE8= Original-Received: by 10.227.173.66 with SMTP id o2mr3341738wbz.12.1307224786246; Sat, 04 Jun 2011 14:59:46 -0700 (PDT) Original-Received: from new-host.home (AOrleans-553-1-30-152.w92-152.abo.wanadoo.fr [92.152.4.152]) by mx.google.com with ESMTPS id 14sm1872523wbw.49.2011.06.04.14.59.43 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Jun 2011 14:59:44 -0700 (PDT) In-Reply-To: <1307220033.4456.44.camel@mattotaupa> X-Mailer: Apple Mail (2.1084) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.169; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0eEPVXM3h - 2da848c34b33 - 20110604 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:68926 Archived-At: 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{-1} =3D 1$ \stoptext Best regards: OK On 4 juin 2011, at 22:40, Paul Menzel wrote: > 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. > = > $ context abs > [=85] > This is LuaTeX, Version beta-0.70.1-2011051923 (rev 4277) = > \write18 enabled. > (abs.tex > = > ConTeXt ver: 2011.05.18 22:26 MKIV fmt: 2011.5.27 int: english/= english > [=85] > ! Missing $ inserted. > = > system > tex > error on line 1 in file abs.tex: Missing $= inserted ... > = > 1 >> \define\abs[1]{\lvert #1 \rvert} > 2 \starttext > 3 $\lvert 2 \rvert$ > 4 = > 5 $\abs{2}$ > 6 \stoptext > 7 = > = > = > $ > = > \Udelimiter = > \lvert ->\Udelimiter = > "4 "0 "7C = > l.1 \define\abs[1]{\lvert > #1 \rvert} > ? > = > How should I do that correctly? I took that example from the user=92s > guide of the amsmath package (`texdoc amsldoc`). > = > = > Thanks, > = > Paul > ________________________________________________________________= ___________________ > 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-co= ntext > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > _________________________________________________________________________= __________ ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________