From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65360 Path: news.gmane.org!not-for-mail From: Peter Rolf Newsgroups: gmane.comp.tex.context Subject: Re: How to run Typesetting in MetaPost example (MetaFun)? Date: Wed, 19 Jan 2011 18:12:00 +0100 Message-ID: <4D371B60.1070401@gmx.net> References: <4D359A42.4030209@ziggo.nl> <4D36E89F.3010208@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 1295457144 30966 80.91.229.12 (19 Jan 2011 17:12:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 19 Jan 2011 17:12:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jan 19 18:12:19 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 1PfbZz-0007mo-1o for gctc-ntg-context-518@m.gmane.org; Wed, 19 Jan 2011 18:12:19 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6903CCAA05; Wed, 19 Jan 2011 18:12:18 +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 CLAW4gF7mjtk; Wed, 19 Jan 2011 18:12:16 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0B871CA988; Wed, 19 Jan 2011 18:12:16 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 41132CA988 for ; Wed, 19 Jan 2011 18:12:15 +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 0tVlrpRY2ssN for ; Wed, 19 Jan 2011 18:12:03 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id C27D0CA910 for ; Wed, 19 Jan 2011 18:12:03 +0100 (CET) Original-Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with SMTP id p0JHC2XS001202 for ; Wed, 19 Jan 2011 18:12:03 +0100 Original-Received: (qmail invoked by alias); 19 Jan 2011 17:12:02 -0000 Original-Received: from ip-178-200-60-214.unitymediagroup.de (EHLO [192.168.178.3]) [178.200.60.214] by mail.gmx.net (mp064) with SMTP; 19 Jan 2011 18:12:02 +0100 X-Authenticated: #24293357 X-Provags-ID: V01U2FsdGVkX1/wzacpKXzwFfB8uWjnlqDaRT8MG3pX4x8d8m/uMA 6jU9esU/2D+Tin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Mnenhy/0.8.3 Thunderbird/3.1.7 In-Reply-To: <4D36E89F.3010208@ziggo.nl> X-Enigmail-Version: 1.1.1 X-Y-GMX-Trusted: 0 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.165.64.22; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0bDVtc2hp - 8fb773cdc123 - 20110119 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:65360 Archived-At: Am 19.01.2011 14:35, schrieb Verhaag, G.C.H.M.: > Verhaag, G.C.H.M. wrote: > >> Hi, >> >> I wanted to try (using ConTeXt minimals MkIV) the example on page 228 >> of the MetaFun manual, dealing with typesetting in MetaPost. >> >> The code is given as: >> >> \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 >> >> But is won't run. The following message is generated: >> >> \@@toks ->\MPtoks >> >> \dodoappendtoks ->\dodoglobal \@@toks >> \@EAEAEA {\@EA \the \@EA \@@toks >> \the ... >> \whatever #1->\appendtoks #1\to \MPtoks >> \setbox \MPbox =\hbox {\bfd >> \the \MP... >> \dodohandletokenstwo *#1->\dododohandletokens {#1} >> \dohandletokens >> M >> etaPost is Fun! >> \handletokens ...ndletokens {#2}\dohandletokens #1 >> \end >> l.96 \handletokens MetaPost is Fun!\with\whatever >> >> Anybody any idea? >> >> Regards, >> Gerard Verhaag >> ___________________________________________________________________________________ >> >> 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 >> ___________________________________________________________________________________ >> >> > Hi, > > I'm in need of help to get the example as described in the MetaFun > manual running, because I want to use text around a path! > > So, I started reading the chapter about 'Typesetting in METAPOST' and > wanted to try the examples as given in that chapter, but without succes! > > The problem seem to be the MPtoks macro. According to the text in this > chapter this low level macro (and MPbox and appendtoks) are already > defined, but are they really? > > The version of context minimals I use at the moment is: > > MTXrun | current version: 2011.01.18 19:34 > > Any suggestions are very much welcomed! Thanks in advance! > Hi Gerard, how about an alternative way to deal with this? 1. draw the text with Inkscape (put text on a path); I think there is even a tutorial for this. 2. select the graphic and save it as *.eps 3. use pstoedit to convert it into *.mp pstoedit -v -ssp -f "mpost:" foo.eps foo.mp 4. edit/scale the metapost graphic as you like Best wishes, Peter ___________________________________________________________________________________ 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 ___________________________________________________________________________________