From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/14615 Path: main.gmane.org!not-for-mail From: Willi Egger Newsgroups: gmane.comp.tex.context Subject: Re: Strange behaviour? Metapost om connection with MPpage Date: Sat, 24 Jan 2004 18:47:44 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <4012AFC0.9040404@boede.nl> References: <40086972.6010608@boede.nl> <6.0.1.1.2.20040124105349.02eccd30@server-1> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020102010900000907060808" X-Trace: sea.gmane.org 1074966523 9372 80.91.224.253 (24 Jan 2004 17:48:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 24 Jan 2004 17:48:43 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sat Jan 24 18:48:33 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AkRtZ-0004r4-00 for ; Sat, 24 Jan 2004 18:48:33 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 42C9010B2C; Sat, 24 Jan 2004 18:47:29 +0100 (MET) Original-Received: from smtp-out2.xs4all.nl (smtp-out2.xs4all.nl [194.109.24.12]) by ref.ntg.nl (Postfix) with ESMTP id 0764310B2A for ; Sat, 24 Jan 2004 18:46:53 +0100 (MET) Original-Received: from boede.nl (a80-126-172-1.adsl.xs4all.nl [80.126.172.1]) by smtp-out2.xs4all.nl (8.12.10/8.12.10) with ESMTP id i0OHlqhg088625 for ; Sat, 24 Jan 2004 18:47:52 +0100 (CET) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en Original-To: ntg-context@ntg.nl In-Reply-To: <6.0.1.1.2.20040124105349.02eccd30@server-1> Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:14615 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:14615 This is a multi-part message in MIME format. --------------020102010900000907060808 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Hans, Hm, tried to use \starttext \startMPpage \useMPgraphic{\Pict} \stopMPpage \stoptext error: >> useMPgraphic ! Isolated expression. { l.224 \useMPgraphic { Test} ; ? Otherwise this works: \starttext \useMPgraphic{\Pict} \stoptext Strange, I am stumied... Willi Hans Hagen wrote: > At 23:45 16/01/2004, you wrote: > >> Hi all, >> >> Currently I am preparing a series of figures. I use the approach >> given in Metafun: >> >> \startuseMPgraphic{test} >> ... >> code >> ... >> \stopuseMPgraphic >> >> \starttext >> \startMPpage >> \includeMPgraphic{test} >> \stopMPpage >> % \useMPgraphic > > > \useMPgraphic{test} % otherwise it is \useMPgraphic{\stoptext} > >> \stoptext > --------------020102010900000907060808 Content-Type: text/plain; name="test.tex" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="test.tex" \setupoutput[pdftex] \setupcolors[state=start] \def\PICT{Test} \startMPenvironment \setupbodyfont[ss,8pt] \stopMPenvironment \setupMPvariables [\PICT] [linecolor=blue, gap=.2\bodyfontsize] \startuseMPgraphic{\PICT}{linecolor,gap} % the following definition is taken from mp-back.mp and adapted % in order to be able to fill a given path with a pattern def some_stripe (expr awidth , aheight , alinewidth , alinecolor , aangle , agap , ashape_path ) = stripe_gap := agap ; stripe_angle := aangle ; drawoptions (withpen pencircle scaled alinewidth withcolor alinecolor) ; path p ; p := ashape_path ; stripe_path_a () (draw) p ; enddef; def gluedraw(expr gluepath)= path shape_path; shape_path := gluepath; some_stripe (height, width, linewidth, \MPvar{linecolor}, angle, \MPvar{gap}, shape_path); enddef ; numeric u; u := 5mm; numeric width; width := 100u; numeric height; height := 50u; numeric angle; angle := 45 ; numeric linewidth; linewidth :=.5pt; path sq; sq = (0,0)--(10u,0)--(12u,5u)--(10u,10u)--(0,10u) --cycle ; fill sq withcolor \MPcolor{red} ; gluedraw(sq); \stopuseMPgraphic \starttext % \startMPpage % \useMPgraphic{\PICT} % \stopMPpage \useMPgraphic{\PICT} \stoptext --------------020102010900000907060808--