[NTG-context] calculations

Henning Hraban Ramm hraban at fiee.net
Wed Sep 20 00:04:33 CEST 2006

Am 2006-09-19 um 23:34 schrieb nico:

>> I need to downscale every score to 63%, and the shown width check
>> should use the corrected width.
>> How can I do that? (FigWidth should be LPscale * figurewidth)
> I don't know what you really want to do, but an example of computation
> could look like this:
> \newdimen\myfigwidth
> \newdimen\myfigurewidth
> \def\myscale{.63}
> \figurewidth=23pt
> \myfigwidth=\dimexpr(\myscale\myfigurewidth)
> \starttext
> \the\myfigwidth
> \stoptext

Thank you, but now I always get:

! Illegal unit of measure (pt inserted).
<to be read again>
\figurewidth ->545.
\dodostartlilypond ...expr (\LPscale \figurewidth
                                                   ) \ifdim \FigWidth  

from the code:

\def\LPscale{.6315789} % downscale the image
       \getfiguredimensions[\bufferprefix lilypond-\the\lily! 
         \advance\!!dimena by-\FigWidth

What's wrong with \dimexpr{\SomeDef\SomeDim} ?
Some expansion problem?

(Sorry, I only try to patch the code, I didn't write it.)

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

More information about the ntg-context mailing list