Hello, does someone know how, if at all, one can printout some variable? Like Emean:=(2*Eone+Ezero+2*Etwo)/5.; label.urt(btex $A = x$ .... where x is the value of Emean? I frequently create some diagrams, modify them and then forget to change the label. (If one could set the number of digits, it would be even nicer.) Tobias
Taco Hoekwater wrote:
Tobias Burnus wrote:
Hello,
does someone know how, if at all, one can printout some variable? Like Emean:=(2*Eone+Ezero+2*Etwo)/5.; label.urt(btex $A = x$ ....
this should work:
input TEX; label.urt(TEX("$A = "&decimal x&"$)"), ....
in context you can use the more efficient 'textext' mechanism instead of 'TEX' (actually, it was only after writing textext that i noticed the existence of the TEX macro -) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hallo Tobias, you can use char<numeric primary> in the following manner: Emean:=5;% A quite simple example label.lft(btex $A=$ etex,pair exression); label.rt(char(48+Emean),the same pair expression); Clearly, if Emean is an expression like xxx.xxxx, you must convert it in a sequence of single chars (not quite simple). Greetings Albrecht On Tue, 14 Jun 2005, Tobias Burnus wrote:
Hello,
does someone know how, if at all, one can printout some variable? Like Emean:=(2*Eone+Ezero+2*Etwo)/5.; label.urt(btex $A = x$ .... where x is the value of Emean? I frequently create some diagrams, modify them and then forget to change the label. (If one could set the number of digits, it would be even nicer.)
Tobias _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (4)
-
Albrecht Kauffmann
-
h h extern
-
Taco Hoekwater
-
Tobias Burnus