From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30275 Path: news.gmane.org!not-for-mail From: "Boris Tschirschwitz" Newsgroups: gmane.comp.tex.context Subject: Re: \mathematics Date: Mon, 14 Aug 2006 20:31:31 +0200 Message-ID: <651881340608141131j7be84f7r56b8b97aea476841@mail.gmail.com> References: <651881340608140846h49dbe038gb1f3ee4fbc1f7908@mail.gmail.com> <44E0BCCF.1040509@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1273733793==" X-Trace: sea.gmane.org 1155580315 32616 80.91.229.2 (14 Aug 2006 18:31:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 14 Aug 2006 18:31:55 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 14 20:31:53 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1GChDx-00018j-9O for gctc-ntg-context-518@m.gmane.org; Mon, 14 Aug 2006 20:31:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E55D41FD8D; Mon, 14 Aug 2006 20:31:40 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16956-02-16; Mon, 14 Aug 2006 20:31:35 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8E5531FD6D; Mon, 14 Aug 2006 20:31:35 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9EFE91FD6D for ; Mon, 14 Aug 2006 20:31:33 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16956-02-15 for ; Mon, 14 Aug 2006 20:31:32 +0200 (CEST) Original-Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by ronja.ntg.nl (Postfix) with SMTP id 251401FCDB for ; Mon, 14 Aug 2006 20:31:31 +0200 (CEST) Original-Received: by nf-out-0910.google.com with SMTP id h2so41931nfe for ; Mon, 14 Aug 2006 11:31:31 -0700 (PDT) Original-Received: by 10.82.116.15 with SMTP id o15mr608444buc; Mon, 14 Aug 2006 11:31:31 -0700 (PDT) Original-Received: by 10.82.124.16 with HTTP; Mon, 14 Aug 2006 11:31:31 -0700 (PDT) Original-To: "mailing list for ConTeXt users" In-Reply-To: <44E0BCCF.1040509@elvenkind.com> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:30275 Archived-At: --===============1273733793== Content-Type: multipart/alternative; boundary="----=_Part_14384_9212939.1155580291507" ------=_Part_14384_9212939.1155580291507 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cool, it works nicely here, too. Thanks, Boris. On 8/14/06, taco hoekwater wrote: > > Boris Tschirschwitz wrote: > > Hi. > > > > When writing math I like avoiding $ whenever possible by defining my > > math operators with \mathematics, e.g. > > \def\grp{\mathematics{G}}. > > So far I was using this like I use \EnsureMath in LaTeX, but now I'm > > running into problems in MPgraphics: > > Texexec compiles the following file fine until I add the paragraph > > called "Math in Math in MP". There it seems to somehow > > choke on too many $ and \relax. > > > > Is there a better way to do such definitions? > > I've changed my local definition of \mathematics to: > > \unexpanded\long\def\mathematics#1% > {\relax\ifmmode#1\else $#1$\fi} > > And that works nicely. > > Cheers, Taco > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > ------=_Part_14384_9212939.1155580291507 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Cool, it works nicely here, too.

Thanks,
Boris.

On 8/14/06, taco hoekwater <taco@elvenkind.com> wrote:
Boris Tschirschwitz wrote:
> Hi.
>
> When writing math I like avoiding $ whenever possible by defining my
> math operators with \mathematics, e.g.
> \def\grp{\mathematics{G}}.
> So far I was using this like I use \EnsureMath in LaTeX, but now I'm
> running into problems in MPgraphics:
> Texexec compiles the following file fine until I add the paragraph
> called "Math in Math in MP". There it seems to somehow
> choke on too many $ and \relax.
>
> Is there a better way to do such definitions?

I've changed my local definition of \mathematics to:

   \unexpanded\long\def\mathematics#1%
     {\relax\ifmmode#1\else $#1$\fi}

And that works nicely.

Cheers, Taco
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

------=_Part_14384_9212939.1155580291507-- --===============1273733793== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --===============1273733793==--