From: Peter Rolf <indiego@gmx.net>
Subject: Re: calculations
Date: Tue, 26 Sep 2006 22:14:16 +0200 [thread overview]
Message-ID: <45198A18.2050407@gmx.net> (raw)
In-Reply-To: <A0AD0C0C-C4FF-48F0-8193-DE7F9AAF8528@fiee.net>
Hi Hraban,
Henning Hraban Ramm wrote:
> Am 2006-09-26 um 08:53 schrieb Taco Hoekwater:
>
>>> I think I tried everything but didn't get it to work.
>>> For the moment I use:
>>> \def\LPscale{0.6315789} % downscale the image
>>> \def\LPkscale{632}
>>> % doesn't work: \def\LPkscale{\numexpr1000\LPscale\relax}
>> Missed this thread so far, but how about this?
>> \edef\LPkscale{\the\numexpr1000\LPscale\relax}
>
> Thank you.
> That doesn't run on an error, but scales way too much.
> With
> \def\LPscale{0.6315789}
> the command should have the same effect as
> \def\LPkscale{632}
>
> But
> \edef\LPkscale{\the\numexpr1000\LPscale\relax}
> seems to scale about 100 times too much.
>
maybe
\numexpr1000\dimexpr\LPscale\relax\relax
I have a good feeling about it ;)
> I simply(?!?) want to multiply some floating point value with 1000 to
> set the "scale" parameter of \externalfigure.
> Why ist this so difficult?
>
Because there is no normal float type in TeX like in common programming
languages. Also all calculation is limited by \maxdimen.
> Is there a book or tutorial on TeX as a programming language somewhere?
>
I like 'Tex by Topic' alot. Don't know if that fits your needs.
http://archive.contextgarden.net/message/20060901.140544.1fe86b32.en.html
Greetings, Peter
>
>
> Greetlings from Lake Constance!
> Hraban
> ---
> http://www.fiee.net/texnique/
> http://contextgarden.net
> http://www.cacert.org (I'm an assurer)
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>
>
next prev parent reply other threads:[~2006-09-26 20:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-19 20:53 calculations Henning Hraban Ramm
2006-09-19 21:22 ` calculations Hans Hagen
2006-09-19 21:34 ` calculations nico
2006-09-19 22:04 ` calculations Henning Hraban Ramm
2006-09-19 22:40 ` calculations nico
2006-09-20 20:39 ` calculations Henning Hraban Ramm
2006-09-21 8:04 ` calculations Vit Zyka
2006-09-21 19:12 ` calculations Peter Rolf
2006-09-24 19:47 ` calculations Henning Hraban Ramm
2006-09-25 9:46 ` calculations Peter Rolf
2006-09-25 10:21 ` calculations Hans Hagen
2006-09-25 21:11 ` calculations Henning Hraban Ramm
2006-09-26 6:53 ` calculations Taco Hoekwater
2006-09-26 17:14 ` calculations Henning Hraban Ramm
2006-09-26 20:14 ` Peter Rolf [this message]
2006-09-26 20:19 ` calculations 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=45198A18.2050407@gmx.net \
--to=indiego@gmx.net \
--cc=ntg-context@ntg.nl \
/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).