1

I am using MikTex 2.9 and TexStudio on Windows 10.

1.I have included in my preamble: \usepackage[outdir=./converted_pdfs/]{epspdfconversion}

  1. In Configure TexStudio -> Commands -> PdfLateX, I have: pdflatex.exe -synctex=1 -interaction=nonstopmode --enable-write18 %.tex

  2. I have a main .tex file in a directory 'XX', and I have a subdirectory 'XX/gfx' where I have stored my EPS vector graphics.

When trying to build I get:

Package pdftex.def Error: File `./converted_pdfs/VTERM1042_WT_Spikes-epspdf-to.pdf' not found. ...th=0.8\textwidth]{VTERM1042_WT_Spikes.eps}

After searching a lot about the problem on the net I tend to think it is a problem of the path to the .tex file or the path to the .eps files. My impression from reading other people's posts is that "it" does not know where to look for the eps files.

Any help is most appreciated.

  • Did you test it work if you don't use the special outdir? – Ulrike Fischer Jan 7 '16 at 11:44
  • Yes, I just tried. It does not work. The problem is related to 'inability to find the correct path', while package epstopdf does not suffer from the same problem. – Martin Bakardjiev Jan 7 '16 at 13:54
  • By the way, have I correctly enable the write18 option? is my syntax correct for Windows 10, MikTex 2.9 and TexStudio Configuration? – Martin Bakardjiev Jan 7 '16 at 17:38
  • Yes you can use --enable-write18. --shell-escape works too. Beside I guess that you didn't read the documentation of epspdfconversion. It says for outdir: "For other directories ensure that they can be found. See \graphicspath or TEXINPUTS." – Ulrike Fischer Jan 7 '16 at 17:53
  • Well, as a matter of fact, I have read that part of the documentation that you are referring to. However, I have tried with or without the 'outdir' and it still does not work. – Martin Bakardjiev Jan 7 '16 at 19:11
0

So I took the trouble to make a test document and checked the log file. It says quite clearly

 epspdf <file> is used to convert eps->pdf (not epstopdf (script))

and a check in the docu showed (Note the epsTOpdf vs epspdf).

The package needs epspdf which is not in miktex you can find here http://tex.aanhet.net/epspdf.

(This shows again how useful a full test document is, so that one can try out the problem and see the full log-file and don't have to rely on some snippets in the question).

  • Now I have positively installed the epspdf and tried if it works stand alone - yes it does. There is an executable "C:\Program Files (x86)\epspdf\epspdf\epspdftk.exe" which opens up a GUI window where you can select an .eps file and choose where to save the output .pdf file - it works beautifully. However in TexStudio it continues to return the error I mentioned initially. Where can I look for the possible cause? – Martin Bakardjiev Jan 7 '16 at 22:26
  • is there a epspdf.exe, and is in the PATH? – Ulrike Fischer Jan 7 '16 at 22:42
  • No, there is no 'epspdf.exe' anywhere on my drive. There is a 'epspdftk.exe' which opens up a tool with a GUI that works and converts. Because 'epspdf.exe' cannot be found in my system, this means it is not in the windows installer downloaded from the webpage tex.aanhet.net/epspdf. I also downloaded the .zip archive which also does not contain a "epspdf.exe" file. It is possible that earlier version of epspdf which have been written in Ruby used the 'epspdf.exe' but the recent version which is not in Ruby does not have 'epspdf.exe'. – Martin Bakardjiev Jan 8 '16 at 13:14
  • Well then you will probably have to create an epspdf.bat as described on the website. – Ulrike Fischer Jan 8 '16 at 13:24
  • It does not make sense, because in the .bat file , ruby is mentioned. I don't have ruby and ruby is not mentioned as a prerequisite for epspdf on the website. – Martin Bakardjiev Jan 8 '16 at 22:53
0

Have you tried using the epstopdf package instead? It is the package called by epspdfconversion and unless you are looking to pass specific parameters to epstopdf, you shouldn't need to use epspdfconversion.

Here is a setup I used earlier, that worked for me:

\usepackage{epstopdf}
\epstopdfsetup{outdir=./}
\graphicspath{{../}}

Note the extra curly brackets inside the graphicspath command.

I stored my images in a subfolder (img) relative to the .tex file (similar to your setup) and my EPS conversions were created in the same folder as the .tex file.

This meant I called my EPS's as follows:

\includegraphics{img/eps_name}

Note that, as always, no .eps ending is required. In your case, you would replace img with gfx of course.

I am using texify to compile but I don't think your command line should be a problem.

  • Thank you. I appreciate your input. I tried your suggestion and it works beautifully, with 'epstopdf' package. I also tried your approach with 'epspdfconversion' but it did not work. I tried it because the "\epstopdfsetup{outdir=./}" argument is described in the 'epspdfconversion' documentation also. The "graphicspath{{../}}" command, I suppose applies to graphics in general and not to 'epstopdf' particularly ? (I might be mistaken here). I very much appreciate your answer, but because I want to get to the bottom of this, and enable the use of epspdfconversion package I will wait and hope. – Martin Bakardjiev Jan 7 '16 at 13:44
  • I vaguely recall the graphicspath command being necessary in order for the compiler to find the PDFs created by the package, as these were created one folder level up (../) from the original image. I could be wrong, though, as this was a while ago. – Doggie52 Jan 7 '16 at 17:43
  • The error and the problem that I have described, unfortunately, does not advance to the stage that you are describing. It is not the newly created PDFs that cannot be found but the .eps image. With the problem I am experiencing there is no PDF yet produced. This is in contrast with the use of 'epstopdf' package which works for me and I can choose where to place the newly created PDFs using 'outdir=./converted_pdfs/. – Martin Bakardjiev Jan 7 '16 at 19:08
0

Ok, obviously epspdf does not come with MikTeX and needs to be installed by all users of epspdfconversion that are using that distribution. I didn't know that (I am the author of epspdfconversion). I am assuming that a command

epspdf --GRAY afile.eps

can be called via write18/shell-escape

It seem that it is not yet clear how Windows/MikTeX-users make sure that this works.

Daniel

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.