From: Tobias Burnus <tobias.burnus@physik.fu-berlin.de>
Subject: Calculating in TeX
Date: Wed, 5 Dec 2001 22:31:04 +0100 (CET) [thread overview]
Message-ID: <Pine.BSF.4.30.0112052223001.3513-100000@chip.physik.fu-berlin.de> (raw)
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
next reply other threads:[~2001-12-05 21:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-05 21:31 Tobias Burnus [this message]
2001-12-06 9:50 ` Giuseppe Bilotta
2001-12-06 11:27 ` Taco Hoekwater
2001-12-06 14:06 e_w_g
[not found] <Pine.BSF.4.30.0112052223001.3513-100000@chip.physik.fu-ber lin.de>
2001-12-10 8:46 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.BSF.4.30.0112052223001.3513-100000@chip.physik.fu-berlin.de \
--to=tobias.burnus@physik.fu-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).