From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77744 Path: news.gmane.org!not-for-mail From: Mari Voipio Newsgroups: gmane.comp.tex.context Subject: Re: Using MPgraphics as externalfigures? Date: Fri, 3 Aug 2012 22:45:19 +0300 Message-ID: References: <20120802103441.7267c0e1@homerow> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1344023127 14289 80.91.229.3 (3 Aug 2012 19:45:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Aug 2012 19:45:27 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 03 21:45:28 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SxNoN-0000jo-78 for gctc-ntg-context-518@m.gmane.org; Fri, 03 Aug 2012 21:45:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1C541101E0; Fri, 3 Aug 2012 21:45:26 +0200 (CEST) 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 9yvXw5p2WTiS; Fri, 3 Aug 2012 21:45:24 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 34E42101E4; Fri, 3 Aug 2012 21:45:24 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 563E8101E4 for ; Fri, 3 Aug 2012 21:45:23 +0200 (CEST) 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 s-EwlHQAOxS6 for ; Fri, 3 Aug 2012 21:45:22 +0200 (CEST) Original-Received: from filter3-utr.mf.surf.net (filter3-utr.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id 5B360101E0 for ; Fri, 3 Aug 2012 21:45:22 +0200 (CEST) Original-Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) by filter3-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q73JjJml005505 for ; Fri, 3 Aug 2012 21:45:21 +0200 Original-Received: by lbon3 with SMTP id n3so1271337lbo.14 for ; Fri, 03 Aug 2012 12:45:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=ZVFchedwEvYyUogOs/1QDdPQVVN3jZV/8V/2GbysVfQ=; b=W4I2HLth8AfkjsxzPq1SS5lDPqYK1kmZoU5SV8x+oqRgJEBgYrQ5pI4qwoeEoDWfM0 ix2Daf2uEaeo358kaf08PfDlFzQ8Zb7hqpRpaYDnd4M5bXq/ZeTMyLo0mLELW84OoE/4 bBUGjTT00f27tKk70GFp6QyNzhi3zsWDFYNsyseH8W2oz9l0A8tvgNT1t4BAlwEx9xwO O8iocw85V1N0yRZWuggH+9zDnuOH2aLrZbokfRw0coFB+CZ09YXoNGKbMY0mF04zlluS y96j+EExu4IfKmvj0AqoxkIy/sb7eoOOz7hFLlFj8x7U3nrQf6WkmtJGET74EQHQlCpe yj+g== Original-Received: by 10.152.109.198 with SMTP id hu6mr2585736lab.21.1344023119070; Fri, 03 Aug 2012 12:45:19 -0700 (PDT) Original-Received: by 10.152.18.80 with HTTP; Fri, 3 Aug 2012 12:45:19 -0700 (PDT) In-Reply-To: <20120802103441.7267c0e1@homerow> X-Google-Sender-Auth: rSDeDgT6E7yDRKBvihCZ5rjUQM8 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.217.169; 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: 08HGjJjjz - 8a9896b3a677 - 20120803 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:77744 Archived-At: Hi Marco & al, On Thu, Aug 2, 2012 at 11:34 AM, Marco Patzer wrote: > Read http://wiki.contextgarden.net/Metapost I was on which I actually found for informative, but not quite enough for my "very dummy" level. > and 3.3 Integrated Graphics in the MetaFun Manual. *This* was my missing link (and I was being pretty stupid). I dug the book out of my pile of ConTeXt papers and found exactly what I needed, at the end of chapter 3.3, pages 115-117 in my paper copy. To answer to myself (in case somebody else ever looks for this); At least in theory the key to the problem is to create a file somefile.mp, then write the MP code in the file beginfig{01} . . . endfig ; end . The whole file is used by \startMPrun input somefile ; \stopMPrun and the individual figure is available in the virtual file mprun.01. Thus it can be included with \externalfigure[mprun.01][width=0.5\textwidth] %etcetera Page 117 even has an example of exactly the type of combination I'm trying to achieve, so now it's just down to creating the graphic(s) file(s). As my braiding graphics come in groups (steps and variations, to be exact), this solution looks like a winner for now. > \defineframed > [graphicframe] > [frame=on,offset=none] > > \define[1]\MPframed > {\graphicframe{\useMPgraphic{#1}}} > > \startuseMPgraphic{first} > fill fullcircle scaled 2cm withcolor red; > \stopuseMPgraphic > > \startreusableMPgraphic{second} > fill fullsquare rotated 45 scaled 2cm withcolor blue; > \stopreusableMPgraphic > > \startbuffer [third] > fill fullsquare scaled 1cm withcolor green; > \stopbuffer > > \starttext > \useMPgraphic{first} > \reuseMPgraphic{second} > \processMPbuffer [third] > \MPframed{second} > \stoptext Thank you! I'll have to delve into this bit once the current almost-past-deadline project is done, looks like this'll take a bit of processing before it starts to make sense to me (my computer has no such problems...). Now, time for some recoding, thanks once more! Mari ___________________________________________________________________________________ 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 ___________________________________________________________________________________