Featured Book

LaTeX Beginners Guide

Who is online

In total there are 11 users online :: 0 registered, 0 hidden and 11 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 11 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

pstool | External Graphics File not found Topic is solved

graphicspstoolAdd tags Information and discussion about graphics, figures & tables in LaTeX documents.

pstool | External Graphics File not found

Postby BlackPhoenix on Fri Dec 7th, 2012

Hey everybody,

while writing my thesis I have encountered the following problem. First of all, I'm using Miktex 2.9, if that is relevant.

Since I'm using PDFLatex and would like to change captions in my graphics via psfrag (which is obviously not compatible), I found the package pstool, which allows the combination of PDFLaTeX and the use of psfrag commands.

However, it doesn't seem to work for me. I have reduced the problematic file to the following minimum file.

Code: Select all  •  Open in writeLaTeX
\documentclass{article}
\usepackage{pstool}
\begin{document}
randomtext
\pstool{testeps}{\psfrag{test}{blabla1}}
\end{document
}


The file "testeps.eps" is in the same directory. It was exported using the program "Dia", which produces EPS files that are compatible with psfrag and includes a caption "test".

The above source code leads to this error
Code: Select all  •  Open in writeLaTeX
! LaTeX Error: File `testeps' not found.

Now I am sort of clueless and would appreciate any help. I have already looked for comparable problems and answers, but the results were rather limited and none of the answers helped me. So it would be great, if you could help me here. If there is another practicable workaround for the issue with PDFLaTeX and psfrag, let me know.

Thanks in advance,
Alex
Last edited by cgnieder on Fri Dec 7th, 2012, edited 1 time in total.
BlackPhoenix
 
Posts: 5
Joined: Fri Dec 7th, 2012

Re: pstool | External Graphics File not found  Topic is solved

Postby cgnieder on Fri Dec 7th, 2012

Hi and welcome to the LaTeX community!

I can't help with the actual issue as your MWE works for me (with one of my EPS files, of course). I do have an alternative solution, though. I found auto-pst-pdf a working solution for using psfrag with pdfLaTeX. Your MWE would then look as follows:

Code: Select all  •  Open in writeLaTeX
\documentclass{article}
\usepackage[runs=2]{auto-pst-pdf}
\usepackage{psfrag}

\begin{document}
random text
\psfrag{test}{blabla1}
\includegraphics{testeps}
\end{document
}


As before it needs to be compiled with shell-escape enabled.

Regards
Clemens
------------------------------
New German Q&A site about TeX: http://texwelt.de/wissen
System: TeXlive 2013, OpenSUSE 12.3
User avatar
cgnieder
Site Moderator
 
Posts: 1696
Joined: Sat Apr 16th, 2011
Location: Germany

Re: pstool | External Graphics File not found

Postby BlackPhoenix on Fri Dec 7th, 2012

Okay, my bad... I had previously enabled shell-escape via the command line, and assumed that this was permanent... I have now found out how to permanently enable it and now it seems to work perfectly, at least in my minimal example. I assume that it will now also work in the original file.

Thank you and sorry for the superfluous question.

Anyway, I also have some information in return :)

I tried out the auto-pst-pdf package before but as the author writes in the intro here
http://mirror.hmc.edu/ctan/macros/latex ... st-pdf.pdf
pstool seems to be a more efficient successor of auto-pst-pdf. So in case anybody is considering one of the two packages, pstool is probably the better choice.

Alex
BlackPhoenix
 
Posts: 5
Joined: Fri Dec 7th, 2012

Re: pstool | External Graphics File not found

Postby cgnieder on Fri Dec 7th, 2012

BlackPhoenix wrote:Thank you and sorry for the superfluous question.


Don't mind. Maybe it'll still help someone else. :)

BlackPhoenix wrote:I tried out the auto-pst-pdf package before but as the author writes in the intro here
http://mirror.hmc.edu/ctan/macros/latex ... st-pdf.pdf
pstool seems to be a more efficient successor of auto-pst-pdf. So in case anybody is considering one of the two packages, pstool is probably the better choice.


This really depends on the use case. There are packages which use \psfrag internally (e.g. chemstyle or chemnum) in which case pstool's benefits are rather limited but auto-pst-pdf works quite well.

Regards
Clemens
------------------------------
New German Q&A site about TeX: http://texwelt.de/wissen
System: TeXlive 2013, OpenSUSE 12.3
User avatar
cgnieder
Site Moderator
 
Posts: 1696
Joined: Sat Apr 16th, 2011
Location: Germany

Re: pstool | External Graphics File not found

Postby BlackPhoenix on Fri Dec 7th, 2012

Okay, I'm sure you are right. Just wanted to mention that comment as I thought it might be useful for someone.

However, I'm back with a, hopefully easily solvable, related problem:

When I said that enabling the shell-escape worked, it worked when I used "pdflatex" as compiling option. However, if I use "PdfLatex+MakeIndex+Bibtex", the same problem as before occurs, despite having allowed shell-escape for pdflatex. I could also change the settings for "PdfLatex+MakeIndex+Bibtex", but it doesn't accept the --shell-escape command there...("unknown option")

Of course I could compile all graphics with in an extra pdflatex-only file and import them into the main file afterwards, but that seems like a suboptimal choice. So how do I activate shell-escape for the "PdfLatex+MakeIndex+Bibtex" option? As said, I'm using Miktex/Texworks.

So I guess I just lack the proper command that might be different for "PdfLatex+MakeIndex+Bibtex" but that I couldn't find out googling...

Thanks again!
BlackPhoenix
 
Posts: 5
Joined: Fri Dec 7th, 2012

Re: pstool | External Graphics File not found

Postby cgnieder on Fri Dec 7th, 2012

BlackPhoenix wrote:When I said that enabling the shell-escape worked, it worked when I used "pdflatex" as compiling option. However, if I use "PdfLatex+MakeIndex+Bibtex", the same problem as before occurs, despite having allowed shell-escape for pdflatex. I could also change the settings for "PdfLatex+MakeIndex+Bibtex", but it doesn't accept the --shell-escape command there...("unknown option")

Of course I could compile all graphics with in an extra pdflatex-only file and import them into the main file afterwards, but that seems like a suboptimal choice. So how do I activate shell-escape for the "PdfLatex+MakeIndex+Bibtex" option? As said, I'm using Miktex/Texworks.

So I guess I just lack the proper command that might be different for "PdfLatex+MakeIndex+Bibtex" but that I couldn't find out googling...


This seems to be a separate question concerning especially the TeXworks editor and should probably be asked independently in the corresponding forum. As I have never used TeXworks I have no clue...

Regards
Clemens
------------------------------
New German Q&A site about TeX: http://texwelt.de/wissen
System: TeXlive 2013, OpenSUSE 12.3
User avatar
cgnieder
Site Moderator
 
Posts: 1696
Joined: Sat Apr 16th, 2011
Location: Germany

Re: pstool | External Graphics File not found

Postby BlackPhoenix on Fri Dec 7th, 2012

I'll do so, thanks!
BlackPhoenix
 
Posts: 5
Joined: Fri Dec 7th, 2012

Re: pstool | External Graphics File not found

Postby CrazyHorse on Fri Dec 7th, 2012

BlackPhoenix wrote:I tried out the auto-pst-pdf package before but as the author writes in the intro here
http://mirror.hmc.edu/ctan/macros/latex ... st-pdf.pdf
pstool seems to be a more efficient successor of auto-pst-pdf. So in case anybody is considering one of the two packages, pstool is probably the better choice.

No, pstool is _not_ the succesasor of auto-pst-pdf
CrazyHorse
 
Posts: 350
Joined: Sat Aug 2nd, 2008


Topic Tags

graphicspstool

Return to Graphics, Figures & Tables

Who is online

Users browsing this forum: No registered users and 11 guests