From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/49237 Path: news.gmane.org!not-for-mail From: Mikael Persson Newsgroups: gmane.comp.tex.context Subject: Re: How to use MPgraphic with options? Date: Thu, 9 Apr 2009 08:08:27 +0200 Message-ID: References: <49DD9098.7070706@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1239257346 24162 80.91.229.12 (9 Apr 2009 06:09:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Apr 2009 06:09:06 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 09 08:10:25 2009 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 lo.gmane.org with esmtp (Exim 4.50) id 1LrnSz-0006bv-DU for gctc-ntg-context-518@m.gmane.org; Thu, 09 Apr 2009 08:10:25 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 55CC81FB49; Thu, 9 Apr 2009 08:08:57 +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 20711-05; Thu, 9 Apr 2009 08:08:38 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CFBC81FB1D; Thu, 9 Apr 2009 08:08:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1724C1FB1D for ; Thu, 9 Apr 2009 08:08:36 +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 00610-01 for ; Thu, 9 Apr 2009 08:08:29 +0200 (CEST) Original-Received: from filter3-nij.mf.surf.net (filter3-nij.mf.surf.net [195.169.124.154]) by ronja.ntg.nl (Postfix) with ESMTP id A920D1FADB for ; Thu, 9 Apr 2009 08:08:29 +0200 (CEST) Original-Received: from mail-bw0-f178.google.com (mail-bw0-f178.google.com [209.85.218.178]) by filter3-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n3968Rwe001578 for ; Thu, 9 Apr 2009 08:08:28 +0200 Original-Received: by bwz26 with SMTP id 26so461419bwz.2 for ; Wed, 08 Apr 2009 23:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=a7BJIDgOstVuZf4ssICyEi2rssr9I1GIGNv7yyWTpo8=; b=ATuaN+Zw4VzKSUM6pksSz/M1qrN5JCAkaRw31DHS6Ta0cHnlfusueBODCPZK0Hxak2 N0U/akIhAb8sv4KO1edDU/+Fc069qO64MDrZVlqdSdbbcN2H6H9omGp7BIdOXsGT791h nqCuey390JHbauzzx3zJCaTX81lDRb+UZi7S8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=ofbggIhLjn1i72+zwEw6wYJHQFOoBuVDsGC8C5iVdVnvVIobm5dRcSIp1hLWMnoTzj TWXjRmjISA1HcbzO2X22jFtWXMN911KoUu/yS8/YFVN4X+OlX2VX9Afd6NYHY/MSzwVj yRmm+C34pV6p2ZZlw7QVn7k5tzfsP3cJ97Ob0= Original-Received: by 10.103.102.17 with SMTP id e17mr1048149mum.119.1239257307262; Wed, 08 Apr 2009 23:08:27 -0700 (PDT) In-Reply-To: <49DD9098.7070706@gmail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.218.178; 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: 206186474 - 5bb64a07ea09 - 20090409 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:49237 Archived-At: I think this is one way: \startuseMPgraphic{ARule} draw origin -- (\MPvar{mylength},0) ; \stopuseMPgraphic \def\ARule#1{% \setupMPvariables[ARule][mylength=3D#1] \useMPgraphic{ARule} } \starttext Foo \ARule{5mm} bar \ARule{10mm} \stoptext Best regards, Mikael On Thu, Apr 9, 2009 at 8:07 AM, Wei-Wei Guo wrote: > Dear all, > > I need to use many rules with different lengths. Is there any way to > implement > function like below: > > =A0\startuniqueMPgraphic{ARule}{length} > =A0draw origin -- (\MPvar{length},0) ; > =A0\stopuniqueMPgraphic > > =A0\uniqueMPgraphic[length=3D5mm]{ARule} > > The example cannot be run. I only use it to explain what I want. > > Any suggestion is appreciated. > > Best wishes, > Wei-Wei > _________________________________________________________________________= __________ > 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 =A0: http://www.pragma-ade.nl / http://tex.aanhet.net > archive =A0: https://foundry.supelec.fr/projects/contextrev/ > wiki =A0 =A0 : 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________