Peter Rolf wrote:
Henning Hraban Ramm wrote:
Am 2006-09-21 um 21:12 schrieb Peter Rolf:
\externalfigure[\lily!img][scale=\dimexpr(1000\LPscale)]%
\numexpr should work here ..[scale=\numexpr1000\LPscale\relax]%
thank you, that seemed what I looked for, but: ! You can't use `\numexpr' in horizontal mode.
One of my favourite errors. Everytime it occurs I'm a bit puzzled, as I've no general solution for this. I can only tell you what I do in such a case.
- check every parameter of the expression
If the expression itself is ok
- check the correct grouping of prior commands (boxes, conditionals,..) - try to calculate the expression before you pass it \newcount\Myscale \Myscale\numexpr1000\LPscale\relax ..[scale=\the\Myscale]
But in the end it is more try and error than a systematic action. If there is a more general approach to solve this, I would be happy to hear it.
Gr some day soon:
\def\integer#1{\lua{tex.sprint(math.floor(#1))} scale=\integer{1000*\LPscale} Hans -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------