From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/54526 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Metapost Code works with MKII not with MKIV Date: Wed, 18 Nov 2009 20:40:01 -0500 (EST) Message-ID: References: <3b4b12310911181731u2394f3d4i92939f8bb5193415@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 1258594950 10937 80.91.229.12 (19 Nov 2009 01:42:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2009 01:42:30 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 19 02:42:23 2009 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.50) id 1NAw2O-0002vq-Qs for gctc-ntg-context-518@m.gmane.org; Thu, 19 Nov 2009 02:42:20 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CBBA3C9AF1; Thu, 19 Nov 2009 02:39:49 +0100 (CET) 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 B9x7bwqCxW1F; Thu, 19 Nov 2009 02:39:48 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9D02DC9A70; Thu, 19 Nov 2009 02:39:29 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AF0A7C9AAA for ; Thu, 19 Nov 2009 02:38:25 +0100 (CET) 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 x+TbouqBrInM for ; Thu, 19 Nov 2009 02:37:40 +0100 (CET) Original-Received: from skycaptain.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.93.160]) by balder.ntg.nl (Postfix) with ESMTP id AEFE0C9AF1 for ; Thu, 19 Nov 2009 02:37:38 +0100 (CET) Original-Received: FROM dhcp128036205149.central.yale.edu (dhcp128036205149.central.yale.edu [128.36.205.149]) By skycaptain.mr.itd.umich.edu ID 4B04A1F2.43F3F.10472 ; Authuser adityam; 18 Nov 2009 20:40:02 EST In-Reply-To: <3b4b12310911181731u2394f3d4i92939f8bb5193415@mail.gmail.com> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) 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:54526 Archived-At: On Wed, 18 Nov 2009, Curiouslearn wrote: > Hi, > > I am back to trying Metapost. I spent sometime yesterday and today > learning about clipping, buildcycles etc. to fill areas with patterns. > I think I will try to write a simple tutorial with it. > > Meanwhile, I just updated my installation of Context minimals. The > following simple Metapost code does not compile with MKIV, but > compiles okay with MKII. > > \setuppapersize[letter][letter] > \setupcolors[state=start] > \setuppagenumbering[state=stop] > > \starttext > > \startuseMPgraphic{Filling} > u := 1cm; > w:= 2pt; > %Axes > path xaxis; path yaxis; > xaxis := (0,0)--(12,0) scaled u; > yaxis := (0,0)--(0,12) scaled u; > path demand; path AC; > demand := > function (1,"x","10-x",0,10,1) scaled u; > AC := > function(1,"x","2+8/x",1,10,0.1) scaled u; > > drawarrow xaxis withpen pencircle scaled w; > drawarrow yaxis withpen pencircle scaled w; > draw demand withpen pencircle scaled w withcolor 0.5red; > draw AC withpen pencircle scaled w withcolor 0.5green; > fill fullcircle scaled u shifted (4*u,5*u) withcolor 0.1[white,blue] ; > label(btex \tfb S1 etex,(4,5)*u); > \stopuseMPgraphic > \midaligned{\useMPgraphic{Filling}} \stoptext ___________________________________________________________________________________ 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 ___________________________________________________________________________________