Hi,

I have a nice document where I need to perform small calculation (actually
only calculating the average value):
 if((#1+#2+#3) != 0)
   (#1*1 + #2*2 + #3*3)/(#1+#2+#3)
 else
   "--"

Now I was thinking where I could do so in TeX. (I think there are some
macros in ConTeXt, but I cannot find them.)

The output should be of the form "1{,}4" (i.e. separator is a {,} and I
get one figure after the separator).

If there is no good solution I will write a script which calculates this
values and does a inline replacement of the data. -- This is not that
error save since one needs to make sure that this script is run before
texexec...

Tobias

Reply via email to