[texhax] Using a variable to scale psfrags

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Tue Jul 13 23:34:46 CEST 2004


> thanks for all the suggestions. pav's suggestion is
> indeed correct: the "fp" package does the trick
> nicely. for example:

well, you live and learn: i've never really looked at the insides of
the fp package.

> \usepackage[fp]
> ...
> \begin{figure}
>   \begin{psfrags}
>     \def\myscale{1.5}
>     \psfragscanon
>     \psfrag{tag1}[][][\myscale]{Label 1}
>     ..
>     \FPmul\myscale2{\myscale{} * 1.5}

that's dangerous: you're redefining \myscale -- the "2" isn't part of
the command name.  make it \myscaleb (or something -- another common
alternative is roman numerals).

>     \psfrag{tag2}[][][\myscale2]{Label 2}

\myscale2 will now work, but \myscale on its own (as here) would blow
up.



More information about the texhax mailing list