From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65368 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: How to run Typesetting in MetaPost example (MetaFun)? Date: Thu, 20 Jan 2011 11:33:38 +0100 Message-ID: References: <4D359A42.4030209@ziggo.nl> <4D38079F.2010401@ziggo.nl> 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: dough.gmane.org 1295519639 27980 80.91.229.12 (20 Jan 2011 10:33:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 20 Jan 2011 10:33:59 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 20 11:33:55 2011 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.69) (envelope-from ) id 1Pfrpz-0000qA-9r for gctc-ntg-context-518@m.gmane.org; Thu, 20 Jan 2011 11:33:55 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A33BBCAA22; Thu, 20 Jan 2011 11:33:54 +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 gq84Vjhw39iA; Thu, 20 Jan 2011 11:33:52 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 009A5CA9C1; Thu, 20 Jan 2011 11:33:51 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DE4A5CA9C1 for ; Thu, 20 Jan 2011 11:33:50 +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 DsYRYw6qTJHg for ; Thu, 20 Jan 2011 11:33:40 +0100 (CET) Original-Received: from filter5-ams.mf.surf.net (filter5-ams.mf.surf.net [192.87.102.73]) by balder.ntg.nl (Postfix) with ESMTP id F1D4FCA9C0 for ; Thu, 20 Jan 2011 11:33:39 +0100 (CET) Original-Received: from mail-wy0-f169.google.com (mail-wy0-f169.google.com [74.125.82.169]) by filter5-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p0KAXdZY004814 for ; Thu, 20 Jan 2011 11:33:39 +0100 Original-Received: by wyj26 with SMTP id 26so421623wyj.14 for ; Thu, 20 Jan 2011 02:33:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=Jp8CEM6oGGop6yldlpFRqIGVYfTbFFvRB0MCI/sf3tI=; b=Q+GWY+CiTVDfNcUfHX+xsgzPutKsbnmIigI3w0vstnMyMwOqu7b2AZAkm5pvmfDO4b piHzI6I7DpE/bDLp/yJWL6cxTUyGFMp+EXNY5zyEyfPeF2+adqOgGjgHkK8vtLdrWCOU e/kphiwABz5tXICC8fyAs8V24LjJG9f32FWns= 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; b=j12u3kNYX6H3LiCAUvpnwcnOYeE6JWSoL3zw5+x5Pc4GwzPfFbGwUFiWIjGh5X1c8S njbQgltMx1S2/oTpvieFs7ARQJfoeq87y+D4PdaZQCqfwQe9kH7SsZi5yBVYv54blGTX yr7/rL60VKBnaX7DkQ0rTlZNuMzqrfskyC6P4= Original-Received: by 10.227.69.202 with SMTP id a10mr2095125wbj.141.1295519618866; Thu, 20 Jan 2011 02:33:38 -0800 (PST) Original-Received: by 10.227.134.145 with HTTP; Thu, 20 Jan 2011 02:33:38 -0800 (PST) In-Reply-To: <4D38079F.2010401@ziggo.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.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: 0BDVKxD43 - 615c5d810683 - 20110120 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.73 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:65368 Archived-At: You can also use mkii as command line drawing tool: #> mtxrun texexec test.tex \starttext \startTEXpage \resetMPdrawing \startMPdrawing picture pic[] ; numeric wid[], len[], pos[], n ; wid[0] := len[0] := pos[0] := n := 0 ; \stopMPdrawing \def\whatever#1% {\appendtoks#1\to\MPtoks \setbox\MPbox=\hbox{\bfd\the\MPtoks}% \startMPdrawing n := n + 1 ; len[n] := \the\wd\MPbox ; \stopMPdrawing \startMPdrawing[-] pic[n] := textext("\bfd\setstrut\strut#1") ; pic[n] := pic[n] shifted - llcorner pic[n] ; \stopMPdrawing} \handletokens MetaPost is Fun!\with\whatever \startMPdrawing pair len ; len := origin ; for i=1 upto n : draw pic[i] shifted len ; draw boundingbox pic[i] shifted len withpen pencircle scaled .25pt withcolor red ; len := len+(xpart lrcorner pic[i]-xpart llcorner pic[i],0) ; endfor ; \stopMPdrawing \MPdrawingdonetrue\getMPdrawing \stopTEXpage \stoptext -- luigi ___________________________________________________________________________________ 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 ___________________________________________________________________________________