From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/25973 Path: news.gmane.org!not-for-mail From: Mojca Miklavec Newsgroups: gmane.comp.tex.context Subject: Re: using symbols in MetaFun Date: Wed, 15 Feb 2006 16:42:27 +0100 Message-ID: <6faad9f00602150742t74a35b85h5928c9e3bf2063@mail.gmail.com> References: <6faad9f00602102028x561190b7yac4851df28598c08@mail.gmail.com> <43F0632A.8010004@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1140019930 6612 80.91.229.2 (15 Feb 2006 16:12:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Feb 2006 16:12:10 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Feb 15 17:12:07 2006 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 1F9PF7-0004aW-FO for gctc-ntg-context-518@m.gmane.org; Wed, 15 Feb 2006 17:11:01 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 85F4412792; Wed, 15 Feb 2006 17:11:00 +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 27386-06; Wed, 15 Feb 2006 17:10:58 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 567A6127B3; Wed, 15 Feb 2006 16:42:32 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4AB3A127B3 for ; Wed, 15 Feb 2006 16:42:30 +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 26132-09 for ; Wed, 15 Feb 2006 16:42:28 +0100 (CET) Original-Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.199]) by ronja.ntg.nl (Postfix) with SMTP id DBC1E127A1 for ; Wed, 15 Feb 2006 16:42:28 +0100 (CET) Original-Received: by nproxy.gmail.com with SMTP id l37so618929nfc for ; Wed, 15 Feb 2006 07:42:28 -0800 (PST) Original-Received: by 10.49.80.13 with SMTP id h13mr59971nfl; Wed, 15 Feb 2006 07:42:27 -0800 (PST) Original-Received: by 10.48.202.15 with HTTP; Wed, 15 Feb 2006 07:42:27 -0800 (PST) Original-To: mailing list for ConTeXt users In-Reply-To: <43F0632A.8010004@wxs.nl> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:25973 Archived-At: Thank you very much to both of you! This works perfectly and just the way I wanted. I have some other questions, but I have to write exact specification(s) first. (The whole documentation for implementing 3D features is approximately "read the cryptic implementation in PostScript, figure out what it does and implement it that way in your terminal". I hate that, but I'll try to come through it. I'll report as soon as there will be something functional available.) Thanks a lot for all the help, Mojca On 2/13/06, Hans Hagen wrote: > Mojca Miklavec wrote: > > Hello, > > > > I have a "conversion" defined in the following way: > > > > \usesymbols[jmn] > > \defineconversion > > [gnuplot] > > [$\bullet$, > > $\circ$, > > $\star$, > > x, > > {\symbol[navigation 1][NextJump]}] > > > > I would like to use these symbols in a macro > > draw_symbol(x,y,number) > > so that > > draw_symbol(0,0,3) > > would draw a star in the origin. > > > > The problem is that I don't know: > > - how to use symbol sets inside MetaFun (verbatimtex \usesymbols[jmn] > > etex doesn't work here) > > - how to enable > > label(btex \convertnumber{gnuplot}{5} etex, (x,y)) > > to work properly in metafun (no luck with verbatimtex ... etex again) > > > > Any hints would be appreciated. > > > ==== test.tex ==== > > \starttext > > \startMPenvironment [global] > > \readfile{test-gnuplot}{}{} > > \stopMPenvironment > > \setupcolors[state=start] > > \startMPcode > def the_symbol(expr n) = > textext("\GnuPlotSymbol{" & decimal n & "}") > enddef ; > def draw_symbol(expr x, y, n) = > draw the_symbol(n) shifted (x,y) > enddef ; > > for i=1 upto 10 : > draw_symbol(i*10,i*10,i) withcolor red ; > endfor ; > \stopMPcode > > \stoptext > > > === test-gnuplot.tex ==== > > \defineconversion > [gnuplot] > [$\bullet$, > $\circ$, > $\star$, > x, > {\symbol[navigation 1][NextJump]}] > > \unexpanded\def\GnuPlotSymbol#1% > {\convertnumber{gnuplot}{#1}}