From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65325 Path: news.gmane.org!not-for-mail From: "Verhaag, G.C.H.M." Newsgroups: gmane.comp.tex.context Subject: How to run Typesetting in MetaPost example (MetaFun)? Date: Tue, 18 Jan 2011 14:48:50 +0100 Message-ID: <4D359A42.4030209@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"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1295358319 14492 80.91.229.12 (18 Jan 2011 13:45:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 18 Jan 2011 13:45:19 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 18 14:45:15 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 1PfBs3-0005pr-Cl for gctc-ntg-context-518@m.gmane.org; Tue, 18 Jan 2011 14:45:15 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id ABEEBCA9E6; Tue, 18 Jan 2011 14:45:14 +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 74B-Qt+x1AiG; Tue, 18 Jan 2011 14:45:11 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D6D70CA9D7; Tue, 18 Jan 2011 14:45:11 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 345E7CA9D7 for ; Tue, 18 Jan 2011 14:45:10 +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 6FPy7LHK0fBx for ; Tue, 18 Jan 2011 14:44:59 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 2138ECA936 for ; Tue, 18 Jan 2011 14:44:59 +0100 (CET) Original-Received: from smtpq2.gn.mail.iss.as9143.net (smtpq2.gn.mail.iss.as9143.net [212.54.34.165]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p0IDiwUY012445 for ; Tue, 18 Jan 2011 14:44:58 +0100 Original-Received: from [212.54.34.140] (helo=smtp9.gn.mail.iss.as9143.net) by smtpq2.gn.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1PfBrm-00067G-EW for ntg-context@ntg.nl; Tue, 18 Jan 2011 14:44:58 +0100 Original-Received: from 541c2cdc.cm-5-5a.dynamic.ziggo.nl ([84.28.44.220]) by smtp9.gn.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1PfBrl-0000GZ-Qz for ntg-context@ntg.nl; Tue, 18 Jan 2011 14:44:57 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Debian/1.7.8-1 X-Accept-Language: en X-ZiggoSMTP-MailScanner-Information: Please contact the ISP for more information X-ZiggoSMTP-MailScanner-ID: 1PfBrl-0000GZ-Qz X-ZiggoSMTP-MailScanner: Found to be clean X-ZiggoSMTP-MailScanner-SpamCheck: geen spam, SpamAssassin (niet cached, score=0.177, vereist 5, ALL_TRUSTED -1.00, BAYES_40 -0.00, HELO_DYNAMIC_DHCP 0.21, RDNS_DYNAMIC 0.98, T_RP_MATCHES_RCVD -0.01) X-ZiggoSMTP-MailScanner-From: verhaaggchm@ziggo.nl X-Bayes-Prob: 0.0932 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=212.54.34.165; country=NL; region=05; city=Maastricht; latitude=50.8500; longitude=5.6833; http://maps.google.com/maps?q=50.8500,5.6833&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08DV1IWiP - 296ecd1e3c4b - 20110118 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:65325 Archived-At: 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 ___________________________________________________________________________________