From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/54525 Path: news.gmane.org!not-for-mail From: Curiouslearn Newsgroups: gmane.comp.tex.context Subject: Metapost Code works with MKII not with MKIV Date: Wed, 18 Nov 2009 20:31:30 -0500 Message-ID: <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" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1258594422 9884 80.91.229.12 (19 Nov 2009 01:33:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2009 01:33:42 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 19 02:33:35 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 1NAvtu-0000DJ-GT for gctc-ntg-context-518@m.gmane.org; Thu, 19 Nov 2009 02:33:34 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0FB6EC9B10; Thu, 19 Nov 2009 02:30:39 +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 4M35MuHsST7p; Thu, 19 Nov 2009 02:30:39 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1B800C9AC7; Thu, 19 Nov 2009 02:29:49 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C0825C9AAA for ; Thu, 19 Nov 2009 02:29:40 +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 SRjIJzUhKgpl for ; Thu, 19 Nov 2009 02:29:20 +0100 (CET) Original-Received: from mail-pz0-f179.google.com (mail-pz0-f179.google.com [209.85.222.179]) by balder.ntg.nl (Postfix) with ESMTP id 450E5C9AC7 for ; Thu, 19 Nov 2009 02:29:05 +0100 (CET) Original-Received: by pzk9 with SMTP id 9so1175894pzk.16 for ; Wed, 18 Nov 2009 17:31:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=G4/ujZn5mnO8o0MLvKLh6spp0tSwYyCCfPTj19TMnR4=; b=aDOCZIla0XPT7k7qbAVGPay131WBMcvEOW7vFCKrhKtCGXj69bE+Vxv1lkf0ql6Peh KDrPEHSTDzuHRpc6nTQ2a+exi42Z8NUnzv9ghnQRRafMDmuB0MlYJxeRom1e/01odIJW +yEHhyhfP+TUnkIPL8sgrj3lnri9yZ2+S2Vz4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=s+AJ/nd+JxYVSWXbq5IzmkTFIeIDW6zkwmhdgs95OTwnPWHU5C6p22EL2GytCX0wio 0fyDPbsdzcKotun0O7dYBMK7Ym13ChaceWAP3d5pJuRFxzMKDc25WCZ0u4fjrTQfStXn oI4m/iVPsR/0eeLbZnEQTHX2qQjopovzgpBNc= Original-Received: by 10.142.62.12 with SMTP id k12mr1328341wfa.138.1258594290503; Wed, 18 Nov 2009 17:31:30 -0800 (PST) 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:54525 Archived-At: 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}} -------------------------------------------------------------------------------------------------------- The LOG file is: This is LuaTeX, Version beta-0.44.0-2009103007 \write18 enabled. (TestFile.tex ConTeXt ver: 2009.11.18 21:51 MKIV fmt: 2009.11.18 int: english/english system : cont-new loaded (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-new.mkiv)) system : cont-fil loaded (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/cont-fil.tex loading : ConTeXt File Synonyms ) system : cont-sys.rme loaded (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/user/cont-sys.rme (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-tmf.tex (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-tmf.mkiv)) (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-siz.tex (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-siz.mkiv)) (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-otf.tex (/Applications/ConTeXtMinimals/tex/texmf-context/tex/context/base/type-otf.mkiv))) system : TestFile.top loaded (TestFile.top) fonts : preloading latin modern fonts bodyfont : 12pt rm is loaded language : language en is active color : system all is global activated systems : begin file TestFile at line 5 mplib : initializing instance 'metafun' using format 'metafun' mplib : loading 'metafun.mp' from '/Applications/ConTeXtMinimals/tex/texmf-cache/luatex-cache/context/3fc847143b06f084e10e73c8fbdf4ae2/formats/cont-en-metafun.mem' ) * ___________________________________________________________________________________ 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 ___________________________________________________________________________________