ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Vit Zyka <vit.zyka@seznam.cz>
Subject: Re: calculations
Date: Thu, 21 Sep 2006 10:04:19 +0200	[thread overview]
Message-ID: <45124783.9060500@seznam.cz> (raw)
In-Reply-To: <0DE942E8-4FE2-41E2-8C04-6D2DD127172D@fiee.net>

Henning Hraban Ramm wrote:
> Am 2006-09-20 um 00:40 schrieb nico:
> 
>> \figurewidth is not a dimension. I guess the following should work:
>>
>> \def\LPscale{.6315789} % downscale the image
>>      \ifvmode
>>         \getfiguredimensions[\bufferprefix
>> lilypond-\the\lily!figures.pdf][]%
>>         \leavevmode%
>>         \newdimen\FigWidth
>>         \newdimen\FigWidthReal=\figurewidth
>>         \FigWidth=\dimexpr(\LPscale\FigWidthReal)
>>         \ifdim\FigWidth>\localhsize
>>           \!!dimena=\localhsize
>>           \advance\!!dimena by-\FigWidth
>>           \noindent\hskip\!!dimena
>>         \fi
>>      \fi
> 
> Thank you very much, that works indeed.
> 
>>      \externalfigure[\lily!img][scale=\dimexpr(1000\LPscale)]%
> 
> But here \dimexpr is nonsense (should have seen that before).
> But "scale=1000\LPscale" just concatenates the two "strings", and TeX  
> doesn't seem to reckognize a *

\def\LPscale{.6315789pt}
scale=\withoutpt\the\dimexpr\LPscale*1000\relax

Vit

> How can I multiply two values? Di I need some expansion magick or  
> just something like "eval()"?
> 
> 
> 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
> 

-- 
=======================================================
Ing. Vít Zýka, Ph.D.                         TYPOkvítek

database publishing              databazove publikovani
data maintaining and typesetting in typographic quality
priprava dat a jejich sazba v typograficke kvalite

tel.: (+420) 777 198 189     www: http://typokvitek.com
=======================================================

  reply	other threads:[~2006-09-21  8:04 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         ` Vit Zyka [this message]
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                     ` calculations Peter Rolf
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=45124783.9060500@seznam.cz \
    --to=vit.zyka@seznam.cz \
    --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).