[NTG-context] calculations
Vit Zyka
vit.zyka at seznam.cz
Thu Sep 21 10:04:19 CEST 2006
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 at 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
=======================================================
More information about the ntg-context
mailing list