From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/48622 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Value of Metapost variable as a label Date: Sat, 21 Mar 2009 18:04:25 -0400 (EDT) Message-ID: References: <3b4b12310903211339h5b325c67k3e504e81cdc33e0c@mail.gmail.com> 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: ger.gmane.org 1237673226 12604 80.91.229.12 (21 Mar 2009 22:07:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Mar 2009 22:07:06 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Mar 21 23:08:21 2009 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 lo.gmane.org with esmtp (Exim 4.50) id 1Ll9Mb-0005n8-B7 for gctc-ntg-context-518@m.gmane.org; Sat, 21 Mar 2009 23:08:21 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7C91C1FD40; Sat, 21 Mar 2009 23:06:56 +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 03659-04; Sat, 21 Mar 2009 23:06:13 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5C35E1FD08; Sat, 21 Mar 2009 23:06:13 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5C0211FD08 for ; Sat, 21 Mar 2009 23:06:09 +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 06973-04 for ; Sat, 21 Mar 2009 23:05:50 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by ronja.ntg.nl (Postfix) with ESMTP id 06AB71FC06 for ; Sat, 21 Mar 2009 23:05:47 +0100 (CET) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by filter2-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n2LM52au007775 for ; Sat, 21 Mar 2009 23:05:04 +0100 Original-Received: FROM [192.168.2.8] (c-71-234-195-113.hsd1.ct.comcast.net [71.234.195.113]) BY hackers.mr.itd.umich.edu ID 49C5648D.5937B.32075 ; 21 Mar 2009 18:05:01 -0400 In-Reply-To: <3b4b12310903211339h5b325c67k3e504e81cdc33e0c@mail.gmail.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.81; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 197041338 - 7cfd7417ad50 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:48622 Archived-At: On Sat, 21 Mar 2009, Curiouslearn wrote: > Hello, > > First of all, Mojca thanks very much for the update about TikZ. (I could not > find an option to reply in Context Garden mailing list). > > My new question is the following. I have the following code to generate the > labels for the tick marks: > > for i = 0 step 5 until 45: > draw (i,0)*u -- (i,-0.2)*u; > label.bot(decimal(i) ,(i,-0.2)*u); > endfor; > > As you can see I use "decimal(i)" to get the labels (0,5,10,... and so on). > But the font of these numbers is not the same as when I use the "btex > label_text etex" command, which I have set to palatino. How can I typeset > the value of Metapost variables (such as "i" in this case), using tex > commands. label.bot (textext(decimal(i)), (...)) ; > For example, if I had to typeset (n_{1},n{2},...,n_{100}), how > could I do that. label.bot (textext("$n_{" & decimal i & "}"), ... ) ; etc. > On page 63 of John Hobby's metapost manual, he talks about how this could be > achieved using TEX.mp. I tried typing \input TEX before \starttext, however, > I get the error "I can't find file `TEX;' If I put it within the > \startuseMPgraphic and \stopuseMPgraphic, it still does not work. Do I have > to download this from somewhere or does Context have another solution? Use textext. Aditya ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________