[l2h] Question on psfrag

Stefan Schagerberg Stefan Schagerberg <ss.190@brfmasthugget.se>
Thu, 20 Apr 2000 12:26:21 +0200


I used the additions:
psfragstar # {} # [] # [] # [] # [] # {}
psfrag # {} # [] # [] # [] # [] # {}
psfragscanon
psfragscanoff

since \psfrag takes 4 optonal positioning arguments:
\psfrag{tag}[<posn>][<psposn>][<scale>][<rot>]{replacement}

The last two lines were added to support embedded PSfrag replacements.

Why add those lines in graphics.perl and graphicx.perl also? It works
for me just adding them in psfrag.perl.

Comment. When using psfrag I guess it's sometimes a good idea to use the
option -noreuse since normally psfrag replacements only remain in effect
in the surrounding environment. If images are reused the following will
only give two identical figures since the first image is reused.

\begin{figure}[!h]
    \psfrag{tag}[cc][cc]{centered}
    \includegraphics{psfragtest.eps}
\end{figure}

\begin{figure}[!h]
    \psfrag{tag}[cc][cc][1][45]{centered and slanted}
    \includegraphics{psfragtest.eps}
\end{figure}

The cause of this is that I used different replacements on the SAME
eps-file causing the reuse.

Ps. I apoloqize for posting my original question twice. Since I use a
different mail account than the one registered to the mailing list I
first thought it had bounced. Ds.

/Stefan

Ross Moore skrev:
> 
> > I installed latex2html-99.2beta6 which included support for psfrag.
> > However it does not seem to support lines like:
> >
> > \psfrag{NOT DONE YET}[cc][cc]{PSFRAG WORKS...}
> >
> > , but complains it can't find a curly bracket. (On my Windows NT it even
> > crashes.) Guess it's because the
> > positioning arguments (within square brackets) don't seem to be
> > supported
> 
> Yes; that's correct analysis.
> 
> Supporting them is easy to achieve.
> 
> Change the lines in  graphics.perl  and  graphicx.perl  and  psfrag.perl from
> 
> psfragstar # {} # {}
> psfrag # {} # {}
> 
> to
> 
> psfragstar # {} # [] # [] # {}
> psfrag # {} # [] # [] # {}
> 
> Are there other positions in which optional arguments can occur,
> either with \psfrag or with other commands defined in the psfrag package ?
> 
> >
> > \psfrag{NOT DONE YET}{PSFRAG WORKS...}
> >
> > , however does work.
> > Is there a fix for this? The "fast" way would be if "[]" where just
> > ignored, but I'm not really a perl hacker so I don't know how to fix
> > that. Any ideas?
> 
> Hope this helps,
> 
>         Ross Moore
> 
> >
> > regards
> > /Stefan