Subject: AW: bug#44578: AW: bug#44578: Investigating current preview problem

From: "Bruckmann, Tobias" <[email-masked]>
Date: Fri, 7 Jan 2022 12:11:49 +0000

Dear Tassilo,

as far as I understood, the principle is that \psfragfig calls an external
process to perform an "encapsulated" LaTeX->PS->PDF run, applied on a
synthetical LaTeX document that contains the *.eps file. It replaces all
expressions found in the *.eps file (say, a letter "a"), by the
corresponding expression given by psfrag (say, a proper math symbol a):

\psfrag{a}[cc][cc][1.3]{$a$}

Now whether the figure environment contains this line, or the user provides
a separate file, exactly named as the corresponding *.eps file, that
contains all replacements for that *.eps figure.

So, to make psfragfig working, I always thought that -shell-escape is
absolutely needed!

I am not sure whether this was your question, but if I can help, please let
me know.

Best wishes,
Tobias

-----Ursprüngliche Nachricht-----
Von: Tassilo Horn <[email-masked]> 
Gesendet: Freitag, 7. Januar 2022 12:52
An: Ikumi Keita <[email-masked]>
Cc: Bruckmann, Tobias <[email-masked]>; [email-masked];
[email-masked]; [email-masked]
Betreff: Re: bug#44578: AW: bug#44578: Investigating current preview problem

Ikumi Keita <[email-masked]> writes:

>> You are right.  With a test-example EPS which comes with TeXLive, it 
>> again compiles well for me:
>
>>    
>> \psfragfig[mode=errorstop,width=0.9\textwidth]{/usr/share/texmf-dist/
>> tex/latex/mwe/example-image}
>
> It seems that the usage of "example-image" is the source of trouble. 
> In that case, I find in the log that "example-image.tex" is read in, 
> not "example-image.eps".

Ah, indeed, both exist.  But I specified example-image.eps at the first try
and then it complained that example-image.eps.eps did not exist.

So it seems that depending on if -shell-escape is used, \psfragfig either
expects/prefers an eps or a tex file?

Bye,
Tassilo