From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24749 Path: news.gmane.org!not-for-mail From: David Arnold Newsgroups: gmane.comp.tex.context Subject: Re: Passing text to Metapost functions Date: Mon, 26 Dec 2005 13:17:47 -0800 Message-ID: <4B3976CA-22FC-490B-962D-66E58C47664E@cox.net> References: <8B3296E7-0060-4D06-84AE-C3A5816A4F5E@cox.net> <43AFD7AB.7020607@wxs.nl> <43B04CAB.7010201@boede.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135632061 8378 80.91.229.2 (26 Dec 2005 21:21:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Dec 2005 21:21:01 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Dec 26 22:20:59 2005 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1Eqzm1-0005m4-02 for gctc-ntg-context-518@m.gmane.org; Mon, 26 Dec 2005 22:20:53 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8FB59127A0; Mon, 26 Dec 2005 22:20:52 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 32360-04; Mon, 26 Dec 2005 22:20:52 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 51AD312798; Mon, 26 Dec 2005 22:19:06 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 44CC412798 for ; Mon, 26 Dec 2005 22:19:04 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 32203-06 for ; Mon, 26 Dec 2005 22:19:03 +0100 (CET) Original-Received: from fed1rmmtao01.cox.net (fed1rmmtao01.cox.net [68.230.241.38]) by ronja.ntg.nl (Postfix) with ESMTP id A81001278B for ; Mon, 26 Dec 2005 22:19:02 +0100 (CET) Original-Received: from [10.0.1.2] (really [70.191.56.23]) by fed1rmmtao01.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20051226211814.QWCP15695.fed1rmmtao01.cox.net@[10.0.1.2]> for ; Mon, 26 Dec 2005 16:18:14 -0500 In-Reply-To: <43B04CAB.7010201@boede.nl> Original-To: mailing list for ConTeXt users X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:24749 Archived-At: Willi et al, No luck. I can't get any text to show up. I've spent about three days on this, reading, etc., and I'm no closer than I was three days ago. %output=pdf \setupcolors[state=start] \definecolor[gridlines][s=0.7] \startMPinclusions color gridlines; gridlines:=\MPcolor{gridlines}; vardef create_grid(expr xxmin,xxmax,xxscl,yymin,yymax,yyscl,uux,uuy)= for k=xxmin step xxscl until xxmax: draw (xmin*uux,k*uuy)--(xmax*uux,k*uuy) withcolor \MPcolor {gridlines}; draw (k*uux,ymin*uuy)--(k*uux,ymax*uuy) withcolor \MPcolor {gridlines}; endfor; enddef; vardef create_axes (expr xxmin,xxmax,yymin,yymax,uux,uuy) (text xlbl) = drawdblarrow (1.05*xxmin*uux,0)--(1.05*xxmax*uux,0); draw textext.origin(\MPbetex{xlbl}); drawdblarrow (0,1.05*yymin*uuy)--(0,1.05*yymax*uuy); enddef; \stopMPinclusions \starttext \startMPpage %initialize window parameters numeric xmin, xmax, xscl, ymin, ymax, yscl; xmin:=-5; xmax:=5; xscl:=1; ymin:=-5; ymax:=5; yscl:=1; %initialize scale numeric ux, uy; (xmax-xmin)*ux=4in; (ymax-ymin)*uy=3in; %create the grid create_grid(xmin,xmax,xscl,ymin,ymax,yscl,ux,uy); %create the axes \setMPtext{1}{x}; create_axes(xmin,xmax,ymin,ymax,ux,uy)(\MPbetex{1}); \stopMPpage \stoptext %%% Local Variables: %%% mode: conTeXt-en %%% End: