[NTG-context] calculations

Henning Hraban Ramm hraban at fiee.net
Wed Sep 20 22:39:12 CEST 2006

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 *

How can I multiply two values? Di I need some expansion magick or  
just something like "eval()"?

Greetlings from Lake Constance!
http://www.cacert.org (I'm an assurer)

More information about the ntg-context mailing list