From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/50588 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: MP newbie question Date: Mon, 18 May 2009 15:58:08 -0400 (EDT) Message-ID: References: <326847810905181145p77ce2388q1d4500bbb55c09f7@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1242676795 7840 80.91.229.12 (18 May 2009 19:59:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 May 2009 19:59:55 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon May 18 21:59:48 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 1M68zc-0003QK-4S for gctc-ntg-context-518@m.gmane.org; Mon, 18 May 2009 21:59:24 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F1FCA1FD91; Mon, 18 May 2009 21:59:22 +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 09112-03; Mon, 18 May 2009 21:58:42 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 86CCC1FCAA; Mon, 18 May 2009 21:58:42 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BF57B1FCAA for ; Mon, 18 May 2009 21:58: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 18429-08-3 for ; Mon, 18 May 2009 21:58:32 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by ronja.ntg.nl (Postfix) with ESMTP id 175391FC6B for ; Mon, 18 May 2009 21:58:32 +0200 (CEST) Original-Received: from skycaptain.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.93.160]) by filter2-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n4IJwUrq002314 for ; Mon, 18 May 2009 21:58:31 +0200 Original-Received: FROM [192.168.2.8] (c-76-127-178-8.hsd1.ct.comcast.net [76.127.178.8]) By skycaptain.mr.itd.umich.edu ID 4A11BDE5.365B2.26206 ; Authuser adityam; 18 May 2009 15:58:29 EDT In-Reply-To: <326847810905181145p77ce2388q1d4500bbb55c09f7@mail.gmail.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.93.160; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 227812661 - 83e064c7a05e - 20090518 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:50588 Archived-At: On Mon, 18 May 2009, Alan Stone wrote: > Hi, > How do you make this work ? > > --- mpframed.tex --- > > %\def\myFrameAlternative{line} > %\def\myFrameAlternative{dashes} > \def\myFrameAlternative{dots} I usually do (untested) \chardef\myFrameAlternative \myFrameAlternative \zerocount %(or \plusone or \plustwo) and then > \startuniqueMPgraphic{name} > > path p ; > > p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; > show (\myFrameAlternative) ; \ifcase \myFramedAlternative draw p dashed evenly scaled 2 ; \or draw p dashed with dots scaled 2 ; \or draw p; \fi > if \myFrameAlternative = dashes : > % if (\myFrameAlternative) = dashes : > draw p dashed evenly scaled 2 ; > % elseif (\myFrameAlternative) = dots : > elseif \myFrameAlternative = dots : > draw p dashed withdots scaled 2 ; > else : > draw p ; > fi ; > \stopuniqueMPgraphic > > \defineoverlay[myGraphic][\uniqueMPgraphic{name}] > > \starttext > > \framed[% > offset=5mm, > background=myGraphic, > frame=off] > {mp framed} > > \stoptext Aditya ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________