From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/6208 Path: main.gmane.org!not-for-mail From: "Denis B. Roegel" Newsgroups: gmane.comp.tex.context Subject: Re: MetaPost question Date: Sun, 18 Nov 2001 12:57:34 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <20011118125734.B20785@bar.loria.fr> References: <190113640906.20011117205442@telecable.es> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035396749 8501 80.91.224.250 (23 Oct 2002 18:12:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:12:29 +0000 (UTC) Cc: ConTeXt Mailing List Original-To: Jose Luis Diaz In-Reply-To: <190113640906.20011117205442@telecable.es>; from jldiaz@telecable.es on Sat, Nov 17, 2001 at 08:54:42PM +0100 Xref: main.gmane.org gmane.comp.tex.context:6208 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:6208 On Sat, Nov 17, 2001 at 08:54:42PM +0100, Jose Luis Diaz wrote: > But then suppose that I also want a label below each dot, typeset > with TeX, which reads: $t_1=3$, $t_2=20$, $t_3=25$. I can't use > btex/etex because I want to construct the text $t_1=3$ from the loop > variable, something like: > > for i=1 upto 3: > sprintf(string,"$f_%d=%d$",i,t[i]); %This is not Metapost, obviusly > label.bot(TEX(string), (0u, t[i]*u)); % This is > endfor; > > > How can be done? Build your string s with something like s="$t_" & decimal(i) & "=" & decimal(t[i]) & "$"; and then write label.bot(TEX s,(0,t[i]*u)) and don't forget input TEX at the beginning of your file. Denis