[texhax] Using a variable to scale psfrags
Heywood J
heywoodj123 at yahoo.com
Fri Jul 9 05:20:08 CEST 2004
Hello,
I am using the psfrag package to replace dummy text
labels in some EPS figures. Getting all the labels to
scale proportionally with the figure itself works fine
with the \resizebox command, but I'm having trouble
using a variable to scale the individual text labels
with respect to the boxes in the figure. Here's what I
have:
\begin{figure}
\begin{psfrags}
\def\myscale{1.5}
\psfragscanon
\psfrag{tag1}[][][\myscale]{Label 1}
\psfrag{tag2}[][][1.75\myscale]{Label 2}
...
\resizebox{\textwidth}{!}{\includegraphics{foo.eps}}
\end{psfrags}
\end{figure}
The first two (optional) arguments to psfrag (empty in
the example above) have to do with alignment; those
work fine. The problem is with the third optional
argument. TeX handles both psfrag lines above OK, but
the presence of the second line results in a
postscript file that crashes the ghostscript
interpreter.
I've tried \newcommand, \newlength, \newcounter, and
\def -- but for various reasons, none of those work.
I'd like to be able to only adjust the value of
\myscale once at the top of each figure environment,
instead of having to manually tweak all the \psfrag
calls (some of my figures have ten or more).
Does anyone know of a way to do this?
Thanks very much in advance,
HJ
heywoodj123 at-sign yahoo period com
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
More information about the texhax
mailing list